/* ============================================================================
   securitypolicy.com.au  ·  shared stylesheet
   Bound to the active "Neutral Modern" design system.
   House rule: no em dash or en dash characters anywhere, including comments.
   Use commas, full stops, or the word "to".
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- tokens (Neutral Modern, verbatim values) ------------------------------
   The only place raw hex is allowed. Everything else references var(--*).
   Two domain accents live here so the AU and NZ paths read differently:
   cobalt is the primary (AU + global chrome), teal is the sanctioned
   secondary/domain accent for the New Zealand path. Components only ever
   reference var(--accent); the NZ scope rebinds it, so one accent per screen
   still holds. */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f5f7;      /* sunken panels, derived from the neutral ramp */
  --fg: #111111;
  --fg-2: #33373d;
  --muted: #6b6b6b;
  --border: #e5e5e5;
  --border-strong: #d6d8dc;

  --accent-au: #2f6feb;      /* cobalt, primary + Australia path, white text passes AA at 4.57:1 */
  --accent-nz: #0c7d6c;      /* deep teal, NZ accent, darkened so white text and teal-on-paper pass AA */
  --accent: var(--accent-au);
  --accent-on: #ffffff;
  --accent-hover: color-mix(in oklab, var(--accent), black 10%);
  --accent-soft: color-mix(in oklab, var(--accent), transparent 88%);
  --accent-line: color-mix(in oklab, var(--accent), transparent 72%);

  --success: #1b7a3a;        /* darkened so small status text passes AA on paper */
  --warn: #8a5d09;           /* darkened so small warn labels pass AA on paper */
  --danger: #c62222;

  --font-display: 'Inter', -apple-system, system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-h1: clamp(38px, 5vw, 60px);
  --fs-h2: clamp(28px, 3.4vw, 40px);
  --fs-h3: 20px;
  --fs-lead: 19px;
  --fs-body: 16px;
  --fs-meta: 13px;

  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;
  --gap-xl: 56px;
  --gap-2xl: 96px;
  --container: 1160px;
  --gutter: 24px;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --focus: 0 0 0 3px color-mix(in oklab, var(--accent), transparent 68%);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* the New Zealand scope: rebind the single accent, everything reflows teal */
.theme-nz { --accent: var(--accent-nz); }

/* ---- reset and base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }

/* ---- layout primitives ----------------------------------------------------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(40px, 7vw, 80px); }
.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--gap-md); }
.row { display: flex; align-items: center; gap: var(--gap-md); }
.row-wrap { display: flex; align-items: center; gap: var(--gap-sm); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-md); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }
.grid-2-1 { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--gap-xl); align-items: start; }
.grid-side { display: grid; grid-template-columns: 240px 1fr; gap: var(--gap-xl); align-items: start; }
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4, .grid-2-1, .grid-side { grid-template-columns: 1fr; }
  .grid-side { gap: var(--gap-lg); }
}
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---- type ------------------------------------------------------------------ */
h1, .h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 700; line-height: 1.06; letter-spacing: -0.02em; margin: 0; }
h2, .h2 { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
h3, .h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; margin: 0; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--muted); max-width: 60ch; margin: 0; }
.eyebrow {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 16px;
}
.meta { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted); letter-spacing: 0.02em; }
.mono { font-family: var(--font-mono); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.center { text-align: center; }
.maxw-36 { max-width: 36ch; }
.maxw-48 { max-width: 48ch; }

/* ---- chrome: nav ----------------------------------------------------------- */
.topnav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--bg), transparent 12%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 12px; gap: var(--gap-md); }
.brand-lock { display: inline-flex; align-items: center; gap: 10px; }
.brand-lock .mark { width: 30px; height: 30px; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: var(--fg); }
.brand-word .tld { color: var(--muted); font-weight: 500; }
.topnav .links { display: flex; gap: 26px; align-items: center; }
.topnav .links a { font-size: 14.5px; color: var(--muted); font-weight: 500; transition: color var(--ease) 150ms; }
.topnav .links a:hover, .topnav .links a[aria-current="page"] { color: var(--fg); }
.nav-tail { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); align-items: center; justify-content: center; }
.nav-toggle svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .topnav .links { position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: flex-start; gap: 4px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px var(--gutter) 20px; display: none; }
  .topnav .links.open { display: flex; }
  .topnav .links a { padding: 10px 0; font-size: 16px; width: 100%; }
  .nav-toggle { display: inline-flex; }
  .nav-tail .nav-cta-desktop { display: none; }
}

