/* ═══════════════════════════════════════════════════════════════════════
   Aegis design system

   One idea carries the whole interface: PRIVATE things are amber and
   lock-marked, PUBLIC things are blue and globe-marked. That pairing is used
   with no exceptions, so a user learns it once and can then read any screen
   at a glance. It is the visual form of Midnight's dual-ledger model.

   Writing follows the same rule of economy: short bullets with a bold lead,
   never a paragraph where three lines will do.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #06080d;
  --bg-elev: #0b0f16;
  --surface: rgba(18, 24, 34, 0.62);
  --surface-solid: #111722;
  --surface-2: #182130;
  --text: #edf2f8;
  --muted: #93a1b4;
  --faint: #5d6a7d;
  --line: rgba(255, 255, 255, 0.07);
  --line-bright: rgba(255, 255, 255, 0.13);

  --private: #f5b83d;
  --private-soft: rgba(245, 184, 61, 0.07);
  --private-line: rgba(245, 184, 61, 0.28);

  --public: #5aa8ff;
  --public-soft: rgba(90, 168, 255, 0.07);
  --public-line: rgba(90, 168, 255, 0.28);

  --ok: #3ddc97;
  --bad: #ff7a7a;

  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1160px;

  --font-body: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', ui-sans-serif, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

code, .mono { font-family: var(--font-mono); }
code { font-size: 0.92em; }

a { color: inherit; }

::selection { background: rgba(90, 168, 255, 0.35); }

/* ── ambient background ───────────────────────────────────── */
.aurora {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.aurora::before, .aurora::after {
  content: ''; position: absolute; width: 58vw; height: 58vw;
  border-radius: 50%; filter: blur(130px); opacity: 0.14;
}
.aurora::before {
  background: var(--public); top: -24vw; right: -16vw;
  animation: drift 26s var(--ease) infinite alternate;
}
.aurora::after {
  background: var(--private); bottom: -28vw; left: -18vw;
  animation: drift 32s var(--ease) infinite alternate-reverse;
}
@keyframes drift {
  to { transform: translate3d(6vw, 4vw, 0) scale(1.15); }
}
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
}

/* ── shell ────────────────────────────────────────────────── */
.shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
main { flex: 1; padding: 36px 0 40px; }

/* ── header ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  padding: 14px 16px 0;
  transition: padding 0.3s var(--ease);
}
.nav-bar {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  height: 62px; padding: 0 10px 0 18px;
  border: 1px solid var(--line); border-radius: 18px;
  background: rgba(10, 14, 21, 0.55);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: height 0.3s var(--ease), background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.nav.scrolled { padding-top: 8px; }
.nav.scrolled .nav-bar {
  height: 56px;
  background: rgba(8, 11, 17, 0.82);
  border-color: var(--line-bright);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand svg { filter: drop-shadow(0 0 10px rgba(90, 168, 255, 0.25)); }
.brand-word {
  font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 2px; margin-left: 12px; }
.nav-links a {
  position: relative; padding: 7px 13px; border-radius: 10px; text-decoration: none;
  color: var(--muted); font-size: 14px; font-weight: 500; transition: color 0.18s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-label { position: relative; z-index: 1; }
.nav-active {
  position: absolute; inset: 0; border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--line-bright);
}
.nav-status { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-cta { margin-left: 4px; }
.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-bright); border-radius: 12px;
  background: rgba(255, 255, 255, 0.03); cursor: pointer;
}

/* ── chips ────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12.5px; border: 1px solid var(--line-bright); color: var(--muted);
  background: rgba(255, 255, 255, 0.02); white-space: nowrap; text-decoration: none;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.live { background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6); animation: pulse 2.2s infinite; }
.dot.warn { background: var(--private); }
.dot.bad { background: var(--bad); }
.dot.sim { background: var(--public); }
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}
.chip.ok { color: var(--ok); border-color: rgba(61, 220, 151, 0.35); }
.chip.bad { color: var(--bad); border-color: rgba(255, 122, 122, 0.35); }
button.chip { font: inherit; font-size: 12.5px; cursor: pointer; }

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--text);
  border: 1px solid var(--line-bright);
  background: linear-gradient(90deg, rgba(245, 184, 61, 0.1), rgba(90, 168, 255, 0.1));
}
.pill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--private), var(--public));
  box-shadow: 0 0 12px rgba(90, 168, 255, 0.7);
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow { 50% { box-shadow: 0 0 4px rgba(245, 184, 61, 0.6); } }

/* ── typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.028em; line-height: 1.12; margin: 0; }
h3 { letter-spacing: -0.018em; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.16em; font-size: 11.5px;
  font-weight: 600; color: var(--public); margin-bottom: 14px;
}
.lede, .sub { color: var(--muted); font-size: 17px; max-width: 60ch; margin: 0; }
.gradient-text {
  background: linear-gradient(100deg, var(--private) 0%, #ffd98a 30%, #9cc9ff 62%, var(--public) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 8s ease-in-out infinite alternate;
}
@keyframes sheen { to { background-position: 100% 0; } }

.section { margin-top: 110px; }
.section-head { margin-bottom: 34px; }
.section-head h2 { font-size: clamp(28px, 3.8vw, 42px); }
.section-head .sub { margin-top: 12px; }
.section-head.center { text-align: center; }
.section-head.center .sub { margin-left: auto; margin-right: auto; }

/* ── page hero (inner pages) ──────────────────────────────── */
.page-hero { padding: 34px 0 10px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 56px); margin-top: 20px; }
.page-hero .sub { margin-top: 16px; font-size: 18px; }
.page-hero .points { margin-top: 22px; }

