:root {
  --ink: #0b1f3a;
  --ink-2: #163a63;
  --sea: #12497a;
  --sea-dark: #0d3a62;
  --sky: #e8f1f8;
  --paper: #ffffff;
  --accent: #d98b1e;
  --accent-light: #f7c97f;
  --accent-tint: #fdf3e3;
  --focus: #9a4f00;
  --ok: #1d7a4f;
  --warn: #b3261e;
  --text: #0b1f3a;
  --muted: #3d4f66;
  --line: #d5e2ee;
  --radius: 12px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s6: 48px;
  --font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Noto Serif", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  overflow-wrap: break-word;
}

@media (min-width: 640px) {
  body { font-size: 18px; }
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 var(--s2);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: var(--s6); }
h3 { font-size: 1.2rem; margin-top: var(--s4); }

@media (min-width: 640px) {
  h1 { font-size: 2.6rem; }
  h2 { font-size: 1.8rem; }
}

p { margin: 0 0 var(--s2); }

ul, ol {
  padding-left: 1.25rem;
  margin: 0 0 var(--s2);
}

li { margin-bottom: 8px; }

a {
  color: var(--sea);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--sea-dark);
  text-decoration-thickness: 2px;
}

a:active { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  z-index: 10;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--ink);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.prose {
  max-width: 70ch;
  margin: 0 auto;
  padding: 0 16px;
}

.prose-page { padding-top: var(--s4); }

.crumbs {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: var(--s2);
}

.lede {
  font-size: 1.1rem;
  max-width: 60ch;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Header */
.site-header {
  background: var(--ink);
  color: var(--paper);
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.header-inner { max-width: 1240px; }

@media (min-width: 1100px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .site-nav ul { justify-content: flex-end; }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  white-space: nowrap;
  flex: none;
}

.logo:hover { color: var(--accent-light); }

.logo-mark {
  width: 44px;
  height: 22px;
  flex: none;
}

.site-header :focus-visible { outline-color: var(--accent-light); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.site-nav li { margin: 0; }

.site-nav a {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 999px;
  color: #dbe7f3;
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--ink-2);
  color: var(--paper);
}

.site-nav a[aria-current="page"] {
  background: var(--accent-light);
  color: var(--ink);
  font-weight: 600;
}

/* Home hero */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s6) 0 56px;
  border-bottom: 5px solid var(--accent);
  background-image: radial-gradient(ellipse at 85% 0%, #1b4b7d 0%, rgba(11,31,58,0) 60%);
}

@media (min-width: 900px) {
  .hero { padding: 72px 0 80px; }
  .hero h1 { font-size: 2.9rem; max-width: 26ch; }
  .hero .lede { font-size: 1.25rem; }
}

.hero h1 { color: var(--paper); }
.hero .lede { color: #e3edf7; }
.hero a { color: var(--accent-light); }
.hero a:hover { color: #ffffff; }
.hero :focus-visible { outline-color: var(--accent-light); }

.kicker {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 12px;
}

.facts {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: var(--s4) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
}

.fact {
  background: var(--ink-2);
  border: 1px solid #24507f;
  border-radius: var(--radius);
  padding: 20px;
  margin: 0;
  border-top: 4px solid var(--accent);
}

.fact .big {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1.1;
  margin-bottom: 8px;
}

.fact p {
  font-size: 0.95rem;
  color: #e3edf7;
  margin-bottom: 12px;
}

.fact a { font-size: 0.9rem; }

/* Callouts */
.callout {
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: var(--s4) 0;
}

.callout h2,
.callout h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.callout-important {
  background: var(--accent-tint);
  border-left: 6px solid var(--accent);
  color: var(--ink);
}

.callout-help {
  background: var(--sky);
  border: 2px solid var(--sea);
  color: var(--ink);
}

.callout-help h2 { color: var(--sea); }

/* Buttons (official source links only) */
.btn {
  display: inline-block;
  background: var(--sea);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  border: 2px solid var(--sea);
  min-height: 44px;
  line-height: 1.3;
}

.btn:hover {
  background: var(--sea-dark);
  border-color: var(--sea-dark);
  color: #ffffff;
}

.btn:active {
  background: var(--ink);
  border-color: var(--ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: var(--s2) 0 var(--s4);
}

.age-badge {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 8px 0 8px;
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  text-align: start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}

thead th {
  background: var(--sky);
  color: var(--ink);
  font-weight: 600;
}

tbody tr:nth-child(even) { background: #f7fafd; }

.caption {
  font-size: 0.9rem;
  color: var(--muted);
  margin: var(--s2) 0 0;
}

/* Page link cards */
.pages {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .pages { grid-template-columns: 1fr 1fr; }
}

.pages a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  font-weight: 600;
}

.pages a span {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.pages a:hover {
  border-color: var(--sea);
  background: var(--sky);
}

/* Sources */
.sources {
  margin-top: var(--s6);
  padding-top: var(--s3);
  border-top: 2px solid var(--line);
  font-size: 0.95rem;
}

.sources h2 {
  font-size: 1.3rem;
  margin-top: 0;
}

.sources ol { padding-left: 1.25rem; }

.sources a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Footer */
.site-footer {
  background: var(--sky);
  border-top: 4px solid var(--accent);
  padding: var(--s4) 0 40px;
  margin-top: 64px;
  font-size: 0.95rem;
  color: var(--ink);
}

.site-footer p { margin-bottom: 12px; }

.updated {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Lists of plain steps */
.steps li { margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.prose-page > h1 {
  padding-bottom: 16px;
  border-bottom: 3px solid var(--accent);
  margin-bottom: var(--s3);
}

.crumbs a { color: var(--sea); }

/* v2 components: operator pages, licence check, more-pages block, CTA (off module) */
.footer-links { font-size: 0.95rem; }

.more-pages {
  margin-top: var(--s6);
  padding-top: var(--s3);
  border-top: 2px solid var(--line);
}

.more-pages h2 {
  font-size: 1.3rem;
  margin-top: 0;
}

.licence-check {
  background: var(--sky);
  border: 2px solid var(--sea);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 20px 24px;
  margin: var(--s4) 0;
}

.licence-check h2 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--sea);
}

.licence-check dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 16px;
  margin: 0 0 var(--s2);
}

.licence-check dt { font-weight: 600; }

.licence-check dd {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  .licence-check dl { grid-template-columns: 240px 1fr; }
  .licence-check dd { margin: 0; }
}

.cta-banner {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--ink);
  padding: 16px 20px;
  margin: var(--s3) 0;
}

.cta-banner p { margin-bottom: 8px; }

.cta-banner .btn {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.cta-banner .btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--ink);
}

/* Register tables: keep the domain on one line on phones */
.table-wrap td:first-child { white-space: nowrap; overflow-wrap: normal; }

@media (max-width: 480px) {
  .table-wrap table { font-size: 0.9rem; }
  .table-wrap th, .table-wrap td { padding: 10px; }
}

/* League tables (2026-11-22): one line per cell, the table scrolls inside .table-wrap on phones */
.table-wrap table.league { font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.table-wrap table.league th, .table-wrap table.league td { white-space: nowrap; overflow-wrap: normal; word-break: normal; padding: 8px 10px; }
.table-wrap table.league caption { white-space: normal; text-align: left; padding: 8px 10px; }
