/* OddsHub, Deltaodds style: dark pitch, gold accent, prices in JetBrains Mono. */
:root {
  --pitch: #080c14;
  --surface: #0f1520;
  --surface-2: #0b1019;
  --hover: #172033;
  --odds: #151d2b;
  --odds-hover: #1e2d42;
  --best: #0f2a1a;
  --best-text: #9fd8b0;
  --gold: #f0b90b;
  --gold-line: rgba(240, 185, 11, 0.3);
  --flash: rgba(240, 185, 11, 0.35);
  --up: #22c55e;
  --down: #ef4444;
  --late: #f59e0b;
  --text: #e0e6ef;
  --soft: #aab6c6;
  --muted: #8090a4;
  --line: #1a2435;
  --fdj: rgba(249, 115, 22, 0.25);
  --m1: #22c55e;
  --m2: #facc15;
  --m3: #fb923c;
  --m4: #f87171;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--pitch); color: var(--text);
  font: 14px/1.4 "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1360px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 8px; padding-bottom: 8px; }
.logo { font-size: 18px; letter-spacing: -0.02em; font-weight: 600; display: flex; }
.logo-odds { color: var(--gold); font-weight: 700; }
.search { flex: 1 1 260px; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--pitch);
  border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; height: 38px; color: var(--muted); }
.search:focus-within { border-color: var(--gold-line); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: inherit; font-size: 16px; }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.link { background: none; border: 0; padding: 4px 6px; color: var(--soft); cursor: pointer; border-radius: 6px; }
.link:hover { color: var(--gold); background: var(--hover); }

/* Books band */
.band { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.band-in { padding-top: 9px; padding-bottom: 9px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 12.5px; }
#books { display: contents; }
.band-title { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11.5px; }
.book { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--up); }
.dot.late { background: var(--late); }
.dot.down { background: var(--down); }
.book b { font-weight: 600; }
.age { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.banner { margin: 0; padding: 10px 16px; background: rgba(245, 158, 11, 0.12); color: #fcd34d; border-bottom: 1px solid rgba(245, 158, 11, 0.3); text-align: center; font-size: 13px; }

main { padding-top: 18px; padding-bottom: 56px; }

/* Login */
.login { max-width: 420px; margin: 9vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px; }
.login h1 { margin: 0 0 6px; font-size: 22px; }
.login p { margin: 0 0 18px; color: var(--soft); }
.login label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.login input { width: 100%; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--pitch); color: var(--text);
  padding: 0 12px; font: 16px var(--mono); }
.login input:focus { border-color: var(--gold-line); outline: none; }
.primary { margin-top: 14px; width: 100%; height: 44px; border-radius: 8px; border: 0; background: var(--gold); color: var(--pitch); font-weight: 700; cursor: pointer; }
.primary:disabled { opacity: 0.6; cursor: progress; }
.error { color: #fca5a5; margin: 12px 0 0; font-size: 13px; min-height: 1.4em; }

/* List */
.title-row { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; border-bottom: 1px solid var(--line); }
.title-row h1 { margin: 0; padding: 8px 0 10px; font-size: 15px; font-weight: 600; color: var(--gold); border-bottom: 2px solid var(--gold); margin-bottom: -1px; }
.title-row h1 span { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 4px; }
.tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 16px 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; }
.chip:hover { background: var(--hover); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--pitch); font-weight: 600; }
.chip.mono { min-width: 54px; }
.note { margin: 0; color: var(--muted); font-size: 13px; }