/* ── landing hero ─────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
  padding-top: 38px; padding-bottom: 20px;
}
.hero h1 { font-size: clamp(40px, 5.2vw, 66px); margin: 22px 0 0; line-height: 1.02; }
.hero-sub { color: var(--muted); font-size: 19px; margin: 22px 0 20px; max-width: 46ch; }
.hero .points { margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ── hero illustration ────────────────────────────────────── */
.proof-visual {
  position: relative; padding: 18px; border-radius: var(--radius-lg);
  border: 1px solid var(--line-bright);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(245, 184, 61, 0.09), transparent 55%),
    radial-gradient(120% 80% at 100% 100%, rgba(90, 168, 255, 0.11), transparent 55%),
    rgba(12, 16, 24, 0.75);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  perspective: 1000px;
}
.pv-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 4px 14px; font-size: 12.5px; color: var(--muted);
}
.pv-example {
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-bright); font-size: 11.5px;
}
.pv-zone { padding: 14px 16px; border-radius: 14px; border: 1px solid; }
.pv-zone.private { border-color: var(--private-line); background: var(--private-soft); }
.pv-zone.public { border-color: var(--public-line); background: var(--public-soft); }
.pv-label {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.pv-zone.private .pv-label { color: var(--private); }
.pv-zone.public .pv-label { color: var(--public); }
.pv-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 7px 0; font-size: 13.5px; color: var(--muted);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.pv-row:last-child { border-bottom: 0; }
.pv-row code { font-size: 12.5px; }
.pv-zone.private code { color: var(--private); }
.pv-zone.public code { color: var(--public); }
.pv-secret { animation: conceal 5.2s var(--ease) infinite; }
@keyframes conceal {
  0%, 40% { filter: blur(0); opacity: 1; }
  52%, 86% { filter: blur(5px); opacity: 0.5; }
  100% { filter: blur(0); opacity: 1; }
}
.pv-true {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  color: var(--ok) !important; background: rgba(61, 220, 151, 0.13);
  animation: pop 5.2s var(--ease) infinite;
}
@keyframes pop {
  0%, 55% { transform: scale(1); box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
  64% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(61, 220, 151, 0.18); }
  76%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}
.pv-bridge { display: flex; flex-direction: column; align-items: center; padding: 2px 0; }
.pv-beam {
  position: relative; width: 2px; height: 26px; overflow: hidden;
  background: linear-gradient(var(--private-line), var(--public-line));
}
.pv-particle {
  position: absolute; left: -2px; top: -8px; width: 6px; height: 8px; border-radius: 4px;
  background: var(--private); box-shadow: 0 0 10px var(--private);
  animation: travel 2.6s linear infinite;
}
.pv-particle.public { background: var(--public); box-shadow: 0 0 10px var(--public); }
@keyframes travel { to { transform: translateY(40px); } }
.pv-node {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  box-shadow: 0 0 28px rgba(90, 168, 255, 0.18);
}
.pv-node::after {
  content: ''; position: absolute; inset: 1.5px; z-index: -1;
  border-radius: inherit; background: var(--surface-solid);
}
.pv-node svg { color: var(--public); }
/* A conic sweep spinning behind the chip; the ::after covers all but a
   1.5px rim, so what shows is a light travelling around the border. */
.pv-ring {
  position: absolute; left: 50%; top: 50%; z-index: -2;
  width: 260px; height: 260px;
  background: conic-gradient(from 0deg, var(--private), transparent 25%, var(--public) 50%, transparent 75%, var(--private));
  animation: orbit 3.5s linear infinite;
}
@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── proof strip ──────────────────────────────────────────── */
.proof-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 64px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); backdrop-filter: blur(10px); overflow: hidden;
}
.proof-stat { padding: 24px 22px; border-left: 1px solid var(--line); }
.proof-stat:first-child { border-left: 0; }
.proof-stat .v {
  display: block; font-family: var(--font-display); font-size: 40px; font-weight: 700;
  line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.proof-stat.private .v { color: var(--private); }
.proof-stat.public .v { color: var(--public); }
.proof-stat .k { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

/* ── buttons ──────────────────────────────────────────────── */
button, .btn {
  font: inherit; cursor: pointer; border-radius: 12px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.25s, opacity 0.2s;
}
button:active, .btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #7bbaff, var(--public)); color: #03101f; border: 0;
  padding: 12px 22px; font-weight: 600;
  box-shadow: 0 8px 26px rgba(90, 168, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(90, 168, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.03); color: var(--text);
  border: 1px solid var(--line-bright); padding: 11px 20px; font-weight: 500;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.2); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 14px; }
.btn.selected { border-color: var(--public); color: var(--text); background: var(--public-soft); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ── glass cards ──────────────────────────────────────────── */
.glass {
  position: relative; height: 100%;
  padding: 26px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--surface);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
  overflow: hidden;
}
.glass::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}
.glass.private::before { background: linear-gradient(90deg, transparent, var(--private), transparent); }
.glass.public::before { background: linear-gradient(90deg, transparent, var(--public), transparent); }
.glass.private { border-color: var(--private-line); background: linear-gradient(180deg, var(--private-soft), var(--surface) 70%); }
.glass.public { border-color: var(--public-line); background: linear-gradient(180deg, var(--public-soft), var(--surface) 70%); }
.glass:hover { transform: translateY(-3px); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35); }
.glass h3 { font-size: 21px; margin: 16px 0 14px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; backdrop-filter: blur(12px);
}
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.panel { border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); background: var(--surface); }
.panel.private { border-color: var(--private-line); background: var(--private-soft); }
.panel.public { border-color: var(--public-line); background: var(--public-soft); }
.panel h3 { margin: 14px 0 12px; font-size: 20px; }
.panel p { color: var(--muted); margin: 0 0 4px; font-size: 15px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.tag.private { color: var(--private); background: rgba(245, 184, 61, 0.12); }
.tag.public { color: var(--public); background: rgba(90, 168, 255, 0.12); }
.tag.bad { color: var(--bad); background: rgba(255, 122, 122, 0.12); }
.tag.neutral { color: var(--muted); background: rgba(255, 255, 255, 0.06); }

.icon-badge {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none;
  border: 1px solid var(--line-bright); background: rgba(255, 255, 255, 0.04); color: var(--text);
}
.icon-badge.private { color: var(--private); border-color: var(--private-line); background: rgba(245, 184, 61, 0.08); box-shadow: 0 0 24px rgba(245, 184, 61, 0.12); }
.icon-badge.public { color: var(--public); border-color: var(--public-line); background: rgba(90, 168, 255, 0.08); box-shadow: 0 0 24px rgba(90, 168, 255, 0.12); }
.icon-badge.neutral { color: var(--muted); }

.card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 20px;
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text);
}
.card-link svg { transition: transform 0.2s var(--ease); }
.card-link:hover svg { transform: translateX(4px); }