/* ---- buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: 15px; font-weight: 600;
  letter-spacing: -0.005em; transition: background var(--ease) 150ms, border-color var(--ease) 150ms, transform 60ms ease, color var(--ease) 150ms;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: transparent; padding-inline: 6px; }
.btn-ghost:hover { color: var(--accent); }
.btn-arrow::after { content: '\2192'; transition: transform var(--ease) 150ms; }
.btn-arrow:hover::after { transform: translateX(3px); }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.btn-lg { padding: 13px 24px; font-size: 16px; }
a.link { color: var(--accent); font-weight: 500; }
a.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- cards ----------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-lg { border-radius: var(--radius-lg); padding: 28px; }
.card-link { display: block; transition: border-color var(--ease) 150ms, transform var(--ease) 150ms; }
.card-link:hover { border-color: var(--accent-line); transform: translateY(-2px); }

/* ---- pills, tags, badges --------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  background: var(--accent-soft); color: var(--accent); border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
}
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 500;
}
.tag[data-on="true"] { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.code-chip { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); }
.flag { width: 22px; height: 15px; border-radius: 2px; border: 1px solid var(--border); flex: none; }
.badge-status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--success); }
.badge-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

/* ---- hero ------------------------------------------------------------------ */
.hero { padding-block: clamp(56px, 9vw, 108px); position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.dotfield::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 30%, transparent 78%);
  opacity: 0.7; pointer-events: none;
}
.hero h1 { margin-bottom: 18px; max-width: 20ch; }
.hero-center { text-align: center; margin-inline: auto; }
.hero-center h1, .hero-center .lead { margin-inline: auto; }
.hero .lead { margin-bottom: 30px; }
.hero-cta { display: inline-flex; gap: var(--gap-sm); flex-wrap: wrap; }
.hero-center .hero-cta { justify-content: center; }

/* ---- trust strip ----------------------------------------------------------- */
.trust-strip { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.trust-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.trust-item svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* ---- path cards (two country chooser) -------------------------------------- */
.path-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 18px;
  position: relative; overflow: hidden; transition: border-color var(--ease) 160ms, transform var(--ease) 160ms;
}
.path-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.path-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.path-head { display: flex; align-items: center; gap: 12px; }
.path-flag { width: 40px; height: 27px; border-radius: 4px; border: 1px solid var(--border); flex: none; }
.path-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.path-frameworks { display: flex; flex-wrap: wrap; gap: 6px; }
.path-count { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.path-count b { color: var(--accent); font-weight: 600; }
.path-primary-note { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

/* ---- guide card ------------------------------------------------------------ */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 920px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px 15px; display: flex; flex-direction: column; gap: 10px; min-height: 148px;
  transition: border-color var(--ease) 150ms, transform var(--ease) 150ms;
}
.guide-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.guide-card .gc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.guide-card .gc-title { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; line-height: 1.25; letter-spacing: -0.01em; }
.guide-card .gc-desc { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0; }
.guide-card .gc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.guide-card .gc-cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

/* ---- category rail --------------------------------------------------------- */
.cat-rail { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface);
  font-size: 13.5px; font-weight: 500; color: var(--fg-2); transition: all var(--ease) 150ms;
}
.cat-chip .n { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.cat-chip:hover { border-color: var(--accent-line); }
.cat-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.cat-chip[aria-pressed="true"] .n { color: color-mix(in oklab, var(--accent-on), transparent 25%); }

/* ---- hyperframe: home path + guide visualiser ------------------------------ */
.hf { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.hf-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.hf-switch { display: inline-flex; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); gap: 2px; }
.hf-switch button {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; transition: all var(--ease) 160ms;
}
.hf-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-on); }
.hf-switch button:focus-visible { outline: none; box-shadow: var(--focus); }
.hf-legend { display: flex; align-items: center; gap: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.hf-legend b { color: var(--accent); font-weight: 600; }
.hf-body { padding: 18px; }
.hf-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 820px) { .hf-cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .hf-cats { grid-template-columns: 1fr; } }
.hf-cat { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.hf-cat h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; font-family: var(--font-display); letter-spacing: -0.01em; }
.hf-cat .hf-cat-n { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.hf-dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.hf-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); opacity: 0.9; transition: opacity var(--ease) 150ms; }
.hf-map { display: flex; flex-wrap: wrap; gap: 6px; }
.hf-tile {
  display: flex; flex-direction: column; gap: 3px; width: calc((100% - 30px) / 6);
  min-width: 96px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 9px; background: var(--surface);
}
.hf-tile .t-code { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; color: var(--accent); }
.hf-tile .t-name { font-size: 11px; line-height: 1.25; color: var(--fg-2); }
@media (max-width: 820px) { .hf-tile { width: calc((100% - 12px) / 2); } }

