/* =========================================================================
   Marine Navigation Australia — design system

   Two honest nautical looks rather than one generic dark UI:

   LIGHT  "paper chart"  — warm cream stock, sepia line work, chart magenta,
                           and shallow-to-deep water rendered blue-to-white
                           exactly as a printed chart does it.
   DARK   "night helm"   — deep ink water lit by brass instrument light.

   Illustrations are inline SVG driven by the --art-* tokens, so the same
   artwork recolours with the theme.
   ========================================================================= */

:root {
  /* ---- Semantic: dark, "night helm" (default) ---- */
  --bg: #061620;
  --bg-2: #0a2231;
  --panel: #0d2a3a;
  --panel-solid: #0c2735;
  --panel-hover: #10344a;
  --ink: #f0f4f2;
  --ink-2: #a6c0cb;
  --ink-3: #6d8998;
  --line: rgba(150, 200, 215, 0.16);
  --line-strong: rgba(150, 200, 215, 0.32);

  /* Brass instrument light, not SaaS teal. */
  --accent: #ffb03a;
  --accent-2: #57d6c9;
  --signal: #ff6b86;
  --accent-ink: #10202a;
  --glow: rgba(255, 176, 58, 0.2);
  --shadow: 0 26px 64px -26px rgba(0, 0, 0, 0.75);
  --grid-line: rgba(150, 200, 215, 0.05);
  --paper: none;

  /* ---- Illustration palette: dark ---- */
  --art-sky: #07202e;
  --art-sea-0: #12495e;
  --art-sea-1: #0d3a4e;
  --art-sea-2: #0a2d3e;
  --art-sea-3: #071f2c;
  --art-bed: #123141;
  --art-sand: #6e5c3c;
  --art-line: rgba(130, 205, 225, 0.32);
  --art-ink: #dce9ee;
  --art-beam: #57d6c9;
  --art-signal: #ff6b86;
  --art-brass: #ffb03a;
  --art-figure: rgba(180, 214, 226, 0.75);

  /* Sequential ramp for magnitude, one hue, monotonic in OKLab lightness.
     Selected for the dark surface, not flipped from the light one. */
  --viz-0: rgba(150, 200, 215, 0.07);
  --viz-1: #2b2416;
  --viz-2: #57431b;
  --viz-3: #866619;
  --viz-4: #c8942a;
  --viz-5: #ffb03a;
  --viz-grid: rgba(150, 200, 215, 0.14);
  /* Label ink per step, chosen by measured contrast rather than by score.
     Every pair clears 4.5:1. */
  --viz-ink-1: #f0f4f2;
  --viz-ink-2: #f0f4f2;
  --viz-ink-3: #f0f4f2;
  --viz-ink-4: #10202a;
  --viz-ink-5: #10202a;

  /* Type: a serif display face gives this the authority of an
     Admiralty publication rather than a product landing page. */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
    "Times New Roman", serif;
  --font-sans: "Inter var", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --measure: 68ch;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --shell: 1260px;

  color-scheme: dark;
}