/* ── animated bullets ─────────────────────────────────────── */
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.points.compact { gap: 9px; }
.points li { display: flex; align-items: flex-start; gap: 12px; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.points.compact li { font-size: 14.5px; gap: 10px; }
.points strong { color: var(--text); font-weight: 600; }
.point-mark {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 0;
  border-radius: 7px; border: 1px solid var(--line-bright); background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.points.compact .point-mark { width: 19px; height: 19px; border-radius: 6px; margin-top: 1px; }
.point-dot { width: 6px; height: 6px; border-radius: 2px; transform: rotate(45deg); background: currentColor; box-shadow: 0 0 8px currentColor; }
.points.private .point-mark { color: var(--private); border-color: var(--private-line); background: rgba(245, 184, 61, 0.08); }
.points.public .point-mark { color: var(--public); border-color: var(--public-line); background: rgba(90, 168, 255, 0.08); }
.points.ok .point-mark { color: var(--ok); border-color: rgba(61, 220, 151, 0.3); background: rgba(61, 220, 151, 0.08); }
.points.bad .point-mark { color: var(--bad); border-color: rgba(255, 122, 122, 0.3); background: rgba(255, 122, 122, 0.08); }

/* ── landing sections ─────────────────────────────────────── */
.compare h3 { font-size: 24px; }
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; position: relative; }
.flow-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flow-n { font-size: 13px; color: var(--faint); letter-spacing: 0.12em; }
.role .flow-top { justify-content: flex-start; }

.ledger-split { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 0; }
.gate { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 14px; }
.gate-line { flex: 1; width: 1px; background: linear-gradient(var(--private-line), var(--public-line)); min-height: 30px; }
.gate-chip {
  padding: 8px 12px; border-radius: 10px; font-size: 12.5px; color: var(--text);
  border: 1px solid var(--line-bright); background: var(--surface-solid);
  box-shadow: 0 0 30px rgba(90, 168, 255, 0.15);
}

.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color 0.25s, transform 0.3s var(--ease);
}
.stack-item:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.stack-item strong { display: block; font-size: 15px; }
.stack-item span { color: var(--muted); font-size: 13.5px; }

