/* AGNTS apex landing — hand-rolled, no framework. Theme-aware.
   Visual system: neo-grotesque display type, full-bleed section bands,
   pill actions, elevated surfaces. Palette is unchanged from the original
   placard design; only the typography, scale, and layout carry the weight. */

/* ─── typography + shape tokens (theme-independent) ─────────────────── */

:root {
  /* System neo-grotesque: SF Pro on Apple, Segoe UI Variable on Windows,
     Inter/Roboto elsewhere. Zero webfont bytes, so no FOUT and no CLS
     against the mobile LCP budget in lighthouse-budget.json. */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, "Helvetica Neue",
    Arial, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    monospace;

  /* Section rhythm. Enterprise pages breathe; the old 3rem gutters read as
     a document, not a product site. */
  --section-y: clamp(3.5rem, 2rem + 6vw, 7rem);
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 3rem);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Single-layer shadows with modest blur radii. Repeated surfaces (posts,
     stat tiles, placards) use `--shadow-sm`; the wider blurs are reserved for
     the few hero-level cards and hover states, because large-radius shadows
     on many elements are a real paint cost against the mobile TBT budget. */
  --shadow-sm: 0 1px 2px rgba(15, 20, 30, 0.07);
  --shadow: 0 4px 12px rgba(15, 20, 30, 0.08);
  --shadow-lg: 0 10px 28px rgba(15, 20, 30, 0.12);

  --header-h: 4.5rem;

  /* Hero grid trace animation (see .hero-bg below + hero-traces.js). Aliases
     the site's own accent rather than a hardcoded hex, so it tracks whichever
     theme is active without needing a per-theme override. */
  --grid-accent: var(--accent);
}

