:root {
  --bg: #080b10;
  --panel: #10151d;
  --panel2: #0c1118;
  --line: #26303c;
  --line-bright: #3b4857;
  --text: #f1f4ee;
  --muted: #8f9aa7;
  --accent: #d7ff4f;
  --blue: #69c8ff;
  --buy: #58e6a9;
  --fade: #ff795f;
  --purple: #a997ff;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 72% -10%, rgba(105,200,255,.13), transparent 30%),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto;
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
.wrap { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }

header {
  border-bottom: 1px solid var(--line);
  background: rgba(8,11,16,.88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.mast { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { color: var(--accent); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 8px 0 1px; font-size: clamp(30px, 5vw, 58px); line-height: .95; letter-spacing: -.06em; text-transform: uppercase; }
h1 span { color: var(--muted); font-weight: 400; }
.sub { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.mast-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--buy); box-shadow: 0 0 0 5px rgba(88,230,169,.12); }

nav#tabs { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
nav#tabs::-webkit-scrollbar { display: none; }
nav#tabs button {
  flex: 0 0 auto;
  min-width: 150px;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-top: 1px solid var(--line);
  padding: 13px 18px 14px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  position: relative;
}
nav#tabs button + button { border-left: 1px solid var(--line); }
nav#tabs button b { color: #566170; font: 500 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; margin-right: 8px; }
nav#tabs button.active { color: var(--text); background: var(--panel); }
nav#tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }
nav#tabs button.play-tab.active::after { background: var(--purple); }

main { padding: 28px 0 64px; min-height: 65vh; }
.status { color: var(--muted); font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 0 0 26px; text-transform: uppercase; letter-spacing: .05em; }
.hidden { display: none; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  border-bottom: 1px solid var(--line-bright);
  padding: 0 0 18px;
  margin: 0 0 22px;
}
.section-head h2 { margin: 7px 0 5px; font-size: clamp(27px, 4vw, 46px); line-height: 1; letter-spacing: -.045em; }
.section-head p { max-width: 700px; color: var(--muted); margin: 0; font-size: 13px; }
.section-meta { color: var(--text); white-space: nowrap; border: 1px solid var(--line-bright); padding: 8px 11px; font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }

.leader-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin-bottom: 20px; }
.leader { min-width: 0; min-height: 112px; padding: 16px; position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; background: rgba(16,21,29,.92); }
.leader + .leader { border-left: 1px solid var(--line); }
.leader .rank { color: var(--muted); font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.leader strong { display: block; line-height: 1.2; }
.leader small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.leader b { font: 800 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); }
.leader i { position: absolute; height: 4px; bottom: 0; left: 0; background: var(--accent); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); margin-bottom: 20px; background: var(--panel); }
.card { min-height: 94px; padding: 16px; }
.card + .card { border-left: 1px solid var(--line); }
.card .k { color: var(--muted); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.card .v { font: 800 22px/1.15 ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 13px; letter-spacing: -.04em; }

.audit { display: grid; grid-template-columns: 210px 1fr; gap: 22px; border: 1px solid var(--line); border-left: 4px solid var(--blue); padding: 16px 18px; background: var(--panel2); margin: 0 0 20px; }
.audit.good { border-left-color: var(--buy); }
.audit.warn { border-left-color: var(--fade); }
.audit span { display: block; color: var(--muted); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .09em; }
.audit strong { display: block; margin-top: 7px; font-size: 16px; }
.audit p { color: var(--muted); margin: 0; font-size: 13px; }

.table-shell { overflow-x: auto; border: 1px solid var(--line); background: var(--panel); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .09em; background: var(--panel2); position: sticky; top: 0; }
td { font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #151c25; }
.bar { height: 5px; background: var(--accent); display: inline-block; vertical-align: middle; margin-left: 5px; }
.tag { display: inline-block; font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; padding: 5px 7px; text-transform: uppercase; background: rgba(143,154,167,.12); color: var(--muted); }
.tag.BUY, .tag.YES { background: rgba(88,230,169,.13); color: var(--buy); }
.tag.FADE, .tag.NO { background: rgba(255,121,95,.13); color: var(--fade); }
.pos { color: var(--buy); }
.neg { color: var(--fade); }
.muted { color: var(--muted); }
.row-won td { background: rgba(88,230,169,.035); }
.row-lost td { color: var(--muted); }

.empty { color: var(--muted); padding: 24px; background: var(--panel); border: 1px dashed var(--line-bright); font-size: 13px; }
.tab-intro { color: var(--muted); font-size: 13px; max-width: 760px; margin: -4px 0 16px; line-height: 1.5; }
.tab-intro b { color: var(--text); font-weight: 650; }
.mini { display: inline-flex; width: 128px; height: 7px; overflow: hidden; background: var(--panel2); vertical-align: middle; }
.mini i { display: block; height: 100%; }

.chart-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }
.chart-box { background: var(--panel); border: 1px solid var(--line); padding: 14px 16px; }
.chart-title { color: var(--muted); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 6px; }
.chart { width: 100%; height: auto; display: block; }

.venue-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); margin: 0 0 20px; }
.venue-pill { min-height: 68px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; background: var(--panel2); color: var(--muted); border: 0; padding: 13px 16px; cursor: pointer; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.venue-pill + .venue-pill { border-left: 1px solid var(--line); }
.venue-pill b { color: var(--text); font: 800 20px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.venue-pill.active { color: var(--text); background: var(--panel); box-shadow: inset 0 -3px var(--accent); }
.venue-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.venue-dot.polymarket { background: var(--purple); }
.venue-dot.kalshi { background: var(--blue); }
.venue { font: 800 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; padding: 4px 5px; margin-right: 5px; border: 1px solid var(--line-bright); color: var(--muted); }
.venue.polymarket { color: var(--purple); border-color: rgba(169,151,255,.4); }
.venue.kalshi { color: var(--blue); border-color: rgba(105,200,255,.4); }

footer { border-top: 1px solid var(--line); padding: 16px 0 30px; color: var(--muted); font: 600 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.disclaimer { color: #596472; }
a { color: var(--blue); }

/* Pick'em */
.f-hero { padding: 0 0 18px; border-bottom: 1px solid var(--line-bright); margin-bottom: 20px; }
.f-hero h2 { font-size: clamp(30px, 5vw, 48px); line-height: 1; letter-spacing: -.05em; margin: 0; }
.f-hero p { color: var(--muted); margin: 7px 0 0; }
.f-acct { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.f-link { background: none; border: none; color: var(--blue); cursor: pointer; padding: 0; text-decoration: underline; }
.f-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); border: 1px solid var(--line); margin-bottom: 16px; position: relative; background: var(--panel); }
.f-stat { padding: 13px 14px; min-height: 76px; }
.f-stat + .f-stat { border-left: 1px solid var(--line); }
.f-stat .k { display: block; color: var(--muted); font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .08em; }
.f-stat .v { display: block; font: 800 17px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 10px; }
.f-alloc { grid-column: 1 / -1; height: 3px; background: var(--panel2); overflow: hidden; }
.f-alloc-bar { height: 100%; background: var(--purple); transition: width .35s ease; }
.f-pills { display: flex; margin-bottom: 16px; overflow-x: auto; }
.f-pill { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); border-right: 0; padding: 9px 15px; cursor: pointer; font-weight: 750; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.f-pill:last-child { border-right: 1px solid var(--line); }
.f-pill.active { background: var(--panel); color: var(--text); box-shadow: inset 0 -2px var(--purple); }
.f-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.f-card { background: var(--panel); border: 1px solid var(--line); padding: 14px; transition: border-color .15s, transform .15s; }
.f-card.has-pick { border-color: var(--purple); }
.f-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 11px; gap: 8px; }
.f-date { color: var(--muted); font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.f-title { font-weight: 750; }
.vs { color: var(--muted); font-weight: 400; font-size: 10px; margin: 0 4px; text-transform: uppercase; }
.f-opts { display: flex; flex-direction: column; gap: 6px; }
.f-opts.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: 360px; overflow: auto; }
.f-opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--line); padding: 9px 10px; cursor: pointer; color: var(--text); font-size: 12px; transition: all .12s ease; text-align: left; }
.f-opt:hover { border-color: var(--purple); transform: translateY(-1px); }
.f-opt.picked, .f-opt.sel { border-color: var(--purple); box-shadow: inset 3px 0 var(--purple); }
.f-opt.won { border-color: var(--buy); background: rgba(88,230,169,.08); }
.f-opt.dim { opacity: .42; }
.f-opt:disabled { cursor: default; }
.f-opt-team { font-weight: 650; }
.f-opt-meta { color: var(--muted); font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.f-opt-meta b { color: var(--blue); }
.f-stake { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.f-stake-head { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.f-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.f-chip { background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 5px 10px; cursor: pointer; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.f-chip:hover { border-color: var(--purple); }
.f-slider { width: 100%; accent-color: var(--purple); margin-bottom: 8px; }
.f-stake-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; flex-wrap: wrap; }
.f-btn { background: var(--accent); color: #0a0d10; border: 0; padding: 8px 14px; font-weight: 850; cursor: pointer; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.f-btn:hover { filter: brightness(1.08); }
.f-btn:disabled { opacity: .4; cursor: not-allowed; }
.f-btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.f-btn.sm { padding: 5px 9px; }
.f-card-actions { display: flex; gap: 8px; margin: 16px 0 8px; flex-wrap: wrap; }
.f-note { color: var(--muted); font-size: 11px; }
#f-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--panel); color: var(--text); border: 1px solid var(--accent); padding: 11px 17px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 50; font-weight: 650; }
#f-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .leader-grid { grid-template-columns: repeat(2, 1fr); }
  .leader:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .leader:nth-child(4) { border-top: 1px solid var(--line); }
  .chart-row { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .card:nth-child(n+5) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 24px, 1240px); }
  header { position: static; }
  .mast { min-height: 105px; }
  .mast-status { display: none; }
  nav#tabs button { min-width: 132px; padding-inline: 12px; }
  .section-head { display: block; }
  .section-meta { display: inline-block; margin-top: 14px; }
  .leader-grid, .venue-filter, .cards { grid-template-columns: 1fr; }
  .leader + .leader, .venue-pill + .venue-pill, .card + .card, .card:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .audit { grid-template-columns: 1fr; gap: 10px; }
  .f-grid { grid-template-columns: 1fr; }
}
