/* Tokens and type from DESIGN.md ("Official print"): hub petrol on paper, each exam card on its own country field. */
@font-face {
  font-family: 'Figtree Variable';
  src: url('/fonts/figtree-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope Variable';
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --font-display: 'Figtree Variable', sans-serif;
  --font-sans: 'Manrope Variable', sans-serif;
  --ink: oklch(30.39% 0.0383 223.63);
  --muted: oklch(49.68% 0.0272 224.14);
  --paper: oklch(100% 0 0);
  --surface: oklch(95.85% 0.011 225.98);
  --surface-strong: oklch(91.72% 0.0258 221.59);
  --line: oklch(90.68% 0.0105 219.6);
  --brand: oklch(30.39% 0.0383 223.63);
  --field: oklch(30.39% 0.0383 223.63);
  --field-muted: oklch(91.72% 0.0258 221.59);
  --on-field: oklch(100% 0 0);
  --field-action: oklch(89.66% 0.15 93.03);
  --on-field-action: oklch(30.39% 0.0383 223.63);
}
[data-site='uk'] {
  --field: oklch(28.45% 0.1308 262.28);
  --field-muted: oklch(86.7% 0.0363 268.26);
  --field-action: oklch(53.04% 0.2074 22.32);
  --on-field-action: oklch(100% 0 0);
}
[data-site='canada'] {
  --field: oklch(52.84% 0.1931 29.94);
  --field-muted: oklch(93.76% 0.0314 27.41);
  --field-action: oklch(100% 0 0);
  --on-field-action: oklch(23.03% 0.0209 13.71);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: oklch(96.24% 0.0079 216.62);
    --muted: oklch(80.87% 0.0244 227.81);
    --paper: oklch(22.92% 0.0246 229.23);
    --surface: oklch(28.36% 0.0335 228.96);
    --surface-strong: oklch(36.5% 0.0379 222.76);
    --line: oklch(41.92% 0.0354 227.08);
    --brand: oklch(89.07% 0.0197 225.74);
    --field: oklch(36.5% 0.0379 222.76);
    --field-muted: oklch(94.06% 0.0149 218.05);
  }
  [data-site='uk'] {
    --field: oklch(32.9% 0.1331 265.76);
    --field-muted: oklch(89.46% 0.051 271.93);
  }
  [data-site='canada'] {
    --field: oklch(42.35% 0.1527 29.77);
    --field-muted: oklch(90.95% 0.0467 26.2);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--surface-strong) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.75 var(--font-sans);
  text-rendering: optimizeLegibility;
  caret-color: var(--brand);
}
::selection { background: var(--brand); color: var(--paper); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; border-radius: 2px; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
p { color: var(--muted); }
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
}
strong { color: var(--ink); }

.skip {
  position: absolute;
  left: 1.5rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--brand);
  color: var(--paper);
  font-weight: 700;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.75rem; } }
@media (min-width: 80rem) { .wrap { padding: 0 2.5rem; } }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5rem; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}
.wordmark::before {
  content: '';
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: var(--field-action);
}
.top-nav { display: none; gap: 1.75rem; }
.top-nav a { color: var(--ink); font-size: 0.8125rem; font-weight: 700; text-decoration: none; }
.top-nav a:hover, .top-nav a[aria-current='page'] { text-decoration: underline; }
@media (min-width: 48rem) { .top-nav { display: flex; } }

/* Hub */
.hub { padding-top: 3.5rem; padding-bottom: 4rem; }
@media (min-width: 64rem) { .hub { padding-top: 6rem; padding-bottom: 6rem; } }
.hub h1 {
  max-width: 48rem;
  font-size: 2.5rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
}
@media (min-width: 40rem) { .hub h1 { font-size: 3.75rem; } }
.lead { margin: 1.5rem 0 0; max-width: 36rem; font-size: 1.125rem; }

