/* The wall of glass. Dark #0B0E14 ground, pixel-art, the lemniscate.
   House style: half ledger, half liturgy — every panel lands on a number. */
:root {
  --bg: #0B0E14;
  --panel: #11161F;
  --panel-2: #161C28;
  --line: #1E2737;
  --ink: #E7ECF3;
  --dim: #8A97AB;
  --good: #46D08A;
  --bad: #F2616B;
  --drama: #C77DFF;
  --info: #4FC3F7;
  --gold: #E8C35A;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
body { padding: 0 0 48px; }

.lemniscate { color: var(--drama); font-weight: 700; }

/* gate */
.gate { position: fixed; inset: 0; background: var(--bg);
  display: grid; place-items: center; z-index: 50; }
.gate-card { background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 36px 32px; width: min(380px, 90vw); text-align: center; }
.gate-card .lemniscate { font-size: 44px; }
.gate-card h1 { letter-spacing: 8px; margin: 4px 0 8px; }
.gate-card p { color: var(--dim); font-size: 13px; line-height: 1.5; }
.gate-card input { width: 100%; margin: 14px 0 10px; padding: 11px 13px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font: inherit; }
.gate-card button { width: 100%; padding: 11px; border: 0; border-radius: 8px;
  background: var(--drama); color: #1a0b2e; font: inherit; font-weight: 700; cursor: pointer; }
.gate-err { color: var(--bad) !important; }
.gate-note { margin-top: 16px; font-size: 11px !important; opacity: .8; }

/* topbar */
.topbar { display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 16px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(11,14,20,.92); backdrop-filter: blur(6px); z-index: 10; }
.brand { font-weight: 700; letter-spacing: 3px; }
.dayline { color: var(--dim); font-size: 13px; }
.daylight { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 280px; }
.meter { flex: 1; height: 10px; background: var(--panel-2); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.meter-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--info), var(--drama)); transition: width .6s; }
.meter-label { font-size: 12px; color: var(--dim); white-space: nowrap; }

