:root {
  --void: #070b12;
  --navy: #0b1421;
  --panel: #101c2a;
  --line: #26394d;
  --text: #eaf1f7;
  --muted: #8ea1b4;
  --amber: #f5aa3c;
  --cyan: #45d7cf;
  --red: #ef6a63;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: radial-gradient(circle at 62% 0, #15334c 0, var(--void) 42rem); font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
a { color: var(--cyan); }
.masthead, main, footer { width: min(1440px, calc(100% - 36px)); margin-inline: auto; }
.masthead { position: relative; padding: 38px 0 28px; }
.back { display: inline-block; margin-bottom: 30px; text-decoration: none; }
.eyebrow, .panel-label { color: var(--amber); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 800; }
h1 { max-width: 900px; margin: 7px 0; font: 800 clamp(34px, 6vw, 72px)/.98 system-ui, sans-serif; letter-spacing: -.045em; }
.masthead > p { max-width: 760px; margin: 9px 0 0; color: var(--muted); font-size: 16px; }
.masthead .attribution { font-size: 11px; }
.mobile-tripo { display: none; }
.lab-grid { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(360px, 1.7fr) minmax(220px, .8fr); gap: 12px; }
.panel, .chart-card, .derivation, .assumptions, .reality-check, .asset-helper { background: #101c2ae8; border: 1px solid var(--line); border-radius: 10px; }
.panel { min-height: 430px; padding: 20px; }
.panel-label { margin-bottom: 22px; }
label { display: block; margin: 0 0 20px; color: var(--muted); font-size: 12px; }
output { float: right; color: var(--text); }
input[type="range"] { width: 100%; margin-top: 9px; accent-color: var(--amber); cursor: pointer; }
button { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; color: var(--text); background: #152638; font: inherit; font-size: 11px; cursor: pointer; }
button:hover { border-color: var(--cyan); }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.share { width: 100%; margin-top: 20px; border-color: #45d7cf66; color: var(--cyan); }
.share-status { display: block; min-height: 18px; margin-top: 6px; color: var(--muted); font-size: 10px; text-align: center; }
.space { position: relative; overflow: hidden; height: 225px; border-radius: 7px; background: radial-gradient(circle at 75% 20%, #31516c 0 1px, transparent 2px), radial-gradient(circle at 25% 70%, #768fa3 0 1px, transparent 2px), linear-gradient(100deg, #070b12, #102a3d); background-size: 70px 70px, 110px 110px, auto; }
.rocket { position: absolute; left: 9%; top: 45%; z-index: 2; color: var(--amber); font-size: 42px; filter: drop-shadow(0 0 9px #f5aa3c88); transition: transform 80ms linear; }
.exhaust { position: absolute; left: 3%; top: calc(45% + 21px); height: 2px; background: linear-gradient(90deg, transparent, var(--red), var(--amber)); box-shadow: 0 0 9px var(--red); transition: width 80ms linear; }
.ghost { position: absolute; left: 12%; font-size: 14px; transition: left 80ms linear; }
.constant-ghost { top: 29%; color: var(--red); }
.optimal-ghost { top: 69%; color: var(--cyan); }
.model-tag { position: absolute; left: 4%; color: var(--muted); font-size: 9px; }
.constant-tag { top: 26%; }.optimal-tag { top: 66%; }
.burn-label { margin: 18px 0 4px; }
.play { width: 100%; margin-top: 10px; border-color: var(--amber); color: var(--amber); }
.energy-ledger { display: flex; justify-content: space-between; gap: 8px; margin-top: 15px; color: var(--muted); font-size: 10px; }
.energy-ledger strong { color: var(--cyan); }
.metric { padding: 15px 0; border-bottom: 1px solid var(--line); }
.metric span, .gain-card span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { display: block; margin-top: 3px; font: 700 24px system-ui, sans-serif; }
.metric.optimal strong { color: var(--cyan); }
.gain-card { margin-top: 20px; padding: 18px; border: 1px solid #f5aa3c66; border-radius: 7px; background: #2a2013; }
.gain-card strong { display: block; color: var(--amber); font: 800 42px system-ui, sans-serif; }
.gain-card code { color: #d8bd90; font-size: 11px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.chart-card { padding: 18px; color: var(--muted); font-size: 10px; }
.chart-card h2 { margin: 5px 0 0; color: var(--text); font: 700 18px system-ui, sans-serif; }
.chart-card svg { width: 100%; margin-top: 12px; overflow: visible; }
.line-key { display: inline-block; width: 17px; height: 2px; margin: 0 4px 3px 12px; }
.constant-key { background: var(--red); }.optimal-key { background: var(--cyan); }
svg .axis { stroke: #63788b; } svg .grid { stroke: #26394d; stroke-dasharray: 4 5; }
svg path { fill: none; stroke-width: 3; } svg .constant-line { stroke: var(--red); } svg .optimal-line { stroke: var(--cyan); }
svg .cursor { stroke: var(--amber); stroke-width: 1; stroke-dasharray: 4 4; }
svg text { fill: #7890a5; font-size: 10px; }
.derivation, .assumptions { margin-top: 12px; padding: 22px; }
.derivation summary { cursor: pointer; color: var(--amber); font-weight: 800; }
.derivation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 22px; }
.derivation h2, .assumptions h2 { font: 700 17px system-ui, sans-serif; }
.derivation p, .assumptions li { color: var(--muted); font-size: 12px; }
.derivation .equation { color: var(--text); }
.assumptions ul { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 30px; padding-left: 20px; }
.reality-check { margin-top: 12px; padding: 22px; }
.reality-check > div:first-child { display: grid; grid-template-columns: 1fr 2fr; align-items: end; gap: 20px; }
.reality-check h2 { margin: 0; font: 800 28px system-ui, sans-serif; }
.reality-check > div:first-child p { margin: 0; color: var(--muted); font-size: 11px; }
.problem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 20px; }
.problem { min-height: 155px; padding: 15px; border: 1px solid var(--line); border-top-width: 3px; border-radius: 6px; background: #0b1521; }
.problem.passed { border-top-color: #5bd59a; }
.problem.open { border-top-color: var(--amber); }
.problem.waiting { border-top-color: var(--cyan); }
.problem span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.problem h3 { margin: 8px 0 5px; font: 700 14px system-ui, sans-serif; }
.problem p { margin: 0; color: var(--muted); font-size: 10px; }
.wake-time { margin: 16px 0 0; color: #64778a; font-size: 9px; }
.asset-helper { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(320px, 1.2fr); gap: 28px; margin-top: 12px; padding: 22px; }
.asset-source { overflow: hidden; min-height: 300px; border: 1px solid var(--line); border-radius: 7px; background: #071118; }
.asset-source img { display: block; width: 100%; height: 100%; object-fit: cover; }
.asset-helper h2 { margin: 7px 0; font: 800 28px system-ui, sans-serif; }
.asset-helper p, .asset-helper li { color: var(--muted); font-size: 11px; }
.asset-helper ol { padding-left: 20px; }
.asset-helper li { margin: 7px 0; }
.asset-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.asset-button { padding: 10px 13px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #152638; text-decoration: none; font: inherit; font-size: 10px; }
.asset-button.primary { border-color: var(--cyan); color: var(--cyan); }
.asset-button:hover { border-color: var(--amber); color: var(--amber); }
.asset-helper .asset-note { margin-top: 14px; color: #64778a; font-size: 9px; }
.asset-share-status { min-height: 18px; margin: 9px 0 0; color: var(--cyan) !important; }
.glb-upload { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.glb-upload label { margin-bottom: 9px; color: var(--text); font-weight: 800; }
.glb-upload input { width: 100%; margin-bottom: 9px; color: var(--muted); }
.glb-upload button { width: 100%; }
.glb-upload progress { width: 100%; margin-top: 10px; accent-color: var(--cyan); }
.glb-upload p { min-height: 18px; margin: 8px 0 0; font-size: 9px; }
footer { padding: 38px 0 60px; color: #64778a; text-align: center; font-size: 10px; }
@media (max-width: 900px) {
  .lab-grid { grid-template-columns: 1fr 1fr; }
  .flight { grid-column: 1 / -1; grid-row: 1; }
  .charts { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .masthead, main, footer { width: min(100% - 20px, 1440px); }
  .masthead { padding-top: 20px; }
  .lab-grid { grid-template-columns: 1fr; }
  .flight { grid-column: auto; }
  .panel { min-height: auto; }
  .derivation-grid, .assumptions ul { grid-template-columns: 1fr; }
  .problem-grid { grid-template-columns: 1fr; }
  .reality-check > div:first-child { grid-template-columns: 1fr; }
  .asset-helper { grid-template-columns: 1fr; }
  .asset-source { min-height: 220px; }
  .mobile-tripo { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding: 11px 12px; border: 1px solid #45d7cf66; border-radius: 7px; background: #102536; color: var(--muted); font-size: 9px; }
  .mobile-tripo a { flex: 0 0 auto; font-weight: 800; text-decoration: none; }
  .asset-actions { display: grid; grid-template-columns: 1fr; }
  .asset-button { width: 100%; min-height: 46px; display: grid; place-items: center; text-align: center; font-size: 11px; }
  .asset-button.granite-only { margin-top: 8px; border-style: dashed; color: var(--muted); }
  .mike-berth::after { position: static; }
}
@media (min-width: 601px) and (max-width: 1000px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
}
