:root {
  --navy: #12233d;
  --navy-2: #1c3357;
  --red: #e63946;
  --red-dark: #c92a37;
  --ink: #1a2230;
  --muted: #5b6676;
  --line: #e2e6ec;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --ok: #1f8a4c;
  --ok-bg: #e8f6ee;
  --bad: #c62f3b;
  --bad-bg: #fdecee;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(18, 35, 61, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
section { padding: 64px 0; }
.soft { background: var(--bg-soft); }
.center { text-align: center; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 680px; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 10px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary[disabled], .btn-primary[aria-disabled="true"] { background: #e9a1a7; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-white:hover { border-color: #fff; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--red); }
.nav .btn { min-height: 40px; padding: 8px 16px; font-size: .9rem; color: #fff; }
.menu-btn { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--navy); min-width: 44px; min-height: 44px; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; border-bottom: 0; }
}

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(230,57,70,.35), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 820px; }
.hero p { color: #d3dbe7; font-size: 1.15rem; max-width: 680px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: #d3dbe7; font-size: .95rem; }
.ticks li::before { content: "✓ "; color: #7fd6a0; font-weight: 800; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.hero .eyebrow { color: #ffb3b9; }

/* Cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.test-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.test-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(18,35,61,.13); }
.test-card .tc-icon { font-size: 2rem; margin-bottom: 10px; }
.test-card h3 { margin-bottom: 6px; }
.test-card p { color: var(--muted); margin: 0 0 16px; flex: 1; }
.test-card .tc-foot { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.test-card .tc-price { color: var(--navy); }
.test-card .tc-go { color: var(--red); }
.steps { counter-reset: step; }
.step { position: relative; padding-top: 52px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 24px; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: grid; place-items: center; transform: translateY(16px); }
.step { padding: 72px 24px 24px; }
.price-box { max-width: 520px; margin: 0 auto; text-align: center; }
.price-big { font-size: 2.6rem; font-weight: 800; color: var(--navy); margin: 6px 0; }
.price-box ul { text-align: left; list-style: none; padding: 0; margin: 18px 0; }
.price-box li { padding: 7px 0 7px 28px; position: relative; }
.price-box li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.compare { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: .95rem; }
.compare th, .compare td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.compare th { background: var(--bg-soft); }
.table-scroll { overflow-x: auto; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; padding-right: 30px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 1.4rem; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* Category page */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0 0; }
.fact { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 12px 14px; }
.fact strong { display: block; font-size: 1.35rem; color: #fff; }
.fact span { font-size: .85rem; color: #c3cddb; }
.content h2 { margin-top: 1.4em; }
.content ul, .content ol { padding-left: 1.2em; }
.content li { margin: 4px 0; }
.content table { width: 100%; border-collapse: collapse; margin: 14px 0; display: block; overflow-x: auto; }
.content th, .content td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.content th { background: var(--bg-soft); }
.callout { border-left: 4px solid var(--red); background: var(--bg-soft); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 18px 0; }
.buy-box { border: 2px solid var(--navy); }
.buy-box .price-big { margin: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 16px 0; text-align: left; }
.consent input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; accent-color: var(--red); }
.consent-msg { color: var(--bad); font-size: .85rem; min-height: 1.2em; margin: 6px 0 0; }
.pay-methods { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.sources { font-size: .85rem; color: var(--muted); }

/* Test engine */
.test-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-height: 260px; scroll-margin-top: 80px; }
.te-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .9rem; color: var(--muted); }
.te-section { background: var(--bg-soft); border-radius: 20px; padding: 3px 12px; font-weight: 600; color: var(--navy); }
.te-timer { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy); background: var(--bg-soft); padding: 4px 12px; border-radius: 8px; }
.te-timer-low { color: #fff; background: var(--red); }
.te-bar { height: 6px; background: var(--bg-soft); border-radius: 6px; margin: 12px 0 20px; overflow: hidden; }
.te-bar span { display: block; height: 100%; background: var(--red); transition: width .2s; }
.te-q { font-size: 1.15rem; font-weight: 600; margin: 0 0 18px; }
.te-opts { display: grid; gap: 10px; }
.te-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px; font: inherit; color: inherit; cursor: pointer; min-height: 52px; }
.te-opt:hover:not([disabled]) { border-color: var(--navy-2); }
.te-letter { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.te-chosen { border-color: var(--navy); background: #f0f4fa; }
.te-chosen .te-letter { background: var(--navy); color: #fff; }
.te-right { border-color: var(--ok); background: var(--ok-bg); }
.te-right .te-letter { background: var(--ok); color: #fff; }
.te-wrong { border-color: var(--bad); background: var(--bad-bg); }
.te-wrong .te-letter { background: var(--bad); color: #fff; }
.te-opt[disabled] { cursor: default; }
.te-feedback { margin-top: 16px; padding: 14px 16px; border-radius: 10px; }
.te-feedback.ok { background: var(--ok-bg); }
.te-feedback.bad { background: var(--bad-bg); }
.te-feedback p { margin: 6px 0 0; }
.te-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.te-result { text-align: center; }
.te-score-label { color: var(--muted); margin: 0; }
.te-score { font-size: 2.4rem; font-weight: 800; color: var(--navy); margin: 0 0 8px; }
.te-score span { font-size: 1.2rem; color: var(--muted); }
.te-timeup { background: var(--bad-bg); padding: 10px; border-radius: 8px; }
.te-note { color: var(--muted); }
.te-sections { list-style: none; padding: 0; text-align: left; max-width: 520px; margin: 0 auto; }
.te-sections li { display: grid; grid-template-columns: 1fr 120px 52px; gap: 10px; align-items: center; padding: 6px 0; font-size: .92rem; }
.te-sbar { height: 8px; background: var(--bg-soft); border-radius: 8px; overflow: hidden; }
.te-sbar span { display: block; height: 100%; background: var(--ok); }
.te-review { text-align: left; margin-top: 22px; }
.te-review summary { cursor: pointer; font-weight: 700; }
.te-review li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.te-review li.bad .te-rq::before { content: "✗ "; color: var(--bad); }
.te-review li.ok .te-rq::before { content: "✓ "; color: var(--ok); }
.te-rq { font-weight: 600; }
.te-exp { color: var(--muted); }
.te-result .te-nav { justify-content: center; }
.te-upsell { margin: 22px auto 0; max-width: 520px; }
.mode-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.mode-pick button { text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 14px; font: inherit; cursor: pointer; }
.mode-pick button strong { display: block; color: var(--navy); }
.mode-pick button span { font-size: .88rem; color: var(--muted); }
.mode-pick button:hover { border-color: var(--red); }
.section-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.section-pick button { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 20px; padding: 8px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.site-footer { background: var(--navy); color: #c3cddb; padding: 48px 0 28px; font-size: .92rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.footer-cols h4 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { padding: 4px 0; }
.disclaimer { border-top: 1px solid rgba(255,255,255,.15); margin-top: 28px; padding-top: 18px; font-size: .82rem; line-height: 1.6; }
.linklike { background: none; border: 0; padding: 0; color: #fff; font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* Cookie banner */
#cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 100; max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.2); padding: 18px 20px; font-size: .92rem; }
#cookie-banner p { margin: 0 0 12px; }
.cb-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cb-btn { background: var(--navy); color: #fff; border-color: var(--navy); }
.cb-btn:hover { background: var(--navy-2); }

/* Legal pages */
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal ol, .legal ul { padding-left: 1.3em; }
.review-flag { background: #fff6d6; border: 1px solid #f0d77a; padding: 12px 16px; border-radius: 10px; font-size: .9rem; }

@media (max-width: 560px) {
  section { padding: 44px 0; }
  .hero { padding: 48px 0 44px; }
  .test-wrap { padding: 18px 14px; }
  .te-sections li { grid-template-columns: 1fr 70px 44px; }
  .hero-ctas .btn { width: 100%; }
}

/* NZ best-practice layout pieces: flow line, breadcrumbs, topic box, worked examples */
.hero-flow { font-size: .92rem; color: #c3cddb; margin: 0 0 4px; }
.crumbs { font-size: .88rem; color: var(--muted); padding: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--navy-2); }
.topic-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0 0; }
.topic-box ul { margin: 8px 0 0; padding-left: 1.2em; }
.topic-box li { margin: 4px 0; }
.worked { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.worked .tag { display: inline-block; font-size: .78rem; font-weight: 700; background: var(--bg-soft); color: var(--navy); border-radius: 20px; padding: 2px 10px; margin-bottom: 6px; }
.worked ol { margin: 8px 0; }
.worked .ans { background: var(--ok-bg); border-radius: 8px; padding: 10px 12px; font-size: .95rem; }

/* Homepage hero photo band (same dimensions/behaviour as the NZ TestReady site):
   62vh, 384-672px tall (46vh / min 288px on phones; +20% per owner 2026-10-06), crop centred low enough to show people to the waist, short fade only at the very bottom (owner request 2026-10-06). */
.hero-photo { height: 62vh; min-height: 384px; max-height: 672px; position: relative; overflow: hidden; background: var(--navy); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 88%, var(--navy) 100%); pointer-events: none; }
.hero-under-photo { background: var(--navy); padding-top: 32px; }
.hero-under-photo::after { display: none; }
@media (max-width: 700px) { .hero-photo { height: 46vh; min-height: 288px; } }
