:root {
  --blue: #0071bc;
  --blue-ink: #0b4f86;
  --blue-tint: #e8f1fa;
  --gold: #d1b05a;
  --gold-ink: #8a6a1f;
  --gold-tint: #fbf6e8;
  --ink: #231f20;
  --muted: #6b6b72;
  --faint: #9a9aa2;
  --line: #d8d9de;
  --line-soft: #ececf0;
  --surface: #f7f7f9;
  --bg: #ffffff;
  --good: #1f7a4d;
  --bad: #b3261e;
  --radius: 8px;
  --serif: 'Cormorant Garamond', 'Baskerville', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: var(--blue); }
.loading { padding: 64px 16px; text-align: center; color: var(--muted); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 40px; }

/* ---------- header ---------- */
.hdr { text-align: center; margin-bottom: 20px; }
.hdr .logo { height: 26px; width: auto; margin-bottom: 14px; }
.hdr h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 4.4vw, 46px); letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.05; margin: 0 0 10px; }
.hdr .sub { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 15px; }
.status { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 13px; font-weight: 500; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status.live .dot { background: #d93a2b; box-shadow: 0 0 0 0 rgba(217, 58, 43, .5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(217, 58, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 58, 43, 0); } }

/* ---------- tabs ---------- */
.tabs { display: flex; justify-content: center; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 22px; }
.tab { background: none; border: 0; padding: 10px 16px 11px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue); }
.tab .badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #d93a2b; border-radius: 4px; padding: 2px 6px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.linkbtn { background: none; border: 0; color: var(--blue); font-weight: 600; cursor: pointer; padding: 0; }

/* ---------- team rows ---------- */
.match { position: relative; width: 100%; }
.mlabel { position: absolute; top: -16px; left: 1px; font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--faint); }
.card { border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.team { display: flex; align-items: stretch; width: 100%; min-height: 30px; padding: 0; border: 0; background: #fff; text-align: left; font-size: 13px; line-height: 1.15; cursor: default; }
.team .nm, .team .tail { align-self: center; }
.team + .team { border-top: 1px solid var(--line-soft); }
.team .seed { flex: 0 0 26px; align-self: stretch; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border-right: 1px solid var(--line-soft); }
.team .nm { flex: 1; min-width: 0; padding: 4px 8px; }
.mgrid .team .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team .tail { flex: 0 0 auto; padding-right: 8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
button.team.can { cursor: pointer; }
button.team.can:hover { background: var(--blue-tint); }
button.team.can:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.team.empty .nm { color: var(--faint); font-size: 12px; }
.card.pending { border-style: dashed; }
.team.picked { background: var(--blue-tint); }
.team.picked .nm { color: var(--blue-ink); font-weight: 600; }
.team.picked .seed { background: var(--blue); color: #fff; border-color: var(--blue); }
.team.won .nm { font-weight: 600; }
.team.lost .nm, .team.lost .seed { color: var(--faint); }
.team.correct { background: var(--gold-tint); }
.team.correct .seed { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.team.correct .nm { font-weight: 600; }
.team.correct .tail { color: var(--gold-ink); font-weight: 700; }
.team.wrong .nm { text-decoration: line-through; color: var(--bad); }
.team.wrong .tail { color: var(--bad); }
.team.out .nm { text-decoration: line-through; color: var(--faint); }
.team.out.picked { background: #fbeeee; }
.team.out.picked .seed { background: var(--bad); border-color: var(--bad); }
.mfoot { font-size: 11px; color: var(--bad); padding: 3px 2px 0; }

/* ---------- desktop bracket ---------- */
.bracket-scroll { width: 100%; }
.heads, .bracket { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: 12px; }
.heads { margin-bottom: 8px; }
.head { text-align: center; padding-bottom: 8px; border-bottom: 2px solid var(--gold); }
.head b { display: block; font-size: 13px; }
.head span { font-size: 11px; color: var(--muted); }
.head.center { border-bottom-color: transparent; }
.bracket { position: relative; height: 620px; }
.col { display: flex; flex-direction: column; position: relative; z-index: 1; }
.slot { flex: 1; display: flex; align-items: center; }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.lines path { fill: none; stroke: #c4c5cc; stroke-width: 1.25; }
.center-col { position: relative; }
.center-col .ctitle { position: absolute; left: 0; right: 0; bottom: calc(50% + 46px); text-align: center; }
.center-col .ctitle b { font-family: var(--serif); font-size: 24px; letter-spacing: .03em; display: block; line-height: 1; }
.center-col .ctitle span { font-size: 11px; color: var(--muted); }
.center-col .final { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); }
.center-col .champ { position: absolute; left: -12px; right: -12px; top: calc(50% + 58px); }
.champ-box { border: 1.5px solid var(--gold); background: var(--gold-tint); border-radius: var(--radius); padding: 12px 10px; text-align: center; }
.champ-box .k { font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.1; }
.champ-box .v { font-weight: 700; font-size: 16px; margin: 6px 0 2px; color: var(--blue-ink); }
.champ-box .v.tbd { color: var(--faint); font-weight: 500; font-size: 13px; }
.champ-box .d { font-size: 11px; color: var(--muted); }
.champ-box .btn { margin-top: 10px; width: 100%; }
.side-label { position: absolute; top: 2px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

.questions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 28px; }
.questions div { border-top: 2px solid var(--gold); padding-top: 8px; font-size: 12px; color: var(--muted); }
.questions b { display: block; color: var(--ink); font-size: 12px; margin-bottom: 2px; }

/* ---------- submit bar ---------- */
.submitbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-top: 24px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.progress { flex: 1; min-width: 180px; }
.progress .bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; margin-top: 6px; }
.progress .bar i { display: block; height: 100%; background: var(--blue); transition: width .25s; }
.progress small { font-size: 13px; color: var(--muted); }
.error { color: var(--bad); font-size: 14px; margin-top: 8px; }
.ts-holder { display: flex; flex-direction: column; align-items: center; margin: 0 auto; }
.ts-holder .ts-note { display: none; margin: 0 0 10px; font-weight: 600; font-size: 15px; text-align: center; }
.ts-holder.active { max-width: 1240px; margin: 0 auto 32px; padding: 20px 16px; border: 2px solid var(--blue); border-radius: var(--radius); background: var(--blue-tint); width: calc(100% - 32px); }
.ts-holder.active .ts-note { display: block; }

/* ---------- stepper (mobile) ---------- */
.steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.step[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.step.done:not([aria-current="true"]) { color: var(--blue-ink); border-color: #b9d4ec; background: var(--blue-tint); }
.round-intro { margin-bottom: 16px; }
.round-intro h2 { font-family: var(--serif); font-size: 26px; margin: 0; line-height: 1.1; }
.round-intro p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.round-intro q { font-style: italic; color: var(--ink); }
.mgrid { display: grid; grid-template-columns: 1fr; gap: 26px 16px; margin-top: 24px; }
.stepnav > span { flex: 1; }
@media (min-width: 560px) { .mgrid { grid-template-columns: 1fr 1fr; } }
.mgrid .team { min-height: 44px; font-size: 15px; }
.mgrid .team .seed { flex-basis: 34px; font-size: 13px; }
.mgrid .mlabel { font-size: 11px; }
.stepnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.stepnav .btn { flex: 1; }

/* ---------- panels ---------- */
.summary { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.summary > div { padding: 14px 16px; border-right: 1px solid var(--line-soft); }
.summary > div:last-child { border-right: 0; }
.summary .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.summary .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary .of { font-size: 14px; color: var(--muted); font-weight: 500; }
.entries { margin-top: 14px; border: 1px solid var(--line-soft); border-radius: 6px; padding: 12px 14px; }
.entries-total { font-size: 14px; margin-bottom: 6px; }
.entries-total b { font-size: 22px; color: var(--blue-ink); margin-right: 2px; }
.entries ul { list-style: none; margin: 0; padding: 0; }
.entries li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.entries li em { font-style: normal; color: var(--muted); }
.entries li b { font-variant-numeric: tabular-nums; }
.vote-perk { margin-top: 8px !important; color: var(--gold-ink) !important; font-weight: 600; }
.summary .champ-v { font-family: var(--serif); font-size: 26px; color: var(--blue-ink); line-height: 1.15; }
.panels { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; margin-bottom: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.panel.feature { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.panel h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.25; }
.panel .lede { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--gold-ink); margin-bottom: 6px; }
.field { display: block; margin-bottom: 10px; }
.field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.field span em { font-weight: 400; color: var(--muted); font-style: normal; }
.field input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; font: inherit; }
.field input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 12px 0 14px; cursor: pointer; }
.check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--blue); flex: 0 0 auto; }
.fine { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.ok { display: flex; gap: 10px; align-items: flex-start; background: var(--blue-tint); border-radius: 6px; padding: 12px 14px; font-size: 14px; }
.ok b { color: var(--blue-ink); }

.toplist { list-style: none; margin: 0; padding: 0; }
.toplist li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.toplist li:last-child { border-bottom: 0; }
.toplist .rank { font-weight: 700; color: var(--muted); font-size: 13px; text-align: center; }
.toplist .nm { font-weight: 600; font-size: 14px; }
.toplist .bar { height: 6px; border-radius: 3px; background: var(--line-soft); margin-top: 5px; overflow: hidden; }
.toplist .bar i { display: block; height: 100%; background: var(--blue); }
.toplist li.me .bar i { background: var(--gold); }
.toplist .pct { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.locked { text-align: center; padding: 18px 8px; color: var(--muted); font-size: 14px; }
.locked .big { font-size: 28px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; margin: 10px auto 6px; max-width: 260px; }
.meter i { display: block; height: 100%; background: var(--gold); }

.share { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: center; }
.share img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }
.share .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.li-btn { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.li-btn:hover { background: #084f96; border-color: #084f96; }
.bonus { font-size: 13px; color: var(--muted); }
.bonus b { color: var(--ink); }
.cta2 { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 26px; }
.cta2 p { margin: 0; font-size: 15px; }
.cta2 p span { color: #c8c8cf; font-size: 13px; display: block; }
.cta2 .btn { background: transparent; border-color: #fff; color: #fff; }
.section-title { font-family: var(--serif); font-size: 26px; margin: 0 0 14px; }

/* ---------- vote tab ---------- */
.vote-intro { text-align: center; max-width: 640px; margin: 0 auto 22px; }
.vote-intro .q { font-family: var(--serif); font-size: clamp(24px, 3.2vw, 32px); font-weight: 700; line-height: 1.15; margin: 6px 0 6px; }
.vote-intro p { color: var(--muted); margin: 0; font-size: 14px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.vcard .vh { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--faint); letter-spacing: .04em; margin-bottom: 8px; }
.vopts { display: grid; grid-template-columns: 1fr; gap: 6px; }
.vopt { display: flex; align-items: center; gap: 10px; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 12px; cursor: pointer; text-align: left; font-weight: 600; }
.vopt .seed { font-size: 12px; color: var(--muted); width: 18px; font-weight: 600; }
.vopt:hover:not([disabled]) { border-color: var(--blue); }
.vopt.sel { border-color: var(--blue); background: var(--blue-tint); color: var(--blue-ink); box-shadow: inset 0 0 0 1px var(--blue); }
.vopt[disabled] { cursor: default; }
.vopt[disabled]:not(.sel) { color: var(--faint); }
.vfoot { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.empty-state { text-align: center; padding: 30px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); margin-bottom: 26px; }
.empty-state b { color: var(--ink); display: block; font-size: 17px; margin-bottom: 4px; }
.results-round { margin-top: 30px; }
.results-round h3 { font-size: 16px; margin: 0 0 2px; }
.results-round .rq { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.rrow { margin-bottom: 6px; }
.rbar { display: flex; height: 30px; border-radius: 5px; overflow: hidden; font-size: 12px; font-weight: 600; }
.rbar > div { display: flex; align-items: center; padding: 0 8px; white-space: nowrap; min-width: 0; overflow: hidden; }
.rbar .wa { background: var(--blue); color: #fff; }
.rbar .lb { background: var(--line-soft); color: var(--muted); justify-content: flex-end; }
.rbar .wa.right { justify-content: flex-end; }

.foot { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.foot a { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .panels { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary > div:nth-child(2) { border-right: 0; }
  .summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 560px) {
  .wrap { padding: 18px 16px 32px; }
  .share { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .summary .champ-v { font-size: 22px; }
  .tab { padding: 10px 10px 11px; }
}