/* ── faq cards ────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
.faq-card { padding: 0; height: auto; }
.faq-card:hover { transform: none; }
.faq-q {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 20px 22px; border: 0; background: transparent; color: var(--text);
  text-align: left; font-size: 16.5px; font-weight: 600; font-family: var(--font-display);
  letter-spacing: -0.01em; border-radius: 0; justify-content: flex-start;
}
.faq-n { font-size: 12px; color: var(--faint); font-weight: 400; }
.faq-text { flex: 1; }
.faq-toggle {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px;
  border: 1px solid var(--line-bright); color: var(--muted);
}
.faq-card.open .faq-toggle { color: var(--text); border-color: rgba(255, 255, 255, 0.24); }
.faq-a { overflow: hidden; }
.faq-a-inner { padding: 0 22px 22px 22px; }

/* ── notices ──────────────────────────────────────────────── */
.notice {
  display: grid; gap: 12px; padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid; margin-bottom: 26px; font-size: 14.5px;
}
.notice > strong { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.notice.private { border-color: var(--private-line); background: var(--private-soft); }
.notice.private > strong { color: var(--private); }
.notice.public { border-color: var(--public-line); background: var(--public-soft); }
.notice.public > strong { color: var(--public); }
.notice.bad { border-color: rgba(255, 122, 122, 0.3); background: rgba(255, 122, 122, 0.06); }
.notice.bad > strong { color: var(--bad); }

.banner {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 18px; border-radius: 12px; margin-bottom: 26px;
  border: 1px solid var(--private-line); background: var(--private-soft);
  font-size: 14.5px; color: var(--muted);
}
.banner strong { color: var(--private); }

/* ── stat tiles ───────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat .v { font-family: var(--font-display); font-size: 34px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat.public .v { color: var(--public); }
.stat.private .v { color: var(--private); }

/* ── steps / progress ─────────────────────────────────────── */
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; flex-wrap: wrap; }
.steps li {
  display: flex; align-items: center; gap: 9px; padding: 8px 15px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--faint);
  font-size: 14px; transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.steps li.current { color: var(--text); border-color: var(--line-bright); background: rgba(255, 255, 255, 0.05); }