.board { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) repeat(3, 104px) 168px 64px; align-items: center; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
a.row:hover { background: var(--hover); color: inherit; }
.head { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.row.head > * { padding: 12px 6px; font-family: inherit; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.row.head .c-time { padding-left: 16px; }
.row.head .c-n { padding-right: 16px; }
.day { padding: 9px 16px; background: var(--surface-2); color: var(--soft); font-weight: 600; font-size: 12.5px; border-top: 1px solid var(--line); text-transform: capitalize; }
.c-time { padding: 12px 8px 12px 16px; font-family: var(--mono); font-size: 13px; }
.c-time small { display: block; color: var(--late); font-family: "DM Sans", sans-serif; font-size: 11px; }
.c-match { padding: 10px 8px; min-width: 0; }
.teams { display: block; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odds { display: contents; }
.cell { padding: 7px 6px; text-align: center; }
.price { display: inline-flex; flex-direction: column; align-items: center; min-width: 82px; padding: 5px 8px; border-radius: 6px; background: var(--odds); position: relative; transition: background-color 0.6s; }
.price.best { background: var(--best); }
.price .v { font-family: var(--mono); font-weight: 600; font-size: 14px; color: #fff; font-variant-numeric: tabular-nums; }
.price .s { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.price.best .s { color: var(--best-text); }
.price.empty .v { color: var(--muted); }
.price.flash { background: var(--flash); transition: none; }
.price .mv { position: absolute; top: 1px; right: 5px; font-size: 9px; }
.mv.up { color: var(--up); }
.mv.down { color: var(--down); }
.c-fair { padding: 8px 12px; text-align: center; font-family: var(--mono); font-size: 13px; color: var(--soft); white-space: nowrap; }
.c-n { padding: 8px 16px 8px 4px; text-align: right; color: var(--soft); font-size: 13px; white-space: nowrap; }
.foot { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; }
.empty-state { padding: 40px 16px; text-align: center; color: var(--muted); }

/* Match */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.card { margin-top: 12px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
.card h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.card p { margin: 4px 0 0; color: var(--soft); font-size: 13.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--hover); }
.tag.gold { background: none; border: 1px solid var(--gold-line); color: var(--gold); }
.tabs { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 4px 22px; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 0; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.lines { margin: 14px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lines .label { color: var(--muted); font-size: 12.5px; margin-right: 4px; }
.more { margin-left: 4px; }
.grid { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table.books { width: 100%; border-collapse: collapse; }
table.books th, table.books td { border-top: 1px solid var(--line); }
table.books thead th { border-top: 0; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; padding: 12px 6px; text-align: center; }
table.books thead th:first-child { text-align: left; padding-left: 16px; }
table.books th[scope="row"] { text-align: left; padding: 10px 8px 10px 16px; font-weight: 600; white-space: nowrap; }
.bk { display: inline-flex; align-items: center; gap: 10px; }
.bk-tag { width: 32px; height: 22px; border-radius: 5px; background: var(--hover); border: 1px solid var(--line); color: var(--soft); font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.bk-note { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.bk-note.late { color: var(--late); }
.bk-note.down { color: var(--down); }
tr.fair th, tr.fair td { background: var(--surface-2); }
tr.fair .fv { font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--gold); }
td.p { padding: 6px; text-align: center; }
td.p .price { min-width: 92px; padding: 6px 10px; }
tr.fdj .price { box-shadow: inset 0 0 0 1px var(--fdj); }
tr.off td, tr.off th { opacity: 0.55; }
td.mg, td.ag { padding: 8px 12px; text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
td.ag { padding-right: 16px; color: var(--muted); font-size: 12.5px; }
.m1 { color: var(--m1); } .m2 { color: var(--m2); } .m3 { color: var(--m3); } .m4 { color: var(--m4); }
.legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 12.5px; align-items: center; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.sw.best { background: var(--best); } .sw.flash { background: var(--flash); }

/* Tablet: no fair column in the list */
@media (max-width: 960px) {
  .row { grid-template-columns: 58px minmax(0, 1fr) repeat(3, 92px) 52px; }
  .c-fair { display: none; }
  .price { min-width: 74px; }
}
/* Phone: each match on two lines, the three best prices under the teams */
@media (max-width: 640px) {
  .top-in { gap: 8px 12px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .who { font-size: 12px; }
  .head { display: none; }
  .row { grid-template-columns: 50px minmax(0, 1fr) auto; grid-template-areas: "time match n" "odds odds odds"; padding-bottom: 8px; }
  .c-time { grid-area: time; padding: 10px 4px 4px 12px; font-size: 12.5px; }
  .c-match { grid-area: match; padding: 10px 4px 4px; }
  .c-n { grid-area: n; padding: 10px 12px 4px 4px; font-size: 12px; }
  .odds { grid-area: odds; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px; }
  .odds .cell { padding: 0; }
  .price { display: flex; min-width: 0; width: 100%; }
  .price .v { font-size: 14px; }
  .price .s { font-size: 11px; }
  .price .k { display: inline; }
  .card { padding: 14px; }
  .card h1 { font-size: 19px; }
  td.ag, th.ag { display: none; }
  table.books th[scope="row"] { padding-left: 10px; }
  td.p { padding: 5px 3px; }
  td.p .price { min-width: 60px; padding: 5px 4px; }
  td.p .price .v { font-size: 13.5px; }
  .bk-tag { display: none; }
  table.books th[scope="row"] { white-space: normal; padding-right: 4px; font-size: 13px; }
  table.books thead th { font-size: 10.5px; letter-spacing: 0.03em; padding: 10px 3px; }
  td.mg { padding: 8px 10px 8px 4px; font-size: 12px; }
  .lines .chip.mono { min-width: 46px; padding: 0 10px; }
}
.k { display: none; color: var(--muted); font-size: 10.5px; margin-right: 3px; }
@media (prefers-reduced-motion: reduce) { .price { transition: none; } }
