/* front page + connect page — same permanent dark palette as the app (public/app.html) */
:root { color-scheme: dark; --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --line: #383835; --border: rgba(255,255,255,.10); --accent: #3987e5; --good: #0ca30c; --chip-good: #199e70; --bad: #e66767; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }

/* top bar: name · username search · add your teams */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 10px 24px; background: var(--page); border-bottom: 1px solid var(--grid); }
.bar .brand { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: var(--ink); text-decoration: none; }
.bar .spacer { flex: 1; }
.btn { display: inline-block; background: none; border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 600; padding: 7px 12px; border-radius: 8px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.find { position: relative; flex: 0 1 320px; min-width: 0; }
.find input { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.find input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hits { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.hits button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; background: none; border: none; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.hits button:hover, .hits button:focus { background: #262624; }
.hits button span { color: var(--muted); font-size: 13px; }
.hits .none { padding: 9px 12px; color: var(--muted); font-size: 13px; }

/* leaderboard filters: tournament · username · player */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters select { flex: 0 1 300px; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.filters .find { flex: 1 1 200px; max-width: 320px; }
.active { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-weight: 600; }
.tag i { color: var(--muted); font-style: normal; font-weight: 400; }
.tag button { background: none; border: none; color: var(--muted); font: inherit; cursor: pointer; padding: 0 6px; }
.tag button:hover { color: var(--ink); }
.sub { font-size: 13px; }
.pos { font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 4px; color: #fff; }
.pos.QB { background: #e03a3a; } .pos.RB { background: #1f9d4f; } .pos.WR { background: #f2c200; color: #1a1a19; } .pos.TE { background: #3987e5; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.card .k { color: var(--muted); font-size: 12px; }
.card .v { font-size: 22px; font-weight: 700; line-height: 1.3; }
.card .d { color: var(--ink-2); font-size: 12.5px; }
.ulink { background: none; border: none; padding: 0; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.ulink:hover { color: var(--accent); text-decoration: underline; }
.more { text-align: center; padding-top: 12px; }
.teamframe { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 100; background: transparent; color-scheme: dark; }

main { max-width: 1240px; margin: 0 auto; padding: 18px 24px 40px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.head h1 { font-size: 15px; margin: 0; }
.head .note { color: var(--muted); font-size: 12.5px; }
.head .spacer { flex: 1; }
.pills { display: flex; gap: 6px; }
.pill { background: none; border: 1px solid var(--line); color: var(--ink-2); font: inherit; font-weight: 600; font-size: 13px; padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.live { color: var(--good); }
.live .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 5px; vertical-align: middle; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.scroll-x { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
td.contest { white-space: normal; color: var(--ink-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #222220; }
td.user a { color: var(--ink); font-weight: 600; text-decoration: none; }
td.rk { color: var(--muted); width: 1%; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 4px; margin-left: 6px; background: rgba(25,158,112,.16); color: #35c596; }
.empty { color: var(--muted); padding: 22px 10px; text-align: center; }

/* connect page */
.narrow { max-width: 760px; }
.lead { color: var(--ink-2); font-size: 16px; margin: 6px 0 18px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin: 12px 0; }
.step h2 { font-size: 15px; margin: 0 0 6px; }
.step p { margin: 0; color: var(--ink-2); }
.step p + p { margin-top: 10px; }
.step .num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; margin-right: 8px; text-align: center; }
.muted { color: var(--muted); font-size: 13px; }
footer { color: var(--muted); font-size: 12px; margin-top: 24px; }

@media (max-width: 640px) {
  .bar { padding: 8px 12px; gap: 8px; }
  .bar .btn { padding: 7px 9px; font-size: 13px; }
  main { padding: 12px 12px 32px; }
  .panel { padding: 10px 8px; }
  .col-buyin { display: none; }
  .filters select, .filters .find { flex: 1 1 100%; max-width: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card .v { font-size: 19px; }
  .chip { display: block; margin: 2px 0 0; width: max-content; }
  td, th { padding: 8px 6px; }
  td.contest { font-size: 12.5px; }
}