.steps li.done { color: var(--muted); border-color: var(--line-bright); }
.steps .num {
  width: 21px; height: 21px; border-radius: 50%; background: var(--surface-2);
  display: grid; place-items: center; font-size: 12px; flex: none;
}
.steps li.current .num { background: var(--public); color: #03101f; font-weight: 700; }
.steps li.done .num { background: var(--ok); color: #04241a; font-weight: 700; }

/* ── forms ────────────────────────────────────────────────── */
label { display: block; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 11px; color: var(--text); }
select, input[type="number"], input[type="text"] {
  display: block; width: 100%; margin-top: 7px; padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3); color: var(--text); font-family: inherit;
  border: 1px solid var(--line-bright); border-radius: 12px; font-size: 15px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
select:focus, input:focus { outline: none; border-color: var(--public); box-shadow: 0 0 0 3px rgba(90, 168, 255, 0.15); }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--private); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.hash {
  display: block; padding: 12px; border-radius: 10px; margin: 8px 0;
  background: rgba(0, 0, 0, 0.3); border: 1px dashed var(--line-bright);
  font-family: var(--font-mono); font-size: 12.5px;
  word-break: break-all; color: var(--muted);
}
.hash.private { color: var(--private); border-color: var(--private-line); }
.hash.public { color: var(--public); border-color: var(--public-line); }
.field-label { font-size: 13px; color: var(--muted); }

/* ── trial cards ──────────────────────────────────────────── */
.trial {
  text-align: left; width: 100%; background: var(--surface);
  border: 1px solid var(--line); padding: 20px; color: var(--text);
  border-radius: var(--radius); display: block;
}
.trial:hover { border-color: var(--line-bright); }
.trial.selected { border-color: var(--public); box-shadow: 0 0 0 1px var(--public) inset, 0 0 30px rgba(90, 168, 255, 0.12); }
.trial strong { display: block; font-size: 17px; font-family: var(--font-display); letter-spacing: -0.01em; }
.trial .sponsor { display: block; color: var(--faint); font-size: 13px; margin: 2px 0 12px; }
.trial p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.criteria { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.criteria > div {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.2);
}
.criteria dt { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.criteria dd { margin: 2px 0 0; font-size: 14px; }

.trial-card h3 { font-size: 22px; margin: 16px 0 2px; }
.trial-card .sponsor { color: var(--faint); font-size: 13.5px; }
.trial-card .points { margin: 16px 0 18px; }

/* ── proving ──────────────────────────────────────────────── */
.proving { padding: 44px 34px; text-align: center; }
.proving strong { display: block; margin: 18px 0 5px; font-size: 18px; font-family: var(--font-display); }
.proving span { color: var(--muted); font-size: 14.5px; }
.spinner {
  width: 38px; height: 38px; margin: 0 auto; border-radius: 50%;
  border: 3px solid var(--line-bright); border-top-color: var(--public); border-right-color: var(--private);
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-sm { width: 17px; height: 17px; border-width: 2px; margin: 0; }

/* ── result split ─────────────────────────────────────────── */
.verdict { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.verdict h2 { font-size: clamp(30px, 4.4vw, 44px); }
.verdict .badge { padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.verdict .badge.ok { background: rgba(61, 220, 151, 0.14); color: var(--ok); }
.verdict .badge.bad { background: rgba(255, 122, 122, 0.14); color: var(--bad); }

.facts { list-style: none; padding: 0; margin: 16px 0 0; }
.facts li {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}
.facts li:last-child { border-bottom: 0; }
.facts li span { color: var(--muted); font-size: 14px; }
.facts li code { text-align: right; font-size: 13px; }
.glass.private .facts code, .panel.private .facts code { color: var(--private); }
.glass.public .facts code, .panel.public .facts code { color: var(--public); }
.facts.empty li { justify-content: center; color: var(--faint); font-style: italic; }

.note { color: var(--faint); font-size: 13px; margin: 16px 0 0; line-height: 1.55; }

/* ── ledger feed ──────────────────────────────────────────── */
.feed { list-style: none; padding: 0; margin: 0; }
.feed li {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 9px;
  background: var(--surface); font-size: 14px;
}
.feed code { color: var(--public); font-size: 12.5px; word-break: break-all; }
.feed .ok { color: var(--ok); font-weight: 600; white-space: nowrap; }
.feed .activity-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.feed .activity-body strong { font-size: 14.5px; font-weight: 600; }
.feed .activity-body .mono { font-size: 12.5px; color: var(--faint); }

.empty-state {
  display: grid; place-items: center; gap: 10px; padding: 34px 20px; text-align: center;
  border: 1px dashed var(--line-bright); border-radius: var(--radius); color: var(--faint); font-size: 14.5px;
}
.empty-state svg { color: var(--muted); }

/* ── activity feed ────────────────────────────────────────────
   A row that arrived while you were watching gets a brief highlight;
   rows that were already on chain when the page opened do not, so the
   distinction between history and live is never ambiguous.
   ─────────────────────────────────────────────────────────── */
.activity { list-style: none; padding: 0; margin: 0; }
.activity li {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 9px;
  background: var(--surface); overflow: hidden;
}
.activity .activity-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.activity .activity-body strong { font-size: 14.5px; font-weight: 600; }
.activity .activity-body .mono {
  font-size: 12.5px; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.activity time {
  margin-left: auto; font-size: 12px; color: var(--faint);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.activity li.history { opacity: 0.72; }
.activity li.fresh { border-color: var(--line-bright); animation: arrive 2.4s var(--ease); }
@keyframes arrive {
  0% { box-shadow: 0 0 0 1px var(--public) inset, 0 0 24px rgba(90, 168, 255, 0.25); }
  100% { box-shadow: 0 0 0 1px transparent inset, 0 0 0 rgba(90, 168, 255, 0); }
}

/* ── code & commands ──────────────────────────────────────── */
.cmd {
  margin: 16px 0 0; padding: 13px 15px; border-radius: 12px; overflow-x: auto;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: var(--text);
}
.code-block {
  margin: 0; padding: 18px 20px; border-radius: var(--radius); overflow-x: auto;
  background: rgba(0, 0, 0, 0.38); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.75; color: var(--text);
}
.code-block .c { color: var(--faint); }
.code-block .bad { color: var(--bad); }
.code-block .ok { color: var(--ok); }

/* ── wallet ───────────────────────────────────────────────── */
.wallet-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 232px; padding: 7px;
  border: 1px solid var(--line-bright); border-radius: 14px;
  background: var(--bg-elev); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.wallet-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text); font: inherit;
  font-size: 14px; text-align: left; cursor: pointer; justify-content: flex-start;
}
.wallet-menu button:hover { background: rgba(255, 255, 255, 0.05); }
.wallet-menu button .mono { margin-left: auto; font-size: 11.5px; color: var(--faint); }
.wallet-menu img { border-radius: 5px; }
.wallet-menu .note { padding: 0 11px 6px; color: var(--bad); }

.submit-box {
  margin-top: 16px; padding: 15px;
  border: 1px solid var(--public-line); border-radius: 12px;
  background: rgba(90, 168, 255, 0.06);
}
.submit-box .mono { font-size: 12px; color: var(--public); word-break: break-all; }

/* ── how it works diagram ─────────────────────────────────── */
.diagram { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; }
.diagram .glass { padding: 22px; }
.diagram-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; }
.diagram-circuit {
  display: grid; justify-items: center; gap: 6px; padding: 16px 18px; border-radius: 16px; text-align: center;
  border: 1px solid var(--line-bright); background: var(--surface-solid); font-size: 12.5px;
  box-shadow: 0 0 40px rgba(90, 168, 255, 0.12);
}
.diagram-circuit svg { color: var(--public); }
.diagram-arrow { color: var(--faint); }

.timeline { display: grid; gap: 14px; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 1px;
  background: linear-gradient(var(--private-line), var(--private-line) 75%, var(--public-line));
}
.timeline-item { display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; }
.timeline-item .icon-badge { position: relative; z-index: 1; background: var(--bg-elev); }
.timeline-item .glass { padding: 20px 22px; }
.timeline-item h3 { margin: 0 0 12px; font-size: 18px; }

.steps-list { display: grid; gap: 14px; }
.step-card { display: grid; grid-template-columns: 44px 1fr; gap: 18px; }
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  font-family: var(--font-display); font-weight: 700; color: var(--public);
  border: 1px solid var(--public-line); background: rgba(90, 168, 255, 0.08);
}
.step-card h3 { margin: 0 0 10px; font-size: 18px; }
.step-card .cmd { margin: 0 0 12px; }

/* ── footer ───────────────────────────────────────────────── */
.footer { position: relative; margin-top: 110px; overflow: hidden; }
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--private-line), var(--public-line), transparent);
}
.footer-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin: 56px 0 64px; padding: 36px 38px; border-radius: 28px;
  border: 1px solid var(--line-bright);
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(245, 184, 61, 0.16), transparent 60%),
    radial-gradient(80% 140% at 100% 100%, rgba(90, 168, 255, 0.2), transparent 60%),
    var(--surface-solid);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.footer-cta h2 { font-size: clamp(26px, 3.4vw, 36px); }
