/* ═══════════════════════════════════════════════════════════
   RelayLum — AI Context Relay Platform
   The Luminous Relay · deep-signal blue + photon gold
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #06172A;
  --bg-2: #0B243D;
  --card: #0E2B47;
  --line: #234A67;
  --line-soft: rgba(35, 74, 103, 0.65);

  --gold: #FFD66B;
  --cyan: #5CDEFF;
  --violet: #A889FF;
  --warn: #FF8A63;
  --ok: #63E6B1;

  --fg: #D9EAF1;
  --muted: #8AA4B5;
  --faint: #5C7A8C;

  --light-bg: #F1F7FA;
  --light-card: #FFFFFF;
  --light-line: #C8DAE4;
  --light-fg: #142433;
  --light-muted: #4C6270;

  --display: "Sora", system-ui, sans-serif;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --r: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
[data-site-header], [data-site-footer] { display: contents; }

.site-shell { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.container--narrow { width: min(100% - 40px, 720px); margin-inline: auto; }

/* ── typography ── */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold);
}
.kicker::before { content: ""; width: 18px; height: 1px; background: var(--gold); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; color: #F4FBFF; }
h1 { font-size: clamp(2rem, 4.2vw, 3.15rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; }
.lead { font-size: 1.02rem; color: var(--muted); max-width: 54ch; }
.mono-label { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #06172A; box-shadow: 0 0 24px rgba(255,214,107,0.28); }
.btn-gold:hover { background: #ffe08a; }
.btn-line { background: transparent; border-color: var(--line); color: var(--fg); }
.btn-line:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--fg); }
.btn-cyan { background: rgba(92,222,255,0.12); border-color: rgba(92,222,255,0.35); color: var(--cyan); }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn-lg { padding: 13px 22px; font-size: 0.95rem; }
.btn-full { width: 100%; }

/* ── tags ── */
.tag {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.04em;
}
.tag--gold { background: rgba(255,214,107,0.14); color: var(--gold); }
.tag--cyan { background: rgba(92,222,255,0.12); color: var(--cyan); }
.tag--violet { background: rgba(168,137,255,0.14); color: var(--violet); }
.tag--ok { background: rgba(99,230,177,0.12); color: var(--ok); }
.tag--warn { background: rgba(255,138,99,0.14); color: var(--warn); }
.tag--muted { background: rgba(138,164,181,0.12); color: var(--muted); }

/* ── header — slim floating bar + always-visible actions ── */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(6, 23, 42, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(35, 74, 103, 0.55);
}
.header-lightline {
  height: 2px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--gold), var(--violet), transparent);
  background-size: 200% 100%;
  animation: lightSweep 4.5s linear infinite;
}
@keyframes lightSweep {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
body.is-relay-running .header-lightline {
  animation-duration: 1.2s;
  background: linear-gradient(90deg, transparent, var(--gold), var(--cyan), var(--gold), transparent);
  background-size: 200% 100%;
}
body.is-relay-running .nav-link.is-active::after {
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}
.header-inner {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 0;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--display); font-size: 1.05rem; font-weight: 700; color: #F4FBFF; }
.brand-text span { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.nav-main { display: none; flex: 1; justify-content: center; gap: 2px; flex-wrap: wrap; }
@media (min-width: 960px) { .nav-main { display: flex; } }
.nav-link {
  padding: 8px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; color: var(--muted);
  position: relative; white-space: nowrap;
}
.nav-link:hover, .nav-link.is-active { color: var(--fg); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--gold); border-radius: 2px; box-shadow: 0 0 10px var(--gold);
}
.header-actions {
  display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0;
}
.header-actions .btn { white-space: nowrap; }
.header-actions .btn-ghost { color: var(--fg); }
.header-actions .btn-ghost:hover { color: var(--gold); }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; color: var(--fg); font-size: 1.15rem;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
}
@media (min-width: 960px) { .nav-toggle { display: none; } }
.mobile-nav {
  display: none; flex-direction: column; gap: 4px; padding: 10px 0 16px;
  border-top: 1px solid var(--line);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a, .mobile-nav .btn {
  padding: 10px 12px; border-radius: var(--r); color: var(--muted); font-weight: 600;
  text-align: left; justify-content: flex-start;
}
.mobile-nav a:hover { background: var(--card); color: var(--fg); }
.mobile-nav .btn { width: 100%; margin-top: 4px; justify-content: center; }
.user-menu { position: relative; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #06172A; font-weight: 800; font-size: 0.72rem;
}
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 8px; box-shadow: 0 18px 40px rgba(0,0,0,0.35); z-index: 90;
}
.user-dropdown.is-open { display: block; }
.user-dropdown a, .user-dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--r);
  font-size: 0.86rem; color: var(--muted);
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg-2); color: var(--fg); }
.user-workspace-label {
  display: block; padding: 8px 12px 10px; font-family: var(--mono); font-size: 0.62rem;
  color: var(--faint); border-bottom: 1px solid var(--line); margin-bottom: 4px;
}