:root {
  color-scheme: light;
  /* Cream page fill — same light --bg as landing/research/paper.css so the
     apex, compare, and sibling shells match Research in light mode. */
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --chart-2: #a4761c;
  --chart-3: #22798a;
  --text: #1b1b1b;
  --muted: #5f5a52;
  --line: #d9dee5;
  --line-strong: #c7ced8;
  --accent: #b0342c;
  --accent-soft: rgba(176, 52, 44, 0.1);
  --accent-line: rgba(176, 52, 44, 0.45);
  --focus: #b0342c;
  --split-flap-surface: #eceff3;
  --split-flap-line: #c7ced8;
  --split-flap-edge: rgba(176, 52, 44, 0.06);
  /* Observer-app screenshot strip: phone bezel / letterbox behind contain-fit images */
  --demo-phone-chrome: #dce1e8;
  /* 78rem ≈ 1248px. Sections are full-bleed bands; this constrains only the
     inner container, so wide displays get real product-site presence instead
     of a narrow editorial column floating against a margin. */
  --max-w: 78rem;
  /* Alternating section band + translucent sticky header. */
  --band: #ffffff;
  --header-bg: rgba(246, 245, 241, 0.82);
  --on-accent: #ffffff;
  /* Hero grid trace animation, light theme. Kept softer than the prior .8 so
     the hatch reads as atmosphere, not a heavy cage; comet head stays a deeper
     red (drawn on white, not ink) rather than the pale dark-theme tint. */
  --grid-line: #9aa4b2;
  --grid-opacity: 0.35;
  --grid-accent-hot: #7a1f1a;
  --hero-glow: rgba(176, 52, 44, 0.13);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #181b21;
    --surface: #1c1f26;
    --surface-2: #20242c;
    --chart-2: #e8b04b;
    --chart-3: #5ec8d8;
    --text: #ffffff;
    --muted: #aeb4bf;
    --line: #2a2f38;
    --line-strong: #343b4a;
    --accent: #ff4d4d;
    --accent-soft: rgba(255, 77, 77, 0.14);
    --accent-line: rgba(255, 77, 77, 0.5);
    --focus: #ff4d4d;
    --split-flap-surface: #20232c;
    --split-flap-line: #343b4a;
    --split-flap-edge: rgba(255, 77, 77, 0.12);
    --demo-phone-chrome: #0a0c0f;
    --band: #1c1f26;
    --header-bg: rgba(24, 27, 33, 0.82);
    --on-accent: #14161a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.55);
    /* Hero grid trace animation, dark theme — identical to
       cliftonhatfield.com's own dark values, since its accent (#ff4d4d) is
       already this site's dark --accent. */
    --grid-line: #343b4a;
    --grid-opacity: 0.34;
    --grid-accent-hot: #ffe1e1;
    --hero-glow: rgba(255, 77, 77, 0.2);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --chart-2: #a4761c;
  --chart-3: #22798a;
  --text: #1b1b1b;
  --muted: #5f5a52;
  --line: #d9dee5;
  --line-strong: #c7ced8;
  /* Brick red: keeps the brand accent legible on the light placard instead of
     dissolving into warm gray (AA on --bg for the small uppercase labels). */
  --accent: #b0342c;
  --accent-soft: rgba(176, 52, 44, 0.1);
  --accent-line: rgba(176, 52, 44, 0.45);
  --focus: #b0342c;
  --split-flap-surface: #eceff3;
  --split-flap-line: #c7ced8;
  --split-flap-edge: rgba(176, 52, 44, 0.06);
  --demo-phone-chrome: #dce1e8;
  --band: #ffffff;
  --header-bg: rgba(246, 245, 241, 0.82);
  --on-accent: #ffffff;
  --grid-line: #9aa4b2;
  --grid-opacity: 0.35;
  --grid-accent-hot: #7a1f1a;
  --hero-glow: rgba(176, 52, 44, 0.13);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181b21;
  --surface: #1c1f26;
  --surface-2: #20242c;
  --chart-2: #e8b04b;
  --chart-3: #5ec8d8;
  --text: #ffffff;
  --muted: #aeb4bf;
  --line: #2a2f38;
  --line-strong: #343b4a;
  --accent: #ff4d4d;
  --accent-soft: rgba(255, 77, 77, 0.14);
  --accent-line: rgba(255, 77, 77, 0.5);
  --focus: #ff4d4d;
  --split-flap-surface: #20232c;
  --split-flap-line: #343b4a;
  --split-flap-edge: rgba(255, 77, 77, 0.12);
  --demo-phone-chrome: #0a0c0f;
  --band: #1c1f26;
  --header-bg: rgba(24, 27, 33, 0.82);
  --on-accent: #14161a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.55);
  --grid-line: #343b4a;
  --grid-opacity: 0.34;
  --grid-accent-hot: #ffe1e1;
  --hero-glow: rgba(255, 77, 77, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* The sticky header (`--header-h`) sits above the page and would otherwise
     cover the top of whatever heading a `#fragment` link scrolls to — e.g.
     `#proof-label`. This offsets every anchor jump (direct URL fragments and
     in-page `<a href="#...">` links alike) by the header's height plus a
     little breathing room, so the target heading always lands clear of it. */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.006em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Sections own their own full-bleed background band, so `main` is a plain
   flow container with no padding of its own. The previous narrow column with
   a left "spine" rule is what made the page read as a personal essay; the
   band system replaces it. */
main {
  width: 100%;
  margin: 0;
  padding: 0 0 var(--section-y);
}

/* Every direct child of `main` is a full-bleed band. Centering happens through
   padding rather than a `max-width` + `margin: auto` wrapper so each band keeps
   its own display mode (`.hero` and `.placards` are grids) and can still paint
   a background edge to edge. */
main > * {
  width: 100%;
  padding-inline: max(var(--gutter), (100% - var(--max-w)) / 2);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--accent-line);
  transition: text-decoration-color 0.2s ease;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

p {
  margin: 0 0 1rem;
}

strong {
  color: var(--text);
  font-weight: 600;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--muted);
}

/* ─── sticky header ─────────────────────────────────────────────────── */

.site-header {
  margin: 0;
  padding: 0 max(var(--gutter), (100% - var(--max-w)) / 2);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

/* Progressive enhancement: without backdrop-filter the translucent header
   would let content bleed through while scrolling. */
@supports not (backdrop-filter: blur(4px)) {
  .site-header {
    background: var(--bg);
  }
}

.header-inner {
  width: 100%;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

/* Brand lockup — mark + wordmark. An anonymous "Home" text link is the single
   clearest tell of a personal site; a lockup anchors the page as a product. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  margin-right: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 2.1rem;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.brand-mark .mark-tri {
  fill: #ff3b30;
}

.brand-mark .mark-dot {
  fill: #ff3b30;
}

html[data-theme="dark"] .brand-mark .mark-dot {
  fill: #ffffff;
}

.brand-word {
  height: 0.8125rem;
  width: auto;
  display: block;
  flex: 0 0 auto;
}

/* "ARCOLOGY LABS" is a long name set on one line, so it takes real width. The
   header stops being a single row at 60rem (see the max-width: 60rem block
   that moves .brandnav to its own row); below that the wordmark steps down a
   little so the lockup keeps its share of a narrow header. */
@media (min-width: 60rem) {
  .brand-word {
    height: 1rem;
  }
}

.brandnav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.008em;
  /* Horizontal scroll instead of wrapping — `min-width: 0` is required or the
     flex item's automatic minimum size would push the header wider than the
     viewport on narrow screens. */
  overflow-x: auto;
  min-width: 0;
  scrollbar-width: none;
  margin-right: auto;
}

.brandnav::-webkit-scrollbar {
  display: none;
}

.brandnav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.brandnav a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.brandnav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 60rem) {
  .brandnav {
    order: 3;
    width: 100%;
    margin: 0;
    padding-bottom: 0.35rem;
  }

  .header-inner {
    flex-wrap: wrap;
    padding-top: 0.6rem;
  }

  .brand {
    margin-right: auto;
  }

  /* The header wraps to two rows here (brand/CTA, then nav pills), taller
     than `--header-h` — widen the anchor-scroll offset to match or a jump
     to e.g. #proof-label still lands partly under it. */
  html {
    scroll-padding-top: calc(var(--header-h) + 3.5rem);
  }
}

.theme-picker {
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 0;
}

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
}

.theme-icon {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
}

.theme-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.theme-toggle[data-active-theme="system"] .theme-icon[data-theme-icon="system"],
.theme-toggle[data-active-theme="light"] .theme-icon[data-theme-icon="light"],
.theme-toggle[data-active-theme="dark"] .theme-icon[data-theme-icon="dark"] {
  display: block;
}

/* ─── hero ──────────────────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
}

.hero h1 {
  margin: 0 0 1.5rem;
  color: var(--text);
  /* Official Arcopolis wordmark (landing/arcology/arcopolis-wordmark-inline.svg).
     currentColor follows --text so light/dark themes stay in step. */
  line-height: 0;
  /* Cap-height band reserved for CLS; matches the wordmark height clamp. */
  min-height: clamp(1.85rem, 1rem + 2.8vw, 3.15rem);
}

.hero-wordmark {
  display: block;
  width: min(100%, clamp(14rem, 8rem + 28vw, 28rem));
  height: auto;
  aspect-ratio: 977 / 100;
}

.hero .lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 0.75rem;
  max-width: 34em;
}

.hero .lead strong,
.hero .lead b {
  color: var(--text);
}

.hero-days {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ─── hero: copy left, living thread right ──────────────────────────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 1rem + 3vw, 4.5rem);
  /* `start`, not `center` — the copy column runs taller than the thread
     card, so centering the row drops the thread's top edge well below the
     headline instead of lining the two columns up. */
  align-items: start;
  padding-block: clamp(3rem, 1.5rem + 6vw, 6.5rem) var(--section-y);
}