/* ---- Semantic: light, "paper chart" ---- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --bg: #f6f0e2;
    --bg-2: #ece3cf;
    --panel: #fdfaf2;
    --panel-solid: #fdfaf2;
    --panel-hover: #fffdf7;
    --ink: #143040;
    --ink-2: #3d5f70;
    --ink-3: #83745c;
    --line: rgba(95, 75, 45, 0.2);
    --line-strong: rgba(95, 75, 45, 0.4);
    --accent: #a2590f;
    --accent-2: #0e6d79;
    --signal: #b0175a;
    --accent-ink: #fdfaf2;
    --glow: rgba(162, 89, 15, 0.16);
    --shadow: 0 20px 44px -26px rgba(50, 40, 20, 0.4);
    --grid-line: rgba(95, 75, 45, 0.07);

    --art-sky: #f8f3e6;
    --art-sea-0: #b6dde3;
    --art-sea-1: #cfe8ec;
    --art-sea-2: #e5f1f3;
    --art-sea-3: #f7f3e8;
    --art-bed: #e3d2aa;
    --art-sand: #b09a68;
    --art-line: rgba(60, 92, 104, 0.55);
    --art-ink: #143040;
    --art-beam: #0e6d79;
    --art-signal: #b0175a;
    --art-brass: #a2590f;
    --art-figure: rgba(20, 48, 64, 0.62);

    --viz-0: rgba(95, 75, 45, 0.07);
    --viz-1: #f0e0bd;
    --viz-2: #dcbe83;
    --viz-3: #c1923f;
    --viz-4: #96540f;
    --viz-5: #5f3607;
    --viz-grid: rgba(95, 75, 45, 0.16);
    --viz-ink-1: #143040;
    --viz-ink-2: #143040;
    --viz-ink-3: #143040;
    --viz-ink-4: #fdfaf2;
    --viz-ink-5: #fdfaf2;

    color-scheme: light;
  }
}

:root[data-theme='light'] {
  --bg: #f6f0e2;
  --bg-2: #ece3cf;
  --panel: #fdfaf2;
  --panel-solid: #fdfaf2;
  --panel-hover: #fffdf7;
  --ink: #143040;
  --ink-2: #3d5f70;
  --ink-3: #83745c;
  --line: rgba(95, 75, 45, 0.2);
  --line-strong: rgba(95, 75, 45, 0.4);
  --accent: #a2590f;
  --accent-2: #0e6d79;
  --signal: #b0175a;
  --accent-ink: #fdfaf2;
  --glow: rgba(162, 89, 15, 0.16);
  --shadow: 0 20px 44px -26px rgba(50, 40, 20, 0.4);
  --grid-line: rgba(95, 75, 45, 0.07);

  --art-sky: #f8f3e6;
  --art-sea-0: #b6dde3;
  --art-sea-1: #cfe8ec;
  --art-sea-2: #e5f1f3;
  --art-sea-3: #f7f3e8;
  --art-bed: #e3d2aa;
  --art-sand: #b09a68;
  --art-line: rgba(60, 92, 104, 0.55);
  --art-ink: #143040;
  --art-beam: #0e6d79;
  --art-signal: #b0175a;
  --art-brass: #a2590f;
  --art-figure: rgba(20, 48, 64, 0.62);

  --viz-0: rgba(95, 75, 45, 0.07);
  --viz-1: #f0e0bd;
  --viz-2: #dcbe83;
  --viz-3: #c1923f;
  --viz-4: #96540f;
  --viz-5: #5f3607;
  --viz-grid: rgba(95, 75, 45, 0.16);
  --viz-ink-1: #143040;
  --viz-ink-2: #143040;
  --viz-ink-3: #143040;
  --viz-ink-4: #fdfaf2;
  --viz-ink-5: #fdfaf2;

  color-scheme: light;
}

/* ------------------------------------------------------------------ reset */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: 'cv11', 'ss01';
}

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

a {
  color: var(--accent-2);
  text-decoration-color: color-mix(in srgb, var(--accent-2) 45%, transparent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

/* The ocean floor: a faint bathymetric grid behind everything. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 75%);
}

/* Water column: a soft aqua bloom near the surface. */
body::after {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 90vh;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 12% -5%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    radial-gradient(50% 45% at 88% 0%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
}

/* ---------------------------------------------------------------- layout */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow {
  max-width: 900px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--r) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* ---------------------------------------------------------------- header */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--glow);
  transition: width 0.1s linear;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.masthead[data-stuck='true'] {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 10px var(--glow));
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text small {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav a:hover,
.nav a[aria-current] {
  color: var(--ink);
  background: var(--panel-hover);
}

.nav a[aria-current]::after {
  content: '';
  display: block;
  height: 2px;
  margin-top: 0.3rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.nav-toggle {
  display: none;
}

@media (max-width: 950px) {
  .nav {
    position: fixed;
    inset: 4.25rem 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem var(--gutter) 1.5rem;
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: calc(100vh - 4.25rem);
    overflow-y: auto;
  }

  .nav[data-open='true'] {
    transform: translateY(0);
  }

  .nav a {
    padding: 0.85rem 0.5rem;
    border-radius: var(--r-sm);
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle {
    display: inline-grid;
    margin-left: auto;
  }

  .nav-toggle + .icon-btn,
  .theme-toggle {
    margin-left: 0.4rem;
  }
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-top: clamp(2.75rem, 7vw, 5rem);
}

.hero__grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 3rem;
  }
}

.hero__rose {
  display: none;
}

@media (min-width: 900px) {
  .hero__rose {
    display: block;
    padding-top: 0.5rem;
  }
}

.rose {
  width: 100%;
  height: auto;
  opacity: 0.9;
}

/* The hero illustration: a full-bleed cross-section of the whole system. */
.scene-wrap {
  margin: clamp(2.25rem, 5vw, 3.5rem) 0 0;
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--art-sea-2);
}

.scene {
  display: block;
  width: 100%;
  height: clamp(360px, 44vw, 620px);
}

.scene-wrap figcaption {
  padding: 0.9rem var(--gutter);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
}

.scene-wrap figcaption::before {
  content: 'Fig. 1 — ';
  color: var(--accent);
  font-weight: 650;
  letter-spacing: 0.04em;
}

.wave-band {
  color: var(--bg-2);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--glow);
  animation: ping 2.6s ease-out infinite;
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 12px transparent;
  }
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.015em;
  line-height: 1.14;
  font-weight: 650;
  margin: 0;
  text-wrap: balance;
}