/* ── footer ── */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
  padding: 48px 0 36px;
}
@media (min-width: 800px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h4 {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: var(--muted); }
.footer-col a:hover { color: var(--cyan); }
.footer-bar { border-top: 1px solid var(--line); padding: 22px 0 28px; }
.footer-tag { font-size: 0.88rem; color: var(--muted); max-width: 62ch; margin-bottom: 14px; }
.footer-bar-inner { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--faint); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal a:hover { color: var(--gold); }

/* ── shared page chrome ── */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 3vw, 36px); }
.page-hero--center { text-align: center; }
.page-hero--center .lead { margin-inline: auto; }
.page-hero-inner .kicker { margin-bottom: 16px; }
.page-hero h1 { margin-bottom: 14px; }
.page-hero .lead { margin-bottom: 22px; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-hero--center .page-hero-actions { justify-content: center; }
.section { padding: clamp(36px, 5vw, 64px) 0; }
.section--tight { padding-top: 8px; }
.sec-head { margin-bottom: 22px; }
.sec-head .kicker { margin-bottom: 10px; }
.sec-head h2 { margin-bottom: 10px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
}
.split-2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .split-2 { grid-template-columns: 1.05fr 0.95fr; align-items: start; } }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 26px; } .mt-l { margin-top: 44px; }

.ledger { border-top: 1px solid var(--line); }
.ledger-row {
  display: grid; grid-template-columns: 46px minmax(140px, 200px) 1fr auto;
  gap: 18px; align-items: baseline; padding: 18px 4px; border-bottom: 1px solid var(--line);
}
.ledger-row .lr-no { font-family: var(--mono); font-size: 0.78rem; color: var(--gold); }
.ledger-row .lr-key { font-family: var(--display); font-weight: 700; color: #F4FBFF; }
.ledger-row .lr-desc { font-size: 0.9rem; color: var(--muted); }
@media (max-width: 760px) {
  .ledger-row { grid-template-columns: 40px 1fr; }
  .ledger-row .lr-desc, .ledger-row .lr-side { grid-column: 2; }
}

/* ═══════════ HOME — RELAY TUNNEL ═══════════ */
.tunnel-hero {
  position: relative;
  padding: clamp(28px, 4vw, 48px) 0 clamp(20px, 3vw, 32px);
  overflow: hidden;
}
.tunnel-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(92,222,255,0.12), transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(168,137,255,0.1), transparent 55%),
    radial-gradient(ellipse 40% 40% at 10% 70%, rgba(255,214,107,0.08), transparent 50%);
  pointer-events: none;
}
.tunnel-head {
  position: relative; z-index: 2;
  max-width: 720px; margin: 0 auto 32px;
  text-align: center;
}
.tunnel-head .kicker { justify-content: center; }
.tunnel-head h1 { margin: 14px auto; }
.tunnel-head .lead { margin: 0 auto 22px; max-width: 54ch; }
.tunnel-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
  justify-content: center;
}
.tunnel-links {
  display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.86rem;
  justify-content: center;
}
.tunnel-links a { color: var(--cyan); font-weight: 700; }
.tunnel-links a:hover { text-decoration: underline; }

