
:root {
  --bg: #0a0e15;
  --panel: rgba(22, 28, 38, 0.62);
  --panel-2: rgba(34, 42, 56, 0.66);
  --panel-solid: #161c26;
  --border: rgba(236, 231, 218, 0.10);
  --border-strong: rgba(236, 231, 218, 0.20);
  --text: #ece7da;
  --muted: #97a1b2;
  --accent: #7bc6b7;
  --accent-2: #8a93ff;
  --red: #ff6b6b;
  --yellow: #e2b557;
  --green: #64c784;
  --gray: #758093;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:active { opacity: .7; }

/* Kinetic aurora field (pure CSS, no canvas) */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 650px at 85% -10%, rgba(138, 147, 255, 0.10), transparent 60%),
    radial-gradient(900px 600px at -5% 5%, rgba(123, 198, 183, 0.12), transparent 55%);
}
.aurora::before, .aurora::after {
  content: "";
  position: absolute;
  width: 64vmax;
  height: 64vmax;
  border-radius: 50%;
  filter: blur(80px);
}
.aurora::before {
  left: -22vmax;
  top: -26vmax;
  background: radial-gradient(circle, rgba(123, 198, 183, 0.16), transparent 62%);
  animation: drift-a 28s ease-in-out infinite alternate;
}
.aurora::after {
  right: -26vmax;
  bottom: -30vmax;
  background: radial-gradient(circle, rgba(138, 147, 255, 0.13), transparent 62%);
  animation: drift-b 34s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(9vmax, 7vmax) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-8vmax, -9vmax) scale(1.06); } }

