/* ============================================================
   Aegis-Beacon — Design System v2
   Direction: rugged "mission console" — rescue electronics
   built for the field. Dark graphite surfaces, signal-orange
   accent, technical display type, precision hairlines.
   Typography: Chakra Petch (display) + Manrope Variable (body)
   + JetBrains Mono (data/terminal). All fonts self-hosted
   via @fontsource — no external requests.
   ============================================================ */

/* ─── 1. Color Tokens ───
   Palette: cool technical paper, near-black ink, signal orange as the
   only saturated accent. Deliberately not a warm cream + clay pairing. */
:root {
  color-scheme: light;
  --background: oklch(0.972 0.002 90deg);     /* cool paper, no warm cream */
  --foreground: oklch(0.14 0.006 250deg);     /* cool ink */
  --card: oklch(0.998 0 90deg);
  --card-foreground: oklch(0.14 0.006 250deg);
  --primary: oklch(0.6 0.185 45deg);          /* signal orange */
  --primary-hover: oklch(0.53 0.19 45deg);
  --primary-foreground: oklch(0.99 0 0deg);   /* white on orange — AA */
  --secondary: oklch(0.958 0.003 90deg);
  --secondary-foreground: oklch(0.19 0.01 250deg);
  --secondary-hover: oklch(0.93 0.006 90deg);
  --muted: oklch(0.952 0.003 90deg);
  --muted-foreground: oklch(0.42 0.012 250deg); /* on white: >= 7:1 */
  --accent: oklch(0.945 0.006 90deg);
  --accent-foreground: oklch(0.19 0.01 250deg);
  --border: oklch(0.885 0.008 90deg);
  --border-strong: oklch(0.78 0.014 90deg);
  --ring: oklch(0.52 0.17 45deg);
  --destructive: oklch(0.55 0.2 27deg);
  --success: oklch(0.48 0.13 152deg);
  --warning: oklch(0.6 0.14 78deg);
  --info: oklch(0.4 0.03 230deg);
  --surface-invert: oklch(0.13 0.004 50deg);
  --surface-invert-fg: oklch(0.97 0 0deg);

  /* Typography */
  --font-display: 'Chakra Petch', 'Manrope Variable', sans-serif;
  --font-body: 'Manrope Variable', 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing & shape */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.375rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 4%), 0 1px 3px 0 rgb(0 0 0 / 3%);
  --shadow-md: 0 2px 6px -1px rgb(0 0 0 / 8%), 0 6px 16px -6px rgb(0 0 0 / 8%);
  --shadow-lg: 0 8px 24px -8px rgb(0 0 0 / 14%), 0 18px 48px -16px rgb(0 0 0 / 12%);
  --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--primary) 28%, transparent),
                 0 10px 34px -8px color-mix(in srgb, var(--primary) 42%, transparent);

  --header-h: 64px;
  --container-max: 80rem;
  --container-px: clamp(1.25rem, 3vw, 2.75rem);
}

.dark {
  color-scheme: dark;
  --background: oklch(0.14 0.004 250deg);      /* cool graphite */
  --foreground: oklch(0.94 0.002 250deg);
  --card: oklch(0.185 0.005 250deg);
  --card-foreground: oklch(0.94 0.002 250deg);
  --primary: oklch(0.71 0.19 45deg);           /* brighter orange for dark bg */
  --primary-hover: oklch(0.76 0.17 45deg);
  --primary-foreground: oklch(0.16 0.004 45deg); /* dark on orange — AA */
  --secondary: oklch(0.23 0.006 250deg);
  --secondary-foreground: oklch(0.93 0.003 250deg);
  --secondary-hover: oklch(0.28 0.008 250deg);
  --muted: oklch(0.22 0.006 250deg);
  --muted-foreground: oklch(0.72 0.01 250deg); /* on graphite: >= 7:1 */
  --accent: oklch(0.23 0.008 250deg);
  --accent-foreground: oklch(0.93 0.003 250deg);
  --border: oklch(0.27 0.01 250deg);
  --border-strong: oklch(0.37 0.014 250deg);
  --ring: oklch(0.72 0.18 45deg);
  --destructive: oklch(0.72 0.17 25deg);
  --success: oklch(0.74 0.14 152deg);
  --warning: oklch(0.8 0.14 80deg);
  --info: oklch(0.76 0.03 230deg);
  --surface-invert: oklch(0.94 0.002 250deg);
  --surface-invert-fg: oklch(0.145 0.004 250deg);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 30%);
  --shadow-md: 0 2px 8px -2px rgb(0 0 0 / 45%), 0 8px 20px -8px rgb(0 0 0 / 40%);
  --shadow-lg: 0 10px 28px -10px rgb(0 0 0 / 55%), 0 24px 64px -20px rgb(0 0 0 / 45%);
}

@media (width >= 1024px) {
  :root { --container-px: 2rem; }
}

/* ─── 2. Base Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: color-mix(in srgb, var(--primary) 24%, transparent); color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background-color: var(--background);
  background-image:
    radial-gradient(ellipse 80% 55% at 100% -5%, color-mix(in srgb, var(--primary) 5%, transparent), transparent 58%),
    radial-gradient(ellipse 65% 45% at 0% 100%, color-mix(in srgb, var(--info) 4%, transparent), transparent 52%);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.dark body {
  background-color: var(--background);
  background-image:
    radial-gradient(ellipse 70% 50% at 90% 0%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 90%, color-mix(in srgb, var(--info) 6%, transparent), transparent 60%),
    radial-gradient(circle, rgb(255 255 255 / 4.5%) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }

/* ─── 3. Typographic scale ─── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-wrap: balance;
  color: var(--foreground);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
code, kbd, samp, pre { font-family: var(--font-mono); }

/* ─── 4. Scrollbar ─── */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background-color: var(--muted-foreground); }

/* ─── 5. Container & sections ─── */
.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--container-px); }
/* .section only owns vertical rhythm; horizontal padding always comes from .container,
   so a `section.container` element keeps its side gutters (a later `padding` shorthand
   would otherwise zero padding-inline due to equal specificity). */
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-alt {
  background:
    radial-gradient(ellipse 70% 55% at 50% -12%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 70%),
    var(--muted);
  border-block: 1px solid var(--border);
}

/* ─── 6. Background atmosphere ───
   Restrained: a single soft radial tint, nothing animated,
   no grid lines, no orbs. */
.hero-wrap {
  background:
    radial-gradient(ellipse 62% 48% at 78% -10%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 36% at 8% 6%, color-mix(in srgb, var(--ring) 6%, transparent), transparent 72%);
}

/* ─── 7. Section heads ─── */
.section-head { max-width: 46rem; margin: 0 auto 2.5rem; text-align: center; }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head__title { margin: 0; letter-spacing: -0.01em; }
.section-head__lead { margin: 0.75rem 0 0; color: var(--muted-foreground); line-height: 1.65; }

/* ─── 8. Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.72rem 1.4rem; font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 600;
  border-radius: var(--radius-lg); border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, color 0.18s ease;
  text-decoration: none; line-height: 1.2; touch-action: manipulation;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: var(--primary); color: var(--primary-foreground);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-secondary {
  background: var(--secondary); color: var(--secondary-foreground);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--secondary-hover); border-color: color-mix(in srgb, var(--primary) 55%, var(--border-strong)); transform: translateY(-1px); }
.btn-cta {
  background: var(--primary-foreground); color: var(--primary);
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}
.btn-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgb(0 0 0 / 30%); }
.btn-cta-ghost {
  background: transparent; color: var(--primary-foreground);
  border-color: color-mix(in srgb, var(--primary-foreground) 35%, transparent);
}
.btn-cta-ghost:hover { background: color-mix(in srgb, var(--primary-foreground) 12%, transparent); border-color: color-mix(in srgb, var(--primary-foreground) 65%, transparent); transform: translateY(-1px); }

/* ─── 9. Hero (specimen plate + signal tape) ─── */
.hero-wrap { position: relative; isolation: isolate; overflow: hidden; }
.hero-section {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 3.5rem);
  padding-inline: var(--container-px);
}
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3.5rem; }
  .hero-copy { padding-inline-start: clamp(0rem, 2vw, 2.5rem); }
}
.hero-copy { display: grid; gap: 1.15rem; justify-items: start; }
.hero-stamp {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.06em; color: var(--muted-foreground);
}
.hero-stamp::before {
  content: ""; width: 7px; height: 7px; border-radius: 1px;
  background: var(--primary);
}
.hero-title {
  margin: 0; font-size: clamp(2.15rem, 4.6vw, 3.4rem); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.05; max-width: 20ch;
}
.hero-sub {
  margin: 0; color: var(--muted-foreground); font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  line-height: 1.7; max-width: 44ch;
}
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.35rem; }

/* hairline key-spec strip under the copy */
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 0;
  margin: 0.85rem 0 0; padding: 0; list-style: none;
  border-block: 1px solid var(--border);
}
.hero-stats li {
  display: flex; flex-direction: column; gap: 0.18rem;
  padding: 0.7rem 1.15rem 0.7rem 0; margin-right: 1.15rem;
}
.hero-stats li + li { border-left: 1px solid var(--border); padding-left: 1.15rem; }
.hero-stats span { font-size: 0.66rem; letter-spacing: 0.04em; color: var(--muted-foreground); }
.hero-stats b {
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600;
  color: var(--foreground); font-variant-numeric: tabular-nums;
}

/* specimen plate: the device as a field-manual figure */
.hero-specimen { display: grid; gap: 0.9rem; }
.specimen-plate {
  position: relative;
  border: 1px solid var(--border-strong); border-radius: var(--radius-2xl);
  padding: 0.65rem; background: var(--card); box-shadow: var(--shadow-lg);
}
.specimen-plate::before,
.specimen-plate::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
}
.specimen-plate::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--primary); border-left: 2px solid var(--primary);
  border-top-left-radius: 6px;
}
.specimen-plate::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--primary); border-right: 2px solid var(--primary);
  border-bottom-right-radius: 6px;
}
.specimen-plate__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.3rem 0.55rem 0.65rem;
}
.specimen-plate__fig {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em;
  color: var(--muted-foreground);
}
.specimen-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--success);
}
.specimen-chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px var(--success);
}
.specimen-plate__img {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background-color: var(--muted);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
}
.specimen-image { width: 100%; height: auto; display: block; }
.specimen-caption {
  margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--muted-foreground);
  line-height: 1.6; max-width: 46ch;
}

/* signal tape: the real payload waveform + rescue-band ruler */
.hero-tape {
  margin-top: clamp(2.25rem, 4.5vw, 3.5rem);
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  overflow: hidden; background: var(--card); box-shadow: var(--shadow-md);
}
.hero-tape__top {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.6rem 1.1rem; border-bottom: 1px solid var(--border);
  background: var(--muted);
}
.hero-tape__live {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--success);
}
.hero-tape__live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px var(--success);
}
.hero-tape__meta {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em;
  color: var(--muted-foreground);
}
.hero-tape__signal {
  position: relative;
  padding: 1.1rem 1.1rem 0.7rem;
  overflow: hidden;
}
.hero-tape__trace { position: relative; }
.hero-tape__signal svg {
  display: block; width: 100%; height: 12px;
}
.hero-tape__signal rect { fill: var(--primary); }

/* carrier cursor: the one slow, deliberate motion on the page - a scope
   trace sweeping the live waveform. Decorative (aria-hidden), so it stays
   invisible until motion is explicitly allowed. */

/* thin frequency tick strip under the waveform */
.hero-tape__scale {
  display: flex; justify-content: space-between; gap: 0;
  padding: 0.4rem 1.1rem 0;
}
.hero-tape__scale span {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--muted-foreground); font-variant-numeric: tabular-nums;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.hero-tape__scale span:first-child { padding-left: 0; }
.hero-tape__scale span:last-child { padding-right: 0; }
.hero-tape__carrier {
  position: absolute; top: -4px; bottom: -2px; left: 0;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--primary), color-mix(in srgb, var(--primary) 35%, transparent));
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--primary) 50%, transparent);
  opacity: 0; pointer-events: none;
}
.hero-tape__carrier::before {
  content: ""; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid var(--primary);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-tape__carrier {
    opacity: 1;
    /* duration set from the payload's real CW transmission time at 20 WPM */
    animation: carrierSweep var(--carrier-dur, 7s) linear infinite;
  }
  @keyframes carrierSweep {
    from { left: 0%; }
    to { left: 100%; }
  }
}
.hero-tape__ruler {
  position: relative;
  display: flex; justify-content: space-between;
  padding: 0.5rem 1.1rem 1.05rem;
}
.hero-tape__ruler::before {
  content: ""; position: absolute; left: 1.1rem; right: 1.1rem; top: 0.5rem;
  height: 1px; background: var(--border);
}
.hero-tape__ruler span {
  position: relative; padding-top: 0.9rem;
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--muted-foreground); font-variant-numeric: tabular-nums;
}
.hero-tape__ruler span::before {
  content: ""; position: absolute; top: 0.3rem; left: 50%;
  width: 1px; height: 0.4rem; background: var(--border-strong);
  transform: translateX(-50%);
}