/* Titles use the serif display face: this is a technical reference, and it
   should carry the authority of a hydrographic publication. */
h1,
.prose-h2,
.section__head h2,
.card--feature h3,
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.005em;
}

.card__aside {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card__rose {
  width: 132px;
  align-self: center;
  margin-bottom: 0.5rem;
}

@media (max-width: 899px) {
  .card__rose {
    display: none;
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  max-width: 22ch;
}

.hero__lede {
  margin: 1.5rem 0 0;
  font-size: clamp(1.075rem, 1.9vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 58ch;
}

.grad {
  background: linear-gradient(96deg, var(--accent) 10%, var(--signal) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 26px -14px var(--glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px var(--glow);
  color: var(--accent-ink);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--panel);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--ink);
}

/* Depth-sounding stat strip */
.soundings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-top: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--line);
}

.sounding {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  padding: 1.15rem 1.25rem;
}

.sounding dt {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 650;
}

.sounding dd {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.sounding__date {
  font-size: 1.05rem !important;
}

.sounding dd span {
  font-size: 0.95rem;
  color: var(--ink-3);
  font-weight: 550;
  letter-spacing: 0;
}

/* Wave divider */
.wave {
  display: block;
  width: 100%;
  height: clamp(40px, 6vw, 80px);
  color: var(--bg-2);
}

/* -------------------------------------------------------- illustrations */

.art {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--art-sea-2);
  margin: 0;
}

.art__svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Card header band */
.art--card {
  aspect-ratio: 5 / 3;
  border-bottom: 1px solid var(--line);
}

.art--card .art__svg {
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

a.card:hover .art--card .art__svg {
  transform: scale(1.05);
}

/* Shorter strip for the topic grid, so it reads lighter than a guide card */
.art--strip {
  aspect-ratio: 16 / 6;
}

/* Inline figures: they sit in the prose flow, beside the section they explain. */
.figure {
  margin: 2.25rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
}

.figure__art {
  background: var(--art-sea-2);
  border-bottom: 1px solid var(--line);
}

.figure--viz .figure__art {
  background: var(--panel-solid);
  padding: 1rem 0.75rem 0.5rem;
}

.figure__art svg {
  display: block;
  width: 100%;
  height: auto;
}

.figure figcaption {
  padding: 0.75rem 1.05rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.figure figcaption b {
  color: var(--accent);
  font-weight: 650;
  letter-spacing: 0.02em;
}

/* A chart's own labels are already small; don't let the container magnify them
   much beyond the size they were drawn for. */
.viz__svg {
  max-width: 620px;
  margin-inline: auto;
}

/* Presented as a numbered plate: the illustration keeps its native 5:3
   proportion instead of being cropped to fill a wide band. */
/* Capped so the artwork is only modestly scaled up from the size its
   label type was drawn for. */
.plate {
  margin: 0 0 2.75rem;
  width: 100%;
  max-width: 580px;
}

.art--plate {
  aspect-ratio: 5 / 3;
  border: 1px solid var(--line);
  border-radius: var(--r) var(--r) 0 0;
}

.plate figcaption {
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--r) var(--r);
  background: var(--panel);
  color: var(--ink-2);
  font-size: 0.85rem;
  line-height: 1.55;
}

.plate figcaption::before {
  content: 'Plate — ';
  color: var(--accent);
  font-weight: 650;
  letter-spacing: 0.03em;
}

/* ------------------------------------------------------------- sections */

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section--sunk {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

/* A faint depth-contour wash, so a full-width band still reads as water. */
.section--charted {
  position: relative;
  overflow: hidden;
}

.section--charted::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 58px,
    var(--grid-line) 58px 60px
  );
  mask-image: linear-gradient(to bottom, transparent, #000 40%, #000 60%, transparent);
}

.section--charted > .shell {
  position: relative;
}

.section__head {
  max-width: 62ch;
  margin-bottom: 2.5rem;
}

.section__kicker {
  font-size: 0.72rem;
  font-weight: 680;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section__head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
}

.section__head p {
  color: var(--ink-2);
  margin: 0.9rem 0 0;
  font-size: 1.05rem;
}

/* ----------------------------------------------------------------- cards */

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, background 0.25s ease,
    box-shadow 0.25s ease;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(80% 120% at 0% 0%, var(--glow), transparent 65%);
  transition: opacity 0.3s ease;
}

a.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow);
  color: inherit;
}

