/* ============================================================
   TRUELINE — design system carried from finance command center
   Light is the default; dark is the option. One indigo accent,
   desaturated ember for falling probability, mint for rising.
   Everything else neutral. No decoration, no texture.
   ============================================================ */

:root {
  --radius: 0.5rem;

  --bg: oklch(0.977 0.004 85);
  --fg: oklch(0.215 0.012 266);
  --surface: oklch(1 0 0);
  --surface-raised: oklch(0.982 0.003 85);
  --hairline: oklch(0.888 0.006 266);
  --border: oklch(0.912 0.005 266);

  --primary: oklch(0.47 0.158 266);
  --primary-fg: oklch(0.99 0.002 260);
  --signal: oklch(0.475 0.158 266);
  --signal-soft: oklch(0.575 0.14 266);
  --signal-deep: oklch(0.365 0.135 268);

  --ember: oklch(0.515 0.135 42);
  --ember-soft: oklch(0.63 0.11 44);
  --mint: oklch(0.475 0.105 168);

  /* Mișcarea prețului: albastru/portocaliu, validat pe protanopie, deuteranopie
     și tritanopie. Roșu/verde — reflexul industriei — e cea mai proastă alegere
     posibilă: ~1 din 12 bărbați europeni are o deficiență roșu/verde.
     Culoarea nu e niciodată singurul purtător de sens — glifele ▲/▼ rămân. */
  --move-up: #0072B2;
  --move-down: #E69F00;

  --ink-dim: oklch(0.44 0.012 266);
  --ink-faint: oklch(0.545 0.012 266);
  --grid-line: oklch(0.855 0.006 266);

  --band-outer: color-mix(in oklab, var(--signal) 9%, var(--surface));
  --shadow-card: 0 1px 2px oklch(0.22 0.02 266 / 0.06), 0 1px 8px oklch(0.22 0.02 266 / 0.05);
}

.dark {
  --bg: oklch(0.145 0.012 268);
  --fg: oklch(0.955 0.004 260);
  --surface: oklch(0.185 0.013 267);
  --surface-raised: oklch(0.222 0.015 266);
  --hairline: oklch(0.32 0.016 266);
  --border: oklch(0.29 0.015 266);

  --primary: oklch(0.62 0.198 268);
  --primary-fg: oklch(0.145 0.012 268);
  --signal: oklch(0.68 0.185 264);
  --signal-soft: oklch(0.63 0.175 266);
  --signal-deep: oklch(0.42 0.13 268);

  --ember: oklch(0.72 0.175 48);
  --ember-soft: oklch(0.62 0.155 36);
  --mint: oklch(0.8 0.165 168);

  --move-up: #56B4E9;
  --move-down: #F0B860;

  --ink-dim: oklch(0.68 0.013 262);
  --ink-faint: oklch(0.5 0.013 262);
  --grid-line: oklch(0.32 0.016 266);

  --shadow-card: none;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html {
  font-family: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  color-scheme: light;
}
html.dark { color-scheme: dark; }

/* Nav-ul e sticky (~60px): fără asta orice ancoră aterizează cu titlul sub bară. */
:target, section[id] { scroll-margin-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4 {
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0 0 0.5rem;
}
h2 { font-size: 1.65rem; }
h3 { font-size: 1.05rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "zero" 1;
  letter-spacing: -0.03em;
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* ---------- buttons / controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: 500 0.9rem "Inter Tight", sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--signal-deep); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.2rem; height: 2.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}
.icon-btn svg { width: 1.05rem; height: 1.05rem; }
.icon-moon { display: none; }
.dark .icon-moon { display: block; }
.dark .icon-sun { display: none; }

.control, select.control, input.control {
  font: 500 0.85rem "Inter Tight", sans-serif;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.42rem 0.7rem;
  outline: none;
}
.control:focus-visible, .chip:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--signal-soft);
  outline-offset: 1px;
}
.search { min-width: 160px; }

.chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.chip {
  font: 500 0.8rem "JetBrains Mono", monospace;
  padding: 0.36rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--fg); }
.chip.active {
  background: var(--band-outer);
  border-color: var(--signal-soft);
  color: var(--primary);
}

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.brand {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700; font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--primary); }
.nav-links { display: flex; gap: 1.4rem; }
.nav-links a { color: var(--ink-dim); font-size: 0.9rem; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; }

/* ---------- hero ---------- */

/* Hero compact: masa live trebuie să fie above the fold. Peste ~1000px de scroll
   până la dovada principală pierde până la jumătate din traficul tehnic. */
.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.75rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.06; margin-bottom: 1.1rem; }
.hero-accent { color: var(--primary); }
.hero-sub {
  font-size: 1.12rem;
  color: var(--ink-dim);
  max-width: 560px;
  margin: 0 0 1.8rem;
}
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; margin-bottom: 0; }
.hero-stats {
  display: flex; gap: 1.6rem; flex-wrap: wrap; align-items: center;
  margin-left: auto;
  padding-left: 1.6rem;
  border-left: 1px solid var(--hairline);
}
.stat { display: flex; align-items: baseline; gap: 0.35rem; }
.stat .num { font-size: 1rem; font-weight: 600; }
.stat-label { font-size: 0.75rem; color: var(--ink-faint); }
@media (max-width: 860px) {
  .hero-stats { margin-left: 0; padding-left: 0; border-left: none; gap: 1rem; }
}

/* ---------- table section ---------- */

.table-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.tier-note { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.tier-note-text { font-size: 0.78rem; color: var(--ink-faint); text-align: right; line-height: 1.4; }

.pill {
  font: 600 0.62rem "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}
.pill-alpha {
  background: var(--band-outer);
  border: 1px solid var(--signal-soft);
  color: var(--primary);
}
.pill-live {
  background: color-mix(in oklab, var(--mint) 12%, transparent);
  border: 1px solid var(--mint);
  color: var(--mint);
}

.table-shell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }

/* tabs */
.tabs {
  display: flex; gap: 0.15rem;
  padding: 0.5rem 0.75rem 0;
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
}
.tab {
  font: 600 0.84rem "Inter Tight", sans-serif;
  padding: 0.55rem 0.9rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-dim);
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: var(--fg); }
.tab.active { color: var(--fg); border-bottom-color: var(--primary); }

/* filters */
.filters {
  display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-raised);
}

/* grid */
/* internal scroll so the header can pin to the top of the table, not the page.
   ponytail: overflow-x:auto alone traps position:sticky in this wrapper — own scroll + top:0 is the clean fix */
.grid-wrap { overflow: auto; max-height: 62vh; }
.grid { min-width: 960px; }
.grow {
  display: grid;
  align-items: stretch;
}
.ghead {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), 0 6px 10px -8px oklch(0.22 0.02 266 / 0.25);
  font: 600 0.7rem "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
.gsubhead, .glabels { display: grid; }
.gsub {
  padding: 0.35rem 0.6rem 0.1rem;
  font: 600 0.62rem "JetBrains Mono", monospace;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); opacity: 0.8;
  border-right: 1px solid var(--grid-line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gsub:last-child { border-right: none; }
.glabels { border-top: 1px solid var(--grid-line); }
.grow { border-bottom: 1px solid var(--grid-line); }
.grow:last-child { border-bottom: none; }
.grow:hover { background: var(--surface-raised); }

.cell {
  padding: 0.55rem 0.6rem;
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0;
}
.ghead .cell { padding: 0.55rem 0.6rem; flex-direction: row; align-items: center; gap: 0.3rem; }
.cell.num-r { align-items: flex-end; text-align: right; }
.ghead .cell.num-r { flex-direction: row; justify-content: flex-end; }

.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--fg); }
.sort-arrow { font-size: 0.6rem; opacity: 0.85; }