/* ─── 10. Design cards (asymmetric) ─── */
.design-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.1rem;
}
@media (min-width: 640px) { .design-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .design-grid { grid-template-columns: repeat(3, 1fr); }
  .design-card--wide { grid-column: span 2; }
}
.design-card {
  position: relative;
  padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.design-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.design-card--wide { border-top: 2px solid var(--primary); }
.design-card h3 { margin-bottom: 0.6rem; font-size: 1.08rem; }
.design-card p { color: var(--muted-foreground); line-height: 1.65; font-size: 0.9rem; margin: 0; }
.design-card__code {
  margin-top: 1.1rem; padding: 0.75rem 0.95rem;
  background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.7;
  display: grid; gap: 0.1rem; color: var(--foreground);
}
.design-card__code .dim { color: var(--muted-foreground); }
.design-card__code .accent { color: var(--primary); }

/* ─── 11. Modes console (rows, no numbers/dots) ─── */
.modes-console {
  border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow-sm);
}
.mode-row {
  display: grid; grid-template-columns: 1fr; gap: 0.4rem 1.75rem;
  padding: 1.25rem 1.4rem; border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.mode-row:last-child { border-bottom: none; }
@media (min-width: 900px) {
  .mode-row { grid-template-columns: 11rem 1fr auto; }
}
.mode-row__name {
  font-family: var(--font-display); font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.1em; color: var(--primary);
}
.mode-row__desc { margin: 0; font-size: 0.9rem; color: var(--muted-foreground); line-height: 1.65; }
.mode-row__meta {
  display: flex; gap: 1.25rem; margin: 0; font-family: var(--font-mono);
  font-size: 0.72rem; color: var(--muted-foreground);
}
.mode-row__meta div { display: flex; gap: 0.4rem; }
.mode-row__meta dt { color: var(--muted-foreground); }
.mode-row__meta dd { margin: 0; color: var(--foreground); font-weight: 500; }

/* ─── 12. Stack rail (mono, no chips) ─── */
.stack-rail {
  display: flex; flex-wrap: wrap; gap: 0;
  border-block: 1px solid var(--border); padding: 1.15rem 0.25rem;
}
.stack-rail span {
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500; color: var(--foreground);
  padding: 0.25rem 1.1rem; border-right: 1px solid var(--border);
}
.stack-rail span:first-child { padding-left: 0; }
.stack-rail span:last-child { border-right: none; }
@media (max-width: 640px) {
  .stack-rail span { border-right: none; padding: 0.25rem 0.9rem 0.25rem 0; }
}
.stack-note { margin: 0.9rem 0 0; font-size: 0.82rem; color: var(--muted-foreground); }

/* ─── 14. FAQ ─── */
.faq { max-width: 44rem; margin: 0 auto; border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__question {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 0.25rem; font-weight: 600;
  cursor: pointer; user-select: none; width: 100%;
  background: none; border: none; color: var(--foreground);
  font-size: 0.95rem; text-align: left;
}
.faq__question:hover { color: var(--primary); }
.faq__chevron { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.22s ease; color: var(--muted-foreground); }
.faq__item[open] .faq__chevron { transform: rotate(180deg); color: var(--primary); }
.faq__answer { color: var(--muted-foreground); padding: 0 0 1.2rem; line-height: 1.7; }

/* ─── 15. CTA ─── */
.cta-section {
  position: relative; overflow: hidden;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}
.cta-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; text-align: center; }
.cta-section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; margin-bottom: 0.9rem; }
.cta-section p { font-size: 1.02rem; opacity: 0.92; margin-bottom: 2rem; max-width: 520px; margin-inline: auto; }
.cta-buttons { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }

