:root {
  --bg: #07090e;
  --bg-elevated: #0e131d;
  --bg-card: #121826;
  --bg-code: #0a0d14;
  --border: #232d42;
  --border-bright: #33415c;

  --accent: #f7931a;
  --accent-soft: rgba(247, 147, 26, 0.14);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.12);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.14);
  --danger: #f43f5e;
  --danger-soft: rgba(244, 63, 94, 0.14);

  --text: #e2e8f0;
  --text-strong: #f8fafc;
  --muted: #94a3b8;

  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
  position: relative;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(247, 147, 26, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.07) 0%, transparent 40%),
    linear-gradient(rgba(35, 45, 66, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 45, 66, 0.22) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 42px 42px, 42px 42px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  background: rgba(247, 147, 26, 0.1);
  color: #fbbf24;
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.success { color: var(--success); }
.danger { color: var(--danger); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Telemetry Bar */
.telemetry-bar {
  background: #04060a;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.42rem 1rem;
}

.telemetry-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.tel-sep { color: #334155; }

/* Sticky Nav */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.72rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-strong);
  font-size: 1.05rem;
}

.brand:hover { text-decoration: none; }

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent);
  color: #07090e;
  font-weight: 900;
}

.brand-text small {
  color: var(--muted);
  font-weight: 600;
}

.nav-anchors {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.nav-anchors a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-anchors a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-external {
  display: flex;
  gap: 0.5rem;
}

.ext-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ext-pill:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.ext-mrkc {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(247, 147, 26, 0.45);
}

.ext-btc {
  background: var(--cyan-soft);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Hero */
.hero {
  margin: 2rem 0 2.2rem;
  padding: 2.8rem 2.2rem;
  border-radius: 16px;
  border: 1px solid rgba(247, 147, 26, 0.45);
  background:
    radial-gradient(circle at top right, rgba(247, 147, 26, 0.16), transparent 52%),
    linear-gradient(145deg, #15110c 0%, #0d121c 58%, #090d16 100%);
  text-align: center;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.48);
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(247, 147, 26, 0.4);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.3rem);
  font-weight: 900;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-sub-domain {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.62em;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.hero-lead {
  max-width: 820px;
  margin: 0 auto 1.65rem;
  color: #cbd5e1;
  font-size: 1.04rem;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.68rem 1.2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #07090e;
  box-shadow: 0 8px 24px rgba(247, 147, 26, 0.3);
}

.btn-secondary {
  background: #1e293b;
  color: var(--text-strong);
  border: 1px solid #334155;
}

.btn-outline {
  border: 1px solid rgba(247, 147, 26, 0.6);
  color: var(--accent);
  background: rgba(247, 147, 26, 0.06);
}

.btn-outline-cyan {
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.06);
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.9rem;
  text-align: left;
}

.kpi-card {
  background: rgba(7, 9, 14, 0.72);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kpi-label {
  font-size: 0.76rem;
  color: var(--muted);
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-strong);
}

.kpi-value small {
  font-size: 0.65em;
  font-weight: 600;
}

.kpi-note {
  font-size: 0.75rem;
  color: #64748b;
}

/* Panels */
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.2rem;
  margin-bottom: 2rem;
  scroll-margin-top: 76px;
}

.section-header {
  margin-bottom: 1.6rem;
}

.sec-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.panel h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  color: var(--text-strong);
  font-weight: 800;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.sec-desc {
  color: var(--muted);
  font-size: 0.96rem;
}

/* Formulas */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.formula-card {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
}

.formula-card-accent {
  border-color: rgba(247, 147, 26, 0.5);
  background: linear-gradient(160deg, rgba(247, 147, 26, 0.08) 0%, #0a0d14 65%);
}

.formula-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.math-block {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 0.6rem;
}

.m-var { font-weight: 800; color: var(--cyan); }
.m-highlight { color: var(--success); font-weight: 800; }
.m-strike { text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 2px; color: #fca5a5; }

.m-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  font-size: 0.86em;
  line-height: 1.25;
  margin: 0 0.15rem;
}

.m-num {
  border-bottom: 1px solid var(--muted);
  padding: 0 0.25rem 0.1rem;
}

.m-den { padding-top: 0.1rem; }

.formula-note {
  font-size: 0.83rem;
  color: var(--muted);
}

/* Calculator */
.calc-shell {
  background: var(--bg-code);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.6rem;
}

.calc-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.calc-topbar h3 {
  font-size: 1.08rem;
  color: var(--text-strong);
}

.preset-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.chip {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border-bright);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #07090e;
}

.calc-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.input-group input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.58rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-bright);
  background: #0e1420;
  color: var(--text-strong);
  outline: none;
  transition: border-color 0.15s ease;
}

