/* Print&Scan - shared styles. Tokens from brand/tokens.md. */

:root {
  --navy: #0B1524;
  --green: #4BB97A;
  --blue: #2FB4E8;
  --paper: #F6F3EC;          /* warm off-white page background */
  --rule: rgb(11 21 36 / 0.22);
  --rule-strong: #0B1524;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* modular scale, ratio about 1.25 */
  --text: 1.0625rem;         /* 17px */
  --text-sm: 0.875rem;
  --text-xs: 0.78rem;
  --h3: 1.25rem;
  --h2: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
  --h1: clamp(2.25rem, 1.2rem + 4.6vw, 4.25rem);

  --measure: 62ch;
  --gutter: 1rem;
  --page: 72rem;
  --space-section: clamp(3.5rem, 2rem + 6vw, 7rem);
}

@media (min-width: 64rem) {
  :root { --text: 1.125rem; --h3: 1.375rem; }  /* 18px body on desktop */
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font: 400 var(--text)/1.65 var(--font);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--navy); }

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

.container { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }

.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  background: var(--navy); color: var(--paper); padding: 0.6rem 1rem;
}
.skip-link:focus { top: var(--gutter); }

/* Headings: scale, weight and spacing carry the tone */
h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: var(--h1); letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); line-height: 1.3; letter-spacing: -0.01em; }
h1, h2, h3 { text-wrap: balance; }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }

.kicker {
  display: block; margin-bottom: 1.1rem;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.kicker::before {
  content: ""; display: block; width: 2.75rem; height: 3px; background: var(--green); margin-bottom: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0.55rem 1.5rem;
  font: 600 var(--text-sm)/1.3 var(--font); letter-spacing: 0.02em; text-decoration: none; text-align: center;
  border: 2px solid var(--navy); color: var(--navy); background: transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--navy); color: var(--paper); }
.btn-primary { background: var(--green); border-color: var(--green); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: var(--navy); }
/* press state: every custom button answers a click */
.btn:active, .btn-primary:active { background: var(--navy); border-color: var(--navy); color: var(--paper); }

/* Standalone text links keep a 44px hit region */
.link-arrow { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 500; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5rem; flex-wrap: wrap; }
.logo { display: block; line-height: 0; padding-block: 0.9rem; }
.logo img { display: block; width: 11.5rem; height: auto; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2rem; }
.site-nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 500; font-size: 0.95rem;
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 0.4em;
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { text-decoration-color: var(--green); }
.site-nav .btn { padding-inline: 1.2rem; }

.menu-toggle {
  display: none; align-items: center; gap: 0.6rem;
  font: 600 var(--text-sm)/1 var(--font); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--navy); background: transparent; border: 2px solid var(--navy); min-height: 2.75rem; padding: 0 0.9rem; cursor: pointer;
}
.menu-toggle:active { background: var(--navy); color: var(--paper); }
.menu-toggle:not([hidden]) { display: inline-flex; }
.menu-toggle svg { width: 1.1rem; height: 1.1rem; }

@media (min-width: 48rem) {
  .menu-toggle:not([hidden]) { display: none; }
}
@media (max-width: 47.99rem) {
  .site-nav { flex-basis: 100%; }
  .site-nav.is-collapsible:not(.is-open) { display: none; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 1.25rem; }
  .site-nav li { border-top: 1px solid var(--rule); }
  .site-nav a:not(.btn) { display: flex; min-height: 3.25rem; }
  .site-nav li:last-child { padding-top: 1rem; }
}

/* Sections */
.section { padding-block: var(--space-section); border-top: 1px solid var(--rule); }
.section-head { margin-bottom: clamp(2rem, 1rem + 4vw, 4rem); }
.section-head h2 { max-width: 22ch; }
.section-head p { margin-top: 1.25rem; }

/* Hero */
.hero { padding-block: clamp(3.5rem, 2rem + 8vw, 8rem) clamp(3rem, 2rem + 5vw, 6rem); }
.hero h1 { max-width: 17ch; }
.hero .lede { font-size: calc(var(--text) * 1.15); max-width: 44ch; margin-top: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.25rem; }