@media (max-width: 62rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

/* ─── hero grid + trace animation ────────────────────────────────────
   Ported from cliftonhatfield.com (see hero-traces.js for the JS half): a
   faint 46px crosshatch grid, radially masked toward the top-left, with a
   soft accent bloom behind the headline and short comet-style light pulses
   that trace individual grid lines at random. `.hero-bg` is `position:
   absolute` so it drops out of the grid layout entirely — `.hero` supplies
   the containing block via `position: relative` above. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* `.hero-grid` / `.hero-traces` bleed 2px past this box on every edge (see
     below) to hide the mask's crisp boundary. `.hero` here runs full
     viewport width (a full-bleed band, unlike cliftonhatfield.com's
     narrower hero), so without clipping that bleed that pokes 2px past the
     left/right viewport edge and forces a horizontal scrollbar. */
  overflow: hidden;
}

.hero-copy,
.hero-thread {
  position: relative;
  z-index: 1;
}

.hero-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: var(--grid-opacity);
  mask-image: radial-gradient(120% 90% at 28% 18%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(
    120% 90% at 28% 18%,
    #000 0%,
    transparent 72%
  );
}

/* Comet trace layer — created and populated by hero-traces.js; the resting
   grid above is never touched. Same radial mask as `.hero-grid` so trails
   fade toward the same edges. */
.hero-traces {
  position: absolute;
  inset: -2px;
  overflow: hidden;
  pointer-events: none;
  mask-image: radial-gradient(120% 90% at 28% 18%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(
    120% 90% at 28% 18%,
    #000 0%,
    transparent 72%
  );
}

.hero-trace {
  position: absolute;
  will-change: transform, opacity;
}

.hero-glow {
  position: absolute;
  left: -8%;
  top: 6%;
  width: 62%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--hero-glow), transparent 72%);
  filter: blur(8px);
}

@media (max-width: 62rem) {
  .hero-glow {
    left: -16%;
    top: 1rem;
    width: clamp(17rem, 82vw, 26rem);
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* ─── pill actions ──────────────────────────────────────────────────── */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  align-items: center;
}

.cta-row .cta-button {
  min-height: 3.25rem;
  padding: 0.85rem 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.008em;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

/* The old buttons stacked a `small` caption inside the control, which made
   them tall blocks rather than actions. The captions now live in
   `.cta-note` under the row. */
.cta-row .cta-button small {
  display: none;
}

.cta-row .cta-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow);
}

.cta-row .cta-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--text) 14%);
  border-color: color-mix(in srgb, var(--accent) 86%, var(--text) 14%);
  color: var(--on-accent);
  box-shadow: var(--shadow-lg);
}

.cta-row .cta-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.cta-row .cta-ghost:hover {
  background: var(--surface-2);
  border-color: var(--text);
  color: var(--text);
}

.cta-note {
  margin: 0.85rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.cta-note span + span::before {
  content: "·";
  margin: 0 0.55rem;
  color: var(--muted);
}

.hero-proof {
  margin: 1.75rem 0 0;
}

/* The box styling lives on the `<a>`, not the wrapping `<p>` — makes the
   whole padded card the click target and hover surface, not just the
   underlying text runs. */
.hero-proof a {
  display: block;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.hero-proof a:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line-strong);
  border-left-color: var(--accent);
}

.hero-proof-cta {
  display: block;
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-proof-label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-proof strong {
  color: var(--text);
}

.artifact-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin: 0.35rem 0 0.6rem;
}

.artifact-dot {
  color: var(--accent);
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.post {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: start;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.85rem 1.15rem 0.35rem;
  box-shadow: none;
  position: relative;
}

.post:last-child {
  padding-bottom: 0.95rem;
}

.post-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 2.35rem;
  min-height: 100%;
}

/* Vertical connector among replies only — not under the root post. */
.post-reply:not(:last-child) .post-rail::after {
  content: "";
  position: absolute;
  top: 2.45rem;
  bottom: -0.35rem;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--muted) 55%, var(--line-strong));
  border-radius: 1px;
}

.post-main {
  min-width: 0;
  padding-bottom: 0.55rem;
}

.post-reply {
  margin-left: 2.25rem;
  background: transparent;
}

.post-reply .post-main {
  padding-top: 0.05rem;
}

.post-who {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.3rem;
}

.avatar {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #101216;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-lg {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.95rem;
}

.post-handle {
  color: var(--text);
  font-weight: 600;
}

a.post-handle,
a.handle-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  text-decoration-line: none;
  text-decoration-thickness: 0;
  text-decoration-color: transparent;
  border-bottom: 0;
  box-shadow: none;
  transition: color 140ms ease;
}

a.post-handle:hover,
a.handle-link:hover {
  color: var(--text);
  text-decoration: none;
  text-decoration-line: none;
}

.post-time {
  color: var(--muted);
}

.post-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.thread-foot {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.55rem 0 0;
}

/* ─── relationship dyad card ────────────────────────────────────────── */

.dyad {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 1rem + 1.5vw, 2.25rem);
  margin-top: 0;
  box-shadow: var(--shadow-sm);
}

.band .dyad,
.band .post,
.band .chart-card {
  background: var(--bg);
}

