/* Hindsight - shared look for every game. Dark trading-terminal theme. */
:root {
  --bg: #080b14;
  --panel: #10172a;
  --panel-2: #161f36;
  --raise: #1d2740;
  --line: #222d49;
  --line-soft: #1a2338;
  --ink: #e8eefc;
  --muted: #a2afca;
  --dim: #97a6c5;
  --accent: #4b7bff;
  --up: #22d39a;
  --down: #ff5670;
  --warn: #ffb443;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Themed extras (dark values). Light and Paper redefine them in /common/themes.css. */
  --link: #9db6ff;
  --up-ink: #6ff0c4;
  --warn-ink: #ffd083;
  --down-ink: #ff92a4;
  --raise-hover: #26324f;
  --line-strong: #33456e;
  --card-top: #18223a;
  --card-bottom: #0e1526;
  --on-accent: #061027;
  --accent-2: #5a86ff;
  --accent-line: #6f97ff;
  --down-2: #ff6b81;
  --on-down: #2c0710;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 16% -12%, rgba(75,123,255,.12), transparent 62%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--link); }
code { font-family: var(--mono); font-size: 11.5px; }

.shell { max-width: 1240px; margin: 0 auto; padding: 18px 20px 56px; display: grid; gap: 12px; }

.top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-bottom: 4px; }
.hub-link { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; font-weight: 600;
            color: var(--dim); text-decoration: none; padding: 7px 11px; border: 1px solid var(--line);
            border-radius: 8px; }
.hub-link .arrow { margin-right: 6px; }
.hub-link:hover { color: var(--ink); border-color: var(--accent); }
.wordmark { font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: .18em; }
.wordmark .alt { color: var(--accent); margin-left: 6px; }
.lede { margin: 0; color: var(--muted); font-size: 13px; flex: 1; min-width: 240px; line-height: 1.6; }

.error { color: var(--down); font-family: var(--mono); font-size: 11.5px;
         border-left: 2px solid var(--down); background: rgba(255,86,112,.09); padding: 8px 12px; }
.error:empty { display: none; }

.board { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 12px; }

.panel { background: linear-gradient(180deg, var(--panel-2), var(--panel));
         border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; overflow: hidden; }

.side { background: linear-gradient(180deg, var(--panel-2), var(--panel));
        border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 18px;
        display: flex; flex-direction: column; gap: 10px; }

.cap { margin: 0; font-size: 9.5px; letter-spacing: .18em; font-weight: 600; color: var(--dim); }

.seg { display: flex; gap: 4px; padding: 3px; background: var(--raise);
       border: 1px solid var(--line); border-radius: 9px; }
.seg label { flex: 1; text-align: center; padding: 7px 6px; border-radius: 6px; position: relative;
             font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .08em;
             color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent); color: var(--on-accent); }
.seg.mode { width: auto; min-width: 250px; }

.side label:not(.seg label):not(.check label) { display: block; }
.side label > span { display: block; font-size: 9.5px; letter-spacing: .14em;
                     font-weight: 600; color: var(--dim); margin-bottom: 6px; }

/* Dash 4 number inputs: a container with stepper buttons either side. */
.dash-input-container { display: flex; align-items: stretch; width: 100%; background: var(--bg);
  border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.dash-input-container:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(75,123,255,.16); }
.dash-input-container input[type="number"] { border: none; border-radius: 0; background: transparent;
  box-shadow: none; min-width: 0; flex: 1; }
button.dash-input-stepper { width: 38px; flex: none; padding: 0; border: none; border-radius: 0;
  background: var(--raise); color: var(--muted); font-size: 15px; letter-spacing: 0; }
button.dash-input-stepper:hover:not(:disabled) { background: var(--raise-hover); color: var(--ink); border: none; }
input[type="number"] { width: 100%; padding: 9px 11px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 9px; color: var(--ink);
  font-family: var(--mono); font-size: 12.5px; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(75,123,255,.16); }

.check { font-size: 12px; color: var(--muted); }
.check input { margin-right: 4px; accent-color: var(--accent); }

button { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--ink);
  background: var(--raise); border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 14px; cursor: pointer; width: 100%;
  transition: background .15s ease, border-color .15s ease, transform .1s ease; }
button:hover:not(:disabled) { background: var(--raise-hover); border-color: var(--line-strong); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .35; cursor: not-allowed; }
button.primary { background: linear-gradient(180deg,var(--accent-2),var(--accent));
                 border-color: var(--accent-line); color: var(--on-accent); }
button.danger { background: linear-gradient(180deg,var(--down-2),var(--down));
                border-color: var(--down-ink); color: var(--on-down); }