.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.16);
}

.mini-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.mini-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.18rem 0.46rem;
  border-radius: 4px;
  border: 1px solid #263147;
  background: #111827;
  color: #94a3b8;
  cursor: pointer;
}

.mini-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.res-box {
  background: #101624;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.res-box-highlight {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.1) 0%, #101624 65%);
}

.res-box-gold {
  border-color: rgba(247, 147, 26, 0.5);
  background: linear-gradient(155deg, rgba(247, 147, 26, 0.1) 0%, #101624 65%);
}

.res-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.res-val {
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.25;
}

.res-sub {
  font-size: 0.78rem;
  color: #94a3b8;
}

.calc-alert {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  border-left: 4px solid var(--accent);
  background: rgba(247, 147, 26, 0.08);
  color: #e2e8f0;
}

.calc-alert.alert-danger {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.calc-alert.alert-success {
  border-left-color: var(--success);
  background: var(--success-soft);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table caption {
  text-align: left;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.data-table th,
.data-table td {
  padding: 0.78rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  background: var(--bg-code);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.row-highlight {
  background: rgba(247, 147, 26, 0.07);
}

.badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-gold { background: var(--accent-soft); color: var(--accent); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

/* Eta cards */
.eta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.eta-card {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem;
}

.eta-card-active {
  border-color: rgba(247, 147, 26, 0.55);
}

.eta-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-soft);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.45rem;
}

.eta-card h4 {
  color: var(--text-strong);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.eta-big {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-strong);
}

.eta-cost {
  font-size: 0.86rem;
  color: var(--muted);
}

/* Code Window & POW Decay */
.code-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.code-window {
  background: #06080d;
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  background: #0f1522;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }
.code-filename { margin-left: 0.4rem; }

.code-body {
  padding: 1.15rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.code-body code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.c-com { color: #64748b; }
.c-kw { color: #c084fc; font-weight: 700; }
.c-num { color: #38bdf8; }
.c-hl {
  display: block;
  background: rgba(247, 147, 26, 0.14);
  border-left: 3px solid var(--accent);
  margin: 0.25rem -1.15rem;
  padding: 0.25rem 1.15rem;
  color: #fff7ed;
}

.code-explainer {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
}

.code-explainer h3 {
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.code-explainer ul {
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.91rem;
  color: #cbd5e1;
}

.decay-chain {
  margin: 0.45rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #111827;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 700;
}

/* Charts */
.chart-card {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem;
  margin-top: 1.25rem;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.chart-head h3 {
  font-size: 1.02rem;
  color: var(--text-strong);
  margin-bottom: 0.2rem;
}

.chart-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.chart-selected {
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(247, 147, 26, 0.35);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
}

.svg-container {
  width: 100%;
  overflow-x: auto;
}

.svg-container svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 640px;
}

/* Shame Museum */
.filter-tabs {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}

.tab-btn {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  border: 1px solid var(--border-bright);
  background: var(--bg-code);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-strong);
  border-color: var(--danger);
}

.tab-btn.active {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.shame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 1.15rem;
}

.shame-card {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  padding: 1.3rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shame-card-warn {
  border-left-color: var(--accent);
}

.shame-card.hidden {
  display: none;
}

.shame-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.shame-id {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  background: var(--danger);
  color: #fff;
  padding: 0.16rem 0.52rem;
  border-radius: 4px;
}

.shame-tag {
  font-size: 0.76rem;
  color: #fda4af;
  background: var(--danger-soft);
  padding: 0.16rem 0.52rem;
  border-radius: 4px;
  font-weight: 600;
}

.src-link {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
}

.shame-card h3 {
  font-size: 1.08rem;
  color: var(--text-strong);
}

.shame-quote {
  font-size: 0.9rem;
  color: #cbd5e1;
  background: rgba(244, 63, 94, 0.06);
  border: 1px dashed rgba(244, 63, 94, 0.35);
  padding: 0.8rem 0.95rem;
  border-radius: 8px;
}

.rebuttal {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
}

.rebuttal-title {
  font-weight: 800;
  color: var(--success);
  font-size: 0.84rem;
  margin-bottom: 0.3rem;
}

/* Sci-Fi Novel */
.novel-panel {
  border-color: rgba(247, 147, 26, 0.35);
}

.term-demo {
  border-bottom: 1.5px dashed var(--accent);
  color: var(--accent);
  padding: 0 0.15rem;
}

.novel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.novel-meta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.novel-controls {
  display: flex;
  gap: 0.45rem;
}

.ctrl-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.32rem 0.68rem;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.ctrl-btn:hover,
.ctrl-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.novel-body {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.04rem;
  line-height: 1.95;
  color: #e2e8f0;
}

.novel-body.serif-mode {
  font-family: var(--font-serif);
}

.novel-body p {
  margin-bottom: 1.15rem;
  text-align: justify;
}

.scene-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 1.8rem 0 1.25rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  background: #0a0f1a;
  border: 1px solid var(--border-bright);
  border-left: 3px solid var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.novel-callout {
  background: rgba(247, 147, 26, 0.07);
  border: 1px solid rgba(247, 147, 26, 0.35);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

.novel-callout p:last-child {
  margin-bottom: 0;
}

.glossary-term {
  font: inherit;
  color: var(--accent);
  background: rgba(247, 147, 26, 0.1);
  border: none;
  border-bottom: 1.5px dashed var(--accent);
  padding: 0 0.25rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.glossary-term:hover {
  background: rgba(247, 147, 26, 0.24);
}

.glossary-drawer {
  max-width: 820px;
  margin: 1.6rem auto 0;
  padding: 1rem 1.25rem;
  background: #0a101c;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
  font-size: 0.9rem;
}

.glossary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
  color: var(--cyan);
}

/* Playbook */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
  margin-top: 1.35rem;
}

.step-card {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem;
}

.step-card-gold {
  border-color: rgba(247, 147, 26, 0.5);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.step-card h3 {
  font-size: 1.08rem;
  color: var(--text-strong);
  margin-bottom: 0.75rem;
}

.step-card ul {
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.profit-matrix {
  margin-top: 1.4rem;
  background: linear-gradient(150deg, rgba(247, 147, 26, 0.08) 0%, #0a0d14 60%);
  border: 1px solid rgba(247, 147, 26, 0.38);
  border-radius: 12px;
  padding: 1.35rem;
}

.profit-matrix h3 {
  font-size: 1.02rem;
  color: var(--text-strong);
  margin-bottom: 1rem;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.9rem;
}

.matrix-item {
  background: rgba(7, 9, 14, 0.75);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.95rem 1rem;
}

.m-tag {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.matrix-item strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.matrix-item p {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Ecosystem */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.eco-card {
  display: block;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.eco-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: var(--accent);
}

.eco-current {
  border-color: rgba(247, 147, 26, 0.65);
  background: linear-gradient(155deg, rgba(247, 147, 26, 0.1) 0%, #0a0d14 70%);
}

.eco-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.16rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.55rem;
}

.eco-card h3 {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  color: var(--text-strong);
  margin-bottom: 0.45rem;
}

.eco-card p {
  font-size: 0.86rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.8rem;
  margin-top: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.35rem;
}

@media (max-width: 900px) {
  .code-split {
    grid-template-columns: 1fr;
  }
  .shame-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 2rem 1.2rem;
  }
  .panel {
    padding: 1.4rem 1.1rem;
  }
  .nav-anchors {
    display: none;
  }
}
