/* ============================================================
   FRONTIER LABS — Silk Aurora design system
   World: near-black void, slow silk aurora ribbons (mint,
   cyan), fine grain, pearlescent panels.
   Voice: Satoshi. Artifacts/data: JetBrains Mono.
   ============================================================ */

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-400.woff2') format('woff2');
  font-weight: 400; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-500.woff2') format('woff2');
  font-weight: 500; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-700.woff2') format('woff2');
  font-weight: 700; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-900.woff2') format('woff2');
  font-weight: 900; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-700.woff2') format('woff2');
  font-weight: 700; font-display: swap; font-style: normal;
}

:root {
  --void: #050507;
  --void-soft: #0b0b0f;
  --surface: #101016;
  --elevated: #14151d;
  --panel: rgba(20, 21, 29, 0.62);
  --panel-solid: #14151d;
  --hairline: rgba(242, 239, 232, 0.09);
  --hairline-strong: rgba(242, 239, 232, 0.18);

  --ink: #f2efe8;
  --muted: #b8b5c2;
  --read: #cfccd6;
  --dim: #85838f;

  --mint: #6ed6c9;
  --mint-dim: #3d8a81;
  --azure: #41FFFF;
  --azure-bright: #85ffff;
  --on-azure: #04252c;
  
  --cyan: #41FFFF;
  --cyan-dim: #0b6f7a;

  --success: #4ade9c;
  --warning: #f0c75e;
  --danger: #f0655a;
  --info: #8fd0e0;

  --font-sans: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --measure: 68ch;
  --radius: 14px;
  --radius-sm: 9px;
  --max: 1120px;

  --ease-out-exp: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lift: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 40px -12px rgba(0,0,0,0.7);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.76;
  letter-spacing: 0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --- Browser surfaces: themed, not default --- */
::selection { background: rgba(110, 214, 201, 0.28); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: #23242e; border-radius: 4px; border: 2px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: #33343f; }
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}
a { color: var(--mint); text-decoration-color: rgba(110,214,201,0.35); text-underline-offset: 4px; transition: color .2s var(--ease-out-exp), text-decoration-color .2s var(--ease-out-exp); }
a:hover { color: var(--azure); text-decoration-color: rgba(65,255,255,0.6); }
code, kbd, pre, .mono { font-family: var(--font-mono); }
code {
  font-size: 0.86em;
  background: rgba(110,214,201,0.08);
  border: 1px solid rgba(110,214,201,0.14);
  border-radius: 4px;
  padding: 0.1em 0.38em;
  color: var(--mint);
}

/* --- Aurora field + flow lines + grain --- */
#aurora {
  position: fixed; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  display: block;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: url("../img/flow-field.svg") center / cover no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.grain {
  position: fixed; inset: -50%; z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.2s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0,0); }
  25% { transform: translate(-2%,1%); }
  50% { transform: translate(1%,-2%); }
  75% { transform: translate(-1%,2%); }
  100% { transform: translate(0,0); }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  html { scroll-behavior: auto; }
}

/* --- Skip link --- */
.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--azure); color: var(--void);
  padding: 10px 18px; border-radius: 9px; font-weight: 700;
  z-index: 200; transition: top .25s var(--ease-out-exp);
  text-decoration: none;
}
.skip-link:focus { top: 14px; color: var(--void); }