.dyad-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.agent-tile {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.agent-tile-r {
  justify-content: flex-end;
  text-align: right;
}

.agent-nm {
  font-family: var(--font-sans);
}

.agent-nm b {
  display: block;
  font-size: 0.95rem;
}

.agent-nm span {
  font-size: 0.78rem;
  color: var(--muted);
}

.dyad-vs {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.dyad-vs b {
  display: block;
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0;
  text-transform: none;
}

.meters {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.55rem;
}

/* Desktop: mirror columns (value|bar · label · bar|value). Agent handles live
   in .meter-who and stay visually hidden here — the dyad header supplies the
   left/right mapping. Mobile stacks each side with the handle shown. */
.meter {
  display: grid;
  grid-template-columns: 1fr 6.2rem 1fr;
  gap: 0.6rem;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.meter-side {
  display: grid;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.meter-side-l {
  grid-template-columns: 2.2rem 1fr;
}

.meter-side-r {
  grid-template-columns: 1fr 2.2rem;
}

.meter-who {
  display: none;
}

.meter-nm {
  text-align: center;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.meter-val {
  font-family: var(--font-mono);
  color: var(--text);
}

.meter-side-r .meter-val {
  text-align: right;
}

.bar {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}

.bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0.9;
}

/* Match the agent avatar accents so left/right columns stay distinguishable. */
.bar-l i {
  right: 0;
  background: #5ec8d8;
}

.bar-r i {
  left: 0;
  background: #d87f5e;
}

.receipts {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.receipt {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.85rem 0.95rem;
  font-size: 0.88rem;
}

.receipt-who {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.receipt-who b {
  color: var(--text);
}

.receipt q {
  quotes: "\201C" "\201D";
  font-style: italic;
}

.caption {
  font-family: var(--font-sans);
  font-size: 0.83rem;
  color: var(--muted);
  margin: 0.8rem 0 0;
}

/* ─── identity drift chart ──────────────────────────────────────────── */

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 1rem + 1.5vw, 2.25rem);
  margin-top: 0;
  box-shadow: var(--shadow);
}

.chart-card svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-axis {
  stroke: var(--line-strong);
}

.chart-tick {
  fill: var(--muted);
  font-size: 10px;
  font-family: var(--font-sans);
}

.chart-l1 {
  stroke: var(--accent);
}

.chart-l2 {
  stroke: var(--chart-2);
}

.chart-l3 {
  stroke: var(--chart-3);
}

.chart-legend {
  display: flex;
  gap: 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.chart-legend i {
  display: inline-block;
  width: 0.85rem;
  height: 3px;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.chart-key-1 {
  background: var(--accent);
}

.chart-key-2 {
  background: var(--chart-2);
}

.chart-key-3 {
  background: var(--chart-3);
}

/* ─── compressed placards ───────────────────────────────────────────── */

.placards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Real panels rather than two ruled text columns. */
.placard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem);
  box-shadow: var(--shadow-sm);
}

.band .placard {
  background: var(--bg);
}

/* Inside a panel the label is the card's title, not a category eyebrow —
   sentence case at heading scale so the card has a readable anchor. */
.placard .section-label {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0.85rem;
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: -0.018em;
  text-transform: none;
  color: var(--text);
}

.placard-sub {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.placard p {
  margin: 0.5rem 0;
  font-size: 0.9875rem;
  color: var(--muted);
}

.notlist {
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;
}

.notlist li {
  margin: 0.45rem 0;
  padding-left: 1rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--muted);
}

.notlist li::before {
  content: "\00D7";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ─── responsive: hero + dyad + placards ────────────────────────────── */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .receipts {
    grid-template-columns: 1fr;
  }

  .placards {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .post {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }

  .post-reply {
    margin-left: 1.25rem;
  }
}

@media (max-width: 560px) {
  /* Keep both agents left-aligned. The old stagger (left tile / right tile)
     fought the meter columns and made ownership impossible to read. */
  .dyad-head {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .agent-tile-r {
    justify-content: flex-start;
    text-align: left;
    flex-direction: row;
  }

  .agent-tile-r .avatar {
    order: -1;
  }

  .dyad-vs {
    text-align: left;
  }

  /* Stack each metric as labeled rows: handle · bar · value.
     Reorder so the metric name leads; DOM order is L · name · R for desktop. */
  .meter {
    grid-template-columns: 1fr;
    grid-template-areas:
      "nm"
      "l"
      "r";
    gap: 0.45rem;
    font-size: 0.78rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
  }

  .meter:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .meter:first-child {
    padding-top: 0;
  }

  .meter-nm {
    grid-area: nm;
    text-align: left;
    justify-self: start;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.1rem;
  }

  .meter-side-l {
    grid-area: l;
  }

  .meter-side-r {
    grid-area: r;
  }

  .meter-side-l,
  .meter-side-r {
    grid-template-columns: 7rem minmax(0, 1fr) 2.2rem;
    align-items: center;
    gap: 0.5rem;
  }

  .meter-side-l .meter-who {
    grid-column: 1;
    grid-row: 1;
  }

  .meter-side-l .bar {
    grid-column: 2;
    grid-row: 1;
  }

  .meter-side-l .meter-val {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
  }

  .meter-side-r .meter-who {
    grid-column: 1;
    grid-row: 1;
  }

  .meter-side-r .bar {
    grid-column: 2;
    grid-row: 1;
  }

  .meter-side-r .meter-val {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
  }

  .meter-who {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
  }

  /* Both bars grow left → right once the columns are stacked. */
  .bar-l i {
    left: 0;
    right: auto;
  }
}

.proof-bundle-id {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1rem;
}

.proof-bundle-id code {
  font-size: 0.8rem;
  color: inherit;
}

/* Tertiary "read more" action. Sentence case with a hover-only rule reads as
   a product link; the previous uppercase + permanent underline read as a
   blog's footer link. */
.stats-digest-link {
  margin: 1.75rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.008em;
  text-transform: none;
}

.stats-digest-link a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1em;
  transition: border-color 160ms ease;
}

.stats-digest-link a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.section-meta-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.05em;
  letter-spacing: 0.04em;
}

.section-meta-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── contrast (post-hero category distinctions) ────────────────────── */

.contrast-block {
  margin-top: 2rem;
}

/* Skip layout/paint for offscreen post-hero sections until near viewport. */
.section,
.stats,
.contrast-block,
.proof-block,
.section-demo,
.section-cta {
  content-visibility: auto;
  contain-intrinsic-size: auto 28rem;
}

.contrast-block p {
  color: var(--muted);
  font-size: 0.95rem;
}

.contrast-block p:last-child {
  margin-bottom: 0;
}

/* ─── section frame ─────────────────────────────────────────────────── */

/* Bands, not a ruled column. Each section owns a full-bleed background and a
   generous vertical rhythm; alternating `.band` sections give the page the
   sectioned structure an enterprise site reads with. */
.section,
.stats {
  margin: 0;
  padding-block: var(--section-y);
  border-left: 0;
  position: relative;
}

.section + .section::before,
.stats + .section::before,
.section + .stats::before {
  content: "";
  position: absolute;
  inset-inline: max(var(--gutter), (100% - var(--max-w)) / 2);
  top: 0;
  border-top: 1px solid var(--line);
}

/* Opt-in tinted band. Suppresses the divider rule above it — the colour
   change is already the separation. */
.section.band,
.stats.band {
  background: var(--band);
}

.section.band::before,
.band + .section::before,
.band + .stats::before {
  border-top: 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 clamp(1.75rem, 1rem + 2vw, 3rem);
  padding-bottom: 0;
  border-bottom: 0;
  max-width: 46rem;
}

/* Small uppercase category label — kept as the section eyebrow. */
.section-label {
  margin: 0;
  order: -1;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Display heading. Sections previously had only the 0.68rem uppercase label,
   which is the main reason the page scanned as a blog rather than a product
   site — there was no headline at any section. */
.section-title {
  margin: 0;
  font-size: clamp(1.65rem, 1.15rem + 1.8vw, 2.6rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.026em;
  color: var(--text);
  /* No `text-wrap: balance` here — the `max-width: 46rem` on `.section-head`
     already produces good ragging across nine headings, and balancing every
     one of them costs main-thread time against the mobile TBT budget. */
  /* This is almost always the `#fragment` target (see `aria-labelledby` on
     each `.section`), but `.section-label` sits visually above it via
     `order: -1` — `html`'s `scroll-padding-top` alone clears the header for
     *this* element only, leaving the eyebrow label above it still tucked
     underneath. Extra scroll-margin here (combines additively with
     scroll-padding-top) pulls the whole head, label included, clear of the
     header instead. */
  scroll-margin-top: 2rem;
}

/* The label is the eyebrow, so the meta line drops to the end of the head. */
.section-head .section-meta {
  order: 3;
}

.section-meta {
  font-family: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-height: 1em;
}

/* Bands run to 78rem, but running prose must not. Cap the measure at roughly
   75 characters so body copy stays readable on wide displays — long lines are
   the other half of why the old layout needed a narrow column. */
.section > p,
.stats > p,
.section > ul,
.section > ol {
  max-width: 62rem;
}

/* Every `.section-head` in index.html carries a `.section-title`, so the
   fallback single-line arrangement is not needed. A `:not(:has(...))` guard
   here measurably raised style-recalc cost against the mobile TBT budget in
   lighthouse-budget.json; add an explicit class if a title-less head ever
   ships rather than reintroducing the `:has()` match. */

/* ─── arcology definition ───────────────────────────────────────────── */

/* The page wears the Arcology Labs wordmark, so this is the one place that
   says what the word means. Set as a dictionary entry rather than prose: the
   headword, the real 1969 definition, and our claim on the word each need to
   read as a separate thing, not as one paragraph of brand copy.

   Narrower than the 62rem prose cap because the card's own padding plus the
   sense indent sit inside this width — 56rem is what actually keeps the
   definition text near a readable measure instead of running the full band. */
.definition {
  margin: 0;
  max-width: 56rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem);
  box-shadow: var(--shadow-sm);
}

.definition-term {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.definition-word {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.definition-say {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.definition-pos {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
}

/* Baseline alignment (not the default stretch) is what keeps the small mono
   sense number sitting on the first line of its definition at every clamp
   step, without hand-tuned line-heights. */
.definition-sense {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0 0.75rem;
  margin: 0;
}

.definition-sense + .definition-sense {
  margin-top: 1.15rem;
}

.definition-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.definition-sense p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.62;
}

/* The etymology halves are a gloss, not emphasis — underline them instead of
   italicising, so "architecture + ecology" reads as the parts of the word. */
.definition-sense em {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--accent-line);
}

/* Aligns with the card above rather than the 62rem `.section > p` default, so
   the entry and its footnote share one left and right edge. `.define` scoping
   keeps specificity above the `.section > p` default. */
.define .definition-note {
  margin: 1.5rem 0 0;
  max-width: 56rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Two entries, one lexicon. Each column is a card plus the footnote that
   belongs to it, so the note can never drift from its headword. Stacked by
   default; side by side once both cards get a real reading measure (~28rem
   each). The flex column stretches the cards to equal height in a row, which
   is what makes the pair read as deliberate rather than coincidental. */
.definition-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  max-width: 56rem;
}

.definition-col {
  display: flex;
  flex-direction: column;
}

.definition-col .definition {
  flex: 1;
}

@media (min-width: 72rem) {
  .definition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    max-width: none;
  }
}

/* Epistemic status as the card's closing line rather than a badge on the
   headword — the definition argues the claim, then the status qualifies it,
   so a reader hits the idea before the hedge. The top border echoes the
   headword row's own border-bottom, bookending the card. */
.definition-status-row {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.definition-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

/* ─── stats hero ────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  /* 2-up on small screens; 3-up from 32rem. Gap is the shared divider —
     one line between cells, not a double border from adjacent cards. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 32rem) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Cells fill the panel; the grid gap is the only line between them. */
.stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  min-width: 0;
  padding: clamp(1.1rem, 0.8rem + 1vw, 1.6rem);
  background: var(--surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.band .stat {
  background: var(--bg);
}

.stat-value {
  margin: 0;
  font-family: inherit;
  font-weight: 600;
  /* Bigger numerals — the stats block is the main visual anchor of the page;
     its weight should match that role. */
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.55rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 1.1em;
  height: 1.1em;
  overflow: hidden;
}

.splitflap-display {
  display: inline-flex;
  align-items: flex-start;
  min-height: 1.1em;
  height: 1.1em;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}

.splitflap-slot {
  position: relative;
  display: inline-block;
  width: 0.64em;
  height: 1.1em;
  overflow: hidden;
  flex: 0 0 auto;
  perspective: 7rem;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
}

.splitflap-slot.is-comma {
  width: 0.28em;
}

.splitflap-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: pre;
  transform-style: preserve-3d;
  transform-origin: center;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
  background: var(--split-flap-surface);
  border: 1px solid var(--split-flap-line);
  box-shadow: inset 0 0 0 1px var(--split-flap-edge);
}

.splitflap-slot.is-comma .splitflap-glyph {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.splitflap-slot.is-static .splitflap-glyph {
  position: relative;
  transform: rotateX(0deg);
  opacity: 1;
}

.splitflap-slot.is-animating .splitflap-glyph.splitflap-glyph-out {
  transition:
    transform 300ms cubic-bezier(0.22, 0.72, 0.24, 1),
    opacity 190ms linear;
  transform: rotateX(0deg);
  transform-origin: 50% 100%;
  opacity: 1;
}

.splitflap-slot.is-animating .splitflap-glyph.splitflap-glyph-in {
  transition:
    transform 300ms cubic-bezier(0.22, 0.72, 0.24, 1),
    opacity 190ms linear;
  transform: rotateX(90deg);
  transform-origin: 50% 0%;
  opacity: 0;
}

.splitflap-slot.is-animating.is-active .splitflap-glyph.splitflap-glyph-out {
  transform: rotateX(-90deg);
  opacity: 0;
}

.splitflap-slot.is-animating.is-active .splitflap-glyph.splitflap-glyph-in {
  transform: rotateX(0deg);
  opacity: 1;
}

.splitflap-glyph.splitflap-glyph-out::after,
.splitflap-glyph.splitflap-glyph-in::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.splitflap-glyph.splitflap-glyph-out::after {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.01) 46%,
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0.1)
  );
}

.splitflap-slot.is-comma .splitflap-glyph::after {
  display: none;
}

.splitflap-glyph-divider {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-50%);
  pointer-events: none;
}

.splitflap-glyph.splitflap-glyph-in .splitflap-glyph-divider,
.splitflap-glyph.splitflap-glyph-out .splitflap-glyph-divider {
  display: block;
}

.stat-label {
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ─── demo ──────────────────────────────────────────────────────────── */

.demo-app-store {
  margin: 1.15rem 0 0;
}

.demo-app-store .app-store-badge-link {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  border-bottom: 0;
}

.demo-app-store .app-store-badge-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.app-store-badge {
  display: block;
  height: 2.5rem;
  width: auto;
}

.app-store-badge--dark {
  display: none;
}

.app-store-badge--light {
  display: block;
}

html[data-theme="dark"] .app-store-badge--light {
  display: none;
}

html[data-theme="dark"] .app-store-badge--dark {
  display: block;
}

.section-demo > .resp-16x9 {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* Hide the empty video frame entirely until a URL is wired in. The 6-up phone
   strip below is the §4.11 fallback; an empty 16:9 box reads as a load
   failure and dwarfs the rest of the page. JS removes the attribute (or sets
   it to a real URL) when the iframe is injected, which un-hides this box. */
.section-demo > .resp-16x9[data-demo-src=""] {
  display: none;
}

/* Phone-shaped tiles: portrait by default so iOS/Android screenshots drop in
   without cropping. Landscape sources letterbox via `object-fit: contain`. */
.demo-strip {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 30rem) {
  .demo-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.demo-strip figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--demo-phone-chrome);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.demo-strip .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  background: var(--demo-phone-chrome);
  overflow: hidden;
}

/* Center like the lightbox (intrinsic size + max bounds). Stacked light/dark
   imgs stay absolutely positioned so only one layout box is used. */
.demo-strip .frame .demo-shot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.demo-strip .frame .demo-shot-dark {
  display: none;
}

.demo-strip .frame .demo-shot-light {
  display: block;
}

html[data-theme="dark"] .demo-strip .frame .demo-shot-light {
  display: none;
}

html[data-theme="dark"] .demo-strip .frame .demo-shot-dark {
  display: block;
}

.demo-strip figcaption {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0.55rem 0.5rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

/* Opens phone tile in a theme-matched overlay (uses landing data-theme). */
.demo-strip__open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: left;
  overflow: visible;
  -webkit-appearance: none;
  appearance: none;
}

.demo-strip__open:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.demo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top, 0px))
    max(0.75rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px))
    max(0.75rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.demo-lightbox[hidden] {
  display: none;
}

.demo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: color-mix(in srgb, var(--bg) 40%, var(--text) 60%);
  opacity: 0.72;
}

.demo-lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(92vh, 52rem);
  padding: 0.65rem 0.65rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .demo-lightbox__panel {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
}

.demo-lightbox__close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.demo-lightbox__close:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.demo-lightbox__img-wrap {
  margin-top: 1.75rem;
  max-height: min(78vh, 44rem);
  overflow: auto;
  border-radius: 6px;
  background: var(--demo-phone-chrome);
}

.demo-lightbox__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(76vh, 43rem);
  object-fit: contain;
}