.team-name { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-sub { font-size: 0.68rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kick { font: 500 0.8rem "JetBrains Mono", monospace; color: var(--ink-dim); white-space: nowrap; }

/* probability cell — number + thin proportional baseline meter (no overflow) */
.pcell { position: relative; padding: 0.5rem 0.55rem; min-width: 0; }
.pcell-inner {
  --p: 0.5;
  position: relative;
  text-align: right;
  padding: 0.1rem 0.1rem 0.42rem;
  border-bottom: 2px solid var(--grid-line);
}
.pcell-inner::after {
  content: "";
  position: absolute; left: 0; bottom: -2px; height: 2px;
  width: calc(var(--p) * 100%);
  background: var(--signal-soft);
  border-radius: 2px;
}
.pcell-inner .num { font-size: 0.92rem; font-weight: 600; color: var(--fg); }
.pcell-move { display: block; font: 500 0.62rem "JetBrains Mono", monospace; color: var(--ink-faint); }
.pcell-move.up { color: var(--move-up); }
.pcell-move.down { color: var(--move-down); }
.pcell-move.flat { color: var(--ink-faint); }
.pcell-sub { font: 400 0.62rem "JetBrains Mono", monospace; color: var(--ink-faint); margin-top: 0.1rem; }

.margin-badge {
  display: inline-block;
  font: 500 0.64rem "JetBrains Mono", monospace;
  color: var(--ink-dim);
  background: var(--surface-raised);
  border: 1px solid var(--grid-line);
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  white-space: nowrap;
}

.linecell .num { font-size: 0.85rem; font-weight: 600; }

/* KO + Match rămân fixe la scroll lateral. Grila de handicap trece de 2400px:
   fără asta derulezi până la +4.25 și nu mai știi al cui e rândul. */
.grow > .cell:nth-child(1), .glabels > .cell:nth-child(1) { position: sticky; left: 0; z-index: 2; }
.grow > .cell:nth-child(2), .glabels > .cell:nth-child(2) { position: sticky; left: 96px; z-index: 2; }
.grow > .cell:nth-child(1), .grow > .cell:nth-child(2) { background: var(--surface); }
.grow:hover > .cell:nth-child(1), .grow:hover > .cell:nth-child(2) { background: var(--surface-raised); }
.glabels > .cell:nth-child(1), .glabels > .cell:nth-child(2) { background: var(--surface-raised); }
.grow > .cell:nth-child(2), .glabels > .cell:nth-child(2) { box-shadow: 1px 0 0 var(--grid-line); }

/* Grila pe linie: celulă goală = linia nu e cotată la meciul ăsta (nu zero).
   Punctul e deliberat șters, ca golurile să nu concureze cu cifrele. */
.pcell.empty { display: flex; align-items: center; justify-content: flex-end; }
.pcell.empty .dash { color: var(--ink-faint); opacity: 0.3; font-size: 1rem; padding-right: 0.1rem; }

/* Ancora rândului: linia pe care piața o vede cel mai aproape de 50/50.
   Dă ochiului un punct de reper — la stânga „peste" e probabil, la dreapta nu. */
.pcell.anchor .pcell-inner { background: var(--band-outer); border-radius: 5px 5px 0 0; }
.pcell.anchor .pcell-inner .num { color: var(--primary); }
.qline sup { font-size: 0.6rem; color: var(--ink-faint); }

.grouphead {
  grid-column: 1 / -1;
  font: 600 0.66rem "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  padding: 0.45rem 0.75rem;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--hairline);
}

/* specials mini-grids */
.minigrid { display: inline-grid; grid-template-columns: repeat(3, 2.4rem); gap: 2px; }
.minigrid .num { font-size: 0.72rem; text-align: center; padding: 0.15rem 0.1rem; border-radius: 4px; background: var(--surface-raised); }
.cs-list { display: flex; flex-direction: column; gap: 0.15rem; }
.cs-list .num { font-size: 0.72rem; }
.btts-pair { display: flex; gap: 0.5rem; }

/* table foot */
.table-foot {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--hairline);
  background: var(--surface-raised);
  font-size: 0.76rem; color: var(--ink-faint);
}
.counts-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; text-align: right; }
.freshness { font: 500 0.7rem "JetBrains Mono", monospace; color: var(--ink-faint); }

