/* TrueScoreLine — hoja de estilos */
/* Tipografías OFL-1.1 (Fontsource), alojadas en el propio sitio */
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 800; font-display: swap; src: url("/static/fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }
:root {
  --paper: #f2f4f0;
  --surface: #ffffff;
  --ink: #16212c;
  --muted: #5a6672;
  --line: #d5dbd3;
  --home: #1f4fa3;
  --draw: #a9b2ba;
  --away: #a3324a;
  --hit: #1f7a47;
  --miss: #a3324a;
  --board: #16212c;
  --board-ink: #f2f4f0;
  --board-dim: #93a3b1;
  --lamp: #f5b400;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f161d;
    --surface: #16202a;
    --ink: #e6ebef;
    --muted: #9aa7b3;
    --line: #2a3642;
    --home: #6f9cf0;
    --draw: #66717c;
    --away: #e0687f;
    --hit: #4cc08a;
    --miss: #e0687f;
    --board: #0a1016;
    --board-ink: #f2f4f0;
    --board-dim: #8193a3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f161d; --surface: #16202a; --ink: #e6ebef; --muted: #9aa7b3; --line: #2a3642;
  --home: #6f9cf0; --draw: #66717c; --away: #e0687f; --hit: #4cc08a; --miss: #e0687f;
  --board: #0a1016; --board-ink: #f2f4f0; --board-dim: #8193a3; color-scheme: dark;
}

*, *::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.55 var(--text);
}
a { color: var(--home); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* cabecera */
.top { background: var(--board); color: var(--board-ink); }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { font: 700 1.55rem/1 var(--display); color: var(--board-ink); text-decoration: none; letter-spacing: 0.01em; }
.logo b { font-weight: 800; color: var(--lamp); }
.nav { display: flex; gap: 4px 16px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--board-dim); text-decoration: none; white-space: nowrap; font-weight: 600; font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--board-ink); border-bottom-color: var(--lamp); }

/* tipografía */
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.05; margin: 0; }
h1 { font-weight: 800; font-size: clamp(2.3rem, 7.5vw, 3.5rem); letter-spacing: -0.005em; }
h2 { font-weight: 700; font-size: 1.75rem; margin-top: 44px; margin-bottom: 14px; }
h3 { font-weight: 700; font-size: 1.3rem; }
p { margin: 0 0 14px; }
.intro { padding: 36px 0 8px; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; margin-top: 12px; }
.note, .meta { color: var(--muted); font-size: 0.97rem; }
.meta { margin-top: 10px; }
.crumbs { padding-top: 18px; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); }
.disclaimer { margin-top: 40px; font-size: 0.88rem; color: var(--muted); }

/* marcador: el elemento protagonista */
.board {
  background: var(--board);
  color: var(--board-ink);
  border-radius: 10px;
  padding: 22px 18px 16px;
  margin: 22px 0 18px;
}
.board-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.board-team { font: 700 clamp(1.15rem, 4.6vw, 1.7rem)/1.05 var(--display); overflow-wrap: break-word; hyphens: auto; }
.board-team.r { text-align: right; }
.board-score { font: 800 clamp(4.6rem, 20vw, 8.5rem)/0.85 var(--display); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 0.08em; }
.board-score .sep { color: var(--lamp); font-weight: 700; transform: translateY(-0.04em); }
.board-cap { margin: 14px 0 0; color: var(--board-dim); font-size: 0.95rem; text-align: center; }
.board-cap a { color: var(--board-ink); }

/* barra 1X2 */
.tri-wrap { margin: 6px 0 4px; }
.tri { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); gap: 2px; }
.tri span { display: block; height: 100%; min-width: 2px; }
.tri-h { background: var(--home); }
.tri-d { background: var(--draw); }
.tri-a { background: var(--away); }
.tri-labels { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin-top: 8px; font-size: 0.95rem; color: var(--muted); }
.tri-labels b { color: var(--ink); font-size: 1.15rem; font-family: var(--display); font-weight: 700; margin-right: 4px; }
.tri-labels span:first-child b { color: var(--home); }
.tri-labels .r { text-align: right; }
.tri-labels .r b { color: var(--away); }
.tri-labels .c { text-align: center; }

