:root {
  color-scheme: light;
  --ink: #142134;
  --text: #27384c;
  --muted: #516076;
  --blue: #205d9b;
  --amber: #ffbc32;
  --amber-hover: #eea924;
  --line: #d8e1ed;
  --paper: #fff;
  --background: #f7f9fc;
  --footer: #0d1119;
  --gutter: 16px;
  --measure: 68ch;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font-size: 1rem; line-height: 1.55; }
img { display: block; max-width: 100%; }
h1, h2, p, ul, ol { margin: 0; }
h1, h2 { color: var(--ink); line-height: 1.2; letter-spacing: -.025em; }
h1 { font-size: 1.75rem; font-weight: 760; text-wrap: balance; }
h2 { font-size: 1.375rem; font-weight: 740; }
a { color: var(--blue); text-underline-offset: .15em; }
a:hover { color: #134577; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #1965b2; outline-offset: 3px; }

.shell { width: min(1056px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 2; padding: 10px 16px; background: var(--paper); font-weight: 700; transform: translateY(-120%); }
.skip-link:focus { transform: none; }
.review-bar { padding: 5px var(--gutter); background: #e7eef7; color: #314b6b; font-size: .8125rem; font-weight: 650; text-align: center; }

.area-page { width: min(1120px, calc(100% - 24px)); padding-block: 18px 32px; }
.area-layout { display: grid; gap: 16px; }
.area-main, .area-aside { display: grid; gap: 16px; min-width: 0; align-content: start; }
.area-panel { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.area-intro, .area-aside .area-panel { border-color: #ccdbee; background: #edf4fc; }
.area-intro { background: linear-gradient(165deg, #ebf3fd, #fcfdff); }
.area-intro h1 { max-width: none; margin-block: 5px 8px; text-wrap: pretty; font-size: clamp(1.75rem, 4.5vw, 2.65rem); }
.directory-breadcrumbs { display: flex; flex-wrap: wrap; gap: 5px; align-items: baseline; color: var(--muted); font-size: .875rem; }
.directory-filter-control { margin-top: 17px; }
.directory-filter-control label { display: block; margin-bottom: 5px; font-weight: 700; }
.area-directory-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; max-width: 36rem; }
.area-directory-search-controls input { width: 100%; min-width: 0; min-height: 46px; padding: 8px 10px; border: 1px solid #91a5bf; border-radius: 8px; color: var(--ink); background: var(--paper); }
.area-directory-search-controls input::placeholder { color: var(--muted); }
.area-directory-search-controls button { min-height: 46px; padding: 8px 12px; border: 1px solid #e5a515; border-radius: 8px; background: var(--amber); color: #211806; font-weight: 750; }
.area-directory-search-controls button:hover { background: var(--amber-hover); }
#directory-filter-status { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.area-jump { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; margin-top: 12px; padding: 7px 10px; border: 1px solid #acc2dd; border-radius: 8px; background: #edf4fc; font-weight: 700; text-decoration: none; }
.area-jump:hover { background: #e2edf9; text-decoration: underline; }

.area-panel h2 + p, .area-aside p + p { margin-top: 7px; }
.area-rows { display: grid; gap: 5px 10px; margin-top: 13px; padding: 0; list-style: none; }
.area-row { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 44px; padding: 8px 10px; border: 1px solid #dbe4ef; border-radius: 7px; background: #f7fafd; line-height: 1.35; text-decoration: none; }
.area-row:hover { border-color: #9fbad6; background: #edf4fc; }
.area-row:hover .area-label { text-decoration: underline; }
.area-code { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.area-label { color: var(--text); overflow-wrap: anywhere; }
.area-label small { display: block; color: var(--muted); }
.area-row-arrow { font-weight: 650; }
.area-pagination ul { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin-top: 15px; list-style: none; }
.area-pagination .page-link { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; }
.area-pagination a:hover, .area-pagination [aria-current] .page-link { border-color: #94acc7; background: #edf4fc; color: var(--blue); }
.area-pagination [aria-current] { font-weight: 750; }
.area-pagination [aria-disabled] { color: var(--muted); }

#other-uk-number-ranges { scroll-margin-top: 12px; }
.range-category { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.range-category h3 { margin: 0 0 4px; color: var(--ink); font-size: 1.125rem; }
.range-category .area-rows { margin-top: 9px; }
.range-source { margin-top: 14px; }
.area-aside h2 { font-size: 1.125rem; }

@media (max-width: 360px) {
  .area-directory-search-controls { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 641px) {
  .area-page { width: min(1120px, calc(100% - 32px)); padding-block: 24px 40px; }
  .area-panel { padding: 21px; }
}

@media (min-width: 720px) {
  .area-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  :root { --gutter: 32px; }
  .area-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
  .area-panel h2 { font-size: 1.625rem; }
  .area-aside .area-panel h2 { font-size: 1.125rem; }
}