.facts { display: grid; gap: 0; margin: clamp(3rem, 2rem + 5vw, 5.5rem) 0 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.facts div { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.facts dd { margin: 0.2rem 0 0; font-size: calc(var(--text) * 1.2); font-weight: 500; }
@media (min-width: 48rem) {
  .facts { grid-template-columns: repeat(3, 1fr); column-gap: 2.5rem; }
  .facts div { border-bottom: 0; padding-block: 1.25rem 0; }
}

/* Pillars and deliverables: ruled columns, no cards */
.columns { display: grid; gap: 2.5rem; }
.column { border-top: 3px solid var(--navy); padding-top: 1.25rem; }
.column .label { display: block; margin-bottom: 0.75rem; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.column h3 { margin-bottom: 1rem; }
.column p:last-child { margin-bottom: 0; }
@media (min-width: 56rem) {
  .columns { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}

.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { position: relative; padding: 0.55rem 0 0.55rem 1.4rem; border-top: 1px solid var(--rule); }
.dash-list li::before { content: ""; position: absolute; left: 0; top: 1.3em; width: 0.8rem; height: 2px; background: var(--green); }
.dash-list li:last-child { border-bottom: 1px solid var(--rule); }

/* Figure */
.figure-split { display: grid; gap: 2.5rem; align-items: center; }
.figure-split figure { margin: 0; }
.figure-split figcaption { margin-top: 0.9rem; font-size: var(--text-sm); }
.figure-split svg { display: block; width: 100%; }
@media (min-width: 56rem) {
  .figure-split { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

/* How it works: numbered list with actor tags */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 56rem; }
.step { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: 0 0.75rem; padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before {
  content: counter(step); grid-row: 1 / span 2;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); font-weight: 300; line-height: 1; letter-spacing: -0.04em;
}
.step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.6rem; }
.step-head h3 { margin: 0; }
.step p { margin: 0; }
.tag {
  display: inline-block; padding: 0.15rem 0.55rem; border: 1px solid var(--navy);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.5;
}
/* Print&Scan steps carry a green marker; the button stays the only filled accent */
.tag-ps::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.45rem; background: var(--green); }
@media (min-width: 48rem) {
  .step { grid-template-columns: 5.5rem 1fr; gap: 0 1.5rem; padding: 2.25rem 0; }
}

.notes { display: grid; gap: 0; margin: clamp(2.5rem, 1.5rem + 3vw, 4rem) 0 0; max-width: 56rem; }
.notes h3 { font-size: var(--text); letter-spacing: 0; margin-bottom: 0.5rem; }
.notes ul { margin: 0; }
@media (min-width: 48rem) {
  .notes { grid-template-columns: 1fr 2fr; gap: 2rem; }
}

/* Closing call to action */
.cta h2 { max-width: 20ch; }
.cta .hero-actions { margin-top: 2rem; }

/* Footer */
.site-footer { background: var(--navy); color: var(--paper); padding-block: 3.5rem 2.5rem; }
.site-footer :focus-visible { outline-color: var(--paper); }
.footer-grid { display: grid; gap: 2rem; }
.footer-logo { display: block; width: 11.5rem; line-height: 0; }
.footer-logo img { width: 100%; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.site-footer a:not(.footer-logo) { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: var(--text-sm); font-weight: 500; text-underline-offset: 0.25em; }
.footer-meta { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(246 243 236 / 0.3); font-size: var(--text-sm); }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2rem; }
.footer-meta p { margin: 0; max-width: none; }
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: 1fr auto; align-items: end; }
}

/* System accessibility settings */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
@media (prefers-contrast: more) {
  :root { --rule: #0B1524; }
}
.footer-mail { margin: 0.75rem 0 0; }

/* Exam request page */
.page-head { padding-block: clamp(3rem, 2rem + 6vw, 6rem) clamp(2rem, 1.5rem + 3vw, 4rem); }
.page-head h1 { max-width: 22ch; }

.bilingual { display: grid; gap: 2rem; }
.bilingual > * { min-width: 0; }
@media (min-width: 48rem) {
  .bilingual { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
.bilingual h2 { font-size: var(--h3); letter-spacing: -0.01em; margin-bottom: 1rem; }
.bilingual p:last-child, .bilingual ul { margin-bottom: 0; }

.notice { padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem); border-block: 3px solid var(--navy); }
.notice-rules { list-style: none; margin: 0; padding: 0; }
.notice-rules li { padding: 0.9rem 0; border-top: 1px solid var(--rule); }
.notice-rules li:first-child { border-top: 0; padding-top: 0; }
.notice-rules strong { display: block; font-size: var(--h3); font-weight: 600; line-height: 1.3; }

.form-section { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) var(--space-section); }
.form-embed { margin-top: 2rem; }  /* no overflow rules: the embed is 1900px tall */
.form-reminder { margin: 2rem 0 0; font-weight: 500; max-width: none; }

/* Text-heavy pages: label column and reading column */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.toc { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.toc a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 500; }

.split { display: grid; gap: 2rem; }
.split-head h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); max-width: 14ch; }
.split-body { max-width: 46rem; }
.split-body > :last-child { margin-bottom: 0; }
.split-body h3 { margin: 2.5rem 0 0.75rem; }
.split-body h3:first-child { margin-top: 0; }
@media (min-width: 64rem) {
  .split { grid-template-columns: 17rem 1fr; gap: 4rem; }
}