/* destacado */
.featured { margin-top: 26px; padding-top: 22px; border-top: 3px solid var(--ink); }
.featured-h { margin: 0; font-size: 1.6rem; }

/* listas de partidos */
.day { margin-bottom: 26px; }
.day-h { font-size: 1.35rem; padding-bottom: 6px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.comp-h { font: 600 0.95rem/1.3 var(--text); margin: 14px 0 2px; }
.comp-h a { color: var(--muted); text-decoration: none; }
.comp-h a:hover { color: var(--ink); text-decoration: underline; }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-areas: "time teams" "time bar" "time res";
  column-gap: 12px;
  row-gap: 6px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.row:hover { background: var(--surface); }
.row:hover .row-score { background: var(--lamp); color: #16212c; }
.row-time { grid-area: time; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.95rem; padding-top: 3px; }
.row-time small { display: block; font-size: 0.8rem; line-height: 1.25; margin-top: 2px; }
.row-teams { grid-area: teams; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-weight: 600; }
.row-teams .t-a { text-align: right; }
.row-score {
  font: 800 1.35rem/1 var(--display);
  font-variant-numeric: tabular-nums;
  background: var(--board);
  color: var(--board-ink);
  padding: 5px 9px 4px;
  border-radius: 4px;
  min-width: 3.2em;
  text-align: center;
}
.row-bar { grid-area: bar; }
.row-bar .tri { height: 6px; }
.row-bar .tri-wrap { margin: 0; }
.row-res { grid-area: res; }
.res { font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.res.hit { color: var(--hit); }
.res.miss { color: var(--miss); }
.res.live { color: var(--lamp); }

/* página de partido */
.match h1 { margin-top: 18px; }
.final { border-left: 4px solid var(--line); background: var(--surface); padding: 12px 16px; margin: 20px 0 0; border-radius: 0 var(--radius) var(--radius) 0; }
.final.hit { border-left-color: var(--hit); }
.final.miss { border-left-color: var(--miss); }
.final p { margin: 0; }
.markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.markets div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.markets div:nth-child(odd) { padding-right: 18px; }
.markets dt { color: var(--muted); }
.markets dd { margin: 0; font: 700 1.3rem/1 var(--display); font-variant-numeric: tabular-nums; }
.scores { list-style: none; padding: 0; margin: 0; }
.scores li { display: grid; grid-template-columns: 3.2em 1fr 4em; align-items: center; gap: 12px; padding: 6px 0; }
.sc { font: 800 1.35rem/1 var(--display); font-variant-numeric: tabular-nums; }
.sc-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.sc-bar span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.scores li { grid-template-columns: 3.2em 1fr 4em 5.5em; }
.scores li.pick .sc-bar span { background: var(--lamp); }
.sc-tag { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.sc-p { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.how { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 12px; }
.how summary { cursor: pointer; font-weight: 600; }
.how p { margin-top: 12px; color: var(--muted); font-size: 0.97rem; }

/* tablas */
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.97rem; }
.tbl th, .tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.tbl th[scope="row"], .tbl thead th:nth-child(2), .tbl tbody th { text-align: left; font-weight: 600; }
.tbl thead th { font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--ink); }
.tbl.small { margin-top: 12px; }
.tbl.small th, .tbl.small td { text-align: left; }

/* textos largos */
.prose { max-width: 66ch; padding-top: 18px; }
.prose h1 { margin: 18px 0 14px; }
.prose h2 { font-size: 1.5rem; margin-top: 34px; }
.facts { padding-left: 1.1em; }
.facts li { margin-bottom: 12px; }

/* anuncios */
.ad { margin: 32px 0; min-height: 50px; display: flex; flex-direction: column; align-items: center; gap: 6px; overflow: hidden; }
.ad-label { font-size: 0.75rem; color: var(--muted); }

/* pie */
.foot { margin-top: 64px; padding: 26px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: var(--ink); }
.foot-note { margin: 8px 0 0; }

@media (min-width: 640px) {
  .row { grid-template-columns: 90px 1fr 160px; grid-template-areas: "time teams bar" "time res res"; align-items: center; }
  .row-time { padding-top: 0; }
  .board { padding: 28px 28px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
