:root {
  --bg: #09090b; --line: #1d1d23; --ink: #fafafa; --dim: #a1a1aa;
  --faint: #52525b; --accent: #a3e635;
  --low: #f87171; --med: #fbbf24; --high: #4ade80;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: "Sora", sans-serif;
  min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* ---------- header ---------- */
.top { max-width: 880px; margin: 0 auto; padding: 56px 24px 0; }
.back { color: var(--faint); text-decoration: none; font-family: "JetBrains Mono", monospace; font-size: 12px; }
.back:hover { color: var(--ink); }
.top h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 700; letter-spacing: -0.03em; margin: 18px 0 10px; }
.sub { color: var(--dim); font-size: 14.5px; line-height: 1.6; max-width: 560px; }

/* ---------- sections ---------- */
main { max-width: 880px; margin: 0 auto; padding: 8px 24px 48px; }
section { padding: 44px 0; border-top: 1px solid var(--line); margin-top: 44px; }
section:first-child { border-top: none; margin-top: 0; }
.shead { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; }
.shead .btn, .shead .tabs { margin-left: auto; }
.snum { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--faint); }
.shead h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.secnote { color: var(--dim); font-size: 13px; line-height: 1.6; }
.rowline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dim { color: var(--faint); font-size: 13px; }

/* ---------- buttons ---------- */
.btn { display: inline-block; background: var(--ink); color: #09090b; border: none; border-radius: 999px;
  padding: 9px 20px; font-family: "Sora", sans-serif; font-weight: 600; font-size: 13px; cursor: pointer;
  transition: opacity .15s; white-space: nowrap; }
.btn:hover { opacity: .85; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--faint); opacity: 1; }
.btn.sm { padding: 7px 16px; font-size: 12.5px; }
.btn:disabled { opacity: .25; cursor: not-allowed; }

/* ---------- upload ---------- */
.drop { border: 2px dashed var(--line); border-radius: 20px; padding: 56px 24px; text-align: center;
  transition: border-color .2s, background .2s, transform .2s; cursor: pointer; }
.drop:hover { border-color: var(--faint); }
.drop.over { border-color: var(--accent); background: rgba(163,230,53,.05); transform: scale(1.01); }
.drop-icon { width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 14px;
  background: rgba(163,230,53,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; }
.drop-big { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.drop-small { color: var(--faint); font-size: 12px; margin: 10px 0; }
.drop-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.drop-btns .btn { cursor: pointer; }
.drop-note { color: var(--faint); font-size: 11px; margin-top: 18px; font-family: "JetBrains Mono", monospace; line-height: 1.8; }

/* stats: quiet inline numbers, no boxes */
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin: 22px 0 6px; }
.stat b { display: block; font-size: 22px; font-weight: 500; font-family: "JetBrains Mono", monospace; letter-spacing: -0.02em; }
.stat span { color: var(--faint); font-size: 11px; }

/* tables */
.tablewrap { overflow: auto; margin-top: 18px; border-top: 1px solid var(--line); max-height: 320px; }
.datatable { width: 100%; border-collapse: collapse; font-family: "JetBrains Mono", monospace; font-size: 11.5px; }
.datatable th, .datatable td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.datatable th { color: var(--faint); font-weight: 500; position: sticky; top: 0; background: var(--bg); }
.datatable td { color: var(--dim); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 500; font-size: 11px; }
.pill.Low { background: rgba(248,113,113,.12); color: var(--low); }
.pill.Medium { background: rgba(251,191,36,.12); color: var(--med); }
.pill.High { background: rgba(74,222,128,.12); color: var(--high); }

/* ---------- pipeline ---------- */
.pipelog { font-family: "JetBrains Mono", monospace; font-size: 12.5px; line-height: 1.5;
  border-top: 1px solid var(--line); padding: 18px 2px; min-height: 56px;
  display: flex; flex-direction: column; gap: 6px; }
.pipelog .ok { color: var(--high); }
.pipelog .inf { color: var(--dim); }
.pipelog .wrk { color: var(--accent); }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 28px; margin-top: 28px; }
.chartbox h3 { font-size: 12px; color: var(--faint); margin-bottom: 12px; font-weight: 500;
  font-family: "JetBrains Mono", monospace; letter-spacing: .02em; }
.chartbox canvas { max-height: 240px; }
.cmtable table { width: 100%; border-collapse: collapse; font-family: "JetBrains Mono", monospace; font-size: 11.5px; }
.cmtable th, .cmtable td { border: 1px solid var(--line); padding: 9px; text-align: center; }
.cmtable th { color: var(--faint); font-weight: 400; font-size: 10.5px; }
.cmtable td { font-weight: 500; }

/* ---------- predict ---------- */
.tabs { display: flex; gap: 4px; }
.tab { background: transparent; border: none; color: var(--faint); border-radius: 999px;
  padding: 7px 16px; font-family: "Sora", sans-serif; font-size: 13px; font-weight: 500; cursor: pointer; }
.tab:hover { color: var(--dim); }
.tab.active { background: var(--ink); color: #09090b; }
.playgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 8px; }
.controls { display: flex; flex-direction: column; gap: 16px; }
.ctl label { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint);
  margin-bottom: 8px; font-family: "JetBrains Mono", monospace; }
.ctl label b { color: var(--ink); font-weight: 500; }
.ctl input[type=range] { width: 100%; accent-color: var(--accent); }
.ctl select { width: 100%; background: transparent; color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-family: "Sora", sans-serif; font-size: 13.5px; }
.ctl select option { background: #111; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; background: transparent; border: none; color: var(--faint);
  padding: 10px; font-family: "Sora", sans-serif; font-size: 13px; font-weight: 500; cursor: pointer; }
.seg button.on { background: var(--accent); color: #09090b; }
.playout { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; }
.verdict .vlabel { font-size: clamp(52px, 7vw, 84px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.verdict.Low .vlabel { color: var(--low); }
.verdict.Medium .vlabel { color: var(--med); }
.verdict.High .vlabel { color: var(--high); }
.verdict-sub { color: var(--faint); font-size: 13px; }
.probars { width: 100%; display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.prow { display: grid; grid-template-columns: 64px 1fr 42px; align-items: center; gap: 10px;
  font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--dim); }
.prow span:last-child { text-align: right; }
.pbar { height: 5px; background: #1a1a20; border-radius: 99px; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 99px; transition: width .25s ease; }
.treenote { color: var(--faint); font-size: 11px; font-family: "JetBrains Mono", monospace; margin-top: 8px; }

footer { text-align: center; color: var(--faint); font-size: 11px; font-family: "JetBrains Mono", monospace;
  padding: 24px 0 40px; border-top: 1px solid var(--line); max-width: 880px; margin: 0 auto; }

@media (max-width: 700px) {
  .charts, .playgrid { grid-template-columns: 1fr; }
  .playgrid { gap: 28px; }
  .top { padding-top: 40px; }
  section { padding: 32px 0; margin-top: 32px; }
}