.tunnel-stage {
  position: relative; z-index: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(11,36,61,0.9), rgba(6,23,42,0.95)),
    repeating-linear-gradient(90deg, transparent, transparent 48px, rgba(92,222,255,0.04) 48px, rgba(92,222,255,0.04) 49px);
  padding: 20px 16px 18px;
  min-height: 520px;
  perspective: 900px;
  overflow: hidden;
}
.tunnel-path {
  position: absolute; left: 8%; right: 8%; top: 18%; bottom: 28%;
  border: 1px solid rgba(92,222,255,0.18);
  border-radius: 40% / 20%;
  transform: rotateX(58deg) scaleY(1.15);
  box-shadow: inset 0 0 60px rgba(92,222,255,0.08), 0 0 40px rgba(255,214,107,0.06);
  pointer-events: none;
}
.tunnel-nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 8px 0 20px;
  z-index: 2;
}
@media (max-width: 800px) { .tunnel-nodes { grid-template-columns: repeat(2, 1fr); } }
.t-node {
  position: relative;
  padding: 14px 12px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, opacity 0.25s;
}
.t-node .tn-dot {
  width: 12px; height: 12px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--faint); box-shadow: 0 0 0 4px rgba(92,222,255,0.08);
}
.t-node h4 { font-size: 0.88rem; margin-bottom: 4px; }
.t-node p { font-size: 0.74rem; color: var(--muted); }
.t-node.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 28px rgba(255,214,107,0.18);
}
.t-node.is-active .tn-dot {
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold), 0 0 0 4px rgba(255,214,107,0.2);
}
.t-node.is-done { border-color: rgba(99,230,177,0.45); }
.t-node.is-done .tn-dot { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.t-node.is-dim { opacity: 0.4; }

.capsule {
  position: relative; z-index: 3;
  max-width: 420px; margin: 0 auto 18px;
  padding: 18px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,214,107,0.16), rgba(92,222,255,0.1));
  border: 1.5px solid rgba(255,214,107,0.55);
  box-shadow: 0 0 40px rgba(255,214,107,0.2), inset 0 0 30px rgba(92,222,255,0.08);
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s;
}
.capsule:hover { transform: scale(1.02); }
.capsule.is-open { border-radius: var(--r-lg); max-width: 560px; }
.capsule-top {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px;
}
.capsule-title { font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--gold); }
.capsule-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.capsule-facts span {
  padding: 8px 10px; border-radius: var(--r); background: rgba(6,23,42,0.55);
  border: 1px solid rgba(255,214,107,0.2); font-size: 0.78rem; color: var(--fg);
}
.capsule-facts b { display: block; font-family: var(--mono); font-size: 0.6rem; color: var(--faint); margin-bottom: 2px; font-weight: 500; }
.capsule-detail { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255,214,107,0.3); }
.capsule.is-open .capsule-detail { display: block; }
.capsule-detail p { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }

.tunnel-panel {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 860px) { .tunnel-panel { grid-template-columns: 1.2fr 0.8fr; } }
.node-readout {
  padding: 16px 18px; border-radius: var(--r-md);
  background: rgba(14,43,71,0.9); border: 1px solid var(--line); min-height: 140px;
}
.node-readout h3 { font-size: 1rem; margin: 8px 0 10px; }
.node-readout ul { display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; color: var(--muted); }
.node-readout li::before { content: "▸ "; color: var(--cyan); }
.compare-box {
  padding: 16px 18px; border-radius: var(--r-md);
  background: var(--bg); border: 1px solid var(--line);
}
.compare-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.compare-cols > div { padding: 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); font-size: 0.8rem; }
.compare-cols .bad { color: var(--warn); }
.compare-cols .good { color: var(--ok); }
.save-bar {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(99,230,177,0.12), rgba(92,222,255,0.1));
  border: 1px solid rgba(99,230,177,0.35);
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
}
.save-bar strong { font-family: var(--display); font-size: 1.35rem; color: var(--ok); }
.save-bar.is-idle { opacity: 0.45; }
.tunnel-stage.is-finished .tunnel-path {
  border-color: rgba(255,214,107,0.55);
  box-shadow: inset 0 0 80px rgba(255,214,107,0.15), 0 0 50px rgba(255,214,107,0.2);
}
.tunnel-stage.is-finished .t-node { opacity: 0.28; border-color: transparent; box-shadow: none; }
.tunnel-stage.is-finished .t-node .tn-dot { background: var(--faint); box-shadow: none; }
.tunnel-stage.is-finished .capsule {
  box-shadow: 0 0 50px rgba(255,214,107,0.35);
}