.demo-lightbox__caption {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}

.placeholder {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

.api-sample {
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ─── positioning: audiences, contrasts, features ───────────────────── */

.positioning-lede {
  max-width: 44rem;
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted);
}

.positioning-sub {
  margin: clamp(2.25rem, 1.5rem + 2vw, 3.25rem) 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* `.section > ul` caps prose lists at 62rem; these are card grids and take
   the full section width. */
.section > .audience-grid,
.section > .not-grid {
  max-width: none;
}

.audience-grid,
.not-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audience-card,
.not-card,
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.band .audience-card,
.band .not-card,
.band .feature-card {
  background: var(--bg);
}

.audience-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
}

.audience-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.audience-card strong {
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.012em;
  color: var(--text);
}

.audience-card span:last-child,
.not-card span:last-child {
  font-size: 0.95rem;
  color: var(--muted);
}

/* A red rule on the left and a crossed label: reads as "ruled out" at a
   glance, without the old wall of × bullets. */
.not-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
}

.not-label {
  font-weight: 650;
  color: var(--text);
}

.not-label::before {
  content: "\00D7";
  margin-right: 0.45rem;
  color: var(--accent);
  font-weight: 700;
}

.feature-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: clamp(2.25rem, 1.5rem + 2vw, 3.25rem);
}