/* --- Honesty ribbon --- */
.honesty-ribbon {
  position: relative;
  background: rgba(65,255,255,0.06);
  border-bottom: 1px solid rgba(65,255,255,0.16);
  color: var(--azure);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 8px 20px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  text-align: center;
}
.honesty-ribbon .ribbon-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--azure); flex: none;
  animation: pulse-dot 2.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.honesty-ribbon .ribbon-dismiss {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: 1px solid rgba(65,255,255,0.25);
  color: var(--azure); font-family: var(--font-mono); font-size: 11px;
  padding: 2px 10px; border-radius: 999px; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.honesty-ribbon .ribbon-dismiss:hover { background: rgba(65,255,255,0.12); border-color: rgba(65,255,255,0.5); }
.honesty-ribbon[data-fixed] .ribbon-dismiss { display: none; }
.honesty-ribbon[hidden] { display: none; }

/* --- Navigation --- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(5, 5, 7, 0.66);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  padding: 0 24px; height: 64px;
}
.nav-links {
  display: flex; gap: 2px; align-items: center;
  flex-wrap: nowrap; justify-content: flex-start;
  overflow-x: auto;
  white-space: nowrap;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: inline-flex;
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 6px 11px; border-radius: 999px;
  transition: color .2s, background .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-links a:hover { color: var(--ink); background: rgba(242,239,232,0.06); }
.nav-links a[aria-current="page"] {
  color: var(--void); background: var(--azure); font-weight: 700;
}
.nav-links a.nav-cta {
  border: 1px solid rgba(110,214,201,0.4); color: var(--mint);
  margin-left: auto;
}
.nav-toggle {
  display: none;
  position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  background: none; border: 1px solid var(--hairline-strong);
  border-radius: 9px; color: var(--ink);
  width: 40px; height: 40px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(8,8,11,0.97);
    border-bottom: 1px solid var(--hairline);
    padding: 12px 16px 18px;
    display: none;
    width: 100%;
    overflow-x: visible;
    white-space: normal;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 15px; flex-shrink: 1; }
  .nav-links a.nav-cta { margin-left: 0; text-align: center; }
}

/* --- Hero (first viewport) --- */
.hero {
  min-height: calc(100svh - 96px);
  display: flex; flex-direction: column;
  max-width: var(--max); margin: 0 auto;
  padding: 48px 24px 0;
  position: relative;
}
.hero-logo {
  display: block;
  margin: 0 auto 40px;
  max-width: 320px;
  width: 60%;
  height: auto;
  opacity: 0.95;
  padding-top: 16px;
}
.hero-main {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  width: 100%; max-width: 820px; margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 900;
  margin: 0 auto 28px;
  max-width: 18ch;
  text-wrap: balance;
}
.hero h1 .hl { color: var(--azure); }
.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--muted); max-width: 60ch; margin: 0 auto 40px;
  text-align: center;
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-proof {
  border-top: 1px solid var(--hairline-strong);
  margin-top: 48px;
  padding: 20px 0 26px;
  display: flex; gap: 34px; align-items: baseline; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: 0.05em; color: var(--dim);
}
.hero-proof strong { color: var(--ink); font-weight: 700; }
.hero-proof .hero-scroll { margin-left: auto; color: var(--muted); text-decoration: none; transition: color .2s var(--ease-out-exp); }
.hero-proof .hero-scroll:hover { color: var(--mint); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-size: 15.5px; font-weight: 700;
  padding: 13px 26px; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform .3s var(--ease-out-exp), box-shadow .3s var(--ease-out-exp), background .2s, color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: var(--azure); color: var(--on-azure);
  box-shadow: 0 10px 34px -10px rgba(65,255,255,0.4);
}
.btn-primary:hover { color: var(--on-azure); background: var(--azure-bright); transform: translateY(-2px); box-shadow: 0 16px 44px -10px rgba(65,255,255,0.5); }
.btn-ghost {
  background: transparent; color: var(--mint);
  border: 1px solid rgba(110,214,201,0.38);
}
.btn-ghost:hover { background: rgba(110,214,201,0.09); color: var(--mint); transform: translateY(-2px); }
.btn .arrow { transition: transform .3s var(--ease-out-exp); }
.btn:hover .arrow { transform: translateX(4px); }

/* --- Layout --- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
main > .section:first-of-type { padding-top: 60px; }
.section { padding: 84px 0; position: relative; }
.section + .section { border-top: 1px solid var(--hairline); }
.section-head { max-width: 62ch; margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.022em; font-weight: 900;
  line-height: 1.12; margin: 0 0 16px; text-wrap: balance;
}
.section-head p { color: var(--read); margin: 0; font-size: 17.5px; }
h3 { font-size: 1.28rem; letter-spacing: -0.014em; font-weight: 700; line-height: 1.3; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.25em; color: var(--read); }
.prose p strong, .prose li strong { color: var(--ink); }
.prose ul, .prose ol { color: var(--read); padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -0.02em; font-weight: 900; margin: 2.2em 0 0.6em; text-wrap: balance; }
.prose h3 { margin: 2em 0 0.6em; }
.prose > :first-child { margin-top: 0; }

/* --- Panels / cards --- */
.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.track-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.track-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  transition: transform .35s var(--ease-out-exp), border-color .3s, box-shadow .35s var(--ease-out-exp);
}
.track-card:hover {
  transform: translateY(-3px);
  border-color: rgba(110,214,201,0.34);
  box-shadow: var(--shadow-lift);
}
.track-card .icon {
  width: 40px; height: 40px; color: var(--mint); flex: none;
}
.track-card .icon svg { width: 100%; height: 100%; }
.track-card h3 { margin: 0; color: var(--ink); }
.track-card p { margin: 0; color: var(--muted); font-size: 15.5px; flex: 1; }
.track-card .go {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--mint); letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 7px;
}
.track-card .go .arrow { transition: transform .3s var(--ease-out-exp); }
.track-card:hover .go .arrow { transform: translateX(5px); }