.footer-cta p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; padding-bottom: 44px; }
.footer-brand p { color: var(--muted); font-size: 14.5px; margin: 14px 0 16px; max-width: 30ch; }
.footer-col h4 {
  font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a {
  display: inline-flex; align-items: center; gap: 5px; color: var(--muted);
  text-decoration: none; font-size: 14.5px; transition: color 0.18s;
}
.footer-col a:hover { color: var(--text); }
.footer-col .ext { transform: rotate(-45deg); opacity: 0.6; }
.footer-base {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 22px 0 34px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px;
}
.footer-watermark {
  position: absolute; left: 50%; bottom: -0.3em; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(120px, 22vw, 300px);
  letter-spacing: -0.04em; line-height: 1; white-space: nowrap; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  z-index: -1;
}

/* ── responsive navigation ────────────────────────────────── */
.burger, .burger::before, .burger::after {
  display: block; width: 17px; height: 1.5px; border-radius: 2px;
  background: var(--text); transition: transform 0.24s var(--ease), opacity 0.16s;
}
.burger { position: relative; }
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { transform: translateY(-5.5px); }
.burger::after { transform: translateY(5.5px); }
.burger.open { background: transparent; }
.burger.open::before { transform: rotate(45deg); }
.burger.open::after { transform: rotate(-45deg); }

.drawer-scrim {
  position: fixed; inset: 0; z-index: -1;
  background: rgba(3, 5, 9, 0.7); backdrop-filter: blur(4px);
}
.drawer {
  position: absolute; top: calc(100% + 8px); left: 16px; right: 16px;
  display: flex; flex-direction: column; gap: 2px; padding: 12px;
  max-height: calc(100vh - 100px); overflow-y: auto;
  border: 1px solid var(--line-bright); border-radius: 18px;
  background: rgba(11, 15, 22, 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.drawer a:not(.btn) {
  display: block; padding: 13px 14px; border-radius: 11px; text-decoration: none;
  color: var(--muted); font-size: 15.5px; font-weight: 500;
}
.drawer a:not(.btn):hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.drawer a.active:not(.btn) { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.drawer-cta { margin-top: 8px; }
.drawer-status {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line);
}

@media (max-width: 1120px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-status { display: none; }
}

/* ── responsive layout ────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .proof-visual { max-width: 520px; }
  .grid.cols-2, .grid.cols-3, .flow, .stack-grid, .faq-grid { grid-template-columns: 1fr; }
  .ledger-split, .diagram { grid-template-columns: 1fr; }
  .gate, .diagram-mid { flex-direction: row; padding: 14px 0; }
  .gate-line { height: 1px; width: auto; min-height: 0; min-width: 30px; }
  .diagram-arrow { transform: rotate(90deg); }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-stat:nth-child(3) { border-left: 0; }
  .proof-stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .nav { padding: 10px 10px 0; }
  .section { margin-top: 76px; }
  .glass { padding: 22px; }
  .panel, .card { padding: 18px; }
  .hero { padding-top: 20px; }
  .hero-sub { font-size: 17px; }
  .proof-stat { padding: 18px 16px; }
  .proof-stat .v { font-size: 32px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 26px; }
  .steps { gap: 6px; }
  .steps li { font-size: 13px; padding: 7px 11px; }
  .form-grid { grid-template-columns: 1fr; }
  /* Hashes are the widest thing on any screen; let them wrap rather than
     pushing the whole page sideways. */
  .hash { font-size: 11px; word-break: break-all; }
  .feed li, .activity li { flex-wrap: wrap; gap: 9px; padding: 12px 13px; }
  .activity time { display: none; }
  .feed code { font-size: 11.5px; }
  .verdict { flex-wrap: wrap; gap: 10px; }
  .footer-cta { padding: 28px 24px; margin: 40px 0 48px; }
  .footer-grid { gap: 28px; }
  .timeline::before { left: 19px; }
  .timeline-item, .step-card { grid-template-columns: 40px 1fr; gap: 14px; }
  .step-num { width: 40px; height: 40px; }
  .faq-q { padding: 18px; font-size: 15.5px; }
  .faq-a-inner { padding: 0 18px 18px; }
}

@media (max-width: 420px) {
  .btn-lg { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
}

/* Nothing should ever push the page sideways. */
html, body { max-width: 100%; overflow-x: hidden; }
pre, code { overflow-wrap: anywhere; }

/* ── eligibility checker ──────────────────────────────────── */
.prove-panel, .glass.proving { height: auto; }
.prove-panel:hover, .glass.proving:hover, .glass:has(form, select):hover { transform: none; box-shadow: none; }
.prove-panel h3 { margin: 16px 0 12px; }
.footer.no-cta .footer-grid { padding-top: 56px; }