/* nota despre favourite–longshot bias, între grilă și subsol */
.bias-note {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  font-size: 0.78rem;
  color: var(--ink-dim);
  max-width: 78ch;
}

.band-scope {
  align-self: center;
  font: 500 0.68rem "JetBrains Mono", monospace;
  color: var(--ink-faint);
  white-space: nowrap;
}

.method-named { border-top: 1px solid var(--grid-line); padding-top: 0.9rem; }

.legend { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.glyph-up { color: var(--move-up); }
.glyph-down { color: var(--move-down); }
.margin-demo { font: 500 0.64rem "JetBrains Mono", monospace; border: 1px solid var(--grid-line); border-radius: 999px; padding: 0.06rem 0.4rem; }
.qline-demo { font: 500 0.72rem "JetBrains Mono", monospace; }
.legend-anchor {
  font: 600 0.64rem "JetBrains Mono", monospace;
  background: var(--band-outer); color: var(--primary);
  border-radius: 4px; padding: 0.08rem 0.35rem;
}
.legend-dash { color: var(--ink-faint); opacity: 0.4; font-size: 1rem; }

/* ---------- scurtături ---------- */

.dash-wide { grid-column: 1 / -1; }
.sc-list { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.7rem; }
.sc-row { display: flex; align-items: stretch; gap: 0.3rem; }
.sc-show {
  flex: 1; display: grid; grid-template-columns: minmax(140px, auto) 1fr auto;
  align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--fg);
  font: 500 0.87rem "Inter Tight", sans-serif; cursor: pointer; text-align: left;
}
.sc-show:hover { border-color: var(--primary); }
.sc-row.sc-active .sc-show { border-color: var(--signal-soft); background: var(--band-outer); color: var(--primary); }
.sc-name { font-weight: 600; }
.sc-rule { font: 400 0.72rem "JetBrains Mono", monospace; color: var(--ink-faint); white-space: nowrap; }
.sc-count {
  font: 500 0.7rem "JetBrains Mono", monospace; color: var(--ink-faint); white-space: nowrap;
}
.sc-sug-all { border-style: dashed; }
.dash-lead { color: var(--ink-dim); margin: -0.2rem 0 1.2rem; font-size: 0.92rem; }
.sc-row.sc-one .sc-show { cursor: default; border-style: dashed; }
.sc-row.sc-one .sc-name { font-weight: 500; }

/* ---------- celulă acționabilă + meniul ei ---------- */

.pcell-act { cursor: pointer; }
.pcell-act:hover .pcell-inner { background: var(--band-outer); border-radius: 5px 5px 0 0; }

.cell-menu {
  position: absolute; z-index: 60; width: 300px;
  padding: 0.7rem; display: flex; flex-direction: column; gap: 0.4rem;
  box-shadow: 0 4px 20px oklch(0.22 0.02 266 / 0.18);
}
.cm-head { display: flex; flex-direction: column; gap: 0.1rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--grid-line); }
.cm-match { font-weight: 600; font-size: 0.86rem; }
.cm-mk { font-size: 0.76rem; color: var(--ink-dim); }
.cm-act {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--fg); cursor: pointer;
  font: 500 0.85rem "Inter Tight", sans-serif; white-space: nowrap;
}
.cm-act:hover { border-color: var(--primary); color: var(--primary); }
.cm-line { display: flex; align-items: center; gap: 0.3rem; }
.cm-line .cm-act { flex: 1; }
.cm-mini { padding: 0.35rem 0.4rem; font-size: 0.78rem; }
.cm-th { width: 3.6rem; }
.cm-num { width: 4.2rem; }
.cm-pct, .cm-at { font-size: 0.78rem; color: var(--ink-faint); }
.cm-wide { width: 100%; justify-content: flex-start; }