/* --- Shift columns (traditional → blind → threshold) --- */
.shift-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}
.shift-col {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
}
.shift-col h3 { margin: 0; }
.shift-col .shift-tag {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.shift-col[data-tone="danger"] .shift-tag { color: var(--danger); }
.shift-col[data-tone="mint"] .shift-tag { color: var(--mint); }
.shift-col[data-tone="azure"] .shift-tag { color: var(--azure); }
.shift-col p { margin: 0; color: var(--muted); font-size: 15px; }
.shift-col ul { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: 15px; }
.shift-col li { margin-bottom: 6px; }

/* --- Callouts (no colored border-left; tinted fields) --- */
.callout {
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 28px 0;
  border: 1px solid var(--hairline);
}
.callout .callout-title {
  font-weight: 700; font-size: 15px; margin: 0 0 8px;
  display: flex; align-items: center; gap: 9px;
}
.callout .callout-title svg { width: 17px; height: 17px; flex: none; }
.callout p { margin: 0; font-size: 15.5px; color: var(--muted); }
.callout p + p { margin-top: 0.6em; }
.callout-insight { background: rgba(110, 214, 201, 0.07); border-color: rgba(110,214,201,0.2); }
.callout-insight .callout-title { color: var(--mint); }
.callout-detect { background: rgba(143, 208, 224, 0.06); border-color: rgba(143,208,224,0.2); }
.callout-detect .callout-title { color: var(--info); }
.callout-warn { background: rgba(240, 199, 94, 0.07); border-color: rgba(240,199,94,0.22); }
.callout-warn .callout-title { color: var(--warning); }
.callout-ethics { background: rgba(65,255,255,0.06); border-color: rgba(65,255,255,0.2); }
.callout-ethics .callout-title { color: var(--azure); }

/* --- Tables --- */
.table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th {
  text-align: left; font-family: var(--font-mono); font-weight: 500;
  font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--dim); padding: 14px 18px;
  border-bottom: 1px solid var(--hairline-strong);
}
td { padding: 13px 18px; border-bottom: 1px solid var(--hairline); color: var(--muted); vertical-align: top; }
tr:last-child td { border-bottom: none; }
td strong, td b { color: var(--ink); font-weight: 700; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(242,239,232,0.025); }