/* the floor / cast */
.floor { padding: 22px 24px 6px; }
.panel-title { font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--dim); margin: 0 0 14px; font-weight: 600; }
.cast { display: flex; gap: 22px; flex-wrap: wrap; }
.seat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; width: 168px; text-align: center; }
.seat canvas { image-rendering: pixelated; width: 96px; height: 96px;
  animation: bob 1.1s steps(2) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.seat .nm { font-weight: 700; margin-top: 6px; }
.seat .mood { font-size: 11px; color: var(--dim); }
.seat .ttl { font-size: 10px; color: var(--dim); margin-top: 3px; min-height: 24px; }
.seat .ceo-tag { display: inline-block; margin-top: 6px; font-size: 10px;
  color: var(--gold); border: 1px solid var(--gold); border-radius: 5px; padding: 1px 6px; }

/* grid of panels */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px; padding: 18px 24px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.panel.wide { grid-column: 1 / -1; }

/* cap table */
.captable .row { margin-bottom: 12px; }
.captable .who { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.captable .who .pct { color: var(--dim); }
.captable .bars { display: flex; gap: 4px; height: 12px; }
.captable .bar { background: var(--panel-2); border-radius: 4px; overflow: hidden; flex: 1; position: relative; }
.captable .bar i { position: absolute; left: 0; top: 0; bottom: 0; display: block; }

/* best strategy */
.best .nm { font-size: 17px; font-weight: 700; }
.best .sub { color: var(--dim); font-size: 12px; margin: 2px 0 12px; }
.best .stats { display: flex; flex-wrap: wrap; gap: 14px; }
.best .stat { font-size: 13px; }
.best .stat b { display: block; font-size: 16px; }
.best .stat .lab { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.spark-wrap { margin-top: 14px; }
#spark { width: 100%; height: 64px; }

/* arc */
.arc-panel { border-color: #2a1f3a; }
.arc .t { font-weight: 700; color: var(--drama); }
.arc .s { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); margin: 4px 0 10px; }
.arc .note { font-size: 13px; line-height: 1.55; color: var(--ink); }

/* research table */
.research table, .tickets table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.research th, .tickets th { text-align: right; color: var(--dim); font-weight: 600;
  padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 11px; }
.research td, .tickets td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.research th:first-child, .research td:first-child,
.tickets th:first-child, .tickets td:first-child { text-align: left; }
.research tr.champ td { color: var(--good); font-weight: 700; }
.num.pos { color: var(--good); } .num.neg { color: var(--bad); }
.tag-degen { color: var(--bad); font-size: 10px; }

/* tickets */
.dry { font-size: 10px; color: var(--gold); border: 1px solid var(--gold); border-radius: 5px; padding: 1px 6px; letter-spacing: 1px; }
.side-long { color: var(--good); } .side-short { color: var(--bad); } .side-flat { color: var(--dim); }

/* forge + beats */
.forge .e, .beats .b { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.forge .head { color: var(--ink); } .forge .spent { color: var(--dim); font-size: 11px; }
.beats .step { color: var(--info); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.beats .txt { color: var(--dim); }

/* footer */
.foot { display: flex; justify-content: space-between; padding: 16px 24px; color: var(--dim); font-size: 12px; }
.foot a { color: var(--info); text-decoration: none; }

/* The record climbs — the all-time-best ladder, one bar per record day. */
.records .rec-row { margin-bottom: 11px; }
.records .rec-meta { display: flex; align-items: baseline; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.records .rec-day { color: var(--dim); font-size: 11px; min-width: 22px; }
.records .rec-name { font-weight: 600; flex: 1; }
.records .rec-score { color: var(--ink); font-variant-numeric: tabular-nums; }
.records .rec-bar { height: 10px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 5px; overflow: hidden; }
.records .rec-bar i { display: block; height: 100%; border-radius: 5px; opacity: .55; }
.records .rec-top .rec-bar i { opacity: 1; box-shadow: 0 0 8px rgba(232,195,90,.35); }
.records .rec-top .rec-score { color: var(--gold); font-weight: 700; }

/* Overfit-watch — the record-holder's params traced toward a range wall (F-10). */
.ow-tag { font-size: 11px; padding: 1px 7px; border-radius: 10px; vertical-align: middle; }
.ow-tag.ow-alarm { color: #1B1207; background: var(--gold); font-weight: 700; }
.ow-tag.ow-clear { color: var(--dim); border: 1px solid var(--line); }
.overfit .ow-head { font-size: 12px; color: var(--dim); margin-bottom: 12px; }
.overfit .ow-head b { color: var(--ink); }
.overfit .ow-leg { margin-bottom: 14px; }
.overfit .ow-leg-head { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; margin-bottom: 6px; }
.overfit .ow-name { font-weight: 600; color: var(--ink); min-width: 42px; }
.overfit .ow-trail { color: var(--dim); font-variant-numeric: tabular-nums; flex: 1; }
.overfit .ow-verdict { color: var(--dim); font-size: 11px; }
.overfit .ow-leg-flag .ow-verdict { color: var(--gold); font-weight: 700; }
.overfit .ow-track { position: relative; height: 12px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 6px; }
.overfit .ow-wall { position: absolute; top: -2px; width: 3px; height: 16px;
  background: repeating-linear-gradient(var(--gold) 0 2px, transparent 2px 4px); }
.overfit .ow-dot { position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%;
  transform: translate(-50%, -50%); opacity: .5; }
.overfit .ow-dot-last { opacity: 1; width: 11px; height: 11px; box-shadow: 0 0 6px rgba(232,131,90,.5); }
.overfit .ow-range { display: flex; justify-content: space-between; color: var(--dim);
  font-size: 10px; margin-top: 3px; }
.overfit .ow-foot { font-size: 11.5px; color: var(--dim); margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--line); }
.overfit .ow-foot.ow-alarm { color: var(--gold); }