/* handoff fault rail — not a feature-card grid */
.fault-rail {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(180deg, rgba(11,36,61,0.9), var(--bg));
}
@media (min-width: 800px) { .fault-rail { grid-template-columns: 1fr 1fr; } }
.fault-item {
  display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
  position: relative;
}
.fault-item::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--warn), transparent);
  opacity: 0.7;
}
@media (min-width: 800px) {
  .fault-item:nth-child(odd) { border-right: 1px solid var(--line); }
  .fault-item:nth-last-child(-n+2) { border-bottom: none; }
}
.fault-no { font-family: var(--mono); font-size: 0.78rem; color: var(--warn); padding-top: 2px; }
.fault-item h4 { font-size: 0.95rem; margin-bottom: 4px; color: #F4FBFF; }
.fault-item p { font-size: 0.84rem; color: var(--muted); line-height: 1.45; }
.map-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .map-grid { grid-template-columns: repeat(3, 1fr); } }
.map-grid b { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; color: var(--faint); }
.map-grid p { margin-top: 6px; font-size: 0.84rem; color: var(--muted); }

/* ═══════════ PLATFORM — RELAY CORE ═══════════ */
.relay-core {
  position: relative; aspect-ratio: 1; max-width: 460px; margin: 0 auto;
}
.rc-ring {
  position: absolute; border-radius: 50%; border: 1.5px solid var(--line);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.25s, opacity 0.25s, transform 0.4s;
  cursor: pointer;
}
.rc-ring span {
  position: absolute; top: 8px; font-family: var(--mono); font-size: 0.58rem;
  color: var(--muted); white-space: nowrap; pointer-events: none;
}
.rc-ring[data-layer="1"] { width: 100%; height: 100%; }
.rc-ring[data-layer="2"] { width: 82%; height: 82%; border-color: rgba(92,222,255,0.35); }
.rc-ring[data-layer="3"] { width: 64%; height: 64%; border-color: rgba(168,137,255,0.4); }
.rc-ring[data-layer="4"] { width: 48%; height: 48%; border-color: rgba(255,214,107,0.4); }
.rc-ring[data-layer="5"] { width: 34%; height: 34%; border-color: rgba(99,230,177,0.4); }
.rc-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 22%; height: 22%; border-radius: 50%;
  background: radial-gradient(circle, var(--gold), rgba(255,214,107,0.2));
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--mono); font-size: 0.58rem; font-weight: 700; color: #06172A; padding: 6px;
  box-shadow: 0 0 30px rgba(255,214,107,0.45); cursor: pointer;
}
.rc-ring.is-off { opacity: 0.25; border-style: dashed; }
.rc-ring.is-focus { border-width: 2.5px; box-shadow: 0 0 20px rgba(92,222,255,0.25); }
.core-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.core-stat { padding: 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); text-align: center; }
.core-stat strong { display: block; font-family: var(--display); font-size: 1.4rem; color: var(--gold); }
.core-stat span { font-size: 0.76rem; color: var(--muted); }