.feature-card {
  padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem);
}

.feature-card h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.feature-card p:last-child {
  margin: 0;
  font-size: 0.975rem;
  color: var(--muted);
}

.feature-eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.feature-card-accent {
  background: linear-gradient(
    160deg,
    var(--accent-soft),
    transparent 60%
  );
  border-color: var(--accent-line);
}

.band .feature-card-accent {
  background:
    linear-gradient(160deg, var(--accent-soft), transparent 60%),
    var(--bg);
}

@media (min-width: 48rem) {
  .audience-grid,
  .not-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* City Tour band: the device recording at its native iPad aspect, controls
   left in frame on purpose so visitors see the city is walkable. The video
   sits inside a CSS-drawn iPad Pro (M4: thin uniform bezel, landscape
   camera on the long edge) so it
   reads as the app running on the device. Mirrored in
   developers/src/components/landing.css (.ipadFrame). */
.city-tour-figure {
  margin: 1.5rem 0 0;
}

.ipad-frame {
  container-type: inline-size;
  position: relative;
  padding: 1.3cqw;
  border-radius: 2.7cqw;
  background: linear-gradient(145deg, #2c2c2e 0%, #161618 55%, #0e0e10 100%);
  box-shadow:
    0 0 0 1px #8e9096,
    0 0 0 3px #3a3b3e,
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 36px 72px -36px rgba(27, 24, 20, 0.55),
    0 12px 28px -18px rgba(27, 24, 20, 0.35);
}

/* Front camera, centered on the top bezel. */
.ipad-frame::before {
  content: "";
  position: absolute;
  top: 0.65cqw;
  left: 50%;
  width: 0.4cqw;
  height: 0.4cqw;
  min-width: 3px;
  min-height: 3px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3b4a63 0%, #0b0d12 70%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.city-tour-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 864;
  background: #000;
  border-radius: 1.4cqw;
  object-fit: cover;
}

.city-tour-figure figcaption {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 48rem;
}

/* Reel band: the 16:9 promo reel, right after the hero. Same playback rules
   as City Tour (poster first, muted loop only while visible, poster plus
   native controls under reduced motion); Sound on restarts it from the top so
   the score lands with the hook. The video lives in Cloud Storage for the
   same iPhone range-request reason. Source: tools/arcopolis-reel/. */
.reel-figure {
  margin: 1.5rem 0 0;
}

.reel-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #07080c;
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 36px 72px -36px rgba(27, 24, 20, 0.55),
    0 12px 28px -18px rgba(27, 24, 20, 0.35);
}

.reel-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #07080c;
  object-fit: cover;
}