/* ─── 16. Scroll reveal (JS-driven, cross-browser) ───
   Elements opt in with [data-rv]. The motion module adds
   html.motion-ok at boot; only then are they hidden, so content
   stays visible with JS disabled or reduced-motion on. */html.motion-ok [data-rv] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--rv-delay, 0ms);
  will-change: opacity, transform;
}
html.motion-ok [data-rv="fade"] { transform: none; }
html.motion-ok [data-rv="left"] { transform: translateX(-2rem); }
html.motion-ok [data-rv="right"] { transform: translateX(2rem); }
html.motion-ok [data-rv="scale"] { transform: scale(0.94); }
html.motion-ok [data-rv].is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.motion-ok [data-rv] {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ─── 17. Entry fade (single, restrained) ─── */
@media (prefers-reduced-motion: no-preference) {
  main#main-content > *:first-child { animation: fadeIn 0.4s ease-out both; }
}

/* ─── 19. Wiki prose ─── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.prose-wiki { max-width: 760px; }
.prose-wiki h1, .prose-wiki h2, .prose-wiki h3, .prose-wiki h4 {
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}
.prose-wiki h2 {
  margin-top: 2.4rem; margin-bottom: 0.9rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border); letter-spacing: -0.01em;
  transition: border-color 0.5s ease, color 0.5s ease;
}
.prose-wiki h2.is-in {
  border-bottom-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  color: var(--foreground);
}
.prose-wiki h2:target, .prose-wiki h3:target {
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  border-radius: var(--radius-md);
}
.prose-wiki h3 { margin-top: 2rem; margin-bottom: 0.6rem; }
.prose-wiki h4 { margin-top: 1.6rem; margin-bottom: 0.55rem; font-family: var(--font-body); }
.prose-wiki p { line-height: 1.75; color: var(--muted-foreground); margin-bottom: 1.1rem; }
.prose-wiki > p:first-of-type {
  font-size: 1.0625rem; line-height: 1.7; color: color-mix(in srgb, var(--foreground) 84%, var(--muted-foreground));
}
.prose-wiki strong { color: var(--foreground); font-weight: 600; }
.prose-wiki a { color: var(--primary); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--primary) 30%, transparent); text-underline-offset: 3px; }
.prose-wiki a:hover { text-decoration-color: currentColor; }
.prose-wiki ul, .prose-wiki ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.prose-wiki ul { list-style-type: disc; }
.prose-wiki ol { list-style-type: decimal; }
.prose-wiki li { line-height: 1.75; color: var(--muted-foreground); margin-bottom: 0.35rem; }
.prose-wiki li::marker { color: var(--primary); }
.prose-wiki code {
  font-family: var(--font-mono); font-size: 0.82em;
  background: color-mix(in srgb, var(--primary) 7%, var(--muted)); padding: 0.14rem 0.42rem;
  border-radius: var(--radius-sm); color: var(--primary); border: 1px solid var(--border);
  word-break: break-word;
}
.prose-wiki pre {
  position: relative;
  background: oklch(0.14 0.004 50deg); border: 1px solid oklch(0.26 0.01 50deg);
  border-top: 2px solid color-mix(in srgb, var(--primary) 55%, oklch(0.26 0.01 50deg));
  border-radius: var(--radius-lg); padding: 1.2rem 1.3rem; overflow-x: auto; margin: 1.4rem 0;
  color: oklch(0.92 0.005 50deg); box-shadow: var(--shadow-md);
  tab-size: 2;
}
.prose-wiki pre code { background: none; padding: 0; border: none; color: inherit; }
.prose-wiki blockquote {
  position: relative;
  border-left: 3px solid var(--primary); padding: 0.85rem 1.1rem 0.85rem 1.4rem;
  margin: 1.3rem 0; background: var(--muted); border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: var(--muted-foreground);
}
.prose-wiki blockquote::before {
  content: ""; position: absolute; top: 0.85rem; left: 1.1rem;
  width: 0.4rem; height: 0.4rem; transform: rotate(45deg);
  background: color-mix(in srgb, var(--primary) 60%, transparent);
}
.prose-wiki table {
  width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: 0.875rem;
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.prose-wiki thead { background: var(--muted); }
.prose-wiki th { font-weight: 700; text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); color: var(--foreground); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-display); white-space: nowrap; }
.prose-wiki td { padding: 0.65rem 1rem; border-bottom: 1px solid color-mix(in srgb, var(--foreground) 6%, var(--background)); color: var(--muted-foreground); }
.prose-wiki tr:last-child td { border-bottom: none; }
.prose-wiki tbody tr:hover td { background: var(--muted); }
.prose-wiki hr { border: none; height: 1px; background: var(--border); margin: 1.9rem 0; }
.prose-wiki img { max-width: 100%; border-radius: var(--radius-lg); margin: 1.4rem 0; border: 1px solid var(--border); }
.prose-wiki > :first-child { margin-top: 0; }
.prose-wiki > :last-child { margin-bottom: 0; }
.prose-wiki details { margin: 1.3rem 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.prose-wiki details summary {
  padding: 0.9rem 1.1rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: var(--muted); list-style: none;
  transition: background 0.15s;
}
.prose-wiki details summary::-webkit-details-marker { display: none; }
.prose-wiki details summary:hover { background: color-mix(in srgb, var(--primary) 6%, var(--muted)); }
.prose-wiki details summary::after {
  content: ""; width: 0.45rem; height: 0.45rem; flex-shrink: 0;
  border-right: 2px solid var(--muted-foreground); border-bottom: 2px solid var(--muted-foreground);
  transform: rotate(45deg); transition: transform 0.2s; margin-top: -0.2rem;
}
.prose-wiki details[open] summary::after { transform: rotate(-135deg); margin-top: 0.15rem; }
.prose-wiki details[open] summary { border-bottom: 1px solid var(--border); }
.prose-wiki details > *:not(summary) { margin-inline: 1.1rem; }

/* Wider table override for pinout and reference tables */
.prose-wiki table.wider { max-width: 100%; }
.prose-wiki table.wider th,
.prose-wiki table.wider td { white-space: nowrap; }

/* wiki alerts (rendered from Obsidian callouts) */
.wiki-alert {
  position: relative; padding: 1rem 1.25rem 1rem 1.5rem;
  border-radius: var(--radius-lg); margin: 1.4rem 0; font-size: 0.9rem; line-height: 1.65;
  background: var(--muted); border: 1px solid var(--border); border-left: 3px solid var(--muted-foreground);
}
.wiki-alert-title {
  display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.12em; color: inherit; margin-bottom: 0.3rem;
}
.wiki-alert p { margin: 0.4rem 0 0; }
.wiki-alert > *:last-child { margin-bottom: 0; }
.wiki-alert strong { color: inherit; font-weight: 600; }
.wiki-alert-warning { background: color-mix(in srgb, var(--destructive) 7%, var(--background)); border-color: color-mix(in srgb, var(--destructive) 20%, var(--border)); border-left-color: var(--destructive); color: var(--destructive); }
.wiki-alert-tip { background: color-mix(in srgb, var(--success) 7%, var(--background)); border-color: color-mix(in srgb, var(--success) 20%, var(--border)); border-left-color: var(--success); color: var(--success); }
.wiki-alert-important { background: color-mix(in srgb, var(--warning) 7%, var(--background)); border-color: color-mix(in srgb, var(--warning) 20%, var(--border)); border-left-color: var(--warning); color: var(--warning); }
.wiki-alert-note, .wiki-alert-info { background: color-mix(in srgb, var(--info) 6%, var(--background)); border-color: color-mix(in srgb, var(--info) 18%, var(--border)); border-left-color: var(--info); color: var(--info); }

/* ─── 20. Aegis device mockup (demo) ─── */
.aegis-device-scene {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  align-self: start; width: 100%;
}
.aegis-device-stage {
  position: relative; width: min(100%, 20rem);
  padding: var(--space-6) var(--space-4) var(--space-3);
}
.aegis-device-stage__plate {
  position: absolute; inset: var(--space-4) 0 0;
  border: 1px solid var(--border-strong); border-radius: var(--radius-2xl);
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, color-mix(in srgb, var(--primary) 9%, var(--card)), transparent 70%),
    linear-gradient(180deg, var(--card), color-mix(in srgb, var(--muted) 75%, var(--card)));
  box-shadow: 0 16px 40px -12px rgb(0 0 0 / 25%), inset 0 1px 0 rgb(255 255 255 / 15%);
  pointer-events: none; overflow: hidden;
}
.stage-grid-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.12;
  background-image: radial-gradient(circle, var(--foreground) 1px, transparent 1px);
  background-size: 16px 16px;
}
.stage-tag {
  position: absolute; top: 10px; left: 16px;
  font-family: var(--font-mono); font-size: 0.52rem; font-weight: 700;
  color: var(--muted-foreground); letter-spacing: 0.1em; opacity: 0.8;
}
.stage-spec {
  position: absolute; top: 10px; right: 16px;
  font-family: var(--font-mono); font-size: 0.52rem; font-weight: 700;
  color: var(--primary); letter-spacing: 0.08em;
}
.aegis-device-stage__plate::before,
.aegis-device-stage__plate::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none; z-index: 2;
}
.aegis-device-stage__plate::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--primary); border-left: 2px solid var(--primary);
  border-top-left-radius: 6px;
}
.aegis-device-stage__plate::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--primary); border-right: 2px solid var(--primary);
  border-bottom-right-radius: 6px;
}
.aegis-device {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(300, minmax(0, 1fr));
  grid-template-rows: repeat(540, minmax(0, 1fr));
  width: 100%; max-width: min(18rem, 100%); margin-inline: auto;
  aspect-ratio: 300 / 540;
  filter: drop-shadow(0 24px 38px rgb(0 0 0 / 32%));
}
.aegis-device > * { min-width: 0; min-height: 0; }
.aegis-device__art {
  grid-column: 1 / -1; grid-row: 1 / -1;
  width: 100%; height: 100%;
  user-select: none; pointer-events: none;
}
.aegis-device__oled-slot {
  grid-column: 49 / 253; grid-row: 135 / 241;
  z-index: 2; overflow: hidden; border-radius: 3px;
  background: #000000;
  box-shadow: inset 0 2px 10px rgb(0 0 0 / 95%), 0 0 1px 1px rgb(255 255 255 / 8%);
}
.oled-canvas {
  display: block; width: 100%; height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000000;
}
.oled-canvas__glass {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(132deg, rgb(255 255 255 / 16%) 0%, transparent 40%),
    linear-gradient(312deg, rgb(255 255 255 / 6%) 0%, transparent 32%);
}
.aegis-device__led-slot {
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.aegis-device__power-switch {
  grid-column: 74 / 110;
  grid-row: 470 / 483;
  z-index: 5;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  pointer-events: none;
}
.aegis-device__power-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.aegis-device__power-switch-track {
  position: relative;
  flex: 1;
  display: block;
  border-radius: 2px;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  box-shadow: none;
}
.aegis-device__power-switch-track:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.aegis-device__power-switch-thumb {
  position: absolute;
  top: 15%;
  left: 6%;
  width: 36%;
  height: 70%;
  border-radius: 2px;
  background: linear-gradient(180deg, #5a6470 0%, #2a323a 45%, #1a2027 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 18%),
    0 1px 2px rgb(0 0 0 / 55%);
  transition: left 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.aegis-device__power-switch-thumb::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 50%;
  width: 1px;
  background: rgb(255 255 255 / 22%);
  box-shadow: -2px 0 0 rgb(0 0 0 / 40%), 2px 0 0 rgb(0 0 0 / 40%);
}
.aegis-device__power-switch-input:checked + .aegis-device__power-switch-track .aegis-device__power-switch-thumb {
  left: 58%;
  background: linear-gradient(180deg, #ff8a50 0%, #ff5722 42%, #c43a12 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 28%),
    0 0 6px rgb(255 87 34 / 55%),
    0 1px 2px rgb(0 0 0 / 45%);
}
.aegis-device:not([data-powered="on"]) .aegis-key {
  pointer-events: none;
}
.aegis-device__led-slot--tx { grid-column: 62 / 76; grid-row: 340 / 354; }
.aegis-device__led-slot--rx { grid-column: 226 / 240; grid-row: 340 / 354; }
.aegis-device__led {
  width: 100%; height: 100%; border-radius: 50%;
  background: #14181c;
  box-shadow: inset 0 1px 4px rgb(0 0 0 / 80%);
  transition: box-shadow 0.08s, background 0.08s;
}
.aegis-device__led--tx.aegis-device__led--on {
  background: #ff2222;
  box-shadow:
    0 0 8px #ff2222,
    0 0 18px #ff2222,
    0 0 32px #ff2222aa,
    inset 0 0 4px #ffffff;
}
.aegis-device__led--rx.aegis-device__led--on {
  background: #0088ff;
  box-shadow:
    0 0 8px #0088ff,
    0 0 18px #0088ff,
    0 0 32px #0088ffaa,
    inset 0 0 4px #ffffff;
}
.aegis-device__keys {
  grid-column: 41 / 265; grid-row: 269 / 319;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3.6%;
  padding: 0; z-index: 3; align-self: stretch; justify-self: stretch;
}
.aegis-key {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: none; cursor: pointer;
  background: transparent; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none; min-width: 0; min-height: 0;
}
.aegis-key::after {
  content: ""; position: absolute; inset: -6px;
  pointer-events: none;
}
.aegis-key:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.aegis-key__hold {
  position: absolute; inset: 4%;
  border-radius: 14%; pointer-events: none; opacity: 0;
  background: conic-gradient(from -90deg, var(--destructive) calc(var(--hold, 0) * 360deg), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  transition: opacity 0.12s ease;
}
.aegis-key.is-holding .aegis-key__hold { opacity: 1; }
.aegis-key__cap {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  width: 92%; height: 92%;
  color: #e8ecf0;
  background: linear-gradient(180deg, #3e4752 0%, #293038 52%, #1e242b 100%);
  border: 1px solid #4a5562;
  border-radius: 14%;
  box-shadow:
    0 2px 0 #12161a,
    0 5px 12px rgb(0 0 0 / 35%),
    inset 0 1px 0 rgb(255 255 255 / 16%);
  transition: transform 0.05s ease, box-shadow 0.05s ease, background 0.1s;
}
.key-legend {
  font-family: var(--font-mono); font-size: clamp(0.40rem, 2.1vw, 0.52rem);
  font-weight: 700; letter-spacing: 0.04em; line-height: 1; text-align: center;
}
.key-sub {
  font-family: var(--font-mono); font-size: clamp(0.26rem, 1.4vw, 0.35rem);
  font-weight: 600; opacity: 0.65; letter-spacing: 0.02em; line-height: 1; text-align: center;
}
.aegis-key:hover .aegis-key__cap {
  color: #ffffff;
  background: linear-gradient(180deg, #4b5663 0%, #323b45 52%, #242b33 100%);
  border-color: #5c6877;
}
.aegis-key.is-pressed .aegis-key__cap,
.aegis-key.is-holding .aegis-key__cap {
  transform: translateY(2px);
  background: linear-gradient(180deg, #1c2128 0%, #14181d 100%);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 60%);
  color: #ffffff;
}
.aegis-device__toast {
  grid-column: 40 / 261; grid-row: 495 / 515;
  z-index: 4; align-self: end; justify-self: center;
  transform: translateY(0.35rem);
  padding: 0.35rem 0.65rem;
  font-family: var(--font-mono); font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.04em; white-space: nowrap;
  border-radius: var(--radius-sm);
  background: var(--surface-invert); color: var(--surface-invert-fg);
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.aegis-device__toast.is-visible { opacity: 1; transform: translateY(0); }
.aegis-device__toast[data-kind="emergency"] {
  background: var(--destructive); color: oklch(0.99 0 0deg);
  box-shadow: 0 0 20px color-mix(in srgb, var(--destructive) 45%, transparent);
}
.aegis-device__hint {
  margin: 0; text-align: center; max-width: 28rem;
  font-size: 0.72rem; color: var(--muted-foreground);
  font-family: var(--font-mono); line-height: 1.65;
}
.aegis-device__hint strong { color: var(--destructive); font-weight: 700; }

/* ─── 20b. Demo device chrome + LISTEN / PC flow ─── */
.demo-device-column {
  position: relative; width: 100%; display: flex; flex-direction: column; gap: var(--space-3);
}
.demo-device-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--card) 92%, var(--muted));
  box-shadow: var(--shadow-sm);
}
.demo-device-toolbar__left {
  display: flex; align-items: center; gap: var(--space-2); min-width: 0;
}
.demo-device-toolbar__tag {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground);
}
.demo-device-toolbar__live {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.06em; padding: 0.2rem 0.55rem; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--primary);
}
.demo-device-toolbar__live[data-mode="listen"] {
  background: color-mix(in srgb, var(--info) 14%, var(--card));
  border-color: color-mix(in srgb, var(--info) 40%, var(--border));
  color: var(--info);
}
.demo-device-toolbar__live[data-mode="emergency"] {
  background: color-mix(in srgb, var(--destructive) 14%, var(--card));
  border-color: color-mix(in srgb, var(--destructive) 45%, var(--border));
  color: var(--destructive);
}
.demo-device-toolbar__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
.demo-icon-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.7rem; min-height: 36px;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--card); color: var(--muted-foreground); cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.demo-icon-btn:hover {
  border-color: var(--primary); color: var(--foreground);
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
}
.demo-icon-btn--accent:hover { box-shadow: 0 0 14px color-mix(in srgb, var(--primary) 25%, transparent); }
.demo-icon-btn__label { white-space: nowrap; }
.demo-listen-callout {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid color-mix(in srgb, var(--info) 28%, var(--border));
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--info) 8%, var(--card)), var(--card));
}
.demo-listen-callout__icon {
  flex-shrink: 0; color: var(--info);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--info) 12%, var(--background));
}
.demo-listen-callout__copy {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem;
  font-size: 0.78rem; line-height: 1.55; color: var(--muted-foreground);
}
.demo-listen-callout__copy strong { color: var(--foreground); font-weight: 600; }
.demo-listen-callout__copy code {
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.1rem 0.35rem; border-radius: var(--radius-sm);
  background: var(--muted); color: var(--foreground);
}
.demo-listen-callout__cta {
  flex-shrink: 0; align-self: center;
  padding: 0.45rem 0.85rem; min-height: 36px;
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--info) 45%, var(--border));
  border-radius: var(--radius-md); background: var(--card);
  color: var(--info); cursor: pointer; transition: all 0.15s;
}
.demo-listen-callout__cta:hover {
  background: color-mix(in srgb, var(--info) 12%, var(--card));
  border-color: var(--info);
}
.demo-device-host { width: 100%; }
.demo-fs-body {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  width: 100%; min-width: 0;
}
.demo-fs-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: stretch; justify-content: center;
  pointer-events: none;
}
.demo-fs-overlay:not([hidden]) { pointer-events: auto; }
.demo-toolbar-fs-only { display: none; }
.demo-device-column.is-fullscreen .demo-toolbar-normal { display: none; }
.demo-device-column.is-fullscreen .demo-toolbar-fs-only:not([hidden]) { display: inline-flex; }
.demo-device-column.is-fullscreen.has-laptop #demo-fs-usb-btn { display: none !important; }
body.demo-fs-open { overflow: hidden; }
body.demo-fs-open .site-header,
body.demo-fs-open .site-footer { visibility: hidden; pointer-events: none; }
body.demo-fs-open .ac-chat { visibility: hidden; pointer-events: none; }
.demo-device-column.is-fullscreen {
  position: relative; width: 100%; max-width: none; height: 100%;
  padding: clamp(0.75rem, 2vw, 1.5rem) clamp(1rem, 3vw, 2rem);
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, var(--muted) 35%, var(--background)), var(--background));
  display: flex; flex-direction: column; gap: var(--space-3);
  overflow-y: auto; overflow-x: hidden; box-sizing: border-box;
}
.demo-device-column.is-fullscreen .demo-listen-callout { display: none; }
.demo-device-column.is-fullscreen .demo-device-toolbar {
  flex-shrink: 0; max-width: 78rem; width: 100%; margin-inline: auto;
}
.demo-device-column.is-fullscreen .demo-fs-body {
  flex: 1; min-height: 0; width: 100%; max-width: 78rem; margin-inline: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-3); overflow: auto; padding-bottom: var(--space-2);
}
.demo-device-column.is-fullscreen .demo-device-host {
  display: flex; justify-content: center; align-items: center;
  flex: 0 1 auto; min-height: 0; width: 100%;
}
.demo-device-column.is-fullscreen .aegis-device-scene { max-width: 100%; }
.demo-device-column.is-fullscreen .aegis-device-stage { width: min(100%, 22rem); }
.demo-device-column.is-fullscreen .aegis-device { max-width: min(20rem, 86vw); }
.demo-device-column.is-fullscreen.has-laptop .demo-fs-body {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr);
  align-items: center; justify-items: stretch; gap: clamp(0.75rem, 2vw, 1.75rem);
}
.demo-device-column.is-fullscreen.has-laptop .demo-fs-connector { align-self: center; margin-bottom: 0; }
.demo-device-column.is-fullscreen.has-laptop .demo-device-host {
  justify-self: end; width: 100%; max-width: min(20rem, 100%);
}
.demo-device-column.is-fullscreen.has-laptop .aegis-device-stage { width: min(100%, 19rem); }
.demo-device-column.is-fullscreen.has-laptop .aegis-device { max-width: min(18rem, 100%); }
.demo-device-column.is-fullscreen.has-laptop .aegis-device__hint { font-size: 0.65rem; }
.demo-fs-connector {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.4rem; padding: 0.25rem; color: var(--primary); align-self: center;
}
.demo-fs-connector__cable { width: clamp(3.5rem, 8vw, 6.5rem); height: 28px; display: block; overflow: visible; }
.demo-fs-connector__path {
  stroke-dasharray: 6 4;
  animation: demoUsbPulse 1.2s linear infinite;
}
@keyframes demoUsbPulse { to { stroke-dashoffset: -20; } }
.demo-fs-connector__tag {
  font-family: var(--font-mono); font-size: 0.55rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  padding: 0.2rem 0.5rem; border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
}
.demo-fs-laptop[hidden],
.demo-fs-connector[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.demo-device-column:not(.has-laptop) .demo-fs-laptop,
.demo-device-column:not(.has-laptop) .demo-fs-connector {
  display: none !important;
}
.demo-device-column:not(.is-fullscreen) .demo-fs-laptop,
.demo-device-column:not(.is-fullscreen) .demo-fs-connector {
  display: none !important;
}
.demo-device-column.is-fullscreen:not(.has-laptop) .demo-fs-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  max-width: 26rem; margin-inline: auto;
}
.demo-fs-laptop {
  display: flex; flex-direction: column; align-items: stretch; justify-content: center;
  min-width: 0; width: 100%; max-width: min(32rem, 100%);
  animation: demoLaptopIn 0.55s ease-out both;
}
.demo-device-column.has-laptop .demo-fs-laptop:not([hidden]) {
  display: flex;
}
@keyframes demoLaptopIn {
  from { opacity: 0; transform: translateX(1.25rem) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.demo-fs-laptop .demo-laptop-mock__caption { display: none; }
.demo-fs-laptop__status {
  margin: var(--space-2) 0 0; text-align: center;
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--muted-foreground);
  letter-spacing: 0.05em;
}
@media (max-width: 899px) {
  .demo-device-column.is-fullscreen {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    height: 100dvh;
  }
  .demo-device-column.is-fullscreen .demo-fs-body {
    flex: initial;
    min-height: auto;
    overflow: visible;
  }
  .demo-device-column.is-fullscreen.has-laptop .demo-fs-body {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    gap: var(--space-3);
  }
  .demo-device-column.is-fullscreen.has-laptop .demo-device-host {
    justify-self: center; width: 100%; max-width: min(16rem, 88vw);
  }
  .demo-device-column.is-fullscreen.has-laptop .aegis-device-stage {
    width: 100%; padding: var(--space-3) var(--space-2) var(--space-2);
  }
  .demo-device-column.is-fullscreen.has-laptop .aegis-device {
    max-width: min(15rem, 84vw);
  }
  .demo-device-column.is-fullscreen.has-laptop .demo-fs-laptop {
    width: 100%; max-width: min(24rem, 100%);
  }
  .demo-fs-connector {
    margin: 0.15rem auto;
  }
  .demo-fs-connector__cable {
    transform: none;
    width: 2.2rem;
    height: 20px;
  }
}
@media (min-width: 900px) and (max-height: 780px) {
  .demo-device-column.is-fullscreen.has-laptop .aegis-device-stage { width: min(100%, 16.5rem); }
  .demo-device-column.is-fullscreen.has-laptop .aegis-device { max-width: min(15.5rem, 100%); }
  .demo-laptop-mock--stage .demo-laptop-mock__keyboard { height: 2.35rem; }
  .demo-laptop-mock--stage .demo-laptop-mock__terminal-wrap .demo-laptop__terminal {
    min-height: 5.5rem; max-height: 7rem;
  }
}
@media (max-width: 760px) {
  .demo-icon-btn__label { display: none; }
  .demo-listen-callout { flex-direction: column; }
  .demo-listen-callout__cta { align-self: stretch; width: 100%; }
}
.demo-laptop { width: 100%; filter: drop-shadow(0 12px 28px rgb(0 0 0 / 35%)); }
.demo-laptop__screen {
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #0a0c0e; overflow: hidden;
}
.demo-laptop__chrome {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.45rem 0.65rem; background: #14181c; border-bottom: 1px solid #222830;
}
.demo-laptop__chrome span:first-child,
.demo-laptop__chrome span:nth-child(2),
.demo-laptop__chrome span:nth-child(3) {
  width: 7px; height: 7px; border-radius: 50%; background: #2a323a;
}
.demo-laptop__chrome span:first-child { background: #ff5f57; }
.demo-laptop__chrome span:nth-child(2) { background: #febc2e; }
.demo-laptop__chrome span:nth-child(3) { background: #28c840; }
.demo-laptop__chrome--host {
  background: linear-gradient(180deg, #1a2430, #121820);
  border-bottom-color: #2a3544;
}
.demo-laptop__chrome-os {
  width: 12px; height: 12px; border-radius: 2px;
  background: linear-gradient(135deg, #0078d4, #005a9e);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 15%);
}
.demo-laptop__chrome-spacer { width: 12px; height: 12px; flex-shrink: 0; }
.demo-laptop__title {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.58rem;
  color: #788490; letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62%;
}
.demo-laptop__terminal {
  margin: 0; padding: 0.85rem 1rem; min-height: 5.5rem;
  font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.65;
  color: #b8c0c8; background: #050608;
}
.demo-laptop__terminal--live { min-height: 6.5rem; }
.demo-laptop__prompt { color: var(--primary); }
.demo-laptop__cursor {
  display: inline-block; animation: demoCursorBlink 0.9s step-end infinite;
  color: var(--primary);
}
.demo-laptop__cursor.is-hidden { display: none; }
@keyframes demoCursorBlink { 50% { opacity: 0; } }
.demo-laptop__response { display: block; margin-top: 0.35rem; color: var(--success); }
.demo-laptop__line { display: block; }
.demo-laptop__line--ok { color: #e8ecf0; }
.demo-laptop__line--dim { color: #6a7580; font-size: 0.92em; }
.demo-laptop__line--cw { color: var(--primary); margin-top: 0.25rem; }
.demo-bridge-launch {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; align-items: center;
  padding: 0.4rem 0.65rem;
  font-family: var(--font-mono); font-size: 0.58rem; line-height: 1.45;
  color: #8a939c; background: #07090b;
  border-bottom: 1px solid #141a22;
}
.demo-bridge-launch__user { color: #0078d4; }
.demo-bridge-launch__cmd { color: #e8ecf0; font-weight: 600; }
.demo-bridge-launch__flag { color: #6a7580; }

/* Bridge TUI (matches aegis-serial-bridge.py dashboard) */
.demo-bridge-tui {
  position: relative; overflow: hidden;
  padding: 0.65rem 0.75rem 0.55rem;
  font-family: var(--font-mono); font-size: 0.68rem; line-height: 1.55;
  color: #c8d0d8; background: #050608;
  min-height: 12rem;
  border-top: 1px solid #1a2028;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}
.demo-bridge-tui[data-bridge-connected="1"] {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, #1a2028);
}
.demo-bridge-tui__glow {
  pointer-events: none; position: absolute; inset: -40% -20% auto;
  height: 70%; opacity: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%);
  transition: opacity 0.4s ease;
}
.demo-bridge-tui[data-bridge-connected="1"] .demo-bridge-tui__glow { opacity: 1; }
.demo-bridge-tui__conn {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: #3a424c; box-shadow: 0 0 0 1px #2a323a;
  transition: background 0.25s, box-shadow 0.25s;
}
.demo-bridge-tui__conn.is-live {
  background: #28c840;
  box-shadow: 0 0 8px #28c840aa, 0 0 0 1px #1a4024;
  animation: demoBridgeConnPulse 1.8s ease-in-out infinite;
}
@keyframes demoBridgeConnPulse {
  50% { opacity: 0.75; transform: scale(0.92); }
}
.demo-bridge-tui--compact {
  font-size: 0.6rem; min-height: 9.5rem; padding: 0.5rem 0.55rem;
}
.demo-bridge-tui__scanlines {
  pointer-events: none; position: absolute; inset: 0; opacity: 0.06;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 2px,
    rgb(255 255 255 / 35%) 2px 3px
  );
}
.demo-bridge-tui__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.65rem;
  margin-bottom: 0.35rem;
}
.demo-bridge-tui__brand {
  font-weight: 800; letter-spacing: 0.06em; color: #f0f4f8;
}
.demo-bridge-tui__head-mid {
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--primary);
}
.demo-bridge-tui__meta {
  margin-left: auto; display: flex; gap: 0.65rem;
  font-size: 0.92em; color: #788490;
}
.demo-bridge-tui__mode-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.55rem;
  margin-bottom: 0.35rem;
}
.demo-bridge-tui__mode-label {
  font-size: 0.85em; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #6a7580;
}
.demo-bridge-tui__mode-pill {
  font-size: 0.78em; font-weight: 800; letter-spacing: 0.06em;
  padding: 0.12rem 0.45rem; border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, #3a424c);
  background: color-mix(in srgb, var(--primary) 14%, #0a0e12);
  color: var(--primary);
}
.demo-bridge-tui__mode-pill[data-mode="listen"] {
  color: var(--info);
  border-color: color-mix(in srgb, var(--info) 45%, #3a424c);
  background: color-mix(in srgb, var(--info) 14%, #0a0e12);
  animation: demoBridgeListenPulse 1.4s ease-in-out infinite;
}
@keyframes demoBridgeListenPulse {
  50% { box-shadow: 0 0 12px color-mix(in srgb, var(--info) 35%, transparent); }
}
.demo-bridge-tui__status-hint {
  margin: 0 0 0.35rem; font-size: 0.88em; color: #8a939c; line-height: 1.45;
}
.demo-bridge-tui__rssi {
  margin-left: auto; font-size: 0.78em; font-weight: 700;
  padding: 0.1rem 0.4rem; border-radius: var(--radius-sm);
  color: var(--info); background: color-mix(in srgb, var(--info) 12%, #0a0e12);
  border: 1px solid color-mix(in srgb, var(--info) 35%, #2a323a);
}
.demo-bridge-tui__track-wrap { margin: 0.25rem 0 0.35rem; }
.demo-bridge-tui__track-label {
  margin: 0 0 0.2rem; font-size: 0.82em; font-weight: 700;
  color: #788490; letter-spacing: 0.06em; text-transform: uppercase;
}
.demo-bridge-tui__track {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 0.1rem;
  font-size: 0.88em; color: #9aa3ac;
}
.demo-bridge-tui__track-item::before { content: "· "; color: var(--primary); }
.demo-bridge-tui__cw-panel {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin: 0.35rem 0 0.15rem; padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--primary) 8%, #0a0c0e);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, #2a323a);
}
.demo-bridge-tui__cw-label {
  font-size: 0.75em; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #788490;
}
.demo-bridge-tui__cw-line {
  font-size: 0.95em; font-weight: 700; color: var(--primary);
}
.demo-bridge-tui__footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.65rem;
  margin-top: 0.45rem; padding-top: 0.4rem;
  border-top: 1px dashed #2a323a;
  font-size: 0.78em; color: #6a7580;
}
.demo-bridge-tui__footer-label {
  font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #788490;
}
.demo-bridge-tui__footer-hint { color: #9aa3ac; }
.demo-bridge-tui__rule {
  border: none; height: 1px; margin: 0.35rem 0;
  background: linear-gradient(90deg, transparent, #3a424c 15%, #3a424c 85%, transparent);
}
.demo-bridge-tui__stats {
  display: grid; gap: 0.28rem; margin: 0;
}
.demo-bridge-tui__stat {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.35rem; align-items: baseline;
}
.demo-bridge-tui__stat dt {
  margin: 0; font-weight: 700; color: #788490; letter-spacing: 0.04em;
}
.demo-bridge-tui__stat dd {
  margin: 0; color: #e8ecf0; word-break: break-word;
}
.demo-bridge-tui__share { color: #8a939c; font-size: 0.92em; }
.demo-bridge-tui__log-label {
  margin: 0.15rem 0 0.25rem; font-weight: 700; color: #788490;
  letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85em;
}
.demo-bridge-tui__log {
  max-height: 7.25rem; overflow: auto; padding-right: 0.15rem;
  display: flex; flex-direction: column; gap: 0.12rem;
  scrollbar-width: thin; scrollbar-color: #3a424c transparent;
}
.demo-bridge-tui--compact .demo-bridge-tui__log { max-height: 5rem; }
.demo-bridge-tui__log-line { white-space: pre-wrap; word-break: break-word; }
.demo-bridge-tui__log-line--bridge { color: #e6c07b; }
.demo-bridge-tui__log-line--device { color: #61afef; }
.demo-bridge-tui__log-line--aegis { color: #98c379; }
.demo-bridge-tui__log-line--ok { color: #98c379; font-weight: 600; }
.demo-bridge-tui__log-line--cw { color: var(--primary); font-weight: 700; }
.demo-bridge-tui__log-line--cmd { color: #e8ecf0; }
.demo-bridge-tui__log-line--serial { color: #6a7580; }
.demo-bridge-tui__log-line--dim { color: #6a7580; }
.demo-bridge-tui__typing { margin-top: 0.25rem; }
.demo-bridge-tui__cmdline {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem;
}
.demo-bridge-tui__cursor {
  display: inline-block; color: var(--primary);
  animation: demoCursorBlink 0.9s step-end infinite;
}
.demo-bridge-tui__response {
  display: block; margin-top: 0.25rem; color: #98c379; font-weight: 600;
}
.demo-laptop__base {
  height: 10px; margin: 0 8%; border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: linear-gradient(180deg, #2a323a, #1a2027);
  box-shadow: 0 4px 12px rgb(0 0 0 / 40%);
}
.demo-laptop--compact .demo-laptop__terminal { font-size: 0.68rem; min-height: 5rem; }

/* Realistic laptop shell (demo LISTEN / fullscreen) */
.demo-laptop-mock { width: 100%; }
.demo-laptop-mock__unit {
  position: relative;
  filter: drop-shadow(0 18px 36px rgb(0 0 0 / 38%));
}
.demo-laptop-mock__lid {
  padding: 0.35rem 0.35rem 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(180deg, #4a5562 0%, #2f3842 55%, #252c34 100%);
  border: 1px solid #5c6877;
  border-bottom: none;
}
.demo-laptop-mock__bezel {
  position: relative;
  padding: 0.45rem 0.45rem 0.35rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: #0a0c0e;
  border: 1px solid #1e242b;
}
.demo-laptop-mock__webcam {
  position: absolute; top: 0.35rem; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: #1a2027; box-shadow: 0 0 0 1px #3a424c;
}
.demo-laptop-mock__screen {
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid #222830;
}
.demo-laptop-mock__terminal-wrap { background: #050608; }
.demo-laptop-mock__terminal-wrap .demo-laptop__terminal {
  min-height: 6.25rem; max-height: 9rem; overflow: auto;
}
.demo-laptop-mock__terminal-wrap .demo-bridge-tui {
  min-height: 0; border-radius: 0;
}
.demo-laptop-mock__hinge {
  height: 5px; margin: 0 12%;
  background: linear-gradient(90deg, #1a2027, #4a5562 50%, #1a2027);
  border-radius: 1px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
}
.demo-laptop-mock__base { position: relative; }
.demo-laptop-mock__deck {
  padding: 0.55rem 0.65rem 0.5rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: linear-gradient(180deg, #3a424c 0%, #252c34 45%, #1a2027 100%);
  border: 1px solid #5c6877;
  border-top: 1px solid #2a323a;
}
.demo-laptop-mock__brand {
  display: block; text-align: center;
  font-family: var(--font-mono); font-size: 0.48rem; font-weight: 700;
  letter-spacing: 0.14em; color: #788490; margin-bottom: 0.35rem;
}
.demo-laptop-mock__keyboard {
  height: 2.75rem; border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(
      90deg,
      #14181c 0 6px,
      #0f1216 6px 7px
    ),
    repeating-linear-gradient(
      180deg,
      #1a2027 0 5px,
      #12161a 5px 6px
    );
  border: 1px solid #2a323a;
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 45%);
}
.demo-laptop-mock__trackpad {
  width: 38%; height: 1.1rem; margin: 0.4rem auto 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #2a323a, #1e242b);
  border: 1px solid #3a424c;
}
.demo-laptop-mock__lip {
  height: 7px; margin: 0 6% -2px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: linear-gradient(180deg, #1a2027, #0f1216);
  box-shadow: 0 6px 14px rgb(0 0 0 / 35%);
}
.demo-laptop-mock__port {
  position: absolute; bottom: 28%; left: -2px;
  font-family: var(--font-mono); font-size: 0.42rem; font-weight: 700;
  letter-spacing: 0.06em; color: #788490;
  padding: 0.12rem 0.2rem; border-radius: 2px;
  background: #1a2027; border: 1px solid #3a424c;
}
.demo-laptop-mock__caption {
  margin: var(--space-2) 0 0; text-align: center;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground);
}
.demo-laptop-mock--stage .demo-bridge-tui {
  min-height: 13.5rem; font-size: 0.7rem;
}
.demo-laptop-mock--stage .demo-bridge-tui__log { max-height: 8rem; }
.demo-laptop-mock--stage { max-width: min(30rem, 100%); }
.demo-laptop-mock--stage .demo-laptop-mock__lid {
  border-radius: var(--radius-lg);
  border-bottom: 1px solid #5c6877;
  padding-bottom: 0.35rem;
}
.demo-laptop-mock--stage .demo-laptop-mock__bezel {
  border-radius: var(--radius-md);
}
.demo-laptop-mock--stage .demo-laptop-mock__screen {
  border-radius: var(--radius-sm);
}
.demo-laptop-mock__monitor-stand {
  display: flex; flex-direction: column; align-items: center;
  margin-top: 0.15rem;
}
.demo-laptop-mock__neck {
  display: block; width: 3px; height: 1.1rem;
  background: linear-gradient(180deg, #4a5562, #2a323a);
  border-radius: 1px;
}
.demo-laptop-mock__foot {
  display: block; width: 5.5rem; height: 0.35rem;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, #3a424c, #1a2027);
  box-shadow: 0 4px 10px rgb(0 0 0 / 35%);
}
.demo-laptop-mock--stage .demo-laptop-mock__port {
  bottom: 18%; left: -4px;
}
@media (max-width: 899px) {
  .demo-laptop-mock--stage .demo-laptop-mock__monitor-stand {
    display: none;
  }
}
.demo-laptop__chrome-tab {
  font-size: 0.52rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.12rem 0.45rem; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: #0a0c0e; color: #c8d0d8;
  border: 1px solid #2a323a; border-bottom: none;
}
.demo-laptop-mock--stage .demo-bridge-tui {
  min-height: 11.5rem; font-size: 0.66rem;
}
.demo-laptop-mock--stage .demo-bridge-tui__log { max-height: 6.5rem; }
.demo-laptop-mock--dialog .demo-laptop-mock__keyboard { height: 2.25rem; }
.demo-listen-scene__laptop .demo-laptop-mock { max-width: 18rem; width: 100%; }

/* LISTEN connection dialog */
.demo-listen-dialog {
  border: none; padding: 0; margin: auto; max-width: min(36rem, calc(100vw - 2rem));
  background: transparent;
}
.demo-listen-dialog::backdrop {
  background: rgb(0 0 0 / 55%); backdrop-filter: blur(6px);
}
.demo-listen-dialog__panel {
  position: relative;
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  background: var(--card); box-shadow: var(--shadow-lg);
  padding: var(--space-5) var(--space-5) var(--space-4);
  max-height: calc(100vh - 2rem); overflow: auto;
}
.demo-listen-dialog__close {
  position: absolute; top: var(--space-3); right: var(--space-3);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--background); color: var(--muted-foreground); cursor: pointer;
}
.demo-listen-dialog__close:hover { border-color: var(--primary); color: var(--primary); }
.demo-listen-dialog__badge {
  display: inline-block; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--info);
  margin-bottom: var(--space-2);
}
.demo-listen-dialog__title {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600;
  margin: 0 0 var(--space-2); padding-right: 2.5rem;
}
.demo-listen-dialog__lead {
  margin: 0 0 var(--space-4); font-size: 0.88rem; line-height: 1.65;
  color: var(--muted-foreground);
}
.demo-listen-dialog__lead code {
  font-family: var(--font-mono); font-size: 0.8rem;
  padding: 0.12rem 0.4rem; border-radius: var(--radius-sm);
  background: var(--muted); color: var(--foreground);
}
.demo-listen-scene {
  display: grid; grid-template-columns: minmax(0, 0.85fr) auto minmax(0, 1.35fr); gap: var(--space-3);
  align-items: center; margin-bottom: var(--space-4);
  padding: var(--space-4); border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--muted);
}
.demo-listen-scene__device,
.demo-listen-scene__laptop { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.demo-listen-scene__device-icon { width: 4.5rem; height: auto; }
.demo-listen-scene__label {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground);
}
.demo-listen-scene__link { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; color: var(--border-strong); }
.demo-listen-scene__cable { width: 4.5rem; height: 1.5rem; color: var(--border-strong); transition: color 0.4s; overflow: visible; }
.demo-listen-scene__usb-tag {
  font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-foreground);
}
.demo-listen-scene.is-connected .demo-listen-scene__link { color: var(--primary); }
.demo-listen-scene.is-connected .demo-listen-scene__cable-path {
  stroke-dasharray: 120; stroke-dashoffset: 120;
  animation: demoCableDraw 0.6s ease-out forwards;
}
@keyframes demoCableDraw { to { stroke-dashoffset: 0; } }
@media (max-width: 520px) {
  .demo-listen-scene {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-2);
  }
  .demo-listen-scene__link {
    transform: none;
    margin: var(--space-1) auto;
  }
  .demo-listen-scene__cable {
    width: 3rem;
    height: 1.25rem;
  }
}
.demo-listen-steps {
  margin: 0 0 var(--space-4); padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: var(--space-2);
}
.demo-listen-steps__item {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  font-size: 0.82rem; line-height: 1.5; color: var(--muted-foreground);
  border: 1px solid transparent; transition: all 0.2s;
}
.demo-listen-steps__item.is-active {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  color: var(--foreground);
}
.demo-listen-steps__item.is-done { opacity: 0.65; }
.demo-listen-steps__item.is-done .demo-listen-steps__num {
  background: var(--success); border-color: var(--success); color: #fff;
}
.demo-listen-steps__num {
  flex-shrink: 0; width: 1.5rem; height: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--background); color: var(--muted-foreground);
}
.demo-listen-steps__item code {
  font-family: var(--font-mono); font-size: 0.75rem;
  padding: 0.08rem 0.3rem; border-radius: var(--radius-sm); background: var(--muted);
}
.demo-listen-dialog__actions {
  display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end;
}

/* ─── 21. Demo page controls ─── */
.demo-page { padding-bottom: var(--space-8); }
.demo-layout {
  display: grid; grid-template-columns: 1fr; gap: var(--space-6);
  max-width: 980px; margin: var(--space-6) auto 0;
}
@media (min-width: 860px) { .demo-layout { grid-template-columns: 1fr 1fr; align-items: start; } }
@media (max-width: 859px) {
  .demo-layout { justify-items: center; }
  .aegis-device-scene { max-width: 100%; }
  .aegis-device-stage { width: min(100%, 20rem); padding-inline: var(--space-2); }
  .aegis-device { max-width: min(17.5rem, 92vw); }
  .controls-panel { width: min(100%, 28rem); }
  .demo-tape { width: 100%; }
  .demo-tape__controls { flex-direction: column; align-items: stretch; }
  .demo-tape__controls label { flex-direction: column; align-items: stretch; }
  .payload-input { width: 100%; max-width: none; }
  .mode-buttons { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .aegis-device { max-width: min(16.5rem, 96vw); }
  .page-head .section-head__lead { font-size: 0.92rem; }
}
.controls-panel {
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  background: var(--card); overflow: hidden;
  box-shadow: 0 8px 30px -10px rgb(0 0 0 / 15%), inset 0 1px 0 rgb(255 255 255 / 8%);
}
.controls-panel__header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--border);
  background: var(--muted);
}
.controls-panel__toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: var(--space-2);
}
.controls-panel__tag {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 700;
  color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.08em;
}
.sound-toggle-btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 0.35rem 0.75rem; border-radius: var(--radius-full);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--card); border: 1px solid var(--border-strong);
  color: var(--muted-foreground); cursor: pointer;
  transition: all 0.15s ease;
}
.sound-toggle-btn:hover {
  border-color: var(--primary); color: var(--foreground);
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
}
.sound-toggle-btn.is-active {
  border-color: var(--primary); color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, var(--card));
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 30%, transparent);
}
.control-group {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid color-mix(in srgb, var(--foreground) 5%, var(--background));
}
.control-group:last-child { border-bottom: none; }
.control-label {
  display: block; font-size: 0.6875rem; font-weight: 600;
  color: var(--muted-foreground); margin-bottom: var(--space-2);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.mode-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.mode-buttons .mode-btn:nth-child(5) { grid-column: 1 / -1; }
.mode-btn {
  padding: 0.55rem; min-height: 44px;
  font-size: 0.6875rem; font-weight: 600; font-family: var(--font-mono);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--background); color: var(--muted-foreground);
  cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.mode-btn:hover { border-color: var(--primary); color: var(--primary); }
.mode-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.mode-btn.active {
  background: var(--primary); border-color: var(--primary); color: var(--primary-foreground);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 15%);
}
.mode-btn.mode-btn--emergency,
.mode-btn[data-mode="emergency"].active {
  background: var(--destructive); border-color: var(--destructive); color: oklch(0.99 0 0deg);
}
.mode-btn.mode-btn--serial {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--info) 45%, var(--border));
}
.mode-btn.mode-btn--serial.active {
  border-style: solid;
  background: color-mix(in srgb, var(--info) 85%, var(--primary));
  border-color: var(--info);
}
.control-hint {
  margin: 0 0 var(--space-2); font-size: 0.72rem; line-height: 1.5;
  color: var(--muted-foreground);
}
.select-input {
  width: 100%; padding: 0.55rem 0.75rem; font-size: 0.8125rem;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--background); color: var(--foreground);
  font-family: var(--font-mono);
}
.select-input:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.range-input {
  width: 100%; -webkit-appearance: none; height: 6px;
  border-radius: 3px; background: var(--border); padding: 0; cursor: pointer;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  background: var(--primary); border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.range-input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--ring); }
.range-value {
  display: block; font-size: 0.75rem; font-family: var(--font-mono);
  color: var(--muted-foreground); margin-top: var(--space-2);
}
.demo-tape { max-width: 980px; margin: var(--space-7) auto 0; }
.demo-tape .hero-tape { margin-top: 0; }
.demo-tape__controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap;
  padding: 0.85rem 1.1rem; border-top: 1px solid var(--border);
}
.demo-tape__controls label {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: 0.78rem; font-weight: 600; color: var(--muted-foreground);
  flex-shrink: 0;
}
.payload-input {
  padding: 0.5rem 0.75rem; font-size: 0.8rem; font-family: var(--font-mono);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--background); color: var(--foreground);
  width: min(24rem, 70vw); flex-shrink: 0;
}
.payload-input:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.demo-tape__time {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--muted-foreground); white-space: nowrap;
}


/* ─── 21. Hero & page responsiveness ───
   On narrow and mid screens the hero stacks, so the copy centres
   and breathes instead of hugging the viewport edges. The split
   layout and left-aligned copy return at 900px+. */
@media (max-width: 899px) {
  .hero-grid { gap: 3rem; }
  .hero-copy { justify-items: center; text-align: center; gap: 1.1rem; }
  .hero-stamp { width: fit-content; }
  .hero-title { margin-inline: auto; }
  .hero-sub { margin-inline: auto; }
  .hero-specimen {
    width: min(100%, 34rem); margin-inline: auto;
    justify-self: center;
  }
  .hero-tape { overflow: hidden; }
  .hero-tape__ruler span:nth-child(2),
  .hero-tape__ruler span:nth-child(4) { display: none; }
}
@media (max-width: 560px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
  }
  .hero-actions .btn { width: 100%; max-width: 18.5rem; }
}
@media (max-width: 640px) {
  .hero-title { font-size: 1.85rem; }
  .design-card { padding: 1.3rem; }
}
@media (min-width: 900px) {
  .hero-specimen { width: 100%; }
}

/* ─── 22. Ambient page tint (static, no animation) ─── */
.wiki-home { background-attachment: scroll; }
/* ─── 23. Misc components ─── */
#scroll-top {
  position: fixed; bottom: 24px; right: 24px; width: 42px; height: 42px;
  border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transform: translateY(16px);
  transition: opacity 0.25s, transform 0.25s, background-color 0.2s, border-color 0.2s;
  z-index: 50; pointer-events: none; color: var(--muted-foreground);
}
#scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#scroll-top:hover { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 9999;
  padding: 0.6rem 1.2rem; background: var(--primary); color: var(--primary-foreground);
  border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; }

/* footer link hover (used by Layout) */
.site-footer__links a, .site-footer__legal a { text-underline-offset: 2px; }

/* wiki page headings: gentle reveal (runs on every browser) */


/* ─── 24. Print ─── */
@media print {
  nav, .theme-btn, #scroll-top, .wiki-sidebar, .wiki-toc-container, .wiki-mobile-nav, .wiki-scroll-progress-bar { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ════════════════════════════════════════════════════════════════════
   Design System v3 - "field console" identity
   Topographic contour motif (the mountain-rescue subject), instrument-
   panel details, and a full pass over how wiki markdown renders.
   All inline SVG, self-hosted type, zero emoji, no external requests.
   ════════════════════════════════════════════════════════════════════ */

/* ─── 25. Topographic contour motif ───
   Faint contour lines like a rescue topo map. One inline SVG data URI,
   reused with different tints and placements, kept well under the
   visibility threshold so it reads as texture, not decoration. */
.hero-wrap::after,
.cta-section::after,
.section-alt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='405' viewBox='0 0 720 405'%3E%3Cg fill='none' stroke='%23f97316' stroke-width='1'%3E%3Cellipse cx='150' cy='120' rx='55' ry='38'/%3E%3Cellipse cx='150' cy='120' rx='112' ry='80'/%3E%3Cellipse cx='150' cy='120' rx='178' ry='130' transform='rotate(10 150 120)'/%3E%3Cellipse cx='540' cy='280' rx='65' ry='44' transform='rotate(-7 540 280)'/%3E%3Cellipse cx='540' cy='280' rx='132' ry='90' transform='rotate(-7 540 280)'/%3E%3Cpath d='M-20 340 C 110 260 250 315 390 262 C 530 210 620 268 740 228'/%3E%3Cpath d='M-20 372 C 130 300 260 352 400 300 C 540 248 630 300 740 262'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 720px 405px;
  background-position: 88% 12%;
  background-repeat: repeat;
  opacity: 0.07;
}
.cta-section::after { background-position: 12% 100%; opacity: 0.09; }
.section-alt::after { background-position: 95% 85%; opacity: 0.05; }
.dark .hero-wrap::after { opacity: 0.055; }
.dark .cta-section::after { opacity: 0.07; }
.dark .section-alt::after { opacity: 0.04; }

/* keep content above the motif */
.hero-section,
.cta-inner,
.section-alt > .container { position: relative; z-index: 1; }

/* ─── 26. Instrument-panel corner brackets ───
   Viewfinder ticks that appear on hover - the "sighted in" cue of
   a field instrument, used only where the card is interactive. */
.design-card { position: relative; }
.design-card::before,
.design-card::after {
  content: "";
  position: absolute;
  width: 15px; height: 15px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.design-card::before {
  top: 9px; left: 9px;
  border-top: 2px solid var(--primary);
  border-left: 2px solid var(--primary);
  border-top-left-radius: 7px;
}
.design-card::after {
  bottom: 9px; right: 9px;
  border-bottom: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
  border-bottom-right-radius: 7px;
}
.design-card:hover::before,
.design-card:hover::after { opacity: 0.85; }

/* ─── 27. TX status pulse ───
   Shared by the specimen-plate chip and the signal-tape "on air" dot.
   Animated only when motion is allowed; static otherwise. */
@media (prefers-reduced-motion: no-preference) {
  .specimen-chip::before, .hero-tape__live::before {
    animation: statusPulse 2.2s ease-in-out infinite;
  }
  @keyframes statusPulse { 50% { opacity: 0.35; } }
}

/* ─── 28. Code blocks with console header ───
   rehype plugin (code-block-header.mjs) wraps each fenced block in
   a .code-block figure with a traffic-dot bar and language label. */
.code-block {
  margin: 1.25rem 0;
  border: 1px solid oklch(0.29 0.01 50deg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: oklch(0.15 0.004 50deg);
  box-shadow: var(--shadow-md);
}
.code-block__bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.95rem;
  background: oklch(0.19 0.005 50deg);
  border-bottom: 1px solid oklch(0.27 0.008 50deg);
}
.code-block__dots { display: flex; gap: 0.35rem; }
.code-block__dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; }
.code-block__dot--red { background: #ef4444; }
.code-block__dot--yellow { background: #eab308; }
.code-block__dot--green { background: #22c55e; }
.code-block__lang {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: oklch(0.66 0.008 50deg);
}
.prose-wiki .code-block pre {
  margin: 0;
  border: none; border-radius: 0; box-shadow: none;
}

/* ─── 29. Wiki prose - heading signals ─── */
.prose-wiki h2 { position: relative; padding-left: 0.9rem; }
.prose-wiki h2::before {
  content: "";
  position: absolute;
  left: 0; top: 0.24em; bottom: 0.24em;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 25%, transparent));
}
.prose-wiki h3::before {
  content: "";
  display: inline-block;
  width: 0.55rem; height: 0.55rem;
  margin-right: 0.5rem;
  border: 1.5px solid var(--primary);
  border-radius: 2px;
  transform: rotate(45deg);
  vertical-align: 0.06em;
}
.prose-wiki h4 { color: var(--primary); font-weight: 700; }

/* ─── 30. Wiki prose - tables ─── */
.prose-wiki table {
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.prose-wiki thead th {
  background: color-mix(in srgb, var(--primary) 8%, var(--muted));
  border-bottom: 2px solid var(--primary);
  font-size: 0.72rem;
}
.prose-wiki tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--foreground) 2.5%, var(--background));
}
.prose-wiki td {
  font-variant-numeric: tabular-nums;
}
.prose-wiki td code { white-space: nowrap; }

/* ─── 31. Wiki prose - kbd, task lists, definition lists ─── */
.prose-wiki kbd {
  font-family: var(--font-mono);
  font-size: 0.78em; font-weight: 500;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
}
.prose-wiki input[type="checkbox"] {
  accent-color: var(--primary);
  width: 0.95rem; height: 0.95rem;
  margin-right: 0.45rem;
  vertical-align: -0.14em;
}
.prose-wiki ul.contains-task-list { list-style: none; padding-left: 0.2rem; }
.prose-wiki li:has(> input[type="checkbox"]:checked) {
  color: color-mix(in srgb, var(--muted-foreground) 70%, transparent);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--muted-foreground) 45%, transparent);
}
.prose-wiki dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.45rem 1.3rem;
  margin: 1.25rem 0;
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  background: var(--card);
}
.prose-wiki dt {
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 600;
  color: var(--primary);
}
.prose-wiki dd {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ─── 32. Wiki prose - blockquote blip & details chevron ─── */
.prose-wiki blockquote { position: relative; padding-left: 1.5rem; }
.prose-wiki blockquote::before {
  content: "";
  position: absolute;
  left: 0.72rem; top: 1.05rem;
  width: 0.38rem; height: 0.38rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
}
.prose-wiki details summary::after {
  content: "";
  width: 0.5rem; height: 0.5rem;
  border-right: 2px solid var(--muted-foreground);
  border-bottom: 2px solid var(--muted-foreground);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.prose-wiki details[open] summary::after { transform: rotate(225deg); }
.prose-wiki details > *:not(summary) { margin-inline: 1.1rem; }

/* ─── 33. Wiki prose - images & misc polish ─── */
.prose-wiki img { box-shadow: var(--shadow-md); }
.prose-wiki hr {
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 55%, var(--border)) 0 6px,
    transparent 6px 14px
  );
}