a.card:hover::before {
  opacity: 1;
}

.card--art {
  padding: 0;
  gap: 0;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.4rem 1.5rem 1.5rem;
  flex: 1;
}

.card__icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.card__icon svg {
  width: 1.3rem;
  height: 1.3rem;
}

.card__icon--lg {
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 1.25rem;
}

.card__icon--lg svg {
  width: 1.6rem;
  height: 1.6rem;
}

.card__eyebrow {
  font-size: 0.68rem;
  font-weight: 680;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.card h3 {
  font-size: 1.16rem;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.945rem;
  line-height: 1.6;
}

.card__meta {
  margin-top: auto;
  padding-top: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.card__meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.card__cta {
  font-size: 0.88rem;
  font-weight: 620;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

a.card:hover .card__cta svg {
  transform: translateX(3px);
}

.card__cta svg {
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 0.2s ease;
}

/* Feature card: the "start here" tile */
.card--feature {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--panel-solid)), var(--panel-solid));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

@media (min-width: 900px) {
  .card--feature {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2.25rem;
  }
}

.card__aside {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card__rose {
  width: 132px;
  align-self: center;
  margin-bottom: 0.5rem;
}

@media (max-width: 899px) {
  .card__rose {
    display: none;
  }
}

.card--feature h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.card--feature p {
  font-size: 1.02rem;
}

/* ---------------------------------------------------------- article page */

.page {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem);
}

.layout {
  display: grid;
  /* An explicit minmax(0, 1fr) track: a plain `auto` track is floored at the
     content's min-content width, which lets a fixed-width figure push the
     column — and the page — wider than the viewport. */
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

/* Grid and flex children default to min-width:auto, so they refuse to shrink
   below their content. Everything here should shrink instead of overflow. */
.layout > * {
  min-width: 0;
}

@media (min-width: 1080px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

.breadcrumbs {
  font-size: 0.83rem;
  color: var(--ink-3);
  margin-bottom: 1.5rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}

.breadcrumbs li::after {
  content: '/';
  margin-left: 0.45rem;
  color: var(--ink-3);
  opacity: 0.5;
}

.breadcrumbs li:last-child::after {
  content: none;
}

.breadcrumbs a {
  color: var(--ink-2);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.article__head {
  padding-bottom: 2rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.article__head h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  max-width: 26ch;
}

.article__lede {
  margin: 1.25rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 60ch;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin-top: 1.75rem;
  font-size: 0.82rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  letter-spacing: 0.01em;
}

a.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill--accent {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

/* ---------------------------------------------------------------- prose */

.prose {
  max-width: var(--measure);
}

/* One flow rule owns vertical rhythm. `.prose p` must not set a margin of its
   own: as a two-part selector it outranks `.prose > * + *` and would collapse
   the gap between consecutive paragraphs. */
.prose > * {
  margin-block: 0;
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose p {
  color: var(--ink-2);
}

.prose strong {
  color: var(--ink);
  font-weight: 640;
}

.prose > p:first-of-type {
  font-size: 1.12rem;
  color: var(--ink);
}

.prose-h2 {
  font-size: clamp(1.45rem, 2.7vw, 1.95rem);
  margin-top: 3.25rem !important;
  padding-top: 0.35rem;
  scroll-margin-top: 6rem;
  position: relative;
}

.prose-h2::before {
  content: '';
  position: absolute;
  top: -1.25rem;
  left: 0;
  width: 3.5rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.prose-h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin-top: 2.25rem !important;
  scroll-margin-top: 6rem;
  color: var(--ink);
}

.prose-h4 {
  font-size: 1.03rem;
  margin-top: 1.75rem !important;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.anchor {
  position: absolute;
  margin-left: -1.15em;
  width: 1em;
  color: var(--ink-3);
  opacity: 0;
  text-decoration: none;
  font-weight: 400;
  transition: opacity 0.18s ease;
}

.prose-h2:hover .anchor,
.prose-h3:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}

@media (max-width: 720px) {
  .anchor {
    display: none;
  }
}

.prose ul,
.prose ol {
  margin: 1.15rem 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
  color: var(--ink-2);
}

.prose li {
  position: relative;
  padding-left: 1.6rem;
}

.prose ul > li::before {
  content: '';
  position: absolute;
  left: 0.28rem;
  top: 0.66em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

.prose ol {
  counter-reset: step;
}

.prose ol > li {
  counter-increment: step;
  padding-left: 2.1rem;
}

.prose ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.prose li > ul,
.prose li > ol {
  margin-top: 0.6rem;
}

.prose blockquote {
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  color: var(--ink);
  font-size: 1.06rem;
}

.prose blockquote p {
  color: var(--ink);
  font-style: italic;
}

.prose blockquote > * + * {
  margin-top: 0.75rem;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.15em 0.42em;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink);
  word-break: break-word;
}

.prose hr {
  border: 0;
  height: 1px;
  margin: 2.75rem 0 0;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.prose .autolink {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  font-weight: 550;
}

.prose .autolink:hover {
  color: var(--accent);
  border-bottom-style: solid;
}

/* Glossary definitions are a shallower destination than a full guide, so their
   links are marked more lightly. */
.prose .autolink--term {
  border-bottom-color: color-mix(in srgb, var(--ink-3) 60%, transparent);
  font-weight: inherit;
}

.prose .autolink--term:hover {
  color: var(--accent-2);
}

.term__mentions {
  margin-top: 0.75rem !important;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-3);
}

.term__mentions a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.term__mentions a:hover {
  color: var(--accent);
}

.prose a.is-external::after {
  content: '↗';
  font-size: 0.72em;
  margin-left: 0.2em;
  vertical-align: super;
  opacity: 0.7;
}

/* Tables read like chart tables: tabular figures, ruled rows, sticky head. */
.table-wrap {
  margin-top: 1.75rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.table-wrap:focus-visible {
  outline-offset: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

thead th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 680;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}

tbody th,
tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
  text-align: left;
  font-weight: 400;
}

tbody th {
  color: var(--ink);
  font-weight: 580;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover th,
tbody tr:hover td {
  background: var(--panel-hover);
}

.ta-right {
  text-align: right !important;
}

.ta-center {
  text-align: center !important;
}

/* Schematics get a plotted-on-chart-paper treatment. */
.schematic,
.code-block {
  margin: 1.9rem 0 0;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel-solid);
  overflow: hidden;
}

.schematic {
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 22px 22px;
  background-color: color-mix(in srgb, var(--accent) 4%, var(--panel-solid));
}

.schematic figcaption,
.code-block figcaption {
  padding: 0.6rem 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 680;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}

.schematic pre,
.code-block pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--accent);
  tab-size: 2;
}

.code-block pre {
  color: var(--ink-2);
}

.schematic pre code,
.code-block pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
  white-space: pre;
}

/* ------------------------------------------------------------------- TOC */

.rail {
  position: sticky;
  top: 5.5rem;
  display: grid;
  gap: 1.5rem;
  font-size: 0.88rem;
}

@media (max-width: 1079px) {
  .rail {
    position: static;
  }
}

.rail__title {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 680;
  margin-bottom: 0.9rem;
}

.toc {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
  max-height: min(60vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}

.toc a {
  display: block;
  padding: 0.3rem 0;
  color: var(--ink-3);
  text-decoration: none;
  line-height: 1.4;
  border-left: 2px solid transparent;
  margin-left: -1.06rem;
  padding-left: 1rem;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.toc a:hover {
  color: var(--ink);
}

.toc a[data-depth='3'] {
  padding-left: 1.9rem;
  font-size: 0.83rem;
}

.toc a[aria-current='true'] {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 580;
}

.rail__panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem;
}

.rail__panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.rail__panel a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.87rem;
  line-height: 1.4;
  display: block;
}

.rail__panel a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------- key facts */

.keyfacts {
  margin: 0 0 2.5rem;
  padding: 1.4rem 1.6rem;
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%), var(--panel);
}

.keyfacts h2 {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
  font-weight: 680;
}

.keyfacts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.keyfacts li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

.keyfacts li::before {
  content: '';
  position: absolute;
  left: 0.1rem;
  top: 0.5em;
  width: 0.65rem;
  height: 0.35rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.nextstep {
  margin: 2.5rem 0 !important;
  padding: 1.2rem 1.4rem;
  border-radius: var(--r);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-left: 3px solid var(--accent);
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--panel);
}

.nextstep__label {
  font-size: 0.68rem !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent) !important;
  font-weight: 680;
  margin-bottom: 0.4rem !important;
}

.nextstep a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nextstep a svg {
  width: 0.85em;
  height: 0.85em;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.nextstep a:hover {
  color: var(--accent);
}

.nextstep a:hover svg {
  transform: translateX(3px);
}

.nextstep p:last-child {
  margin-top: 0.4rem !important;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------- FAQ */

.faq {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq details[open] {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.faq summary {
  cursor: pointer;
  padding: 1.05rem 3rem 1.05rem 1.25rem;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  position: relative;
  font-size: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  right: 1.25rem;
  top: 1.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
}

.faq .faq__body {
  padding: 0 1.25rem 1.25rem;
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.65;
}

.faq .faq__body > * + * {
  margin-top: 0.75rem;
}

/* --------------------------------------------------------- onward links */

.onward {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.onward h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.onward > p {
  color: var(--ink-2);
  margin: 0 0 1.75rem;
  font-size: 0.98rem;
}

.pager {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pager a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.pager small {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 680;
}

.pager strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.35;
}

.pager a.pager--next {
  text-align: right;
  align-items: flex-end;
}

.linklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}

.linklist li {
  border-bottom: 1px solid var(--line);
}

.linklist a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.85rem 0.25rem;
  text-decoration: none;
  color: var(--ink);
  transition: padding 0.2s ease, color 0.2s ease;
}

.linklist a:hover {
  padding-left: 0.6rem;
  color: var(--accent);
}

.linklist a span {
  color: var(--ink-3);
  font-size: 0.85rem;
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* -------------------------------------------------------------- glossary */

.alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 2.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.alphabet a,
.alphabet span {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  font-weight: 650;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.alphabet a:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.alphabet span {
  opacity: 0.32;
}

.terms {
  display: grid;
  gap: 0.9rem;
}

.term {
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  scroll-margin-top: 6rem;
}

.term dt {
  font-weight: 660;
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.term dt .term__abbr {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 680;
}

.term dd {
  margin: 0.55rem 0 0;
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.6;
}

.term dd > * + * {
  margin-top: 0.6rem;
}

.letter-head {
  margin: 2.75rem 0 1rem;
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 680;
  scroll-margin-top: 6rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.letter-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* ---------------------------------------------------------------- search */

.searchbox {
  position: relative;
  margin-bottom: 2rem;
}

.searchbox input {
  width: 100%;
  padding: 0.95rem 1.1rem 0.95rem 2.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.searchbox input::placeholder {
  color: var(--ink-3);
}

.searchbox input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}

.searchbox svg {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ink-3);
  pointer-events: none;
}

.results {
  display: grid;
  gap: 0.75rem;
}

.results__empty {
  color: var(--ink-3);
  padding: 2rem 0;
}

mark {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--ink);
  border-radius: 3px;
  padding: 0 0.15em;
}

/* ---------------------------------------------------------------- footer */

.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
}

.footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer__brand {
  max-width: 32ch;
}

.footer__brand p {
  color: var(--ink-3);
  font-size: 0.9rem;
  margin: 1rem 0 0;
  line-height: 1.6;
}

.footer h2 {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 680;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.footer a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer a:hover {
  color: var(--accent);
}

.footer__note {
  color: var(--ink-3);
  font-size: 0.78rem;
  line-height: 1.6;
}

.footer__bottom {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-3);
  font-size: 0.8rem;
}

/* -------------------------------------------------------------- utility */

.stack {
  display: grid;
  gap: 1.25rem;
}

.center {
  text-align: center;
  margin-inline: auto;
}

.disclaimer {
  margin-top: 2.5rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.6;
}

.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;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .masthead,
  .rail,
  .footer,
  .onward,
  .progress,
  .hero__deco {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .prose {
    max-width: none;
  }
}