/* ═══════════ SOURCE GATEWAY — WATERFALL ═══════════ */
.waterfall {
  position: relative; height: 420px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--bg-2); overflow: hidden;
}
.wf-band {
  position: absolute; left: var(--x, 10%); top: -40px; width: var(--w, 140px);
  padding: 8px 12px; border-radius: 6px; font-size: 0.72rem; font-weight: 600;
  background: rgba(92,222,255,0.12); border: 1px solid rgba(92,222,255,0.35); color: var(--cyan);
  animation: wfFall 4s linear infinite; animation-delay: var(--d, 0s); cursor: pointer;
}
.wf-band.is-map {
  background: rgba(255,138,99,0.12); border-color: var(--warn); color: var(--warn);
  animation-name: wfDrift;
}
@keyframes wfFall { to { top: 110%; } }
@keyframes wfDrift { 0% { top: -40px; left: var(--x); } 60% { top: 45%; } 100% { top: 50%; left: 82%; } }
.wf-plane {
  position: absolute; left: 0; right: 0; height: 3px; top: 48%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 20px var(--gold); z-index: 2; cursor: ns-resize;
}
.wf-labels {
  position: absolute; left: 12px; right: 12px; z-index: 3; display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.62rem; color: var(--faint); pointer-events: none;
}
.wf-labels .above { top: 12px; position: absolute; left: 12px; }
.wf-labels .below { bottom: 12px; position: absolute; left: 12px; }
.wf-side {
  position: absolute; right: 10px; top: 42%; width: 120px; padding: 10px;
  border: 1px dashed var(--warn); border-radius: var(--r); background: rgba(255,138,99,0.08);
  font-size: 0.7rem; color: var(--warn); z-index: 3;
}
.extract-preview {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.extract-preview span {
  padding: 8px 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); font-size: 0.8rem;
}

/* ═══════════ RELAY ENGINE — MATRIX ═══════════ */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); }
.matrix { min-width: 720px; border-collapse: separate; border-spacing: 0; width: 100%; }
.matrix th, .matrix td { padding: 12px 10px; text-align: center; border-bottom: 1px solid var(--line); font-size: 0.78rem; }
.matrix th { font-family: var(--mono); font-size: 0.62rem; color: var(--faint); text-transform: uppercase; background: var(--card); }
.matrix th.row-h, .matrix td.row-h { text-align: left; font-weight: 700; color: var(--fg); min-width: 120px; padding-left: 16px; }
.gate {
  width: 28px; height: 28px; border-radius: 50%; margin: 0 auto;
  border: 1.5px solid var(--line); background: var(--bg); transition: all 0.2s; cursor: pointer;
}
.gate.is-on { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.gate.is-broken { background: transparent; border-color: var(--warn); border-style: dashed; }
.matrix tr.is-congested td { background: rgba(255,138,99,0.06); }
.matrix-meters {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px;
}
.meter { padding: 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.meter strong { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--cyan); }
.meter span { font-size: 0.76rem; color: var(--muted); }
.task-obj {
  padding: 12px 16px; border-radius: var(--r-md); background: rgba(255,214,107,0.08);
  border: 1px solid rgba(255,214,107,0.3); margin-bottom: 14px; font-size: 0.9rem;
}

/* ═══════════ CONTEXT PACKETS — CAPSULE GALLERY ═══════════ */
.capsule-gallery {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory;
}
.cap-card {
  flex: 0 0 min(240px, 78vw); scroll-snap-align: start;
  padding: 18px; border-radius: 999px 999px var(--r-lg) var(--r-lg);
  background: linear-gradient(180deg, rgba(255,214,107,0.12), var(--card));
  border: 1px solid rgba(255,214,107,0.35); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.cap-card:hover, .cap-card.is-active { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,0.3); border-color: var(--gold); }
.cap-card h4 { font-size: 0.95rem; margin-bottom: 8px; }
.cap-meta { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--muted); }
.packet-open {
  margin-top: 18px; padding: 20px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line);
}
.packet-layers { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.slice {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line);
  font-size: 0.86rem; cursor: grab;
}
.slice.is-locked { border-color: var(--gold); color: var(--gold); }
.slice.is-removed { opacity: 0.35; text-decoration: line-through; }
.payload-preview {
  padding: 14px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.72rem; color: var(--cyan); white-space: pre-wrap; line-height: 1.6;
}