/* ─── 34. CTA console kicker ─── */
.cta-section .cta-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: inherit; opacity: 0.85;
  margin-bottom: 1rem;
}
.cta-section .cta-kicker::before {
  content: "";
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

/* ─── 35. Reduced motion for the new touches ─── */
@media (prefers-reduced-motion: reduce) {
  .specimen-chip::before, .hero-tape__live::before { animation: none; }
  .design-card::before, .design-card::after { transition: none; }
  .prose-wiki details summary::after { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════
   Design System v4 - "precision field console" refinement
   Decisive pass: stronger type rhythm, calmer surfaces, consistent
   inner-page headers, and one signature console-readout moment on
   the homepage. Applied globally so every page inherits it.
   ════════════════════════════════════════════════════════════════════ */

/* ─── 36. Shared inner-page header (page-head) ─── */
.page-head {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(1.25rem, 3vw, 2rem);
  text-align: center;
}
.page-head .section-head__title { font-size: clamp(1.9rem, 4vw, 2.75rem); letter-spacing: -0.02em; }
.page-head .section-head__lead {
  max-width: 44rem; margin-inline: auto; margin-top: 1rem;
  color: var(--muted-foreground); font-size: clamp(0.98rem, 1.2vw, 1.08rem); line-height: 1.7;
}
.page-head__meta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.1rem; padding: 0.3rem 0.85rem;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted-foreground);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--card);
}

