/* OddsLap design system
   One idea: every match is a three-part probability strip (home / draw / away).
   Light, data-journalism tone; the colour is reserved for the outcomes. */

:root {
  --paper: #f3f5f2;
  --surface: #ffffff;
  --ink: #15211c;
  --ink-2: #3f4b45;
  --muted: #66726c;
  --rule: #dce1db;
  --rule-strong: #b7bfb8;
  --home: #1e6b4a;
  --draw: #b9c0ba;
  --away: #2c4ba0;
  --home-tint: #e3efe8;
  --away-tint: #e5e9f6;
  --neg: #a83a2b;
  --hint-bg: #fff6dc;
  --hint-rule: #d9a93b;
  --radius: 6px;
  --font: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.7 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--home); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--away); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(243, 245, 242, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; flex: none; }
.logo svg { display: block; }
.site-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-right: -20px; padding-right: 20px; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { flex: none; padding: 6px 10px; color: var(--ink-2); text-decoration: none; font-size: 15px; border-radius: var(--radius); white-space: nowrap; }
.site-nav a:hover { background: #e7ebe6; color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--home); border-radius: 0; }

/* ---------- Page heading ---------- */
main { display: block; }
.page-head { padding: 44px 0 24px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 42px); font-weight: 700; letter-spacing: -0.025em; }
.lead { margin-top: 12px; color: var(--ink-2); font-size: 18px; max-width: 40em; }
.meta { color: var(--muted); font-size: 14px; }