/* ---- prose / article ------------------------------------------------------- */
.prose { font-size: 16.5px; line-height: 1.7; color: var(--fg-2); max-width: 68ch; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 26px; margin-top: 44px; }
.prose h3 { font-size: 19px; margin-top: 30px; }
.prose ul, .prose ol { margin: 18px 0; padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose code { font-family: var(--font-mono); font-size: 0.86em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface); padding: 16px 18px; }
.callout .clabel { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.callout p { margin: 0; font-size: 14.5px; color: var(--fg-2); }
.callout[data-kind="warn"] { border-left-color: var(--warn); }
.callout[data-kind="warn"] .clabel { color: var(--warn); }

/* ---- table of contents / sidebar ------------------------------------------ */
.toc { position: sticky; top: 84px; }
.toc .toc-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--border); font-size: 13.5px; color: var(--muted); }
.toc a:hover, .toc a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); }

/* ---- breadcrumb ------------------------------------------------------------ */
.crumbs { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: 0.5; }

/* ---- forms ----------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--fg-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 15px; transition: border-color var(--ease) 150ms, box-shadow var(--ease) 150ms;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.check-row { display: flex; gap: 10px; align-items: flex-start; }
.check-row input { margin-top: 3px; accent-color: var(--accent); }
.check-row label { font-size: 13px; color: var(--muted); line-height: 1.5; }
.form-note { font-size: 12px; color: var(--muted); }
.form-success { display: none; }
.form-sent .form-fields { display: none; }
.form-sent .form-success { display: block; }

/* ---- lead capture split ---------------------------------------------------- */
.doc-preview { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.doc-sheet { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 18px; box-shadow: var(--elev, 0 1px 0 var(--border)); }
.doc-sheet .sheet-line { height: 8px; border-radius: 3px; background: var(--surface-2); margin-bottom: 9px; }
.doc-sheet .sheet-line.w1 { width: 40%; background: var(--accent-soft); }
.doc-sheet .sheet-line.w2 { width: 88%; }
.doc-sheet .sheet-line.w3 { width: 70%; }
.doc-sheet .sheet-line.w4 { width: 94%; }
.whats-inside li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--fg-2); }
.whats-inside svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 3px; }
.whats-inside { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

/* ---- stats / numbers ------------------------------------------------------- */
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 5vw, 60px); line-height: 1; letter-spacing: -0.03em; color: var(--accent); }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 26ch; }

/* ---- footer ---------------------------------------------------------------- */
.pagefoot { border-top: 1px solid var(--border); padding-block: 48px 40px; color: var(--muted); font-size: 14px; margin-top: 24px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--gap-lg); }
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-col h5 { font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.foot-col a { display: block; padding: 5px 0; color: var(--fg-2); font-size: 14px; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- rules / spacing helpers ---------------------------------------------- */
.rule { border: 0; border-top: 1px solid var(--border); margin: 0; }
.divider-top { border-top: 1px solid var(--border); }
.mt-0 { margin-top: 0; } .mt-sm { margin-top: 12px; } .mt-md { margin-top: 20px; } .mt-lg { margin-top: 32px; }
.section-head { max-width: 46ch; margin-bottom: 36px; }

/* ---- accessibility: skip link --------------------------------------------- */
.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  background: var(--accent); color: var(--accent-on);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  transition: top var(--ease) 150ms;
}
.skip-link:focus { top: 12px; outline: none; box-shadow: var(--focus); }

/* ---- accessibility: focus visibility on links and interactive surfaces ----- */
a:focus-visible,
.cat-chip:focus-visible,
.theme-toggle:focus-visible,
.nav-toggle:focus-visible,
.crumbs a:focus-visible,
.toc a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
:focus:not(:focus-visible) { outline: none; }

/* ---- theme toggle ---------------------------------------------------------- */
.theme-toggle {
  width: 40px; height: 40px; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--fg-2);
  transition: border-color var(--ease) 150ms, color var(--ease) 150ms;
}
.theme-toggle:hover { border-color: var(--fg); color: var(--fg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---- dark theme ------------------------------------------------------------ */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14161a;
  --surface: #1b1e24;
  --surface-2: #23272f;
  --fg: #f3f4f6;
  --fg-2: #cfd3da;
  --muted: #9aa1ac;
  --border: #2b303a;
  --border-strong: #3a414d;
  --accent-au: #6a9bf5;      /* lifted cobalt for legibility on the dark canvas */
  --accent-nz: #2bb9a1;      /* lifted teal for the NZ path on dark */
  --accent: var(--accent-au);
  --accent-on: #0c1017;      /* dark label on the lifted accent fills */
  --accent-hover: color-mix(in oklab, var(--accent), white 12%);
  --accent-soft: color-mix(in oklab, var(--accent), transparent 86%);
  --accent-line: color-mix(in oklab, var(--accent), transparent 64%);
  --success: #3fca70;
  --warn: #e0b155;
  --danger: #f2717a;
  --focus: 0 0 0 3px color-mix(in oklab, var(--accent), transparent 60%);
}

/* ---- reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