/* ---------- secțiunea de beneficii ---------- */

.section-lead { color: var(--ink-dim); margin: -0.3rem 0 1.8rem; font-size: 1.02rem; }
.ben-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.1rem;
}
.ben { padding: 1.4rem; position: relative; }
.ben-step {
  font: 600 0.68rem "JetBrains Mono", monospace;
  color: var(--primary);
  letter-spacing: 0.08em;
  display: block; margin-bottom: 0.5rem;
}
.ben h3 { margin-bottom: 0.6rem; }
.ben p { color: var(--ink-dim); font-size: 0.9rem; margin: 0 0 0.7rem; }
.ben p:last-child { margin-bottom: 0; }
.ben-note {
  font-size: 0.82rem !important;
  color: var(--ink-faint) !important;
  border-top: 1px solid var(--grid-line);
  padding-top: 0.7rem;
}
.ben-wide { padding: 1.5rem; }
.ben-wide h3 { margin-bottom: 0.7rem; }
.ben-wide p { color: var(--ink-dim); max-width: 72ch; margin: 0 0 0.7rem; }
.ben-wide p:last-child { margin-bottom: 0; }
.cm-hint { margin: 0.1rem 0 0; font-size: 0.7rem; color: var(--ink-faint); line-height: 1.35; }

.toast {
  position: fixed; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  z-index: 80; padding: 0.6rem 1rem; border-radius: var(--radius);
  background: var(--fg); color: var(--bg);
  font: 500 0.85rem "Inter Tight", sans-serif;
  box-shadow: 0 4px 20px oklch(0.22 0.02 266 / 0.25);
  transition: opacity 0.35s;
}
.toast.out { opacity: 0; }
.sc-row.sc-active .sc-count { color: var(--primary); }
.sc-bell, .sc-del {
  width: 2.2rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; font-size: 0.9rem; color: var(--ink-dim);
}
.sc-bell.on { background: var(--band-outer); border-color: var(--signal-soft); }
.sc-bell:hover, .sc-del:hover { border-color: var(--primary); }
.sc-suggest { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.8rem; }
.sc-sug-label { font-size: 0.75rem; color: var(--ink-faint); margin-right: 0.2rem; }
.sc-sug { font-size: 0.75rem; }
.sc-form { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.sc-th { width: 5rem; }
.sc-pct { color: var(--ink-faint); font-size: 0.85rem; margin-left: -0.2rem; }

/* istoric pariuri: 10 coloane, cu scroll propriu pe ecran îngust */
.bet-scroll { overflow-x: auto; }
.bt-head, .bt-row {
  display: grid;
  grid-template-columns: minmax(150px,1.6fr) minmax(96px,1fr) 56px 56px 70px 70px 64px minmax(104px,1fr) 76px 28px;
  gap: 0.4rem; align-items: center;
  min-width: 860px;
}
.bt-mk { font-size: 0.78rem; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-row .num.pos, .usum .num.pos { color: var(--mint); }
.bt-row .num.neg, .usum .num.neg { color: var(--ember); }

/* ---------- sections ---------- */

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.method-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}
.method-text p { color: var(--ink-dim); }
.method-text .num { color: var(--fg); }

.method-card { padding: 1.4rem; }
.method-rows { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.1rem; }
.method-row {
  display: grid;
  grid-template-columns: 1fr 5rem 5rem 5rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.method-row .num { text-align: right; }
.method-row .dim { color: var(--ink-faint); }
.arrow-row { grid-template-columns: 1fr auto; }
.arrow { font: 500 0.72rem "JetBrains Mono", monospace; color: var(--ember); }
.method-row.result { color: var(--fg); font-weight: 600; border-top: 1px solid var(--grid-line); padding-top: 0.6rem; }
.method-row.result .num { color: var(--signal-deep); }
.dark .method-row.result .num { color: var(--signal-soft); }
.method-note {
  font-size: 0.8rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--grid-line);
  padding-top: 0.9rem;
  margin: 0;
}

/* coverage */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.8rem;
}
.cov-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
}
.cov-check { color: var(--mint); font-weight: 700; }
.cov-note { color: var(--ink-faint); font-size: 0.78rem; }

