/* NZ Citizenship Prep — "Harbour" look shared with the app: paper background,
   near-black ink and buttons, silver accents, green/red only for right/wrong. */
@font-face { font-family: "Young Serif"; src: url(/fonts/youngserif.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(/fonts/jakarta.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #F5F4F0; --panel: #FFFFFF; --panel2: #ECEBE6; --ink: #151515; --ink2: #575A5F; --ink3: #84888E;
  --line: #DEDCD5; --silver: #C9CCD1; --btn: #151515; --btn-ink: #F5F4F0;
  --ok: #1E7A46; --ok-bg: #E3F2E8; --bad: #B3261E; --bad-bg: #F9E3E1; --gold: #C79A2B;
  --radius: 16px; --wrap: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E10; --panel: #18181B; --panel2: #202024; --ink: #F1F0EC; --ink2: #B4B6BA; --ink3: #8A8D93;
    --line: #2C2C31; --silver: #6B6F76; --btn: #F1F0EC; --btn-ink: #121214;
    --ok: #5CC98A; --ok-bg: #12301F; --bad: #FF8A80; --bad-bg: #3A1614;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 Jakarta, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--silver); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { font-family: "Young Serif", Georgia, serif; font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.2vw, 56px); }
h2 { font-size: clamp(26px, 3.2vw, 34px); margin-top: 1.6em; }
h3 { font-size: 21px; margin-top: 1.4em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 740px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--btn); color: var(--btn-ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span small { display: block; font-weight: 500; font-size: 12px; color: var(--ink3); margin-top: -4px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink2); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--panel2); }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 650; font-size: 15px; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-list { display: grid; }
.menu-list { display: none; position: absolute; right: 16px; top: 60px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px; min-width: 220px; box-shadow: 0 12px 40px rgb(0 0 0 / .14); }
.menu-list a { padding: 10px 12px; text-decoration: none; border-radius: 9px; font-weight: 600; }
.menu-list a:hover { background: var(--panel2); }
@media (max-width: 900px) { .nav { display: none; } .menu { display: block; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; border: 1.5px solid var(--btn); cursor: pointer; transition: transform .12s ease, opacity .12s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--silver); }
.btn.small { padding: 9px 16px; font-size: 15px; }
.btn[disabled] { opacity: .4; cursor: default; transform: none; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Hero */
.hero { padding: 64px 0 40px; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); margin-bottom: 14px; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink2); max-width: 640px; }
.glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 40px 0 0; }
.glance div { background: var(--panel); padding: 20px 22px; }
.glance b { display: block; font-family: "Young Serif", Georgia, serif; font-weight: 400; font-size: 34px; line-height: 1.1; }
.glance span { color: var(--ink2); font-size: 15px; }
@media (max-width: 760px) { .glance { grid-template-columns: repeat(2, 1fr); } }

/* Sections and cards */
section { padding: 28px 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
a.card { display: block; text-decoration: none; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--ink3); transform: translateY(-2px); }
.card h3 { margin-top: 0; font-size: 20px; }
.card p { color: var(--ink2); font-size: 15.5px; margin-bottom: .6em; }
.card .meta { font-size: 13.5px; font-weight: 650; color: var(--ink3); }
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); font-weight: 750; font-size: 14px; margin-bottom: 12px; }
.dark { background: #151515; color: #F5F4F0; border-radius: 22px; padding: 36px; }
.dark p, .dark li { color: #C9CCD1; }
.dark .btn { background: #F5F4F0; color: #151515; border-color: #F5F4F0; }
.dark .btn.ghost { background: transparent; color: #F5F4F0; border-color: #6B6F76; }
@media (prefers-color-scheme: dark) { .dark { background: var(--panel2); border: 1px solid var(--line); } }
.note { background: var(--panel2); border-radius: 12px; padding: 14px 18px; font-size: 15.5px; color: var(--ink2); }
.note b { color: var(--ink); }
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { padding-left: 30px; position: relative; margin: 8px 0; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 12px; height: 7px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg); }
.crosses li::before { content: "–"; border: 0; transform: none; top: 0; left: 6px; width: auto; height: auto; font-weight: 800; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink3); }
.timeline li.done::before { background: var(--ink); border-color: var(--ink); }
.timeline b { display: block; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink3); }

/* Article / lessons */
.crumbs { font-size: 14px; color: var(--ink3); margin: 26px 0 14px; }
.crumbs a { color: var(--ink2); }
article.lesson { padding-bottom: 20px; }
article.lesson p { font-size: 18px; }
.keypoints { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 26px 0; }
.keypoints h2 { font-size: 22px; margin-top: 0; }
.sources { font-size: 15px; color: var(--ink2); }
.sources li { margin: 4px 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0; flex-wrap: wrap; }
.pager a { flex: 1 1 240px; text-decoration: none; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; background: var(--panel); }
.pager a small { display: block; color: var(--ink3); font-weight: 650; }
.pager a.next { text-align: right; }
.lesson-list { list-style: none; padding: 0; margin: 0; counter-reset: l; }
.lesson-list li { counter-increment: l; border-top: 1px solid var(--line); }
.lesson-list a { display: flex; gap: 16px; padding: 16px 4px; text-decoration: none; align-items: baseline; }
.lesson-list a::before { content: counter(l, decimal-leading-zero); font-weight: 750; color: var(--ink3); font-size: 14px; }
.lesson-list a:hover b { text-decoration: underline; }
.lesson-list .done-tag { margin-left: auto; font-size: 13px; color: var(--ok); font-weight: 700; }

/* FAQ */
details.faq { border-top: 1px solid var(--line); padding: 4px 0; }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--ink3); }
details.faq[open] summary::after { content: "–"; }
details.faq div { padding: 0 0 14px; color: var(--ink2); }