button.ghost { width: auto; background: transparent; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.tiles.wide { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 18px; }
.tile { padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.tile small { display: block; font-size: 8.5px; letter-spacing: .13em; font-weight: 600;
              color: var(--dim); margin-bottom: 5px; }
.tile .v { font-family: var(--mono); font-size: 16px; font-variant-numeric: tabular-nums; }
.tile .v.up { color: var(--up); } .tile .v.down { color: var(--down); } .tile .v.warn { color: var(--warn); }

.hint { margin: 0; font-family: var(--mono); font-size: 10px; line-height: 1.65; color: var(--dim); }

table { width: 100%; border-collapse: collapse; }
th { text-align: right; font-size: 9px; letter-spacing: .13em; font-weight: 600;
     color: var(--dim); padding: 8px 6px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
td { text-align: right; padding: 8px 6px; font-family: var(--mono); font-size: 11.5px;
     font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line-soft); }
tr.best td { color: var(--up); }
td.up { color: var(--up); } td.down { color: var(--down); } td.warn { color: var(--warn); }
.empty { color: var(--dim); font-family: var(--mono); font-size: 11px; padding: 18px 4px; text-align: center; }

.verdict { padding: 26px 28px 28px; border-radius: 16px; border: 1px solid var(--line);
           background: linear-gradient(180deg,var(--card-top),var(--card-bottom)); display: grid; gap: 4px; }
.verdict.lost { border-color: rgba(255,86,112,.45); }
.verdict.won { border-color: rgba(34,211,154,.45); }
.verdict h2 { margin: 8px 0 0; font-size: 25px; letter-spacing: -.02em; }
.verdict .headline { margin: 12px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--muted); max-width: 76ch; }
.verdict .score { margin: 14px 0 0; font-size: 14px; line-height: 1.6; }
.verdict .score b { font-family: var(--mono); }
.up-text { color: var(--up); } .down-text { color: var(--down); } .warn-text { color: var(--warn); }

/* choices (bets, picks) */
.choices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.choices label { text-align: center; padding: 9px 2px; border: 1px solid var(--line); border-radius: 8px;
                 font-family: var(--mono); font-size: 10.5px; color: var(--muted); cursor: pointer;
                 background: var(--bg); position: relative; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label:has(input:checked) { border-color: var(--accent); color: var(--ink);
                                    background: rgba(75,123,255,.18); }
.choice-legend { display: flex; justify-content: space-between; font-family: var(--mono);
                 font-size: 9px; letter-spacing: .08em; color: var(--dim); }

/* share */
.share { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
         border-radius: 14px; padding: 16px 18px; }
.share-text { margin: 10px 0 12px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line);
              border-radius: 10px; font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
              white-space: pre-wrap; color: var(--ink); }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-button { position: relative; display: inline-flex; align-items: center; justify-content: center;
                gap: 8px; min-width: 150px; padding: 11px 16px; border-radius: 9px; cursor: pointer;
                border: 1px solid var(--accent-line); background: linear-gradient(180deg,var(--accent-2),var(--accent));
                color: var(--on-accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-decoration: none; }
.share-button + .share-button { background: transparent; color: var(--ink); border-color: var(--line); }
.share-button .clip { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.share-button .clip > * { width: 100%; height: 100%; }

/* round progress dots */
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dot { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg);
       font-family: var(--mono); font-size: 10px; display: grid; place-items: center; color: var(--dim); }
.dot.now { border-color: var(--accent); color: var(--ink); }
.dot.right { background: rgba(34,211,154,.22); border-color: rgba(34,211,154,.6); color: var(--up); }
.dot.wrong { background: rgba(255,86,112,.18); border-color: rgba(255,86,112,.55); color: var(--down); }

.footer-note { font-family: var(--mono); font-size: 10px; color: var(--dim); line-height: 1.7;
               border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 10px; }

@media (max-width: 900px) {
  .board { grid-template-columns: minmax(0,1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .shell { padding: 14px 14px 44px; }
  .seg.mode { width: 100%; }
}

/* today's standing and streak, shown under the verdict */
.standing { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
            background: rgba(8, 11, 20, .55); display: grid; gap: 6px; }
.standing p { margin: 0; }
.standing-main { font-size: 15px; line-height: 1.5; color: var(--ink); }
.standing-streak { font-family: var(--mono); font-size: 12px; color: var(--warn); }
.standing-note { font-size: 12px; line-height: 1.6; color: var(--dim); }

/* Dash 4 wraps each radio option's text in spans. The side panel's field-label
   rule (.side label > span) must not restyle them, or a selected option's
   text turns grey on the accent background. */
.side .seg label > span, .side .choices label > span,
.seg label > span, .choices label > span {
  display: inline; margin: 0; color: inherit; font-size: inherit;
  letter-spacing: inherit; font-weight: inherit;
}