.video-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: var(--space-8);
}
.video-page .page-head {
  width: 100%;
}
.video-stage {
  width: min(56rem, 100%);
  margin: 0 auto;
}
.video-frame {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.video-player {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.iv-page {
  overflow-x: clip;
  padding-bottom: var(--space-8);
}
.iv-page .section-head { margin-bottom: 1.25rem; }
.iv-full {
  display: flex;
  justify-content: center;
  margin-top: 1.15rem;
}
.iv-full__btn {
  min-height: 52px;
  padding: 0.95rem 1.75rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent),
    var(--shadow-glow);
}
.iv-full__btn:hover {
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--primary) 42%, transparent),
    var(--shadow-glow);
}
.iv-full .btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.iv-phone {
  position: relative;
  width: min(22.5rem, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 12px 1.25rem;
  box-sizing: border-box;
  filter: drop-shadow(0 28px 48px rgb(0 0 0 / 48%));
}
.iv-phone__btn {
  position: absolute;
  width: 4px;
  background: linear-gradient(180deg, #6a7380, #2a323a);
  border-radius: 2px 0 0 2px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%);
}
.iv-phone__btn--vol {
  left: 2px; top: 118px; height: 72px;
}
.iv-phone__btn--vol::after {
  content: "";
  position: absolute;
  left: 0; top: 88px;
  width: 4px; height: 36px;
  background: inherit;
  border-radius: inherit;
  box-shadow: inherit;
}
.iv-phone__btn--pwr {
  right: 2px; top: 148px; height: 52px;
  border-radius: 0 2px 2px 0;
}
.iv-phone__frame {
  position: relative;
  border-radius: 2.15rem;
  padding: 10px 10px 12px;
  background:
    linear-gradient(145deg, #4a5360 0%, #1c2228 38%, #0e1216 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 22%),
    inset 0 -1px 0 rgb(0 0 0 / 55%),
    0 0 0 1px #0a0c0e;
}
.iv-phone__ear {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 18px; margin-bottom: 6px;
}
.iv-phone__mic {
  width: 6px; height: 6px; border-radius: 50%;
  background: #0a0c0e; box-shadow: inset 0 1px 1px rgb(255 255 255 / 12%);
}
.iv-phone__speaker {
  width: 68px; height: 6px; border-radius: 3px;
  background: #0a0c0e;
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 10%);
}
.iv-phone__cam {
  width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a6a88, #0a1220 62%, #000);
  box-shadow: 0 0 0 2px #1a2027;
}
.iv-phone__screen {
  display: flex; flex-direction: column;
  height: min(38rem, 68vh);
  border-radius: 1.55rem;
  overflow: hidden;
  background: #0b0e12;
  box-shadow: inset 0 0 0 1px #1a2027;
}
.iv-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 1rem 0.2rem;
  color: #f4f6f8;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
}
.iv-status__icons { display: flex; align-items: center; gap: 0.4rem; }
.iv-pane {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.iv-pane[hidden] { display: none; }
.iv-list-head {
  padding: 0.35rem 1rem 0.55rem;
}
.iv-list-head__title {
  margin: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.7rem; letter-spacing: -0.03em; color: #f4f6f8;
}
.iv-list-row {
  display: flex; align-items: center; gap: 0.75rem;
  width: 100%; min-height: 72px;
  padding: 0.65rem 1rem;
  border: 0; border-top: 1px solid #1e252c;
  background: transparent; color: inherit;
  cursor: pointer; text-align: left;
  touch-action: manipulation;
}
.iv-list-row:hover { background: #151a20; }
.iv-list-row:active { background: #1a2027; }
.iv-list-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.iv-list-row__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; background: #1a2027;
}
.iv-list-row__body { flex: 1; min-width: 0; }
.iv-list-row__top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
}
.iv-list-row__name {
  font-weight: 700; font-size: 0.95rem; color: #f4f6f8;
}
.iv-list-row__time {
  font-size: 0.72rem; color: #8b96a3; flex-shrink: 0;
}
.iv-list-row__preview {
  display: block; margin-top: 0.15rem;
  font-size: 0.8rem; color: #8b96a3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iv-chat-head {
  display: grid; grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 0.25rem 0.35rem 0.55rem;
  border-bottom: 1px solid #1e252c;
}
.iv-back {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: transparent; color: #0a84ff;
  cursor: pointer; touch-action: manipulation;
}
.iv-back:hover { opacity: 0.8; }
.iv-back:active { opacity: 0.55; }
.iv-back:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 8px; }
.iv-chat-head__ident {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
.iv-chat-head__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: #1a2027;
}
.iv-chat-head__name {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: 0.78rem; color: #f4f6f8;
}
.iv-thread {
  display: flex; flex-direction: column; gap: 0.9rem;
  flex: 1; min-height: 0;
  padding: 0.9rem 0.75rem 0.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgb(255 87 34 / 7%), transparent 55%),
    #0b0e12;
}
.iv-home {
  height: 18px; display: flex; align-items: center; justify-content: center;
}
.iv-home::before {
  content: "";
  width: 108px; height: 4px; border-radius: 2px; background: #3a444e;
}
.iv-phone__chin {
  display: flex; justify-content: center; padding-top: 8px;
}
.iv-phone__port {
  width: 42px; height: 5px; border-radius: 2px;
  background: #0a0c0e;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
}
.iv-block {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.iv-block[hidden],
.iv-ans[hidden],
.iv-ask[hidden],
.iv-text[hidden] {
  display: none;
}
.iv-text {
  align-self: flex-start;
  max-width: 86%;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 1rem 1rem 1rem 0.25rem;
  background: #2a323a;
  color: #c8d0d8;
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.iv-text a {
  color: #7cbcff;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.iv-text a:hover { color: #b6d8ff; }
.iv-text a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.iv-ask {
  align-self: flex-end;
  max-width: 86%;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 1rem 1rem 0.25rem 1rem;
  background: color-mix(in srgb, var(--success) 28%, #14301f);
  color: #eaffea;
  font-size: 0.88rem;
  line-height: 1.5;
}
.iv-ask:has(+ .iv-ask) { border-bottom-right-radius: 0.35rem; }
.iv-ask + .iv-ask { border-top-right-radius: 0.35rem; }
.iv-text:has(+ .iv-text) { border-bottom-left-radius: 0.35rem; }
.iv-text + .iv-text { border-top-left-radius: 0.35rem; }
.iv-ask + .iv-text { margin-top: 0.4rem; }
.iv-ans {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: min(16.5rem, 88%);
  min-height: 48px;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 1rem 1rem 1rem 0.25rem;
  background: #2a323a;
  color: #c8d0d8;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}
.iv-ans:hover {
  background: #343c46;
}
.iv-ans:active { transform: scale(0.99); }
.iv-ans:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.iv-ans.is-playing {
  box-shadow: 0 0 0 1px #5a6570;
}
.iv-ans__icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: #c8d0d8; color: #12161b;
}
.iv-ans__pause { display: none; }
.iv-ans.is-playing .iv-ans__play { display: none; }
.iv-ans.is-playing .iv-ans__pause { display: block; }
.iv-ans__wave {
  display: flex; align-items: center; gap: 3px; flex: 1; height: 20px;
}
.iv-ans__wave i {
  display: block; width: 3px; height: 6px; border-radius: 2px;
  background: #9aa4b0; transform-origin: center;
}
.iv-ans.is-playing .iv-ans__wave i { animation: ivWave 0.9s ease-in-out infinite; }
.iv-ans__wave i:nth-child(2) { height: 12px; animation-delay: 0.05s; }
.iv-ans__wave i:nth-child(3) { height: 18px; animation-delay: 0.1s; }
.iv-ans__wave i:nth-child(4) { height: 10px; animation-delay: 0.16s; }
.iv-ans__wave i:nth-child(5) { height: 20px; animation-delay: 0.08s; }
.iv-ans__wave i:nth-child(6) { height: 8px; animation-delay: 0.2s; }
.iv-ans__wave i:nth-child(7) { height: 16px; animation-delay: 0.12s; }
.iv-ans__wave i:nth-child(8) { height: 11px; animation-delay: 0.18s; }
.iv-ans__wave i:nth-child(9) { height: 7px; animation-delay: 0.04s; }
@keyframes ivWave {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1.25); }
}
.iv-ans__time {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  min-width: 2.3rem; text-align: right; color: #d0d6dc;
}
.iv-typing {
  align-self: flex-start;
  display: flex; align-items: center; gap: 5px;
  width: fit-content;
  padding: 0.7rem 0.9rem;
  border-radius: 1rem 1rem 1rem 0.25rem;
  background: #2a323a;
}
.iv-typing[hidden] { display: none; }
.iv-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #9aa4b0;
  animation: ivDot 1.1s ease-in-out infinite;
}
.iv-typing span:nth-child(2) { animation-delay: 0.15s; }
.iv-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ivDot {
  0%, 80%, 100% { opacity: 0.28; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.iv-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 8px 8px 10px;
  border-top: 1px solid #1e252c;
  background: #10151a;
}
.iv-compose__field {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  max-height: 72px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 18px;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-color: #1c232b;
  color: #f4f6f8;
  -webkit-text-fill-color: #f4f6f8;
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
  caret-color: #25d366;
  opacity: 1;
}
.iv-compose__field:read-only,
.iv-compose__field:disabled {
  background-color: #1c232b;
  color: #f4f6f8;
  -webkit-text-fill-color: #f4f6f8;
  opacity: 1;
}
.iv-compose__field::placeholder { color: #7b8693; }
.iv-compose__field:focus { outline: none; box-shadow: 0 0 0 1px #2d3944; }
.iv-compose__send {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.iv-compose__send:hover:not(:disabled) { filter: brightness(1.08); }
.iv-compose__send:active:not(:disabled) { transform: scale(0.94); }
.iv-compose__send:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.iv-compose__send:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  filter: none;
}
@media (max-width: 640px) {
  .iv-page { padding-bottom: 0.5rem; padding-inline: 0.75rem; }
  .iv-page .page-head { padding: 0.65rem 0 0.2rem; }
  .iv-page .section-head { margin-bottom: 0.35rem; }
  .iv-page .page-head .section-head__title { font-size: 1.45rem; }
  .iv-full { margin-top: 0.65rem; }
  .iv-full__btn { min-height: 48px; padding: 0.8rem 1.25rem; font-size: 0.95rem; }
  .iv-phone {
    display: flex;
    flex-direction: column;
    width: min(21.5rem, 100%);
    height: min(34rem, calc(100dvh - 14.5rem));
    max-height: calc(100dvh - 14.5rem);
    padding: 0 4px 0.15rem;
    filter: drop-shadow(0 16px 24px rgb(0 0 0 / 40%));
  }
  .iv-phone__btn { display: none; }
  .iv-phone__frame {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 8px 10px;
    border-radius: 1.85rem;
  }
  .iv-phone__screen {
    flex: 1;
    height: auto;
    min-height: 0;
    border-radius: 1.35rem;
  }
  .iv-compose { padding: 8px; }
}
@media (max-width: 640px) and (max-height: 700px) {
  .iv-page .page-head { padding: 0.4rem 0 0.1rem; }
  .iv-phone { height: calc(100dvh - 12.5rem); max-height: calc(100dvh - 12.5rem); }
  .iv-full { margin-top: 0.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .iv-ans.is-playing .iv-ans__wave i { animation: none; }
  .iv-ans:active { transform: none; }
  .iv-typing span { animation: none; opacity: 0.8; }
  .iv-compose__send:active:not(:disabled) { transform: none; }
}

/* ─── 37. Calmer, more confident surfaces & rhythm ─── */
.section-head { margin-bottom: 2.75rem; }
.section-head__title { font-weight: 700; }
.section-head__lead { max-width: 46rem; margin-inline: auto; }
.section-head--left .section-head__lead { margin-inline: 0; }

/* buttons: crisper geometry, less pill-ish */
.btn { border-radius: calc(var(--radius-md) + 1px); padding: 0.72rem 1.35rem; }
.btn-primary { box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 1px 2px rgb(0 0 0 / 8%); }
.btn-secondary { box-shadow: inset 0 1px 0 rgb(255 255 255 / 60%); }
.dark .btn-secondary { box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%); }

/* cards: hairline-first, shadow only on hover */
.design-card, .wiki-group-card, .wiki-tile,
.modes-console {
  box-shadow: none;
}
.design-card { background: color-mix(in srgb, var(--card) 92%, var(--muted)); }
.design-card:hover { box-shadow: var(--shadow-md); }

/* prose: keep measure human, tighten table heads */
.prose-wiki { font-size: 0.96rem; }
.prose-wiki p, .prose-wiki li { color: var(--muted-foreground); }

/* ─── 38. Console readout panel (homepage signature) ───
   A dark instrument panel even in light mode - the "screen" of the
   device - carrying real firmware telemetry lines. */
.console-panel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 85% -20%, oklch(0.28 0.09 40deg / 0.35), transparent 60%),
    linear-gradient(180deg, oklch(0.175 0.006 50deg), oklch(0.135 0.005 50deg));
  border: 1px solid oklch(0.3 0.01 50deg);
  box-shadow: 0 24px 60px -24px oklch(0.1 0.01 50deg / 0.8), inset 0 1px 0 oklch(1 0 0 / 0.06);
  color: oklch(0.92 0.005 50deg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.console-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath d='M0 80h160M80 0v160' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1'/%3E%3C/svg%3E");
}
.console-panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.9rem; margin-bottom: 1rem;
  border-bottom: 1px solid oklch(1 0 0 / 0.1);
  font-family: var(--font-mono);
}
.console-panel__title {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: oklch(0.75 0.01 50deg);
}
.console-panel__live {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.62rem; letter-spacing: 0.14em; color: oklch(0.82 0.16 145deg);
  text-transform: uppercase;
}
.console-panel__live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 8px #22c55e;
}
@media (prefers-reduced-motion: no-preference) {
  .console-panel__live::before { animation: statusPulse 2.2s ease-in-out infinite; }
}
.console-panel__lines {
  display: grid; gap: 0.55rem;
  font-family: var(--font-mono); font-size: clamp(0.72rem, 1vw, 0.84rem);
  line-height: 1.6;
}
.console-panel__line { display: flex; gap: 1rem; flex-wrap: wrap; }
.console-panel__t {
  color: oklch(0.6 0.01 50deg); min-width: 9.5ch; flex-shrink: 0;
}
.console-panel__v { color: oklch(0.93 0.005 50deg); font-weight: 500; }
.console-panel__v--ok { color: #4ade80; }
.console-panel__v--sig { color: #fb923c; }
.console-panel__sep {
  border: none; border-top: 1px dashed oklch(1 0 0 / 0.14); margin: 0.35rem 0;
}
.console-panel__foot {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem;
  margin-top: 1.1rem; padding-top: 0.9rem;
  border-top: 1px solid oklch(1 0 0 / 0.1);
  font-family: var(--font-mono); font-size: 0.68rem; color: oklch(0.66 0.008 50deg);
}
.console-panel__foot span b { color: oklch(0.9 0.005 50deg); font-weight: 600; }

/* ─── 39. Signature split: console panel beside a short field note ─── */
.sig-grid {
  display: grid; grid-template-columns: 1fr; gap: clamp(1.75rem, 3.5vw, 3rem);
  align-items: center;
}
@media (min-width: 900px) {
  .sig-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .sig-grid--flip .sig-grid__aside { order: -1; }
}
.sig-grid__aside p { color: var(--muted-foreground); line-height: 1.75; margin: 0 0 1rem; }
.sig-grid__aside p:last-child { margin-bottom: 0; }
.sig-list { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.sig-list li {
  position: relative; padding-left: 1.6rem;
  color: var(--muted-foreground); font-size: 0.92rem; line-height: 1.6;
}
.sig-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0.5rem; height: 0.5rem; border: 1.5px solid var(--primary);
  transform: rotate(45deg);
}

/* ─── 40. Type rhythm refinements (both themes) ─── */
.hero-title { font-weight: 700; }
.mode-row__name { font-weight: 600; }
.stack-rail span { font-weight: 500; }
.faq__question { font-size: 0.98rem; }

/* dark-mode console chrome keeps identical */
.dark .console-panel {
  border-color: oklch(0.34 0.012 50deg);
}

@media (max-width: 560px) {
  .console-panel__line { gap: 0.4rem; }
  .console-panel__t { min-width: 8ch; }
}

/* ─── 41. Wiki home & article refinement ─── */
.wiki-home__hero .hero-stamp { margin-inline: auto; }
.wiki-home__title { font-weight: 700; }
.wiki-tile { position: relative; }
.wiki-tile:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.wiki-group-card {
  box-shadow: none;
  background: color-mix(in srgb, var(--card) 94%, var(--muted));
}
.wiki-group-card__head h2 { position: relative; padding-left: 0.75rem; }
.wiki-group-card__head h2::before {
  content: "";
  position: absolute; left: 0; top: 0.2em; bottom: 0.2em; width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 25%, transparent));
}

/* article page: page title + prose breathing */
.wiki-page-header { margin-bottom: 2rem; }
.wiki-page-title { font-weight: 800; }
.wiki-main { background: var(--background); }
.wiki-toc-item.active { color: var(--primary); }
.wiki-nav-home--active { color: var(--primary); }

/* consistent soft page tint behind inner pages that use page-head */
main > .page-head + * { position: relative; }

/* ─── 42. Console scroll reveal on the homepage sig section ─── */
html.motion-ok [data-rv] { transition-delay: var(--rv-delay, 0ms); }
.console-panel {
  transform-origin: center;
}
@media (prefers-reduced-motion: reduce) {
  .console-panel__live::before { animation: none; }
}

/* ─── 43. Hardware lab (/lab) ─── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hw-lab-page { padding-block: clamp(2.5rem, 5vw, 4rem) 4rem; }
.hw-lab-head { max-width: 56rem; margin-bottom: 1.25rem; }
.hw-lab-eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary);
}
.hw-lab-head h1 { margin: 0.5rem 0 0; font-size: clamp(1.85rem, 3.6vw, 2.6rem); letter-spacing: -0.02em; }
.hw-lab-lead { margin: 0.85rem 0 0; color: var(--muted-foreground); line-height: 1.7; max-width: 62ch; }
.hw-lab-lead a { color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; }
.hw-lab-lead a:hover { color: var(--primary); }
.hw-lab-head__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1.25rem;
}
.hw-lab-presets { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.hw-lab-preset-btn {
  padding: 0.4rem 0.85rem; border-radius: var(--radius-full);
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--border-strong); background: var(--card);
  color: var(--foreground); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.hw-lab-preset-btn:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--card)); }
.hw-lab-preset-btn--ghost { color: var(--muted-foreground); }
.hw-lab-progress { display: flex; align-items: center; gap: 0.55rem; }
.hw-lab-progress__ring { width: 2.25rem; height: 2.25rem; }
.hw-lab-progress__track { fill: none; stroke: var(--border); stroke-width: 2.5; }
.hw-lab-progress__fill {
  fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round;
  transition: stroke-dasharray 0.35s ease;
}
.hw-lab-progress__label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: var(--primary);
}
.hw-lab-steps {
  list-style: none; margin: 0 0 1.25rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.hw-lab-steps__item {
  flex: 1 1 140px; max-width: 220px;
  padding: 0.55rem 0.75rem; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--card);
  transition: border-color 0.2s, background 0.2s;
}
.hw-lab-steps__item.is-done {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
}
.hw-lab-steps__title {
  display: block; font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.hw-lab-steps__hint {
  display: block; margin-top: 0.2rem; font-size: 0.68rem; color: var(--muted-foreground); line-height: 1.35;
}
.hw-lab-layout {
  display: grid; gap: 1.25rem;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(220px, 280px);
  align-items: start;
}
.hw-lab-palette {
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  background: var(--card); overflow: hidden;
  box-shadow: 0 8px 28px -12px rgb(0 0 0 / 18%);
}
.hw-lab-palette__tools { padding: 0.65rem 0.65rem 0; }
.hw-lab-search input {
  width: 100%; padding: 0.45rem 0.65rem; border-radius: var(--radius-md);
  border: 1px solid var(--border-strong); background: var(--background);
  font-family: var(--font-mono); font-size: 0.72rem;
}
.hw-lab-palette__title {
  margin: 0; padding: 0.65rem 1rem; font-size: 0.72rem; font-weight: 700;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border); background: var(--muted); color: var(--muted-foreground);
}
.hw-lab-palette__list {
  list-style: none; margin: 0; padding: 0.5rem; display: grid; gap: 0.35rem;
  max-height: min(68vh, 620px); overflow-y: auto;
}
.hw-lab-palette__item {
  display: grid; grid-template-columns: 72px 1fr; gap: 0.65rem; align-items: center;
  width: 100%; padding: 0.45rem; border-radius: var(--radius-lg);
  border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.hw-lab-palette__item:hover { border-color: var(--border-strong); background: var(--muted); }
.hw-lab-palette__item.is-mounted {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
}
.hw-lab-palette__thumb {
  display: flex; align-items: center; justify-content: center;
  height: 52px; border-radius: var(--radius-md);
  background: #0a0e12; border: 1px solid var(--border);
}
.hw-lab-palette__thumb svg { width: 100%; height: 100%; padding: 4px; }
.hw-lab-palette__name { display: block; font-size: 0.82rem; font-weight: 600; }
.hw-lab-palette__sub { display: block; font-size: 0.68rem; color: var(--muted-foreground); margin-top: 0.12rem; line-height: 1.35; }
.hw-lab-palette__zone {
  display: block; margin-top: 0.2rem; font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--primary); text-transform: uppercase; letter-spacing: 0.06em;
}
.hw-lab-bench {
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  background: var(--card); overflow: hidden;
  box-shadow: 0 12px 40px -16px rgb(0 0 0 / 22%);
}
.hw-lab-bench__chrome {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); background: var(--muted);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.hw-lab-bench__tag { color: var(--muted-foreground); }
.hw-lab-legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hw-lab-legend li { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--muted-foreground); font-size: 0.62rem; }
.hw-lab-legend__swatch { width: 0.65rem; height: 0.65rem; border-radius: 2px; }
.hw-lab-legend__swatch--power { background: #3ecf6a; }
.hw-lab-legend__swatch--data { background: #38bdf8; }
.hw-lab-legend__swatch--rf { background: #fb923c; }
.hw-lab-bench__surface {
  padding: 0.75rem; background:
    radial-gradient(circle at 20% 10%, rgb(62 207 106 / 6%), transparent 45%),
    linear-gradient(180deg, color-mix(in srgb, var(--muted) 40%, var(--background)), var(--background));
}
.hw-lab-bench__svg { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.hw-lab-bench__hint { margin: 0; padding: 0.75rem 1rem 1rem; font-size: 0.78rem; color: var(--muted-foreground); border-top: 1px solid var(--border); }
.hw-lab-zone-label {
  font-family: JetBrains Mono, monospace; font-size: 7px; fill: #3ecf6a; opacity: 0.45;
  letter-spacing: 0.08em;
}
.hw-lab-ghost {
  fill: none; stroke: #3ecf6a; stroke-width: 0.9; stroke-dasharray: 4 3; opacity: 0.35;
  transition: opacity 0.25s;
}
.hw-lab-ghost.is-hidden { opacity: 0; pointer-events: none; }
.hw-lab-ghost-label {
  font-family: JetBrains Mono, monospace; font-size: 6px; fill: #6ee7a0; opacity: 0.5;
}
.hw-lab-wire {
  fill: none; stroke-width: 1.6; stroke-linecap: round;
  opacity: 0.9; pointer-events: none;
  stroke-dasharray: 120; stroke-dashoffset: 120;
  animation: hw-lab-wire-in 0.55s ease forwards;
}
.hw-lab-wire--power { stroke: #3ecf6a; }
.hw-lab-wire--data { stroke: #38bdf8; }
.hw-lab-wire--rf { stroke: #fb923c; }
@keyframes hw-lab-wire-in { to { stroke-dashoffset: 0; } }
.hw-lab-wire-label {
  font-family: JetBrains Mono, monospace; font-size: 7px; fill: #9aa8b8; text-anchor: middle; pointer-events: none;
}
.hw-lab-part {
  filter: drop-shadow(0 4px 10px rgb(0 0 0 / 40%));
  cursor: pointer; outline: none;
  transition: filter 0.15s;
}
.hw-lab-part:hover { filter: drop-shadow(0 6px 14px rgb(0 0 0 / 45%)); }
.hw-lab-part.is-selected { filter: drop-shadow(0 0 12px rgb(62 207 106 / 55%)); }
.hw-lab-part.is-entering { animation: hw-lab-part-in 0.4s ease; }
@keyframes hw-lab-part-in {
  from { opacity: 0; transform: translate(var(--lab-x, 0), calc(var(--lab-y, 0) + 8px)); }
  to { opacity: 1; }
}
.hw-lab-inspector {
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  background: var(--card); padding: 1rem 1.1rem;
  box-shadow: 0 8px 28px -12px rgb(0 0 0 / 18%);
  position: sticky; top: 5.5rem;
}
.hw-lab-inspector__title {
  margin: 0 0 0.75rem; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground);
}
.hw-lab-inspector__empty p { margin: 0; font-size: 0.78rem; color: var(--muted-foreground); line-height: 1.6; }
.hw-lab-inspector__zone {
  margin: 0; font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700;
  color: var(--primary); text-transform: uppercase; letter-spacing: 0.06em;
}
.hw-lab-inspector__name { margin: 0.35rem 0 0; font-size: 1.05rem; }
.hw-lab-inspector__detail { margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--muted-foreground); line-height: 1.6; }
.hw-lab-inspector__pins { margin: 1rem 0 0; font-size: 0.78rem; }
.hw-lab-inspector__pins dt { font-weight: 600; color: var(--muted-foreground); margin-bottom: 0.25rem; }
.hw-lab-inspector__pins dd { margin: 0; font-family: var(--font-mono); font-size: 0.68rem; line-height: 1.55; }
.hw-lab-inspector__toggle {
  margin-top: 1rem; width: 100%; padding: 0.5rem 0.75rem; border-radius: var(--radius-md);
  border: 1px solid var(--border-strong); background: var(--muted);
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.hw-lab-inspector__toggle:hover:not(:disabled) { border-color: var(--destructive); color: var(--destructive); }
.hw-lab-inspector__toggle:disabled { opacity: 0.45; cursor: not-allowed; }
.hw-lab-inspector__links {
  margin: 1rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--border);
  font-size: 0.68rem; color: var(--muted-foreground); line-height: 1.5;
}
@media (max-width: 1100px) {
  .hw-lab-layout { grid-template-columns: minmax(220px, 1fr) minmax(0, 1.4fr); }
  .hw-lab-inspector { grid-column: 1 / -1; position: static; }
}
@media (max-width: 720px) {
  .hw-lab-layout { grid-template-columns: 1fr; }
  .hw-lab-palette__list { max-height: none; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .hw-lab-steps__item { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-lab-wire { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
  .hw-lab-part.is-entering { animation: none; }
}