/* Quiz */
.quiz { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px; margin: 22px 0; }
.quiz .bar { height: 6px; background: var(--panel2); border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
.quiz .bar i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .25s; }
.quiz .qmeta { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink3); font-weight: 650; margin-bottom: 8px; }
.quiz .prompt { font-family: "Young Serif", Georgia, serif; font-size: clamp(21px, 2.6vw, 26px); line-height: 1.3; margin: 0 0 18px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; font: inherit; font-size: 17px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover:not([disabled]) { border-color: var(--ink3); }
.opt .key { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--silver); font-weight: 750; font-size: 14px; }
.opt.sel { border-color: var(--ink); background: var(--panel2); }
.opt.sel .key { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.right .key { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .key { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt[disabled] { cursor: default; }
.explain { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--panel2); font-size: 16px; color: var(--ink2); }
.explain b { color: var(--ink); }
.explain a { font-size: 14px; }
.quiz .actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.result { text-align: center; padding: 10px 0 6px; }
.result .score { font-family: "Young Serif", Georgia, serif; font-size: 64px; line-height: 1; }
.result .verdict { display: inline-block; margin: 12px 0; padding: 6px 14px; border-radius: 999px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; }
.verdict.pass { background: var(--ok-bg); color: var(--ok); }
.verdict.fail { background: var(--bad-bg); color: var(--bad); }
.review { margin-top: 26px; text-align: left; }
.review .item { border-top: 1px solid var(--line); padding: 16px 0; }
.review .item p { margin: 0 0 6px; }
.review .tag { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.review .tag.ok { color: var(--ok); } .review .tag.no { color: var(--bad); }
.dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.dots button { width: 32px; height: 32px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.dots button.ans { background: var(--panel2); border-color: var(--silver); color: var(--ink); }
.dots button.cur { border-color: var(--ink); color: var(--ink); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat b { display: block; font-family: "Young Serif", Georgia, serif; font-weight: 400; font-size: 30px; }
.stat span { font-size: 14px; color: var(--ink2); }
.meter { height: 8px; background: var(--panel2); border-radius: 8px; overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--ink); }

/* Apps */
.store { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 12px; background: #000; color: #fff; text-decoration: none; border: 1px solid #3a3a3a; min-width: 180px; }
.store svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.store span { font-size: 11px; line-height: 1.2; }
.store span b { display: block; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.appbox { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.appbox img { width: 112px; height: 112px; border-radius: 26px; }
@media (max-width: 620px) { .appbox { grid-template-columns: 1fr; } }

/* Footer */
footer.site { margin-top: 60px; border-top: 1px solid var(--line); padding: 40px 0 50px; font-size: 15px; color: var(--ink2); }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; }
footer.site h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 6px 0; }
footer.site a { text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .disc { margin-top: 30px; font-size: 13.5px; color: var(--ink3); }
@media (max-width: 760px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
.nav a.btn, .nav a.btn:hover { background: var(--btn); color: var(--btn-ink); }