/* --- Badges / status (shape-coded, never hue alone) --- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; padding: 3px 11px; border-radius: 999px;
  border: 1px solid;
}
.badge::before { content: ""; width: 7px; height: 7px; flex: none; }
.badge-ok { color: var(--success); border-color: rgba(74,222,156,0.35); background: rgba(74,222,156,0.08); }
.badge-ok::before { border-radius: 50%; background: var(--success); }
.badge-warn { color: var(--warning); border-color: rgba(240,199,94,0.35); background: rgba(240,199,94,0.08); }
.badge-warn::before { background: var(--warning); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.badge-danger { color: var(--danger); border-color: rgba(240,101,90,0.35); background: rgba(240,101,90,0.08); }
.badge-danger::before { background: var(--danger); clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%); }
.badge-neutral { color: var(--muted); border-color: var(--hairline-strong); background: rgba(242,239,232,0.04); }
.badge-neutral::before { border: 1.5px solid var(--muted); border-radius: 50%; background: transparent; }
.badge-mint { color: var(--mint); border-color: rgba(110,214,201,0.35); background: rgba(110,214,201,0.08); }
.badge-mint::before { border-radius: 4px; background: var(--mint); }

/* --- Diagrams --- */
.diagram-block {
  margin: 36px 0;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.diagram-block .diagram-scroll { overflow-x: auto; padding: 30px 26px 20px; }
.diagram-block svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.diagram-caption {
  padding: 0 26px 8px; color: var(--muted); font-size: 15px;
}
.diagram-caption p { margin: 0 0 8px; }
.diagram-figure-label {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;
  color: var(--dim); text-transform: uppercase;
  padding: 18px 26px 0;
}
.step-controls {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 26px 20px;
  border-top: 1px solid var(--hairline);
  margin-top: 12px;
  flex-wrap: wrap;
}
.step-btn {
  background: rgba(242,239,232,0.05); color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px; padding: 8px 18px;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: background .2s, border-color .2s, transform .2s var(--ease-out-exp);
  display: inline-flex; align-items: center; gap: 7px;
}
.step-btn:hover { background: rgba(110,214,201,0.1); border-color: rgba(110,214,201,0.4); }
.step-btn:active { transform: scale(0.97); }
.step-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.step-btn[disabled]:hover { background: rgba(242,239,232,0.05); border-color: var(--hairline-strong); }
.step-btn.play { background: var(--azure); color: var(--on-azure); border-color: transparent; }
.step-btn.play:hover { background: var(--azure-bright); }
.step-counter { font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); letter-spacing: 0.06em; }
.step-live-caption {
  flex-basis: 100%;
  color: var(--muted); font-size: 15px; margin-top: 4px;
  min-height: 1.6em;
}
/* SVG step visibility */
[data-step] { opacity: 0; transition: opacity .55s var(--ease-out-exp), transform .55s var(--ease-out-exp); transform: translateY(6px); }
[data-step].step-on { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-step] { transition: opacity .01s; transform: none; }
}
/* SVG shared grammar */
svg .dg-label { font-family: var(--font-mono); font-size: 12px; fill: var(--muted); }
svg .dg-label-sm { font-family: var(--font-mono); font-size: 11px; fill: var(--dim); }
svg .dg-title { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; fill: var(--ink); letter-spacing: 0.04em; }
svg .dg-node { fill: var(--elevated); stroke: var(--hairline-strong); stroke-width: 1.5; }
svg .dg-node-mint { fill: rgba(110,214,201,0.1); stroke: var(--mint); stroke-width: 1.5; }
svg .dg-node-danger { fill: rgba(240,101,90,0.09); stroke: var(--danger); stroke-width: 1.5; }
svg .dg-node-azure { fill: rgba(65,255,255,0.08); stroke: var(--azure); stroke-width: 1.5; }
svg .dg-flow { stroke: var(--mint); stroke-width: 1.5; fill: none; }
svg .dg-flow-dim { stroke: var(--dim); stroke-width: 1.5; fill: none; stroke-dasharray: 5 5; }
svg .dg-flow-danger { stroke: var(--danger); stroke-width: 1.5; fill: none; }
svg .dg-cipher { fill: url(#hatch); stroke: var(--hairline-strong); stroke-width: 1.5; }
svg .dg-blind { fill: var(--dim); }
svg .dg-signal { stroke: var(--success); }
.text-equiv {
  padding: 0 26px 22px; color: var(--dim); font-size: 13.5px;
}
.text-equiv summary { cursor: pointer; color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; }
.text-equiv ol, .text-equiv ul { margin: 10px 0 0; padding-left: 1.4em; }
.text-equiv li { margin-bottom: 4px; }

/* --- Reveal (one quiet entrance, hero excluded; only when JS is present) --- */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease-out-exp), transform .8s var(--ease-out-exp);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* --- Simulation page --- */
.console-frame {
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--void-soft);
  box-shadow: var(--shadow-lift);
}
.console-frame .console-chrome {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: rgba(20,21,29,0.9);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 12px; color: var(--dim);
}
.console-chrome .dot { width: 9px; height: 9px; border-radius: 50%; }
.console-frame iframe {
  display: block; width: 100%; height: 720px; border: 0;
  background: var(--void-soft);
}
.sim-grid {
  display: grid; gap: 18px;
  grid-template-columns: 1fr 360px;
  align-items: start;
}
@media (max-width: 1080px) { .sim-grid { grid-template-columns: 1fr; } }