.reel-sound {
  position: absolute;
  right: clamp(0.6rem, 2vw, 1rem);
  bottom: clamp(0.6rem, 2vw, 1rem);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(7, 8, 12, 0.62);
  color: #fff;
  font: 600 0.8rem/1 var(--font-sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.reel-sound[hidden] {
  display: none;
}

.reel-sound:hover {
  background: rgba(7, 8, 12, 0.82);
}

.reel-sound:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.reel-sound svg {
  display: block;
  width: 1rem;
  height: 1rem;
  flex: none;
}

.reel-sound .reel-icon-on,
.reel-sound[aria-pressed="true"] .reel-icon-muted {
  display: none;
}

.reel-sound[aria-pressed="true"] .reel-icon-on {
  display: block;
}

@media (max-width: 40rem) {
  .reel-sound {
    gap: 0.4rem;
    padding: 0.4rem 0.7rem 0.4rem 0.55rem;
    font-size: 0.72rem;
  }
}

.reel-figure figcaption {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 48rem;
}

/* Build hero: copy on the left, the developer portal's code window on the
   right. The window mirrors developers/src/components/LandingCodeSample.tsx
   (same three samples, same token colors) so the two front doors match. */
.build-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.build-hero-copy > p:first-child {
  margin-top: 0;
}

@media (min-width: 64rem) {
  .build-hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
  }
}

.code-window {
  --tok-string: #2f7d5b;
  --tok-number: #9a5b00;
  --tok-ok: #2f7d5b;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow:
    0 28px 64px -32px rgba(27, 24, 20, 0.35),
    var(--shadow-sm);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .code-window {
    --tok-string: #9fd7b8;
    --tok-number: #ffb86b;
    --tok-ok: #9fd7b8;
    box-shadow:
      0 32px 80px -32px rgba(0, 0, 0, 0.75),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
}

:root[data-theme="dark"] .code-window {
  --tok-string: #9fd7b8;
  --tok-number: #ffb86b;
  --tok-ok: #9fd7b8;
  box-shadow:
    0 32px 80px -32px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.code-window-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 10px 0;
  border-bottom: 1px solid var(--line);
}

.code-window-tab {
  flex: none;
  margin: 0;
  padding: 10px 12px 11px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 140ms ease, box-shadow 140ms ease;
}

.code-window-tab:hover {
  color: var(--text);
}

.code-window-tab[aria-selected="true"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.code-window-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
  border-radius: 8px;
}

/* All panels share one grid cell, so the window is as tall as the longest
   sample and switching tabs never moves the page. */
.code-window-stack {
  display: grid;
}

.code-window-panel {
  grid-area: 1 / 1;
  min-width: 0;
}

.code-window-panel[data-active="false"] {
  visibility: hidden;
}

.code-window-request,
.code-window-response {
  margin: 0;
  padding: 16px 18px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-window-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--line) 35%, transparent);
  color: var(--muted);
  font-size: 0.75rem;
}