/* ═══════════ PROVENANCE — DEPTH STACK ═══════════ */
.depth-stack {
  position: relative; height: 380px; perspective: 1000px; margin-bottom: 16px;
}
.depth-layer {
  position: absolute; left: 8%; right: 8%;
  padding: 16px 18px; border-radius: var(--r-md);
  background: rgba(14,43,71,0.85); border: 1px solid var(--line);
  backdrop-filter: blur(4px); transition: transform 0.4s, opacity 0.4s;
  cursor: pointer;
}
.depth-layer[data-z="0"] { top: 8%; transform: translateZ(80px); border-color: var(--gold); z-index: 5; }
.depth-layer[data-z="1"] { top: 28%; transform: translateZ(40px) scale(0.96); opacity: 0.85; z-index: 4; }
.depth-layer[data-z="2"] { top: 48%; transform: translateZ(0) scale(0.92); opacity: 0.7; z-index: 3; }
.depth-layer[data-z="3"] { top: 68%; transform: translateZ(-40px) scale(0.88); opacity: 0.55; z-index: 2; }
.depth-layer.is-focus { border-color: var(--cyan); box-shadow: 0 0 30px rgba(92,222,255,0.25); opacity: 1 !important; }
.depth-layer .unverified { color: var(--warn); font-family: var(--mono); font-size: 0.68rem; }
.claim-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.claim {
  padding: 12px 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  font-size: 0.88rem; cursor: pointer; transition: border-color 0.2s;
}
.claim:hover, .claim.is-active { border-color: var(--cyan); }
.claim.is-unverified { border-color: var(--warn); }

/* ═══════════ COMPRESSION LAB — PRESSURE CHAMBER ═══════════ */
.chamber {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 900px) { .chamber { grid-template-columns: 1.4fr 0.8fr; } }
.chamber-tank {
  position: relative; min-height: 320px; border-radius: var(--r-lg);
  border: 2px solid var(--line); background: radial-gradient(circle at 40% 50%, rgba(92,222,255,0.08), var(--bg-2));
  overflow: hidden;
}
.chamber-tank.is-cracked { border-color: var(--warn); box-shadow: inset 0 0 40px rgba(255,138,99,0.15); }
.chamber-tank.is-cracked::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,138,99,0.15) 41%, transparent 42%),
    linear-gradient(45deg, transparent 55%, rgba(255,138,99,0.12) 56%, transparent 57%);
  pointer-events: none;
}
.particle {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
  animation: particleFloat 3s ease-in-out infinite;
}
.particle.is-gold { background: var(--gold); box-shadow: 0 0 12px var(--gold); width: 10px; height: 10px; }
@keyframes particleFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -10px); }
}
.chamber-aperture {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 36px; height: var(--aperture, 80px); border-radius: 999px;
  border: 2px solid var(--violet); box-shadow: 0 0 20px rgba(168,137,255,0.4);
  background: rgba(168,137,255,0.1); transition: height 0.3s;
}
.chamber-readout { display: flex; flex-direction: column; gap: 12px; }
.token-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.token-pair > div { padding: 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); text-align: center; }
.token-pair strong { display: block; font-family: var(--display); font-size: 1.5rem; }
.fact-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 0.82rem; }
.fact-lists ul { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; color: var(--muted); }
.comp-slider { width: 100%; accent-color: var(--violet); margin: 10px 0; }

/* ═══════════ CONTEXT EVALS — RACE TRACKS ═══════════ */
.eval-task {
  padding: 14px 18px; border-radius: var(--r-md); background: rgba(168,137,255,0.1);
  border: 1px solid rgba(168,137,255,0.35); margin-bottom: 16px; font-size: 0.92rem;
}
.tracks { display: flex; flex-direction: column; gap: 12px; }
.track {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line);
}
.track-name { font-weight: 700; font-size: 0.86rem; }
.track-bar {
  position: relative; height: 10px; border-radius: 999px; background: var(--bg);
  overflow: hidden;
}
.track-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transition: width 1.2s ease;
}
.track.is-running .track-fill { width: var(--progress, 100%); }
.track-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; grid-column: 2 / -1; }
.track.is-winner { border-color: var(--ok); box-shadow: 0 0 20px rgba(99,230,177,0.15); }