.relay-pool { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.relay-card {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); padding: 14px 16px;
  transition: border-color .3s, opacity .3s, transform .3s var(--ease-out-exp);
}
.relay-card .relay-name { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.relay-card .relay-meta { font-family: var(--font-mono); font-size: 11px; color: var(--dim); margin-top: 7px; line-height: 1.8; }
.relay-card .relay-meta b { color: var(--muted); font-weight: 500; }
.relay-card.seized { opacity: 0.55; border-color: rgba(240,101,90,0.45); }
.relay-card.fresh { border-color: rgba(110,214,201,0.5); }
.seize-btn {
  margin-top: 10px; width: 100%;
  background: rgba(240,101,90,0.09); color: var(--danger);
  border: 1px solid rgba(240,101,90,0.3); border-radius: 9px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.06em; padding: 7px 0; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.seize-btn:hover:not([disabled]) { background: rgba(240,101,90,0.18); border-color: rgba(240,101,90,0.55); }
.seize-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.defender-log {
  background: var(--panel); border: 1px solid rgba(143,208,224,0.22);
  border-radius: var(--radius); overflow: hidden;
  position: sticky; top: 88px;
}
.defender-log .log-head {
  padding: 15px 20px; border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.defender-log .log-head h3 { margin: 0; font-size: 15px; color: var(--info); font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.04em; }
.defender-log .log-entries { padding: 14px 20px; max-height: 420px; overflow-y: auto; }
.defender-log .log-entry {
  font-size: 13.5px; color: var(--muted); line-height: 1.6;
  padding: 10px 0; border-bottom: 1px dashed var(--hairline);
  opacity: 0; transform: translateY(8px);
  animation: log-in .5s var(--ease-out-exp) forwards;
}
.defender-log .log-entry:last-child { border-bottom: none; }
@keyframes log-in { to { opacity: 1; transform: none; } }
.defender-log .log-entry .collect-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; color: var(--info);
  border: 1px solid rgba(143,208,224,0.3); border-radius: 4px;
  padding: 1px 7px; margin-top: 6px; margin-right: 5px;
}
.defender-log .log-empty { color: var(--dim); font-size: 13.5px; font-style: italic; }
.copy-btn {
  background: rgba(143,208,224,0.09); color: var(--info);
  border: 1px solid rgba(143,208,224,0.3); border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  padding: 5px 13px; cursor: pointer; transition: background .2s;
}
.copy-btn:hover { background: rgba(143,208,224,0.18); }

.scenario-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin: 26px 0 18px;
}
.scenario-state {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 20px;
}
.threshold-meter {
  display: inline-flex; gap: 5px; align-items: center;
}
.threshold-meter .pip {
  width: 26px; height: 8px; border-radius: 4px;
  background: rgba(110,214,201,0.16); border: 1px solid rgba(110,214,201,0.35);
  transition: background .3s, border-color .3s;
}
.threshold-meter .pip.lost { background: rgba(240,101,90,0.14); border-color: rgba(240,101,90,0.45); }

#reshare-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0 0; }
#reshare-row[hidden] { display: none; }

/* --- Code blocks (annotated protocol artifacts) --- */
.code-block {
  background: var(--void-soft);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  padding: 22px 26px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
.code-block .k { color: var(--azure); }
.code-block .s { color: var(--mint); }
.code-block .n { color: var(--champagne, var(--azure-bright)); }
.code-block .c { color: var(--dim); }

/* --- Pull quote --- */
.pull-quote {
  margin: 40px 0;
  padding: 34px 40px;
  background: rgba(65,255,255,0.045);
  border: 1px solid rgba(65,255,255,0.14);
  border-radius: var(--radius);
  max-width: 720px;
}
.pull-quote p {
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.5;
  letter-spacing: -0.008em;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 14px;
  text-wrap: pretty;
}
.pull-quote cite {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--azure);
}
.pull-quote cite a { color: var(--azure); }

/* --- Claims list --- */
.claims-list { counter-reset: claim; }
.claims-list li { margin-bottom: 0.85em; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 40px;
  padding: 56px 24px 40px;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between;
}
.footer-brand { max-width: 340px; }
.footer-logo { height: 40px; width: auto; display: block; margin-bottom: 14px; }
.footer-brand p { color: var(--dim); font-size: 13.5px; margin: 14px 0 0; }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--dim); margin: 0 0 14px; font-weight: 500;
}
.footer-col a { display: block; color: var(--muted); text-decoration: none; font-size: 15px; padding: 4px 0; }
.footer-col a:hover { color: var(--mint); }
.footer-legal {
  max-width: var(--max); margin: 36px auto 0;
  padding-top: 22px; border-top: 1px solid var(--hairline);
  color: var(--dim); font-size: 12.5px; line-height: 1.7;
}

/* --- Page hero (interior pages) --- */
.page-hero {
  max-width: var(--max); margin: 0 auto;
  padding: 88px 24px 20px;
}
.page-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  letter-spacing: -0.026em; font-weight: 900;
  line-height: 1.06; margin: 0 0 20px; max-width: 20ch; text-wrap: balance;
}
.page-hero .lede { color: var(--read); font-size: clamp(1.02rem, 1.5vw, 1.2rem); max-width: 60ch; margin: 0; }

/* --- Utility --- */
.mono-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--dim); }
.stat-row { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 44px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .stat-value { font-size: 1.7rem; font-weight: 900; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .stat-key { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--dim); text-transform: uppercase; }
.hr-fade { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--hairline-strong), transparent); margin: 0; }

@media (max-width: 720px) {
  .honesty-ribbon { justify-content: flex-start; text-align: left; padding-right: 88px; }
  .section { padding: 60px 0; }
  .hero { padding: 64px 20px 0; min-height: 0; }
  .hero-main { margin: 0; grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { max-width: 380px; }
  .hero-proof { gap: 18px 26px; }
  .hero-proof .hero-scroll { display: none; }
  .page-hero { padding: 60px 20px 12px; }
  .console-frame iframe { height: 560px; }
}