.code-window-ok {
  color: var(--tok-ok);
  font-family: var(--font-mono);
  font-weight: 700;
}

.code-line {
  display: block;
  padding-left: calc(var(--indent, 0ch) + 2ch);
  text-indent: -2ch;
}

.tok-nowrap {
  white-space: nowrap;
}

.tok-method {
  color: var(--accent);
  font-weight: 700;
}

.tok-header {
  color: var(--muted);
}

.tok-key {
  color: var(--text);
}

.tok-string {
  color: var(--tok-string);
}

.tok-number,
.tok-literal {
  color: var(--tok-number);
}

/* A phone gets a preview of the response, not all of it. */
@media (max-width: 35rem) {
  .code-window-stack {
    position: relative;
    max-height: 25rem;
    overflow: hidden;
  }

  .code-window-stack::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 72px;
    background: linear-gradient(to bottom, transparent, var(--surface));
    pointer-events: none;
  }
}

.build-hero + .build-grid {
  margin-top: 2.5rem;
}

/* Three ways in, one card each. Stacked on phones; a row once each card
   has room for its one-line command. */
.build-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.build-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.build-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.build-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* auto top margin pins every command to the card's bottom edge */
.build-card .api-sample {
  margin-top: auto;
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  box-shadow: none;
}

@media (min-width: 64rem) {
  .build-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.band .api-sample {
  background: var(--bg);
}

.api-sample code {
  font-size: inherit;
  color: inherit;
}

/* ─── CTA ───────────────────────────────────────────────────────────── */

.cta-block {
  margin: 1.75rem 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

a.cta-button {
  text-decoration: none;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.008em;
  line-height: 1;
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.cta-button:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--text) 14%);
  border-color: color-mix(in srgb, var(--accent) 86%, var(--text) 14%);
  color: var(--on-accent);
  box-shadow: var(--shadow-lg);
}

.cta-email {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
}

.cta-email a {
  color: var(--accent);
}

#cta-email[hidden] {
  display: none;
}

/* ─── closing CTA band ──────────────────────────────────────────────── */

/* The final contact section is the page's last impression; give it a solid
   band and a centred, larger arrangement instead of the same left-aligned
   text block as every other section. */
.section-cta {
  background: var(--band);
  text-align: center;
}

.section-cta .section-head {
  margin-inline: auto;
  align-items: center;
  text-align: center;
}

.section-cta .cta-block {
  justify-content: center;
}

.section-cta p {
  margin-inline: auto;
  max-width: 44rem;
}

/* ─── footer ────────────────────────────────────────────────────────── */

.landing-foot {
  margin: 0;
  /* padding-block only — the inline padding comes from the `main > *` band
     rule and a shorthand here would zero it out and un-center the footer. */
  padding-block: 2.25rem 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0;
}

.landing-foot a {
  color: var(--muted);
  text-decoration-color: rgba(142, 139, 131, 0.45);
}

.landing-foot a:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

.landing-foot span {
  margin: 0 0.4rem;
  color: var(--line-strong);
}

/* ─── privacy consent ───────────────────────────────────────────────── */

/* Inverted (text-on-text-color) rather than the site's card surface — every
   card, stat tile, and placard now uses `--surface` + a hairline border, so
   the consent banner needs a treatment nothing else on the page uses or it
   reads as just another panel and gets ignored. */
.privacy-consent {
  position: fixed;
  z-index: 1000;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem max(var(--gutter), (100% - var(--max-w)) / 2);
  color: var(--bg);
  background: var(--text);
  border: 0;
  border-top: 1px solid var(--text);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.45;
}

.privacy-consent__content {
  max-width: 50rem;
  flex: 1 1 auto;
}

/* Inline label rather than a stacked heading — keeps the bar a single narrow
   strip instead of growing tall enough to compete with page content. */
.privacy-consent h2 {
  display: inline;
  margin: 0 0.5rem 0 0;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-consent p {
  display: inline;
  margin: 0;
  color: color-mix(in srgb, var(--bg) 82%, var(--text));
}

.privacy-consent a {
  color: var(--bg);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

.privacy-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.privacy-consent button {
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  color: var(--bg);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--bg) 45%, transparent);
  border-radius: var(--radius-pill);
  font: 600 0.9rem/1.2 var(--font-sans);
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.privacy-consent button:hover {
  background: color-mix(in srgb, var(--bg) 14%, transparent);
  border-color: color-mix(in srgb, var(--bg) 70%, transparent);
}

.privacy-consent [data-privacy-consent-accept] {
  /* Literal white, not `--on-accent` — `--on-accent` flips to near-black in
     dark theme (where `--accent` is a lighter red), but this button sits on
     the inverted consent bar, not the page background, so it needs a fixed
     white label in both themes. */
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.privacy-consent [data-privacy-consent-accept]:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--bg) 14%);
  border-color: color-mix(in srgb, var(--accent) 86%, var(--bg) 14%);
}

.privacy-consent button:focus-visible,
.privacy-consent a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 46rem) {
  .privacy-consent {
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
    padding-block: 0.85rem;
  }

  .privacy-consent h2 {
    display: block;
    margin-bottom: 0.2rem;
  }

  .privacy-consent__actions button {
    flex: 1 1 10rem;
  }
}

/* ─── utility ───────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 28rem) {
  .header-inner {
    gap: 0.55rem;
  }

  .brandnav {
    gap: 0.65rem 0.85rem;
    font-size: 0.75rem;
  }
}