/* ═══════════ MEMORY GATEWAY — ORBITS ═══════════ */
.orbit-field {
  position: relative; aspect-ratio: 1; max-width: 480px; margin: 0 auto;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,214,107,0.08), transparent 60%);
}
.orbit {
  position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px dashed var(--line);
  transform: translate(-50%, -50%); animation: orbitSpin 28s linear infinite;
}
.orbit[data-ring="inner"] { width: 36%; height: 36%; border-color: rgba(255,214,107,0.45); animation-duration: 14s; }
.orbit[data-ring="mid"] { width: 64%; height: 64%; border-color: rgba(92,222,255,0.35); animation-duration: 22s; animation-direction: reverse; }
.orbit[data-ring="outer"] { width: 92%; height: 92%; border-color: rgba(168,137,255,0.3); }
@keyframes orbitSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.orbit-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--gold); color: #06172A; display: flex; align-items: center; justify-content: center;
  text-align: center; font-family: var(--mono); font-size: 0.62rem; font-weight: 700; z-index: 2;
  box-shadow: 0 0 28px rgba(255,214,107,0.4);
}
.mem-node {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan); cursor: grab;
  top: 0; left: 50%; transform: translate(-50%, -50%);
}
.mem-node.is-conflict { background: var(--warn); box-shadow: 0 0 12px var(--warn); animation: pulseWarn 1s ease infinite; }
@keyframes pulseWarn { 50% { transform: translate(-50%, -50%) scale(1.3); } }
.orbit-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; font-size: 0.8rem; color: var(--muted); }

/* ═══════════ DEVELOPERS — COMMAND COCKPIT ═══════════ */
.cockpit {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); min-height: 420px;
  display: flex; flex-direction: column;
}
.cockpit-bar {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center;
}
.cmd-input {
  flex: 1; min-width: 180px; padding: 10px 14px; border-radius: var(--r);
  background: var(--bg); border: 1px solid var(--line); color: var(--gold);
  font-family: var(--mono); font-size: 0.88rem;
}
.cmd-input:focus { outline: none; border-color: var(--gold); }
.cockpit-canvas {
  flex: 1; display: grid; grid-template-columns: 1fr; gap: 12px; padding: 14px; align-content: start;
}
@media (min-width: 900px) { .cockpit-canvas { grid-template-columns: 1fr 1fr; } }
.cmd-window {
  padding: 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line);
  display: none;
}
.cmd-window.is-open { display: block; animation: winIn 0.25s ease; }
@keyframes winIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cmd-window h4 { font-family: var(--mono); font-size: 0.72rem; color: var(--cyan); margin-bottom: 10px; }
.cmd-window pre {
  font-family: var(--mono); font-size: 0.72rem; line-height: 1.65; color: var(--muted); white-space: pre-wrap;
}
.cmd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cmd-chips button {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono);
  font-size: 0.72rem; color: var(--muted);
}
.cmd-chips button:hover, .cmd-chips button.is-active { border-color: var(--gold); color: var(--gold); }
.integ-bar {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; border-top: 1px solid var(--line);
  background: var(--card); border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.integ-bar button {
  padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--line); font-size: 0.78rem; font-weight: 600; color: var(--muted);
}
.integ-bar button.is-active, .integ-bar button:hover { border-color: var(--cyan); color: var(--cyan); }
.integ-snippet {
  margin-top: 12px; padding: 14px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.76rem; color: var(--ok); display: none; white-space: pre-wrap;
}
.integ-snippet.is-open { display: block; }