.sites { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .sites { grid-template-columns: 1fr 1fr; } }
.site-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100%;
  min-height: 22rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 1.75rem;
  border-radius: 16px;
  background: var(--field);
  color: var(--on-field);
}
@media (min-width: 40rem) { .site-card { padding: 2.25rem; } }
.contours {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40%);
  mask-image: linear-gradient(to right, transparent, #000 40%);
}
.site-card h2 {
  color: var(--on-field);
  font-size: 1.875rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
@media (min-width: 40rem) { .site-card h2 { font-size: 2.25rem; } }
.site-card p { margin: 1rem 0 0; color: var(--field-muted); max-width: 26rem; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.facts { font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stores { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}
.store-soon { color: var(--on-field); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--on-field) 40%, transparent); }
a.store { background: var(--field-action); color: var(--on-field-action); }
.store svg { width: 1.125rem; height: 1.125rem; flex: none; }

/* Independence strip */
.independence { background: var(--surface); border-block: 1px solid var(--line); }
.independence .wrap { display: flex; gap: 0.875rem; align-items: flex-start; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.independence svg { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.25rem; color: var(--ink); }
.independence p { margin: 0; font-size: 0.875rem; max-width: 70ch; }

/* Policies list */
.docs { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 64rem) { .docs { padding-top: 6rem; padding-bottom: 6rem; display: grid; grid-template-columns: 5fr 7fr; gap: 3rem; } }
.docs h2 { font-size: 2.25rem; line-height: 1.08; letter-spacing: -0.035em; }
@media (min-width: 64rem) { .docs h2 { font-size: 3rem; } }
.docs > div > p { margin: 1rem 0 0; max-width: 28rem; }
.doc-list { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
@media (min-width: 64rem) { .doc-list { margin: 0; } }
.doc-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  align-items: center;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.doc-list strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.doc-list span { grid-column: 1; color: var(--muted); font-size: 0.875rem; }
.doc-list svg { grid-row: 1 / span 2; grid-column: 2; width: 1.25rem; height: 1.25rem; transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
.doc-list a:hover strong { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.doc-list a:hover svg { transform: translateX(4px); }

/* Document pages */
.doc { padding-top: 3rem; padding-bottom: 5rem; }
@media (min-width: 64rem) { .doc { padding-top: 5rem; } }
.doc h1 { font-size: 2.5rem; font-weight: 650; line-height: 1.05; letter-spacing: -0.04em; }
@media (min-width: 40rem) { .doc h1 { font-size: 3rem; } }
.doc .meta { margin: 1rem 0 0; font-size: 0.875rem; }
.prose { max-width: 70ch; margin-top: 2.5rem; }
.prose h2 { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.025em; margin: 3rem 0 0.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.375rem; }
.prose li::marker { color: var(--ink); }
.table { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
th, td { padding: 0.75rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface); color: var(--ink); font-weight: 700; }
td { color: var(--muted); }
td:first-child { color: var(--ink); font-weight: 600; }
.notice {
  margin: 0 0 2.5rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: var(--surface);
  font-size: 0.9375rem;
}

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 3rem 0; }
.site-footer .wrap { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer ul a { color: var(--ink); font-size: 0.8125rem; font-weight: 700; text-decoration: none; }
.site-footer ul a:hover, .site-footer ul a[aria-current='page'] { text-decoration: underline; }
.site-footer p { margin: 0; font-size: 0.8125rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Card footer note before the store links exist; links use .store on the field action. */
.soon { font-size: 0.875rem; color: var(--field-muted); }

/* Document navigation beside the text from lg; hidden below (the footer carries the same links). */
.doc-nav { display: none; }
@media (min-width: 64rem) {
  .doc { display: grid; grid-template-columns: minmax(0, 70ch) 1fr; column-gap: 4rem; align-items: start; }
  .doc > h1, .doc > .meta, .doc > .prose { grid-column: 1; }
  .doc-nav { display: block; grid-column: 2; grid-row: 1 / span 3; justify-self: end; position: sticky; top: 2rem; width: 16rem; }
  .doc-nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .doc-nav a { display: block; padding: 0.5rem 0 0.5rem 1.25rem; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
  .doc-nav a:hover { color: var(--ink); }
  .doc-nav a[aria-current='page'] { color: var(--ink); border-left-color: var(--ink); }
}