/* Definition lists: term, plain-language meaning */
.defs { margin: 0 0 1.5rem; padding: 0; }
.defs > div { padding: 1rem 0; border-top: 1px solid var(--rule); }
.defs > div:last-child { border-bottom: 1px solid var(--rule); }
.defs dt { font-weight: 600; }
.defs dd { margin: 0.25rem 0 0; max-width: var(--measure); }

/* Requirements table */
.req-table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; }
.req-table caption { text-align: left; }
.req-table th, .req-table td { padding: 1rem 1rem 1rem 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.req-table tr:last-child th, .req-table tr:last-child td { border-bottom: 1px solid var(--rule); }
.req-table thead th { border-top: 3px solid var(--navy); font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; }
.req-table tbody th { font-weight: 600; width: 38%; }

/* Deadlines */
.deadline { display: grid; border-block: 3px solid var(--navy); margin: 0 0 1.5rem; }
.deadline div { padding: 1.25rem 0; }
.deadline div + div { border-top: 1px solid var(--rule); }
.deadline .label { display: block; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.deadline .figure { display: block; margin-top: 0.25rem; font-size: var(--h2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
@media (min-width: 40rem) {
  .deadline { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .deadline div + div { border-top: 0; }
}
.defs-title { margin: 2.25rem 0 0.75rem; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }

/* Comparison table: columns on wide screens, stacked rows on narrow ones */
.compare { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.compare caption { text-align: left; margin-bottom: 1rem; }
.compare th, .compare td { padding: 1rem 1rem 1rem 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 1px solid var(--rule); }
.compare thead th { border-top: 3px solid var(--navy); font-size: var(--text-sm); font-weight: 600; }
.compare thead th.is-ps { border-top-color: var(--green); }
.compare tbody th { font-weight: 600; width: 28%; }
.compare td.is-ps { font-weight: 600; }
@media (max-width: 47.99rem) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tbody tr { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
  .compare tbody tr:last-child { border-bottom: 1px solid var(--rule); }
  .compare th, .compare td { padding: 0; border: 0 !important; }
  .compare tbody th { width: auto; margin-bottom: 0.5rem; }
  .compare td { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.3rem; }
  .compare td::before { content: attr(data-label); font-weight: 400; }
}

/* Contact */
.mail-link { display: inline-block; margin: 0.5rem 0 1.5rem; font-size: clamp(1.25rem, 0.5rem + 4.6vw, 2.6rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