/* Reality Mirror first screen */
.mirror-hero {
  position: relative;
  min-height: min(760px, 100svh);
  display: grid;
  align-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px 32px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: #07080a;
}
.mirror-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 48% 28%, rgba(226,181,87,.18), transparent 18%),
    radial-gradient(circle at 75% 70%, rgba(138,147,255,.13), transparent 28%),
    radial-gradient(circle at 18% 72%, rgba(123,198,183,.12), transparent 28%),
    linear-gradient(180deg, rgba(7,8,10,.2), rgba(7,8,10,.94));
  filter: saturate(1.08);
}
.mirror-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(236,231,218,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236,231,218,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}
.mirror-inner { position: relative; z-index: 1; width: min(960px, 100%); margin: 0 auto; }
.mirror-brand { margin-bottom: 18px; }
.mirror-kicker {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: .32em;
  text-transform: uppercase;
}
.mirror-title {
  max-width: 100%;
  margin: 0;
  font-size: clamp(24px, 7.2vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: break-word;
  word-break: keep-all;
}
.mirror-answer {
  max-width: 780px;
  margin: 18px 0 22px;
  color: var(--text);
  font-size: clamp(18px, 4.2vw, 32px);
  line-height: 1.32;
}
.mirror-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin: 22px 0 14px;
}
.mirror-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 18, 24, .62);
  box-shadow: 0 18px 60px rgba(0,0,0,.28);
  padding: 15px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.mirror-label { color: var(--muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 7px; }
.mirror-status { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; }
.mirror-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--yellow); box-shadow: 0 0 22px rgba(226,181,87,.55); }
.mirror-red .mirror-dot { background: var(--red); box-shadow: 0 0 22px rgba(255,107,107,.55); }
.mirror-green .mirror-dot { background: var(--green); box-shadow: 0 0 22px rgba(100,199,132,.55); }
.mirror-red .mirror-status-card { border-color: rgba(255,107,107,.58); }
.mirror-green .mirror-status-card { border-color: rgba(100,199,132,.55); }
.mirror-card p { margin: 6px 0 0; color: var(--muted); }
.mirror-ring-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; }
.mirror-ring {
  --score: 0;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #0b0d11 58%, transparent 60%),
    conic-gradient(var(--yellow) calc(var(--score) * 1%), rgba(236,231,218,.1) 0);
  box-shadow: inset 0 0 28px rgba(226,181,87,.12), 0 0 38px rgba(226,181,87,.12);
}
.mirror-ring span { font-size: 24px; font-weight: 900; line-height: 1; }
.mirror-ring small { color: var(--muted); margin-top: -22px; font-size: 12px; }
.mirror-pain {
  margin-top: 14px;
  padding: 13px 15px;
  border-left: 2px solid var(--red);
  color: #ffd7d4;
  background: rgba(255,107,107,.08);
  border-radius: 0 14px 14px 0;
}
.mirror-score-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mirror-score-number { color: var(--text); font-size: 24px; font-weight: 850; line-height: 1; font-variant-numeric: tabular-nums; }
.mirror-score-label { margin-top: 5px; color: var(--muted); font-size: 12px; }
.mirror-meta { margin-top: 13px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.mirror-meta.stale { color: var(--red); }
.mirror-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 0; }
.copy-row-button {
  appearance: none;
  border: 1px solid rgba(226,181,87,.46);
  border-radius: 999px;
  background: rgba(226,181,87,.10);
  color: var(--yellow);
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.copy-row-button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.copy-row-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.copy-chip { border: 1px solid rgba(226,181,87,.24); border-radius: 999px; background: rgba(226,181,87,.06); padding: 4px 8px; color: var(--text); }
.copy-sep { color: rgba(226,181,87,.56); }
.lamp-wall {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(226,181,87,.22);
  border-radius: 18px;
  background: rgba(9, 11, 15, .48);
}
.lamp-wall-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.lamp-wall-head h2 { margin: 0; color: var(--yellow); font-size: 14px; letter-spacing: 0; }
.lamp-wall-head span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lamp-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}
.lamp {
  aspect-ratio: 1;
  border-radius: 4px;
  border: 1px solid rgba(236,231,218,.18);
  background: rgba(236,231,218,.035);
}
.lamp:focus-visible,
.track-shortcut:focus-visible,
.asset-card[href]:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
.lamp-published {
  border-color: rgba(226,181,87,.82);
  background: linear-gradient(180deg, rgba(255,220,136,.96), rgba(180,123,36,.74));
  box-shadow: 0 0 14px rgba(226,181,87,.38);
}
.lamp-primary { animation: lamp-breathe 4.2s ease-in-out infinite; }
.lamp-fail {
  border-color: rgba(255,107,107,.58);
  background: linear-gradient(135deg, rgba(80,16,20,.72) 0 44%, rgba(255,107,107,.58) 45% 55%, rgba(80,16,20,.72) 56% 100%);
}
.lamp-future { border-color: rgba(236,231,218,.16); background: transparent; }
@keyframes lamp-breathe { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
.true-number-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.true-number-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(236,231,218,.045);
  padding: 10px;
  min-width: 0;
}
.true-number-label { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.true-number-value { margin-top: 5px; color: var(--text); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.true-number-detail { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.true-number-card.negative .true-number-value { color: #9f2f2f; }
.true-number-card.missing .true-number-value,
.true-number-card.missing .true-number-detail { color: rgba(236,231,218,.55); }
.track-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.track-shortcut {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(236,231,218,.04);
  padding: 8px;
  color: var(--text);
}
.track-shortcut-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-shortcut-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.legacy-link-row { margin-top: 10px; font-size: 12px; }
.command-v3-bars { margin: 16px 0; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: rgba(0,0,0,.12); }
.command-v3-bars h3 { margin: 0 0 10px; font-size: 14px; }
.v3-bar-row { margin-top: 9px; }
.v3-bar-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.v3-bar-head b { color: var(--text); font-weight: 650; }
.v3-bar { height: 7px; margin-top: 5px; border-radius: 999px; background: rgba(236,231,218,.08); overflow: hidden; }
.v3-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--yellow)); }
@media (min-width: 760px) {
  .interrogation-strip {
    grid-template-columns: minmax(220px, 1.1fr) minmax(260px, 1.4fr) minmax(260px, 1fr);
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 18, 24, .62);
    box-shadow: 0 18px 60px rgba(0,0,0,.28);
    overflow: hidden;
  }
  .interrogation-strip .mirror-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .interrogation-strip .mirror-card + .mirror-card { border-left: 1px solid var(--border); }
  .mirror-ring { width: 112px; }
}
@media (min-width: 900px) {
  .lamp-grid {
    grid-template-columns: repeat(15, minmax(0, 48px));
    justify-content: center;
  }
}
@media (max-width: 380px) {
  .lamp-grid { gap: 4px; }
}