/* ═══════════ PRICING — BANDWIDTH DIAL ═══════════ */
.pricing-light { background: var(--light-bg); color: var(--light-fg); border-radius: var(--r-lg); padding: clamp(28px, 4vw, 40px); border: 1px solid var(--light-line); }
.pricing-light h2, .pricing-light h3 { color: var(--light-fg); }
.pricing-light .lead, .pricing-light .mono-label { color: var(--light-muted); }
.dial-layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 900px) { .dial-layout { grid-template-columns: 1fr 1fr; } }
.bw-dial {
  position: relative; width: min(320px, 100%); aspect-ratio: 1; margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #FFD66B 0deg 60deg, #5CDEFF 60deg 160deg, #A889FF 160deg 260deg, #C8DAE4 260deg 360deg);
  padding: 14px;
  box-shadow: 0 12px 40px rgba(6,23,42,0.12);
}
.bw-dial-inner {
  width: 100%; height: 100%; border-radius: 50%; background: var(--light-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--light-line); position: relative;
}
.bw-needle {
  position: absolute; width: 3px; height: 42%; background: var(--light-fg); border-radius: 2px;
  bottom: 50%; left: 50%; transform-origin: bottom center; transform: translateX(-50%) rotate(var(--angle, -40deg));
  transition: transform 0.35s ease;
}
.bw-needle::after {
  content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid var(--light-fg);
}
.bw-zone { font-family: var(--display); font-size: 1.4rem; font-weight: 700; margin-top: 20px; }
.dial-controls label {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin-bottom: 12px;
  font-size: 0.86rem; font-weight: 600; color: var(--light-fg);
}
.dial-controls input[type="range"] { grid-column: 1 / -1; accent-color: #0B243D; width: 100%; }
.plan-spot {
  padding: 24px; border-radius: var(--r-lg); background: var(--light-card); border: 1px solid var(--light-line);
}
.plan-spot h3 { margin-bottom: 6px; }
.plan-spot .price { font-family: var(--display); font-size: 2.4rem; font-weight: 700; margin: 12px 0; }
.plan-spot ul { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 20px; font-size: 0.9rem; color: var(--light-muted); }
.plan-spot li::before { content: "✓ "; color: #1a9a6a; font-weight: 700; }
.feature-ruler {
  display: flex; gap: 12px; overflow-x: auto; margin-top: 28px; padding-bottom: 8px;
}
.ruler-col {
  flex: 0 0 min(240px, 78vw); padding: 18px; border-radius: var(--r-md);
  background: var(--light-card); border: 1px solid var(--light-line);
}
.ruler-col.is-rec { border-color: #0B243D; box-shadow: 0 8px 24px rgba(6,23,42,0.1); }
.ruler-col h4 { margin-bottom: 10px; }
.ruler-col ul { display: flex; flex-direction: column; gap: 8px; font-size: 0.84rem; color: var(--light-muted); }

/* ── about / light pages ── */
.about-lede { font-family: var(--display); font-size: clamp(1.6rem, 3.2vw, 2.5rem); font-weight: 700; line-height: 1.2; max-width: 22ch; }
.about-cols { columns: 2; column-gap: 36px; }
@media (max-width: 720px) { .about-cols { columns: 1; } }
.about-cols p { margin-bottom: 14px; break-inside: avoid; color: var(--muted); }
.principle { padding: 20px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; gap: 16px; }
.principle .p-no { font-family: var(--mono); color: var(--gold); }
.principle p { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }

.prose h2 { font-size: 1.35rem; margin: 28px 0 12px; }
.prose p { margin-bottom: 14px; color: var(--muted); }
.prose ul { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.prose li { display: flex; gap: 10px; color: var(--muted); }
.prose li::before { content: ""; flex-shrink: 0; margin-top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 12px 14px; border-radius: var(--r);
  background: var(--bg-2); border: 1px solid var(--line); color: var(--fg);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,214,107,0.15);
}
.form-toast {
  padding: 12px 14px; border-radius: var(--r); font-size: 0.85rem; margin-top: 14px;
  background: rgba(99,230,177,0.12); border: 1px solid rgba(99,230,177,0.4); color: var(--ok);
}
.form-toast[hidden] { display: none; }

/* auth — simple centered */
.auth-page {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(28px, 4vw, 38px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.auth-card h1 { font-size: 1.45rem; margin-bottom: 6px; }
.auth-lead { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 18px; font-size: 0.84rem; }
.remember { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.remember input { width: auto; }
.auth-row a { color: var(--gold); font-weight: 600; }
.auth-divider { text-align: center; position: relative; margin: 22px 0; }
.auth-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.auth-divider span { position: relative; background: var(--card); padding: 0 14px; font-size: 0.76rem; color: var(--muted); }
.auth-social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-new { text-align: center; margin-top: 22px; font-size: 0.86rem; color: var(--muted); }
.auth-new a { color: var(--gold); font-weight: 700; }
.auth-panel-switch { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); }
.auth-panel-switch[hidden] { display: none; }
.auth-panel-switch h3 { font-size: 1rem; margin-bottom: 12px; }

.status-line { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.data-table th { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; color: var(--faint); }

@media (max-width: 600px) {
  .tunnel-actions .btn, .page-hero-actions .btn { flex: 1; }
}