/* not-sold */
.not-sold {
  background: var(--surface-raised);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  max-width: none;
}
.not-sold > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.not-sold .eyebrow, .not-sold h2 { padding-left: 1.5rem; }
.not-list { max-width: 760px; padding: 0 1.5rem 0 3rem; margin: 0 auto 1.5rem; display: flex; flex-direction: column; gap: 0.9rem; color: var(--ink-dim); }
.not-list li::marker { color: var(--primary); }

/* pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  align-items: stretch;
}
.price-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.9rem; position: relative; }
.price-card.featured { border-color: var(--signal-soft); box-shadow: 0 0 0 1px var(--signal-soft), var(--shadow-card); }
.featured-tag {
  position: absolute; top: -0.65rem; left: 1.2rem;
  font: 600 0.62rem "JetBrains Mono", monospace;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--primary); color: var(--primary-fg);
  padding: 0.22rem 0.55rem; border-radius: 999px;
}
.price .num { font-size: 2rem; font-weight: 600; }
.price .per { color: var(--ink-faint); font-size: 0.85rem; }
.annual-note { font-size: 0.8rem; color: var(--mint); margin: -0.5rem 0 0; }
.price-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.87rem; color: var(--ink-dim); flex: 1; }
.price-card li::before { content: "✓ "; color: var(--mint); font-weight: 700; }

/* faq */
.faq { max-width: 720px; display: flex; flex-direction: column; }
.faq details {
  border-bottom: 1px solid var(--grid-line);
  padding: 0.9rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 1.1rem "JetBrains Mono", monospace; color: var(--ink-faint); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-dim); margin: 0.6rem 0 0.2rem; font-size: 0.88rem; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--hairline); background: var(--surface-raised); }
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.footer-brand { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; margin: 0; }
.footer-legal { font-size: 0.78rem; color: var(--ink-faint); max-width: 760px; margin: 0; }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-faint); }
.footer-links a { color: var(--ink-dim); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero { padding-top: 3rem; }
  .method-grid { grid-template-columns: 1fr; }
  .tier-note { align-items: flex-start; }
  .tier-note-text { text-align: left; }
  .grid { min-width: 860px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   DASHBOARD — presets, CLV log, alerte, usage, overlay-uri
   ============================================================ */

.dash-section { padding-top: 1rem; }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  align-items: start;
}
.dash-panel { padding: 1.3rem 1.4rem; }
.dash-panel h3 { margin-bottom: 0.9rem; }
.dash-sub { font-size: 0.75rem; color: var(--ink-faint); font-weight: 400; }
.dash-empty { font-size: 0.85rem; color: var(--ink-faint); margin: 0 0 0.8rem; }

.dash-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.9rem; }
.dash-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--grid-line);
  border-radius: 6px;
  background: var(--surface-raised);
}
.dash-main { font-size: 0.85rem; font-weight: 600; display: flex; flex-direction: column; gap: 0.1rem; }
.dash-apply {
  background: none; border: none; padding: 0;
  font: 600 0.87rem "Inter Tight", sans-serif; color: var(--fg);
  cursor: pointer; text-align: left;
}
.dash-apply:hover { color: var(--primary); }
.dash-tools { display: inline-flex; gap: 0.25rem; align-items: center; }
.dash-tools button {
  background: none; border: 1px solid var(--grid-line); border-radius: 4px;
  color: var(--ink-dim); font-size: 0.75rem; cursor: pointer;
  padding: 0.05rem 0.35rem; line-height: 1.3;
}
.dash-tools button:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.dash-tools button:disabled { opacity: 0.3; cursor: default; }

.inline-form { display: flex; gap: 0.5rem; }
.inline-form .control { flex: 1; min-width: 0; }