/* Hero command deck (homepage) */
.hero-deck {
  padding: 34px 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(14, 19, 28, 0.15), rgba(10, 14, 21, 0.6));
}
.hero-inner { max-width: 880px; margin: 0 auto; }
.brand-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 16px; }
.brand, .brand-static {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.42em;
  font-size: 14px;
}
.brand { cursor: pointer; transition: color 0.25s ease, text-shadow 0.25s ease; }
.brand:hover { color: var(--accent); text-shadow: 0 0 16px rgba(123, 198, 183, 0.45); }
.brand-tag {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  min-width: 0;
}
.hero-h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 8vw, 56px);
  line-height: 1.12;
  font-weight: 700;
  background: linear-gradient(100deg, var(--text) 30%, var(--accent) 75%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.thesis { margin: 0 0 5px; font-size: clamp(14px, 3.6vw, 18px); color: var(--text); overflow-wrap: anywhere; }
.thesis em { font-style: normal; color: var(--accent); border-bottom: 1px solid rgba(123, 198, 183, 0.4); }
.mode-line { margin: 2px 0 14px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.chip-strip { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; min-width: 0; max-width: 100%; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 0;
  max-width: 100%;
}
.chip b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.chip-red .dot { background: var(--red); }
.chip-yellow .dot { background: var(--yellow); }
.chip-green .dot { background: var(--green); }
.chip-debt b { color: var(--red); }
.tech-line { margin: 0; color: var(--muted); font-size: 12px; opacity: 0.8; overflow-wrap: anywhere; }
.tech-line code { font-size: 12px; }

/* Easter egg reveal lines (hidden until JS unlocks them) */
.egg-line {
  display: none;
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 2px solid var(--accent);
  background: rgba(123, 198, 183, 0.08);
  border-radius: 0 10px 10px 0;
  color: var(--accent);
  font-size: 14px;
}
.egg-line.egg-show { display: block; animation: egg-in 0.6s ease both; }
@keyframes egg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Scroll reveal (scoped to html.js so no-JS readers always see content) */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease var(--d, 0ms), transform 0.65s ease var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Sub-page glass header */
.top {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(14, 19, 28, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.top h1 { margin: 0 0 5px; font-size: 18px; letter-spacing: .3px; }
.top .meta { color: var(--muted); font-size: 12px; word-break: break-word; }
.top .meta code { font-size: 12px; }
.top .brand-row { margin-bottom: 8px; }
.freshness { display: inline-flex; align-items: center; gap: 6px; }
.freshness .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.freshness.stale .dot { background: var(--yellow); }
main { max-width: 880px; margin: 0 auto; padding: 12px 12px 56px; }
section { margin-bottom: 14px; }
h2 { margin: 0 0 10px; font-size: 14px; color: var(--accent); letter-spacing: .3px; }
h2 .count { color: var(--muted); font-size: 12px; font-weight: 400; }
h3 { margin: 0; font-size: 14px; }
p { margin: 4px 0; font-size: 12px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}
.empty { color: var(--yellow); font-size: 14px; }
code { background: var(--panel-2); border-radius: 4px; padding: 1px 5px; font-size: 12px; }

/* Command-center overview */
.command {
  background: linear-gradient(180deg, rgba(123,198,183,.12), rgba(22,27,34,.62));
  border-color: rgba(123,198,183,.28);
}
.command .rule { color: var(--muted); font-size: 12px; margin-top: -2px; }
.command-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.command-stat { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px; }
.command-num { font-size: 24px; font-weight: 700; line-height: 1; }
.command-label { color: var(--muted); font-size: 12px; margin-top: 4px; }
.status-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 11px; }
.status-pill { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 3px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.status-pill .light { width: 9px; height: 9px; }
.status-pill span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.primary-action { margin-top: 11px; padding: 10px; border-radius: 10px; background: rgba(123,198,183,.08); border: 1px dashed rgba(123,198,183,.35); }
.primary-action b { color: var(--accent); }
.world-progress { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(226,181,87,.08); border: 1px solid rgba(226,181,87,.25); }
.world-progress-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 12px; }
.world-progress-head b { color: var(--yellow); }
.world-progress-head span { color: var(--muted); }
.world-progress-bar { height: 9px; border-radius: 999px; background: #0f141b; border: 1px solid var(--border); overflow: hidden; margin-top: 7px; }
.world-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--red), var(--yellow), var(--accent)); border-radius: inherit; }
.world-progress-note { color: var(--muted); font-size: 12px; margin-top: 5px; }
.naval-link {
  margin-top: 11px; display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 10px;
  background: rgba(123,198,183,.10); border: 1px solid rgba(123,198,183,.5);
}
.naval-link b { color: var(--accent); font-size: 14px; white-space: nowrap; }
.naval-link .naval-q { flex: 1; color: var(--text); font-size: 14px; }
.naval-link .chev { color: var(--muted); font-size: 16px; }
.asset-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.asset-card {
  display: block; padding: 12px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text);
}
.asset-card[href] { border-color: rgba(123,198,183,.35); }
.asset-card[href]:hover { border-color: rgba(123,198,183,.7); }
.asset-card-title { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.asset-card-title b { font-size: 14px; color: var(--accent); }
.asset-status { flex: none; font-size: 12px; padding: 2px 7px; border-radius: 999px; background: rgba(117,128,147,.18); color: var(--muted); border: 1px solid var(--border); }
.asset-status-live { color: var(--green); border-color: rgba(100,199,132,.45); background: rgba(100,199,132,.10); }
.asset-status-pending-url-confirmation { color: var(--yellow); border-color: rgba(226,181,87,.45); background: rgba(226,181,87,.10); }
.asset-note { margin-top: 6px; color: var(--muted); }
.asset-url { margin-top: 6px; font-size: 12px; color: var(--muted); word-break: break-all; }

/* Naval formula page */
.naval-hero { border-color: rgba(123,198,183,.35); }
.naval-intro { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.formula {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; margin: 7px 0; font-size: 16px; line-height: 1.7;
  overflow-wrap: anywhere; word-break: break-word;
}
.formula .f-lhs { color: var(--accent); font-weight: 700; }
.formula.f-master { font-size: 16px; border-color: rgba(123,198,183,.45); background: rgba(123,198,183,.08); }
.naval-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.priority-card {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere;
  border-left: 3px solid var(--gray);
}
.priority-card .pri-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; margin-right: 7px;
  background: var(--panel); border: 1px solid var(--border);
  font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums;
}
.pri-p0 { border-left-color: var(--red); }    .pri-p0 .pri-badge { color: var(--red); }
.pri-p1 { border-left-color: var(--accent); } .pri-p1 .pri-badge { color: var(--accent); }
.pri-p2 { border-left-color: var(--yellow); } .pri-p2 .pri-badge { color: var(--yellow); }
.pri-p3 { border-left-color: var(--green); }  .pri-p3 .pri-badge { color: var(--green); }
.pri-p4 { border-left-color: #8ea6ff; }       .pri-p4 .pri-badge { color: #8ea6ff; }
.naval-line {
  border-top: 1px dashed var(--border); padding: 9px 0; font-size: 14px;
  line-height: 1.65; overflow-wrap: anywhere;
}
.naval-line:first-child { border-top: 0; padding-top: 0; }
.naval-line b { color: var(--accent); }

/* Naval v3 preview (dual-run trial) */
.v3-preview { border-color: rgba(142,166,255,.4); }
.v3-preview h2 { color: #8ea6ff; }
.v3-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; margin-left: 6px;
  background: rgba(142,166,255,.14); border: 1px solid rgba(142,166,255,.4);
  color: #8ea6ff; font-size: 12px; font-weight: 400; vertical-align: 1px;
}
.v3-weights { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.v3-bucket {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 4px; text-align: center; min-width: 0;
}
.v3-bucket .v3-pri { font-size: 12px; font-weight: 700; }
.v3-bucket .v3-weight { font-size: 18px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.v3-bucket .v3-score { font-size: 18px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.v3-bucket .v3-denom { color: var(--muted); font-size: 12px; font-weight: 500; }
.v3-bucket .v3-name { color: var(--muted); font-size: 12px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-p0 .v3-pri { color: var(--red); }
.v3-p1 .v3-pri { color: var(--accent); }
.v3-p2 .v3-pri { color: var(--yellow); }
.v3-p3 .v3-pri { color: var(--green); }
.v3-p4 .v3-pri { color: #8ea6ff; }
.v3-bottleneck {
  margin-top: 10px; padding: 9px 10px; border-radius: 10px; font-size: 12px;
  background: rgba(226,181,87,.08); border: 1px dashed rgba(226,181,87,.35);
}
.v3-bottleneck b { color: var(--yellow); }
.v3-links { margin-top: 9px; font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.v3-note { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* Reality feedback loop */
.reality-wrap { display: grid; grid-template-columns: 1fr; gap: 8px; }
.reality-block { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px; }
.reality-block.reality-alert { border-color: rgba(255,107,107,.4); }
.reality-block.reality-ok { border-color: rgba(100,199,132,.4); }
.reality-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--accent); font-size: 14px; }
.reality-date { color: var(--muted); font-size: 12px; }
.reality-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
.reality-stat { text-align: center; }
.reality-num { font-size: 18px; font-weight: 700; line-height: 1; }
.reality-label { color: var(--muted); font-size: 12px; margin-top: 4px; }
.reality-next { margin-top: 9px; font-size: 12px; }
.reality-next b { color: var(--red); }
.reality-kv { margin: 4px 0; font-size: 12px; }
.reality-kv b { color: var(--muted); font-weight: 500; margin-right: 8px; }

/* Top 3 */
.top3 h2 { margin-bottom: 6px; }
.top-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.top-item:first-of-type { border-top: 0; padding-top: 0; }
.rank {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel-2); color: var(--accent);
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px;
}
.meta-line { color: var(--muted); font-size: 12px; margin: 3px 0 6px; }
.tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted); font-size: 12px;
}
.kv { margin: 3px 0; font-size: 12px; }
.kv b { color: var(--muted); font-weight: 500; margin-right: 6px; }
.kv-evidence { display: none; }
.drill { display: inline-flex; margin-top: 3px; font-size: 12px; }

/* Debt */
.debt { border-color: rgba(255,107,107,.45); }
.debt h2 { color: var(--red); }
.debt-row { padding: 10px 0; border-top: 1px solid rgba(255,107,107,.2); }
.debt-row:first-of-type { border-top: 0; padding-top: 0; }
.sev {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle; background: var(--gray);
}
.sev-red { background: var(--red); box-shadow: 0 0 10px rgba(255,107,107,.5); }
.sev-yellow { background: var(--yellow); }
.debt-banner {
  background: rgba(255,107,107,.12);
  border: 1px solid rgba(255,107,107,.4);
  color: #ffb1b1; border-radius: 10px; padding: 9px 10px;
  font-size: 12px; margin-bottom: 8px;
}
.debt .kv { display: none; }
.debt .kv-next { display: block; }
.debt .kv-next b { color: var(--red); }

/* Track cards (six-track constellation) */
.tracks h2 .sub { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; }
.track-grid {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  padding: 6px; border-radius: var(--radius);
  background-image: radial-gradient(rgba(236, 231, 218, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}
.track-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 11px; display: block;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.track-card:active { border-color: var(--accent); }
.track-card:hover, .track-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  outline: none;
}
.card-head { display: flex; gap: 8px; align-items: center; }
.card-index {
  color: var(--muted); font-size: 12px; letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums; transition: color 0.3s ease;
}
.track-card[data-visited="1"] .card-index { color: var(--accent); }
.light { width: 10px; height: 10px; border-radius: 50%; background: var(--gray); flex: 0 0 auto; }
.status-green .light { background: var(--green); box-shadow: 0 0 12px rgba(100,199,132,.45); animation: breathe 3.2s ease-in-out infinite; }
.status-yellow .light { background: var(--yellow); box-shadow: 0 0 12px rgba(226,181,87,.42); animation: breathe 3.2s ease-in-out infinite; }
.status-red .light { background: var(--red); animation: alarm 1.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes alarm {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 107, 107, 0.4); }
  50% { box-shadow: 0 0 18px rgba(255, 107, 107, 0.85); }
}
.card-head h3 { font-size: 14px; flex: 1; }
.card-head .chev { color: var(--muted); font-size: 16px; }
.metric { color: var(--text); font-size: 12px; margin: 7px 0 4px; }
.comment { color: var(--muted); font-size: 12px; }
.card-foot {
  margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--border);
  display: flex; justify-content: space-between; color: var(--muted); font-size: 12px;
}
.badge-debt { color: var(--red); }

/* Evidence preview */
.evi-list { margin: 0; padding: 0; list-style: none; }
.evi-list li { padding: 9px 0; border-top: 1px dashed var(--border); font-size: 14px; color: var(--text); }
.evi-list li:first-child { border-top: 0; }
.evi-list .src { color: var(--muted); font-size: 12px; }

/* Track detail page */
.nav { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.hero { border-radius: 12px; padding: 16px; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--border); }
.hero-title { display: flex; align-items: center; gap: 10px; }
.hero-title h2 { margin: 0; color: var(--text); font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.stat-label { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.stat-value { font-size: 14px; }
.goals-panel { border-color: rgba(226,181,87,.28); }
.goals-panel h2 { color: var(--yellow); }
.goal-card-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
.goal-card, .goal-data-card {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
}
.goal-card { border-color: rgba(226,181,87,.26); }
.goal-label { color: var(--yellow); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.goal-text { color: var(--text); font-size: 14px; line-height: 1.55; }
.goal-data-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.goal-data-card h3 { color: var(--accent); font-size: 14px; margin-bottom: 8px; }
.goal-data-row {
  display: grid; grid-template-columns: minmax(88px, 150px) 1fr; gap: 10px;
  border-top: 1px dashed var(--border); padding: 7px 0; font-size: 14px;
}
.goal-data-row.single { display: block; }
.goal-data-row:first-of-type { border-top: 0; padding-top: 0; }
.goal-data-key { color: var(--muted); }
.goal-data-value { color: var(--text); overflow-wrap: anywhere; }
.goal-data-note { color: var(--text); font-size: 14px; line-height: 1.55; }
.wins-panel { border-color: rgba(123,198,183,.30); }
.wins-panel h2 { color: var(--accent); }
.readable-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.readable-card {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; font-size: 14px;
}
.readable-card h3 { color: var(--text); font-size: 14px; line-height: 1.45; margin-bottom: 7px; }
.readable-meta { color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.readable-body { color: var(--text); line-height: 1.55; }
.readable-kv { display: grid; grid-template-columns: minmax(70px, 120px) 1fr; gap: 10px; border-top: 1px dashed var(--border); padding: 7px 0; }
.readable-kv:first-of-type { border-top: 0; padding-top: 0; }
.readable-k { color: var(--muted); }
.readable-v { color: var(--text); overflow-wrap: anywhere; }
.action-card { border-left: 3px solid rgba(226,181,87,.55); }
.log-card { border-left: 3px solid rgba(123,198,183,.45); }
.metric-card { border-left: 3px solid rgba(142,166,255,.42); }
.score-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.score-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.score-card-head { display: flex; justify-content: space-between; gap: 8px; color: var(--accent); font-size: 14px; }
.delta-plus { color: var(--green); }
.delta-minus { color: var(--red); }
.plist { margin: 0; padding: 0; list-style: none; }
.plist li { border-top: 1px dashed var(--border); padding: 9px 0; font-size: 14px; color: var(--text); }
.plist li:first-child { border-top: 0; padding-top: 0; }
.source-link { margin-top: 14px; font-size: 12px; color: var(--muted); }

footer { color: var(--muted); text-align: center; font-size: 12px; padding: 8px 16px 30px; }

@media (min-width: 720px) {
  main { padding: 22px; }
  .hero-deck { padding: 52px 32px 26px; }
  .brand-row { margin-bottom: 24px; }
  .chip-strip { gap: 8px; }
  .chip { padding: 6px 12px; font-size: 12px; }
  .mode-line { font-size: 14px; }
  .track-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px; }
  .kv-evidence { display: block; }
  .debt .kv { display: block; }
  .command-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reality-wrap { grid-template-columns: 1fr 1fr; }
  .goal-card-grid { grid-template-columns: 1fr 1fr; }
  .goal-data-grid { grid-template-columns: 1fr 1fr; }
  .naval-grid { grid-template-columns: 1fr 1fr; }
  .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .asset-card { min-height: 128px; }
}

/* iPhone 375 / 320 readability */
@media (max-width: 380px) {
  main { padding-left: 10px; padding-right: 10px; }
  .hero-deck, .top { padding-left: 12px; padding-right: 12px; }
  .hero-h1 { font-size: clamp(24px, 10vw, 32px); }
  .brand-tag { font-size: 12px; letter-spacing: 0.12em; }
  .panel, .track-card { padding: 11px; }
  .chip { padding: 5px 9px; font-size: 12px; gap: 5px; }
  .tech-line { word-break: break-all; }
  .v3-weights { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .status-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .mirror-hero { align-items: start; min-height: auto; padding-bottom: 24px; }
  .mirror-answer { font-size: 18px; }
  .lamp-grid { gap: 4px; }
  .true-number-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .true-number-card { padding: 8px 6px; }
  .true-number-label { font-size: 12px; letter-spacing: 0; }
  .true-number-value { font-size: 16px; }
  .true-number-detail { font-size: 12px; }
}

/* Motion is optional, the reality mirror is not. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