/* ---------- Probability strip (the signature element) ---------- */
.strip { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--rule); }
.strip span { display: block; height: 100%; transform-origin: left center; }
.strip .h { background: var(--home); }
.strip .d { background: var(--draw); }
.strip .a { background: var(--away); }
.strip span + span { box-shadow: -2px 0 0 var(--surface); }
.strip-labels { display: flex; margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.strip-labels span { min-width: 0; white-space: nowrap; }
.strip-labels .d { text-align: center; }
.strip-labels .a { text-align: right; }
.strip-labels .top { color: var(--ink); font-weight: 700; }
.strip-labels small { color: var(--muted); font-size: 12px; margin-left: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .board.is-new .strip span { animation: grow .7s cubic-bezier(.2, .7, .2, 1) both; }
  .board.is-new .strip .d { animation-delay: .08s; }
  .board.is-new .strip .a { animation-delay: .16s; }
}
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Match board (home) ---------- */
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.board-head h2 { font-size: 21px; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.board { margin: 0 0 8px; padding: 0; list-style: none; }
.day { font-size: 14px; font-weight: 600; color: var(--muted); padding: 22px 0 6px; }
.match {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}
a.match:hover { background: linear-gradient(90deg, transparent, #e9ede8 8%, #e9ede8 92%, transparent); }
a.match:hover .go { color: var(--ink); border-color: var(--ink); }
.match time { font-size: 15px; color: var(--ink-2); }
.teams { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 18px; font-weight: 600; }
.teams span:last-child { text-align: right; }
.match .extra { margin-top: 4px; font-size: 13px; color: var(--muted); }
.go { font-size: 14px; color: var(--ink-2); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 6px 12px; white-space: nowrap; background: var(--surface); }
.match.started { opacity: .55; }
.board-note { padding: 14px 0 0; font-size: 14px; color: var(--muted); }
.board-empty { padding: 28px 0; color: var(--ink-2); }
.skeleton .ske { display: block; width: 100%; border-radius: 3px; background: linear-gradient(90deg, #e3e7e2, #eef1ed, #e3e7e2); background-size: 200% 100%; }
.skeleton .teams .ske { width: 60%; }
.skeleton .go { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) { .skeleton .ske { animation: shimmer 1.4s linear infinite; } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Home: below the board ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding: 48px 0 24px; }
.home-grid h2 { font-size: 21px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.tool-list, .post-list { list-style: none; margin: 0; padding: 0; }
.tool-list a, .post-list a { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.tool-list a:hover strong, .post-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.tool-list strong, .post-list strong { display: block; font-size: 17px; font-weight: 600; }
.tool-list span, .post-list span { display: block; margin-top: 2px; font-size: 15px; color: var(--ink-2); }
.post-list .cat { display: inline; margin: 0 8px 0 0; font-size: 13px; color: var(--home); font-weight: 600; }
.post-list time { font-size: 13px; color: var(--muted); }
.more { display: inline-block; margin-top: 14px; font-size: 15px; }
.record { margin: 24px 0 56px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.record p { color: var(--ink-2); max-width: 36em; }
.record strong { color: var(--ink); }
.record nav { display: flex; gap: 10px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #24342d; }
.btn:disabled { opacity: .5; cursor: progress; }
label { display: block; font-size: 14px; color: var(--ink-2); font-weight: 500; }
input, select { display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 16px/1.3 var(--font); font-variant-numeric: tabular-nums; }
input:focus, select:focus { outline: 2px solid var(--away); outline-offset: 0; border-color: var(--away); }
select:disabled { background: #eef1ed; color: var(--ink-2); }
input.needs-input { border-color: var(--hint-rule); background: var(--hint-bg); }

/* ---------- Sections, tool boxes, tables ---------- */
.section { padding: 32px 0; border-top: 1px solid var(--rule); }
.section > h2, .section-title { font-size: 22px; margin-bottom: 6px; }
.section > p.muted { margin-bottom: 18px; }
.tool-box { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; align-items: end; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.muted { color: var(--muted); font-size: 15px; }
.fineprint { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.status { margin: 10px 0 18px; color: var(--muted); font-size: 14px; }
.table-scroll { overflow-x: auto; margin-top: 12px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { text-align: left; font-weight: 600; padding: 0 0 10px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; }
.lambda-hint { margin-top: 14px; padding: 12px 14px; background: var(--hint-bg); border-left: 3px solid var(--hint-rule); font-size: 14px; color: #5c4513; border-radius: 0 var(--radius) var(--radius) 0; }

/* Match analysis view */
.view-head { padding: 36px 0 20px; }
.view-head h1 { font-size: clamp(28px, 4vw, 38px); }
.fixture-strip { margin-top: 18px; max-width: 640px; }
.quote-switch { display: inline-flex; margin: 12px 0; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.quote-switch button { border: 0; background: none; padding: 9px 16px; font: 500 15px/1 var(--font); color: var(--ink-2); cursor: pointer; }
.quote-switch button + button { border-left: 1px solid var(--rule-strong); }
.quote-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.quote-filters { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 12px; }
.quote-filters label { min-width: 180px; }
.quote-status { color: var(--muted); font-size: 14px; margin: 6px 0; }
.quote-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }
.quote-summary > div { padding: 12px 14px; background: var(--paper); border-radius: var(--radius); }
.quote-summary dt { font-size: 13px; color: var(--muted); }
.quote-summary dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.quote-summary small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); }

/* De-vig calculator results + model page results */
.calc-results, .results { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 18px; }
.result-card, .result { padding: 14px 16px; background: var(--paper); border-radius: var(--radius); }
.result-card span, .result strong { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.result-card strong, .result .value { display: block; margin-top: 4px; font-size: 24px; font-weight: 700; color: var(--ink); }
.result small { color: var(--ink-2); font-size: 13px; }
.result.is-home .value { color: var(--home); }
.result.is-away .value { color: var(--away); }
dl.defs { display: grid; gap: 14px; margin: 18px 0 0; }
dl.defs dt { font-weight: 600; }
dl.defs dd { margin: 2px 0 0; color: var(--ink-2); }

/* ---------- Articles ---------- */
.article { max-width: 720px; padding: 36px 0 64px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--ink-2); }
.article h1 { margin-top: 18px; font-size: clamp(28px, 4.2vw, 40px); letter-spacing: -0.02em; }
.article .lead { font-size: 19px; }
.article .byline { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.article .byline .cat { color: var(--home); font-weight: 600; text-decoration: none; }
.article-cover { margin: 28px 0 8px; border-radius: 8px; aspect-ratio: 16 / 7; object-fit: cover; width: 100%; }
.article-toc { margin: 28px 0 8px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; font-size: 15px; }
.article-toc strong { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.article-toc ol { margin: 0; padding-left: 20px; }
.article-toc li { padding: 2px 0; }
.article-toc .toc-sub { margin-left: 16px; font-size: 14px; }
.article-toc a { color: var(--ink-2); text-decoration: none; }
.article-toc a:hover { color: var(--home); text-decoration: underline; }
.article-body { margin-top: 28px; font-size: 18px; line-height: 1.9; overflow-wrap: anywhere; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { margin-top: 2.2em; font-size: 26px; scroll-margin-top: 80px; }
.article-body h3 { margin-top: 1.8em; font-size: 21px; scroll-margin-top: 80px; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li + li { margin-top: .4em; }
.article-body blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--home); color: var(--ink-2); }
.article-body code { font-size: .88em; background: #e7ebe6; padding: 1px 5px; border-radius: 4px; }
.article-body pre { overflow-x: auto; background: var(--ink); color: #e9efe9; padding: 16px; border-radius: 8px; font-size: 14px; line-height: 1.6; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body table { display: block; overflow-x: auto; font-size: 15px; line-height: 1.6; }
.article-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.article-tools { margin-top: 40px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
.article-tools h2 { font-size: 17px; }
.article-tools p { margin-top: 4px; color: var(--ink-2); font-size: 15px; }
.article-tools nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.related { margin-top: 48px; }
.related h2 { font-size: 21px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.disclaimer { margin-top: 40px; font-size: 13px; color: var(--muted); }

/* Article index */
.index-group { padding-top: 12px; }
.index-group h2 { font-size: 19px; margin-top: 28px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }

/* ---------- Simple content pages ---------- */
.prose { max-width: 680px; padding-bottom: 56px; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.8em; font-size: 21px; }
.card-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.card-list > li, .preview { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 20px 22px; }
.preview h2 { font-size: 21px; margin: 4px 0 6px; }
.preview .pick { margin-top: 10px; font-weight: 700; }
.preview .label { font-size: 13px; color: var(--muted); }
.res-win { color: var(--home); font-weight: 700; }
.res-loss { color: var(--neg); }
.res-push { color: var(--muted); }
.tally { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 4px 0 24px; }
.tally div { font-size: 14px; color: var(--muted); }
.tally strong { display: block; font-size: 28px; color: var(--ink); line-height: 1.2; }

/* 404 */
.notfound { padding: 72px 0 96px; max-width: 620px; }
.notfound .strip { max-width: 360px; margin-bottom: 28px; }
.notfound h1 { font-size: clamp(30px, 5vw, 44px); }
.notfound nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.site-footer p { max-width: 38em; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Single-page views on the home page ---------- */
.view { display: none; }
.view.active { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-header .wrap { gap: 14px; height: 56px; }
  .logo span { display: none; }
  .page-head { padding: 28px 0 16px; }
  .lead { font-size: 16px; }
  .match { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 0; }
  .match time { grid-column: 1 / -1; font-size: 13px; }
  .teams { font-size: 16px; }
  .go { padding: 6px 10px; }
  .home-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 36px; }
  .tool-box { padding: 18px; }
  .record { padding: 18px; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 22px; }
}
@media (max-width: 380px) {
  .site-nav a { padding: 6px 7px; font-size: 14px; }
}

/* Market vs model strips in the analysis view */
.fixture-strips { display: grid; gap: 14px; margin: 18px 0 6px; max-width: 720px; }
.fixture-strip-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; }
.strip-name { font-size: 14px; font-weight: 600; color: var(--ink-2); padding-top: 0; line-height: 12px; }
.post-list em.cat { font-style: normal; color: var(--home); font-weight: 600; font-size: 13px; margin-right: 10px; }
.post-list span + span { margin-top: 4px; }
.match .extra span + span { margin-left: 14px; }
@media (max-width: 760px) { .match .go { display: none; } .match { grid-template-columns: minmax(0, 1fr); } }
#totalResults h3{font-size:16px;margin-top:20px}#totalResults .results{margin-top:10px}.share-label{margin-top:14px;font-weight:600;color:var(--home)}
body{min-height:100vh;display:flex;flex-direction:column}body>main{flex:1 0 auto;width:100%}
#records { min-width: 600px; }
#records td:first-child { white-space: nowrap; }
@media (max-width: 760px) { .form-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }

/* Account link in the header */
.account-link { margin-left: auto; flex: none; padding: 6px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap; background: var(--surface); }
.account-link:hover { border-color: var(--ink); }
.account-link.signed-in { border-color: transparent; background: var(--home-tint); color: var(--home); max-width: 10em; overflow: hidden; text-overflow: ellipsis; }
.site-nav { margin-right: 0; padding-right: 0; }
@media (max-width: 760px) { .account-link { padding: 5px 10px; font-size: 14px; } }

/* Auth pages */
.auth { max-width: 420px; padding: 48px 0 72px; }
.auth h1 { font-size: clamp(28px, 4vw, 36px); }
.auth .lead { font-size: 16px; }
.auth form { margin-top: 24px; display: grid; gap: 16px; }
.auth .btn { width: 100%; }
.auth .switch { margin-top: 20px; font-size: 15px; color: var(--ink-2); }
.form-error { padding: 10px 12px; border-radius: var(--radius); background: #fbeae7; color: var(--neg); font-size: 14px; }
.form-ok { padding: 10px 12px; border-radius: var(--radius); background: var(--home-tint); color: var(--home); font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--ink-2); }
.check input { width: 18px; min-height: 18px; height: 18px; margin: 3px 0 0; flex: none; }
.account-grid { display: grid; gap: 20px; max-width: 560px; padding-bottom: 64px; }
.account-grid h2 { font-size: 19px; margin-bottom: 12px; }
.account-grid form { display: grid; gap: 14px; }
.danger { color: var(--neg); border-color: #e3b7b0; }
.danger:hover { border-color: var(--neg); }

/* Match pages */
.match-hero { margin-top: 24px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
.match-hero .teams { font-size: 20px; }
.match-hero .strip { height: 16px; }
.match-hero .strip-labels { font-size: 15px; }
.match-result { margin-top: 14px; font-size: 17px; }
.match-result strong { font-size: 22px; }

/* Match simulator */
.sim { margin-top: 28px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
.sim h2 { font-size: 21px; }
.sim-intro { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.sim-board { margin-top: 18px; padding: 18px; background: var(--paper); border-radius: var(--radius); }
.sim-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; }
.sim-score span:last-child { text-align: right; }
.sim-score strong { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: 0.02em; }
.sim-clock { height: 6px; margin-top: 14px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.sim-clock div { width: 0; height: 100%; background: var(--home); }
.sim-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--muted); }
.sim-events { list-style: none; margin: 12px 0 0; padding: 0; min-height: 48px; font-size: 15px; color: var(--ink-2); }
.sim-events li + li { margin-top: 4px; }
.sim-events .goal-h { color: var(--home); font-weight: 600; }
.sim-events .goal-a { color: var(--away); font-weight: 600; }
.sim-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.sim-bars { margin-top: 18px; display: grid; gap: 12px; }
.sim-bar-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.sim-bar-label small { color: var(--muted); font-size: 13px; }
.sim-bar { position: relative; height: 12px; margin-top: 5px; background: var(--rule); border-radius: 3px; }
.sim-bar i { display: block; height: 100%; border-radius: 3px; }
.sim-bar b { position: absolute; top: -4px; width: 2px; height: 20px; background: var(--ink); }
.sim-note { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 760px) { .sim { padding: 18px; } .sim-score strong { font-size: 32px; } .sim-score { font-size: 15px; } }
@media (max-width: 420px) {
  .site-header .wrap { gap: 10px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 6px 8px; font-size: 14px; }
  .account-link { padding: 5px 9px; }
}
@media (max-width: 370px) {
  .site-header .wrap { padding: 0 14px; gap: 8px; }
  .site-nav a { padding: 6px 6px; }
  .account-link { padding: 4px 8px; font-size: 13px; }
}
.card-preview { margin-top: 18px; }
.card-preview img { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--rule); }
.tg-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0; padding: 16px 18px; border: 1px solid var(--rule); border-left: 4px solid var(--away); border-radius: 8px; background: #fff; }
.tg-callout p { margin: 0; }
.tg-callout strong { display: block; margin-bottom: 2px; }
.tg-callout .btn { flex: none; }
@media (max-width: 560px) { .tg-callout { flex-direction: column; align-items: flex-start; } }
.settled { margin: 8px 0 0; }

/* Pro page */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pro-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: center; padding: 48px 0 32px; }
.pro-hero h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 700; letter-spacing: -0.03em; margin: 0 0 14px; }
.pro-lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 0 12px; max-width: 32em; }
.pro-status { color: var(--muted); margin: 0 0 22px; max-width: 32em; line-height: 1.6; }
.pro-chart { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 18px 14px; }
.pro-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.pro-chart .axis { stroke: var(--rule-strong); }
.pro-chart .grid { stroke: var(--rule); stroke-dasharray: 3 4; }
.pro-chart .tick { font-size: 11px; fill: var(--muted); }
.pro-chart .line-home, .pro-chart .line-away { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pro-chart .line-home { stroke: var(--home); }
.pro-chart .line-away { stroke: var(--away); }
.pro-chart .dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.pro-chart .note { font-size: 11px; fill: var(--ink); }
.pro-chart .lab-home { font-size: 12px; font-weight: 600; fill: var(--home); }
.pro-chart .lab-away { font-size: 12px; font-weight: 600; fill: var(--away); }
.pro-chart figcaption { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.pro-section { padding: 28px 0; border-top: 1px solid var(--rule); }
.pro-section h2 { font-size: 22px; margin: 0 0 16px; }
.pro-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; font-size: 15px; }
.pro-table th, .pro-table td { padding: 12px 14px; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; }
.pro-table thead th { background: #eef1ed; font-weight: 600; font-size: 14px; }
.pro-table td { width: 72px; text-align: center; color: var(--ink-2); }
.pro-table td:last-child { color: var(--home); font-weight: 600; }
.pro-table tbody tr:last-child > * { border-bottom: 0; }
.pro-join fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.pro-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 620px; }
.pro-plan { position: relative; display: grid; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 8px; cursor: pointer; }
.pro-plan input { position: absolute; top: 18px; right: 18px; accent-color: var(--home); width: 18px; height: 18px; }
.pro-plan:has(input:checked) { border-color: var(--home); box-shadow: inset 0 0 0 1px var(--home); background: var(--home-tint); }
.pro-plan:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.plan-name { font-weight: 600; }
.plan-price { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.plan-price small { font-size: 15px; font-weight: 400; color: var(--muted); }
.plan-note { font-size: 13px; color: var(--muted); }
.pro-wants legend { margin-bottom: 10px; color: var(--ink-2); line-height: 1.6; }
.pro-wants label { display: inline-flex; align-items: center; gap: 8px; margin: 0 18px 10px 0; cursor: pointer; }
.pro-wants input { accent-color: var(--home); width: 16px; height: 16px; }
.pro-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pro-msg { min-height: 1.5em; margin: 12px 0 0; color: var(--home); font-weight: 600; }
.pro-msg.error { color: var(--neg); }
.pro-faq h3 { font-size: 16px; margin: 20px 0 6px; }
.pro-faq p { margin: 0; color: var(--ink-2); line-height: 1.7; max-width: 40em; }
@media (max-width: 760px) {
  .pro-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .pro-plans { grid-template-columns: 1fr; }
}
.confidence { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

/* Match result, probability movement, team pages */
.match-result.final { margin-top: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--ink); border-radius: 8px; font-size: 15px; }
.match-result.final p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.match-result.final .score { margin-bottom: 4px; font-size: 17px; color: var(--ink); }
.team-links { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.movement { margin-top: 32px; }
.movement h2 { font-size: 21px; margin: 0 0 8px; }
.movement > p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.7; }
.move-chart { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 14px 10px; }
.move-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.move-chart .g { stroke: var(--rule); }
.move-chart .t { font-size: 11px; fill: var(--muted); }
.move-chart polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.move-chart polyline.h { stroke: var(--home); }
.move-chart polyline.d { stroke: #8d968f; stroke-dasharray: 4 4; }
.move-chart polyline.a { stroke: var(--away); }
.move-chart .l { font-size: 12px; font-weight: 600; }
.move-chart .l.h { fill: var(--home); } .move-chart .l.d { fill: var(--muted); } .move-chart .l.a { fill: var(--away); }
.move-chart figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.team-next { margin: 20px 0 8px; }
.team-next .label { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.team-next-card { display: block; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; color: inherit; text-decoration: none; }
.team-next-card:hover { border-color: var(--ink); }
.team-next-card .teams { display: flex; justify-content: space-between; font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.team-grid { display: flex; flex-wrap: wrap; gap: 8px 10px; padding-top: 14px; }
.team-grid a { padding: 6px 12px; border: 1px solid var(--rule-strong); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 14px; background: var(--surface); }
.team-grid a:hover { border-color: var(--ink); }
td.res-win { color: var(--home); font-weight: 600; } td.res-loss { color: var(--neg); font-weight: 600; } td.res-draw { color: var(--muted); font-weight: 600; }
@media (max-width: 560px) { .move-chart .t { font-size: 19px; } .move-chart .l { font-size: 21px; } .move-chart polyline { stroke-width: 4; } }

/* Prediction challenge */
.ch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.ch-rule { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--home); border-radius: 8px; padding: 12px 16px; margin-bottom: 24px; }
.ch-rule p { margin: 0; color: var(--ink-2); line-height: 1.7; font-size: 15px; }
.ch-picks h2, .ch-side h2 { font-size: 20px; margin: 0 0 12px; }
.ch-login { margin: 0 0 12px; padding: 10px 14px; background: var(--hint-bg); border: 1px solid var(--hint-rule); border-radius: 6px; }
.ch-list { list-style: none; margin: 0; padding: 0; }
.ch-match { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.ch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.ch-head a { font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none; }
.ch-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ch-head time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ch-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ch-btn { display: grid; gap: 2px; padding: 10px 8px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; text-align: center; cursor: pointer; }
.ch-btn .n { font-weight: 600; font-size: 15px; }
.ch-btn .p { font-size: 12px; color: var(--muted); }
.ch-btn:hover { border-color: var(--ink); }
.ch-btn[aria-pressed="true"].h { background: var(--home); border-color: var(--home); color: #fff; }
.ch-btn[aria-pressed="true"].d { background: #5f6963; border-color: #5f6963; color: #fff; }
.ch-btn[aria-pressed="true"].a { background: var(--away); border-color: var(--away); color: #fff; }
.ch-btn[aria-pressed="true"] .p { color: rgba(255,255,255,.85); }
.ch-status { min-height: 1.3em; margin: 6px 0 0; font-size: 13px; color: var(--home); }
.ch-status.error { color: var(--neg); }
.ch-side { display: grid; gap: 16px; position: sticky; top: 76px; }
.ch-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.ch-stats div { background: var(--paper); border-radius: 6px; padding: 10px; text-align: center; }
.ch-stats dt { font-size: 12px; color: var(--muted); }
.ch-stats dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; }
.ch-recent { list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; }
.ch-recent li { padding: 8px 0; border-top: 1px solid var(--rule); display: grid; gap: 2px; }
.ch-recent a { color: var(--ink); font-weight: 600; text-decoration: none; }
.ch-recent span { color: var(--muted); } .ch-recent span.ok { color: var(--home); }
.ch-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.ch-tabs button { flex: 1; padding: 7px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 14px; cursor: pointer; }
.ch-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ch-board { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.ch-board li { display: grid; grid-template-columns: 28px 1fr auto 44px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.ch-board li.muted { display: block; color: var(--muted); border: 0; }
.ch-board .rk { font-weight: 700; color: var(--muted); } .ch-board li:nth-child(-n+3) .rk { color: var(--home); }
.ch-board .sc { font-weight: 600; } .ch-board .ct { color: var(--muted); text-align: right; font-size: 13px; }
.ch-cta { margin: 14px 0 0; font-size: 15px; }
@media (max-width: 860px) { .ch-layout { grid-template-columns: 1fr; } .ch-side { position: static; } }
@media (max-width: 420px) { .ch-btn .p { font-size: 11px; } .ch-head { flex-direction: column; gap: 2px; } }
.site-nav a[data-nav="challenge"] { color: var(--home); font-weight: 600; }
@media (max-width: 480px) { .logo span { display: none; } .site-header .wrap { gap: 8px; } .site-nav a { padding: 6px 7px; } }
@media (max-width: 345px) { .site-nav a { padding: 6px 4px; font-size: 13px; } .account-link { padding: 4px 6px; } }
@media (max-width: 420px) { .site-nav a { padding: 6px 5px; } }
@media (max-width: 345px) { .site-nav a { padding: 6px 3px; font-size: 13px; } .site-header .wrap { padding: 0 10px; } }
@media (max-width: 400px) { .site-header .wrap { padding-left: 14px; padding-right: 14px; } }
@media (max-width: 345px) { .site-header .wrap { padding-left: 10px; padding-right: 10px; } }
@media (max-width: 420px) { .account-link { max-width: 4.6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; } }
@media (max-width: 420px) { .site-nav a { padding: 6px 4px; } .account-link { max-width: 4.2em; } }
@media (max-width: 345px) { .site-nav a { padding: 6px 3px; } }
@media (max-width: 345px) { .account-link { max-width: 3.7em; } }

/* Daily check-in */
.checkin-box h2 { font-size: 20px; margin: 0 0 10px; }
.ci-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ci-streak { margin: 0; color: var(--ink-2); }
.ci-streak strong { font-size: 34px; color: var(--home); margin-right: 2px; }
.ci-bar { height: 8px; background: var(--rule); border-radius: 4px; margin: 12px 0 6px; overflow: hidden; }
.ci-bar i { display: block; height: 100%; background: var(--home); border-radius: 4px; }
.ci-next { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.ci-steps { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; }
.ci-steps li { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--rule); color: var(--muted); }
.ci-steps li .d { width: 4.4em; flex: none; font-weight: 600; white-space: nowrap; }
.ci-steps li.done { color: var(--home); }
.ci-steps li.done .d::before { content: "✓ "; }
.ci-pro { margin: 8px 0; padding: 8px 10px; background: var(--home-tint); border-radius: 6px; color: var(--home); font-weight: 600; font-size: 14px; }
.ci-note { margin: 8px 0 0; color: var(--home); font-weight: 600; font-size: 14px; }
.ch-board .badge, .badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--home-tint); color: var(--home); font-size: 11px; font-style: normal; font-weight: 600; vertical-align: 1px; }
.upset-pick { border-left: 4px solid #b5651d; }
.upset-pick .record-label { color: #b5651d; }
.captcha { margin: 4px 0 14px; display: grid; gap: 6px; min-height: 65px; }
.code-field { display: grid; gap: 6px; margin-bottom: 14px; }
.code-field > label { font-weight: 600; font-size: 14px; }
.code-row { display: flex; gap: 8px; }
.auth .code-row { min-width: 0; display: flex; gap: 8px; align-items: stretch; }
.auth .code-row input { flex: 1 1 0; width: 0; min-width: 0; margin-top: 0; letter-spacing: 3px; }
.auth .code-row .btn { flex: 0 0 auto; width: auto; min-width: 120px; white-space: nowrap; }
.way-pick { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.way-pick legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.result .res-win { color: var(--home); }
.result .res-loss { color: var(--neg); }
.result .res-push { color: var(--muted); }
#settleTable caption { text-align: left; font-weight: 600; padding-bottom: 8px; }
.method-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 12px 0 8px; }
.method-stats div { font-size: 14px; color: var(--muted); }
.method-stats strong { display: block; font-size: 26px; color: var(--ink); line-height: 1.2; }
.tool-tabs { display: flex; gap: 6px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-bottom: 1px solid var(--rule); }
.tool-tabs::-webkit-scrollbar { display: none; }
.tool-tabs a, .tool-tabs button { flex: none; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--ink-2); font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.tool-tabs a:hover, .tool-tabs button:hover { color: var(--ink); }
.tool-tabs [aria-current="page"], .tool-tabs [aria-selected="true"] { color: var(--home); border-bottom-color: var(--home); }
.tool-tabs button:focus-visible, .tool-tabs a:focus-visible { outline: 2px solid var(--away); outline-offset: -2px; }
.panel-lead { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.pz-h { font-size: 16px; margin: 22px 0 0; }
.pz-cap { grid-column: 1 / -1; margin: 0; }
#fitRow { margin-top: 16px; }
@media (max-width: 560px) {
  .tool-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-bottom: 0; overflow: visible; }
  .tool-tabs a, .tool-tabs button { margin: 0; padding: 10px 8px; text-align: center; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
  .tool-tabs [aria-current="page"], .tool-tabs [aria-selected="true"] { border-color: var(--home); background: var(--home-tint); }
  :is(#convForm, #marginForm, #settleForm, #pzForm, #calculate) .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  :is(#convForm, #marginForm, #settleForm, #pzForm, #calculate, #asianResults, #totalResults) .results,
  :is(#asianResults, #convResults, #marginResults, #settleResults, #results) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  :is(#convForm, #marginForm, #settleForm, #pzForm, #calculate) .result, #asianResults .result, #totalResults .result { padding: 10px 12px; }
  :is(#convForm, #marginForm, #settleForm, #pzForm, #calculate) .result .value, #asianResults .result .value, #totalResults .result .value { font-size: 19px; }
}
.results > p { grid-column: 1 / -1; margin: 0; }