/* usage */
.usage-grid { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.usum { display: flex; flex-direction: column; gap: 0.1rem; }
.usum .num { font-size: 1.3rem; font-weight: 600; }
.usum span:last-child { font-size: 0.72rem; color: var(--ink-faint); }
.dash-link { display: block; margin: 0.8rem 0 0.2rem; font-size: 0.85rem; }

/* CLV log */
.bet-summary { display: flex; gap: 1.6rem; margin-bottom: 0.9rem; }
.clv-caption {
  font-size: 0.74rem; color: var(--ink-faint);
  border-top: 1px solid var(--grid-line);
  padding-top: 0.7rem; margin: 0.8rem 0;
}
.bet-table { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; }
/* (grila de 10 coloane e definită mai sus, la „istoric pariuri" — o singură definiție) */
.bt-head { font: 600 0.62rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }
.bt-row { font-size: 0.8rem; padding: 0.3rem 0; border-bottom: 1px solid var(--grid-line); }
.bt-row .num { font-size: 0.78rem; }
.bt-row .num.pos { color: var(--mint); }
.bt-row .num.neg { color: var(--ember); }
.res-won { color: var(--mint); font-weight: 600; }
.res-lost { color: var(--ember); font-weight: 600; }
.res-push { color: var(--ink-dim); }
.bt-row button {
  background: none; border: 1px solid var(--grid-line); border-radius: 4px;
  color: var(--ink-dim); cursor: pointer; font-size: 0.7rem; padding: 0 0.3rem;
}
.bt-row button:hover { color: var(--primary); border-color: var(--primary); }

/* log-bet pe rânduri */
.cell-match { position: relative; }
.logbet {
  position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
  background: var(--surface); border: 1px solid var(--signal-soft); border-radius: 5px;
  color: var(--primary); font-size: 0.8rem; cursor: pointer;
  padding: 0.05rem 0.4rem; opacity: 0; transition: opacity 0.12s;
}
.grow:hover .logbet { opacity: 1; }
.logbet:hover { background: var(--band-outer); }

/* overlay-uri */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: oklch(0.15 0.01 266 / 0.45);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 1rem;
}
.overlay[hidden] { display: none; }
.overlay-card {
  position: relative;
  width: min(420px, 100%);
  padding: 1.6rem 1.5rem;
}
.overlay-card h3 { margin-bottom: 1rem; }
.overlay-close {
  position: absolute; top: 0.6rem; right: 0.7rem;
  background: none; border: none; font-size: 1.3rem; line-height: 1;
  color: var(--ink-faint); cursor: pointer;
}
.overlay-close:hover { color: var(--fg); }
.overlay-form { display: flex; flex-direction: column; gap: 0.7rem; }
.overlay-form .control { width: 100%; }
.form-row { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.82rem; color: var(--ink-dim); }
.form-row label { font: 600 0.68rem "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }
.form-row .num { color: var(--fg); }
.auth-error { color: var(--ember); font-size: 0.8rem; margin: 0; }

/* nav user */
.nav-user { font: 500 0.85rem "Inter Tight", sans-serif; color: var(--ink-dim); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.save-preset { font-size: 0.82rem; padding: 0.45rem 0.8rem; }

/* alert form in panel */
#alertFormWrap .overlay-form { gap: 0.55rem; }
#alertFormWrap .form-row:last-of-type { flex-direction: row; gap: 0.4rem; }
#alertFormWrap .form-row:last-of-type label { align-self: center; }

/* separator vertical între grupele de piețe (totals / handicap / team goals …) */
.gsep { border-left: 1px solid var(--grid-line); }
.grow .cell.gsep, .grow .pcell.gsep { border-left: 1px solid var(--grid-line); }


/* margin explicat simplu, înaintea exemplelor tehnice */
.margin-plain {
  max-width: 760px;
  font-size: 1.02rem;
  color: var(--ink-dim);
  padding: 1rem 1.2rem;
  background: var(--surface-raised);
  border: 1px solid var(--grid-line);
  border-radius: var(--radius);
  margin: 0 0 1.6rem;
}
.margin-plain strong { color: var(--fg); }

/* ---------- rând blocat (free tier) ---------- */
/* Meciul rămâne vizibil, cifrele nu. Un rând ascuns n-ar vinde nimic; unul
   blocat arată exact ce lipsește. */
.grow.locked { background: color-mix(in oklch, var(--paper) 92%, var(--ink) 8%); }
.grow.locked .cell-match .team-name { opacity: 0.72; }
.lockcell {
  display: flex; align-items: center; gap: 0.4rem;
  font: 600 0.74rem "Inter Tight", system-ui, sans-serif;
  color: var(--ink-faint); letter-spacing: 0.01em;
}

/* ---------- mobil: tabelul devine card per meci ---------- */
/* Sub 720px grila de 12+ coloane nu se poate comprima onest — la 30px pe celulă
   cifrele devin ilizibile. Rândul se rearanjează în card: fiecare valoare pe
   linia ei, cu eticheta pieței la stânga. Vezi §E.8 din raport.

   Eticheta vine din `data-mkl`, pus deja de tag() pe celulele cu preț, și
   conține linia în text („Over 2.5 goals"). De aceea celulele de linie și
   separatoarele se ascund aici: ar repeta informația. */
@media (max-width: 720px) {
  .table-section { padding: 1rem 0.75rem 3rem; }
  .grid-wrap { overflow: visible; max-height: none; }
  .grid { min-width: 0; }
  .ghead { display: none; }

  .grow {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 0 0.6rem;
    padding: 0.85rem 0.95rem 0.6rem;
    border: 1px solid var(--rule);
    border-radius: 12px;
    margin-bottom: 0.65rem;
    background: var(--paper);
  }

  /* antetul cardului: meciul stânga, ora dreapta */
  .grow > *:nth-child(1) { position: static !important; left: auto !important;
    grid-column: 2; justify-self: end; padding: 0; }
  .grow > *:nth-child(2) { position: static !important; left: auto !important;
    grid-column: 1; padding: 0; }
  .grow > *:nth-child(1) .kick { font-size: 0.72rem; color: var(--ink-faint); }
  .cell-match .team-name { font-size: 0.96rem; line-height: 1.3; }
  .cell-match .team-sub { font-size: 0.7rem; }

  /* valorile: o linie fiecare, etichetă + număr */
  .grow > *:nth-child(n+3) {
    grid-column: 1 / -1;
    display: flex !important; align-items: baseline; justify-content: space-between;
    gap: 1rem; padding: 0.44rem 0; margin: 0;
    border-top: 1px solid var(--rule);
    min-width: 0; text-align: left;
  }
  .grow > *:nth-child(3) { margin-top: 0.6rem; }
  .grow > .pcell-act::before {
    content: attr(data-mkl);
    font: 500 0.74rem "Inter Tight", system-ui, sans-serif;
    color: var(--ink-faint); white-space: nowrap;
  }
  /* fără etichetă = linie, marjă sau separator: redundant în format card */
  .grow > *:nth-child(n+3):not(.pcell-act):not(.lockcell) { display: none !important; }

  .grow .pcell-inner { justify-content: flex-end; padding: 0; background: none; }
  .grow .pcell-inner .num { font-size: 1.02rem; }

  .grow.locked > .lockcell {
    grid-column: 1 / -1 !important; display: flex !important;
    justify-content: center; margin-top: 0.6rem; padding: 0.55rem;
    border: none; border-radius: 8px;
    background: color-mix(in oklch, var(--ink) 6%, transparent);
  }
}

/* Nota din fereastra de autentificare: momentul exact in care omul poate gresi
   emailul si apoi nu intelege de ce n-are acces. */
.auth-hint {
  margin-top: 0.35rem;
  font-size: 0.76rem; line-height: 1.45;
  color: var(--ink-faint); text-align: center;
}
.auth-hint strong { color: var(--ink); font-weight: 600; }
