/* Latvian carmine red (#9E3039) and white */
:root {
  --bg: #f6f4f4; --fg: #1d1a1b; --muted: #6b6264; --card: #ffffff; --line: #e6dfe0; --soft: #f3eced;
  --lv: #9e3039; --lv-dark: #9e3039; --accent: #9e3039; --link: #9e3039; --accent-soft: #f7e9eb;
  --good: #1e7d3c; --bad: #b3322b; --warn: #a86a00;
  --home: #9e3039; --away: #6c7a89;
  --chart: #9e3039;
  /* categorical series (validated palette, fixed order; colour follows the team, not its rank) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141011; --fg: #ece6e7; --muted: #a59a9c; --card: #1d1819; --line: #33292b; --soft: #262021;
    --lv: #9e3039; --lv-dark: #9e3039; --accent: #ffffff; --link: #f1eded; --accent-soft: #3a1f23;
    --good: #4cc274; --bad: #ef6f66; --warn: #e0a93a;
    --home: #9e3039; --away: #7f8d9c;
    --chart: #c94a55;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--lv); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* header: carmine bar with a thin red-white-red flag stripe at the top */
header.top { background: var(--lv); color: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 rgba(0,0,0,.15);
  border-top: 6px solid transparent; border-image: linear-gradient(#9e3039 0 40%, #fff 40% 60%, #9e3039 60%) 1; }
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: #fff; white-space: nowrap; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.brand span { font-weight: 400; opacity: .85; }
nav.main { min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav.main a { padding: 6px 10px; border-radius: 6px; color: rgba(255,255,255,.85); white-space: nowrap; font-size: 14px; }
nav.main a.on, nav.main a:hover { background: rgba(255,255,255,.16); color: #fff; text-decoration: none; }
.upd { margin-left: auto; color: rgba(255,255,255,.8); font-size: 12px; white-space: nowrap; }

/* front-page banner: flag proportions 2:1:2 */
.hero { background: linear-gradient(180deg, var(--lv) 0 40%, #fff 40% 60%, var(--lv) 60% 100%); border-radius: 14px; padding: 3px; margin-bottom: 8px; }
.hero > div { background: var(--card); border-radius: 11px; padding: 20px 22px; display: flex; gap: 18px; align-items: center; }
.hero img { width: 64px; height: 64px; flex: none; }
.hero h1 { margin: 0; }
.hero h1 b { color: var(--accent); }
.hero p { margin: 4px 0 0; color: var(--muted); }

/* tabs (power ranking / PI) */
.tabs { display: inline-flex; background: var(--soft); border-radius: 8px; padding: 3px; gap: 2px; margin-bottom: 10px; }
.tabs button { font: inherit; font-size: 13px; border: 0; background: none; color: var(--muted); padding: 5px 12px; border-radius: 6px; cursor: pointer; }
.tabs button.on { background: var(--card); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
details.explain { margin-top: 10px; font-size: 13px; color: var(--muted); }
details.explain summary { cursor: pointer; color: var(--link); font-weight: 600; }
details.explain p { margin: 6px 0; }
.h2row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.h2row h2 { margin-bottom: 8px; }

main { padding: 24px 0 48px; }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 19px; margin: 32px 0 12px; border-left: 4px solid var(--lv); padding-left: 10px; line-height: 1.25; }
h3 { font-size: 15px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kpi b { display: block; font-size: 22px; }
.kpi span { color: var(--muted); font-size: 13px; }
.lead { font-size: 16px; line-height: 1.6; margin: 0; }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.c, th.c { text-align: center; }
td.team { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.me td { background: var(--accent-soft); }

.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.form { display: inline-flex; gap: 2px; }
.form i { font-style: normal; font-size: 10px; font-weight: 700; width: 20px; text-align: center; border-radius: 3px; padding: 1px 0; color: #fff; }
.form .U { background: var(--good); } .form .UP { background: #5aa86f; } .form .ZP { background: #c98a83; } .form .Z { background: var(--bad); }

.prob { display: flex; height: 18px; border-radius: 4px; overflow: hidden; font-size: 11px; font-weight: 600; color: #fff; min-width: 120px; }
.prob div { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.prob .h { background: var(--home); } .prob .a { background: var(--away); }

.game { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) 140px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.game:last-child { border-bottom: 0; }
.game .t1 { text-align: right; } .game .t1, .game .t2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game .res { font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; min-width: 54px; }
.game .res small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.game .win { font-weight: 600; }
.badge-up { color: var(--bad); font-weight: 600; font-size: 12px; }
.badge-odd { color: var(--warn); font-weight: 600; font-size: 12px; }

details.day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
details.day > summary { cursor: pointer; padding: 12px 16px; list-style: none; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
details.day > summary::-webkit-details-marker { display: none; }
details.day > summary::before { content: "▸"; color: var(--muted); }
details.day[open] > summary::before { content: "▾"; }
details.day .body { padding: 0 16px 12px; }

.leagues { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lg { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--fg); }
.lg:hover { border-color: var(--accent); text-decoration: none; }
.lg b { font-size: 16px; } .lg .muted { font-size: 13px; }
.levels { display: flex; flex-direction: column; gap: 14px; }
.levels h3 { margin: 0 0 6px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

ul.facts { margin: 0; padding-left: 18px; } ul.facts li { margin: 4px 0; }
.note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.err { color: var(--bad); }
footer { color: var(--muted); font-size: 12px; padding: 24px 0 40px; border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  h1 { font-size: 22px; }
  .game { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
  .game .prob { grid-column: 1 / 4; }
  .upd { display: none; }
  td.team { max-width: 150px; }
  .hide-s { display: none; }
}

/* AI-written reviews */
.ai .ai-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--lv); border-radius: 4px; padding: 2px 7px; margin-bottom: 8px; }
.ai h3 { font-size: 18px; margin: 0 0 8px; }
.ai p.lead + p.lead { margin-top: 10px; }

/* player leaders: keep all number columns visible next to another table */
table.pl th, table.pl td { padding: 6px 5px; }
table.pl td.team { max-width: 130px; }

/* national teams: Latvian flag stripe (2:1:2) and Latvia highlights */
.natflag { flex: none; width: 54px; height: 36px; border-radius: 4px; background: linear-gradient(180deg, var(--lv) 0 40%, #fff 40% 60%, var(--lv) 60%); box-shadow: 0 0 0 1px var(--line); }
.natcard { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--lv); border-radius: 10px; padding: 12px 16px; margin: 16px 0 0; color: var(--fg); }
.natcard:hover { text-decoration: none; border-color: var(--lv); }
.natcard > div:nth-child(2) { flex: 1; min-width: 0; font-size: 14px; }
.natcard .tag { margin-right: 4px; }
.natgo { font-size: 26px; color: var(--muted); }
.lvcard { display: flex; gap: 16px; align-items: flex-start; border-left: 5px solid var(--lv); }
.pair { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.pair:last-child { border-bottom: 0; }
.pair span:last-child { text-align: right; }
.pair .win { font-weight: 700; }
.pair.me { background: var(--accent-soft); border-radius: 6px; }

/* team page */
.teamhead h1 { font-size: 28px; }
.kpi b small { font-size: 14px; color: var(--muted); font-weight: 400; }
table.sortable th[data-k] { cursor: pointer; user-select: none; }
table.sortable th.on { color: var(--fg); }

/* highlighted games with their reason; archive of daily reviews */
.hl { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 4px; }
.hl:last-of-type { border-bottom: 0; }
.hl .game { border-bottom: 0; }
.hl-why { font-size: 13px; color: var(--muted); padding: 0 0 4px 44px; }
.posts { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.post { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--lv); border-radius: 10px; padding: 12px 16px; color: var(--fg); }
.post:hover { text-decoration: none; border-color: var(--lv); }
.post b { flex: 1; min-width: 200px; }

/* group outlook: status per team */
.ol { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ol:last-child { border-bottom: 0; }
.ol.me { background: var(--accent-soft); border-radius: 6px; }
.st { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; margin-top: 1px; }
.st.ok { background: var(--good); } .st.no { background: var(--bad); } .st.open { background: var(--muted); }

/* hall of fame */
table.hof tr[data-m] { cursor: pointer; }
table.hof tr[data-m]:hover td { background: var(--soft); }
.tl { display: flex; gap: 1px; flex-wrap: nowrap; }
.tl i { display: inline-block; width: 5px; height: 14px; border-radius: 1px; background: #d9d4d5; }
.tl i.l1 { background: #5c1a21; } .tl i.l2 { background: #7d2630; } .tl i.l3 { background: #9e3039; } .tl i.l4 { background: #c06a72; }
.tl i.l5 { background: #d7a1a6; } .tl i.l6, .tl i.l7 { background: #e8cdd0; }
.tl i.champ { box-shadow: inset 0 0 0 1.5px #e0a93a; }

/* hall of fame tables on phones: every column, horizontal scroll, the manager stays pinned on the left */
table.hof th, table.hof td { white-space: nowrap; }
table.hof th:nth-child(2), table.hof td:nth-child(2) { position: sticky; left: 0; background: var(--card); z-index: 1; box-shadow: 1px 0 0 var(--line); }
table.hof tr[data-m]:hover td:nth-child(2) { background: var(--soft); }
#hof-nat td.small { white-space: normal; min-width: 220px; }
@media (max-width: 640px) {
  table.hof th, table.hof td, #hof-nat th, #hof-nat td { padding: 6px 5px; font-size: 13px; }
  table.hof td.team { max-width: 120px; }
}

/* mobile menu: ☰ button, links in a dropdown under the header */
.menu-btn { display: none; margin-left: auto; width: 42px; height: 38px; border: 0; border-radius: 8px; background: rgba(255,255,255,.14); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
.nav-upd { display: none; }
@media (max-width: 860px) {
  header.top .wrap { position: relative; }
  .menu-btn { display: flex; }
  .upd { display: none; }
  nav.main { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 6px 12px 12px; background: var(--lv); box-shadow: 0 10px 20px rgba(0,0,0,.25); overflow: visible; }
  header.top.open nav.main { display: flex; }
  nav.main a { padding: 12px 10px; font-size: 16px; border-radius: 8px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.14); }
  nav.main a:last-of-type { border-bottom: 0; }
  nav.main a.on { background: rgba(255,255,255,.2); }
  .nav-upd { display: block; padding: 10px 10px 2px; font-size: 12px; color: rgba(255,255,255,.75); }
  header.top.open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  header.top.open .menu-btn span:nth-child(2) { opacity: 0; }
  header.top.open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* PL / VČK groups: 3 per row, the table fits its card (long club names are cut) */
.grp3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .grp3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grp3 { grid-template-columns: minmax(0, 1fr); } }
table.grp { table-layout: fixed; width: 100%; }
table.grp th, table.grp td { padding-left: 4px; padding-right: 4px; }
table.grp th.n:nth-child(1), table.grp td.n:nth-child(1) { width: 22px; }
table.grp th.n:nth-child(3), table.grp td.n:nth-child(3) { width: 28px; }
table.grp th.n:nth-child(4), table.grp td.n:nth-child(4) { width: 52px; }
table.grp th.n:nth-child(5), table.grp td.n:nth-child(5) { width: 30px; }
table.grp td.team { max-width: none; }

/* front page top: last day (left) + season calendar (right), 50:50 */
:root { --k-league: #1668ff; --k-cup: #ff9500; --k-nat: #e8173a; --ok-bg: #c8f2d4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --k-league: #4d8dff; --k-cup: #ffab2e; --k-nat: #ff4d6a; --ok-bg: #17492a; } }
.top2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.top2 > div > :first-child { margin-top: 16px; }
@media (max-width: 860px) { .top2 { grid-template-columns: minmax(0, 1fr); } }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-size: 16px; }
.cal-head button { font: inherit; font-size: 18px; line-height: 1; width: 34px; height: 30px; border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 6px; cursor: pointer; }
.cal-head button:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid .wd { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; padding-bottom: 2px; }
.cd { position: relative; font: inherit; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); padding: 3px 5px 6px; text-align: left; cursor: pointer; overflow: hidden; }
.cd.out { color: var(--muted); opacity: .35; border-style: dashed; cursor: default; font-size: 13px; }
.cd .n { font-size: 13px; font-weight: 600; }
.cd .r { position: absolute; right: 5px; bottom: 6px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cd .st { position: absolute; right: 4px; top: 1px; font-size: 11px; color: var(--warn); }
.cd.k-league { box-shadow: inset 0 -5px 0 var(--k-league); } .cd.k-cup { box-shadow: inset 0 -5px 0 var(--k-cup); } .cd.k-nat { box-shadow: inset 0 -5px 0 var(--k-nat); }
.cd.ok { background: var(--ok-bg); border-color: var(--good); }
.cd.miss { border-color: var(--warn); }
.cd.now { border: 2px solid var(--fg); }
.cd.fut { opacity: .7; }
.cd.sel { outline: 2px solid var(--link); outline-offset: 1px; opacity: 1; }
.cd:hover:not(.out) { border-color: var(--fg); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.dot.k-league { background: var(--k-league); } .dot.k-cup { background: var(--k-cup); } .dot.k-nat { background: var(--k-nat); } .dot.k-end { background: var(--muted); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line); }
.sw.ok { background: var(--ok-bg); border-color: var(--good); } .sw.now { border: 2px solid var(--fg); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; margin: 10px 0 0; }
.cal-day { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.cal-day h3 { margin-bottom: 6px; }
.cal-ev, .cal-ck { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.cal-ev li { margin: 3px 0; }
.cal-ck { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.cal-ck .ck { display: inline-block; width: 20px; color: var(--muted); font-weight: 700; }
.cal-ck li.ok .ck { color: var(--good); } .cal-ck li.part .ck { color: var(--warn); }
.cal-ck li:not(.ok) { color: var(--muted); }
details.cal-keys { margin-top: 12px; font-size: 13px; }
details.cal-keys summary { cursor: pointer; color: var(--link); font-weight: 600; }
details.cal-keys ul { list-style: none; margin: 6px 0 0; padding: 0; }
details.cal-keys li { margin: 3px 0; } details.cal-keys li.past { opacity: .5; }
details.cal-keys .kd { display: inline-block; min-width: 110px; color: var(--muted); }

/* Tiešraide (tiesraide.php + assets/live.js) and the site-wide banner */
.live-banner { display: block; background: var(--accent-soft); border-bottom: 1px solid var(--line); color: var(--fg); font-size: 14px; }
.live-banner .wrap { padding-top: 8px; padding-bottom: 8px; }
.live-banner span { color: var(--link); font-weight: 600; margin-left: 6px; white-space: nowrap; }
.live-banner.on { background: var(--lv); color: #fff; }
.live-banner.on span { color: #fff; }
.live-banner:hover { text-decoration: none; }
main .lv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; margin-top: 18px; }
.lv-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; position: relative; }
.lv-board { text-align: center; padding: 14px 16px 12px; }
.lv-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.lv-badge.on { background: var(--lv); color: #fff; animation: lv-pulse 1.6s ease-in-out infinite; }
.lv-badge.up { background: var(--accent-soft); color: var(--fg); }
@keyframes lv-pulse { 50% { opacity: .65; } }
.lv-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; margin-top: 12px; }
.lv-team { min-width: 0; }
.lv-tn { font-weight: 700; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.lv-tn a { color: var(--fg); }
.lv-team.t1 .lv-tn { border-top: 3px solid var(--home); padding-top: 6px; }
.lv-team.t2 .lv-tn { border-top: 3px solid var(--away); padding-top: 6px; }
.lv-gk, .lv-pen { font-size: 12px; color: var(--muted); margin-top: 4px; }
.lv-pen { color: var(--bad); }
.lv-score { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.lv-score span { min-width: 54px; padding: 4px 8px; border-radius: 8px; background: var(--fg); color: var(--bg); font-size: 38px; font-weight: 800; line-height: 1.1; }
.lv-score i { font-style: normal; font-size: 30px; font-weight: 800; color: var(--muted); }
.lv-state { margin-top: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.lv-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--fg); font-size: 16px; }
.lv-foot { margin-top: 12px; }
.lv-note { margin: 14px auto 0; max-width: 520px; font-size: 14px; }
.lv-prog { height: 3px; background: var(--soft); border-radius: 3px; margin-top: 12px; overflow: hidden; }
.lv-prog i { display: block; height: 100%; background: var(--lv); transition: width .25s linear; }
.lv-empty { padding: 24px 8px; }
.lv-empty h2 { border: 0; padding: 0; margin: 6px 0; }
.lv-tv { font-size: 42px; }
.lv-goal { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 5; min-width: 240px; max-width: 92%; text-align: center;
  background: var(--lv); color: #fff; border-radius: 12px; padding: 12px 22px; box-shadow: 0 8px 30px rgba(0,0,0,.3); animation: lv-pop .35s ease-out; }
.lv-goal.t2 { background: var(--away); }
.lv-goal b { display: block; font-size: 28px; letter-spacing: .04em; }
.lv-goal span { display: block; font-weight: 700; }
.lv-goal small { display: block; opacity: .9; }
@keyframes lv-pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
.lv-feed-card h3, .lv-chat h3 { margin: 0 0 8px; font-size: 16px; }
.lv-feed { max-height: 60vh; overflow-y: auto; }
.lv-ev { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lv-ev:last-child { border-bottom: 0; }
.lv-t { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.lv-ico { margin-left: 4px; }
.lv-ev.goal { background: var(--accent-soft); border-radius: 6px; padding-left: 6px; padding-right: 6px; }
.lv-ev.goal .lv-b { font-weight: 600; }
.lv-ev.typing .lv-b::after { content: "▍"; color: var(--lv); animation: lv-pulse 1s steps(2) infinite; }
.lv-b .tm { font-weight: 700; }
.lv-b .tm.t1 { color: var(--home); }
.lv-b .tm.t2 { color: var(--away); }
.lv-b a.pl { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); }
.lv-chat { position: sticky; top: 76px; display: flex; flex-direction: column; max-height: calc(100vh - 96px); }
.lv-chat-head { display: flex; justify-content: space-between; align-items: baseline; }
.lv-msgs { flex: 1; min-height: 220px; overflow-y: auto; font-size: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0; }
.lv-msg { padding: 2px 0; overflow-wrap: anywhere; }
.lv-mt { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.lv-emotes { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 0; }
.lv-emotes button { font-size: 20px; line-height: 1; border: 0; background: none; padding: 4px; border-radius: 6px; cursor: pointer; }
.lv-emotes button:hover { background: var(--soft); }
.lv-emotes button:active { transform: scale(1.25); }
.lv-form { display: flex; flex-direction: column; gap: 6px; }
.lv-form input { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); min-width: 0; }
.lv-send { display: flex; gap: 6px; }
.lv-send input { flex: 1; }
.lv-send button { font: inherit; font-size: 14px; font-weight: 600; border: 0; border-radius: 6px; background: var(--lv); color: #fff; padding: 0 14px; cursor: pointer; }
.lv-err { color: var(--bad); min-height: 1em; }
.lv-floats { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 20; }
.lv-float { position: absolute; bottom: -40px; font-size: 30px; animation: lv-up linear forwards; }
.lv-float.mine { font-size: 36px; }
@keyframes lv-up { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-75vh); opacity: 0; } }
@media (max-width: 860px) {
  main .lv-grid { grid-template-columns: minmax(0, 1fr); }
  .lv-chat { position: static; max-height: none; }
  .lv-msgs { max-height: 320px; }
  .lv-feed { max-height: 50vh; }
}
@media (max-width: 520px) {
  .lv-tn { font-size: 15px; }
  .lv-score span { min-width: 40px; font-size: 28px; }
  .lv-teams { gap: 6px; }
  .lv-state { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .lv-badge.on, .lv-ev.typing .lv-b::after, .lv-goal { animation: none; }
  .lv-float { display: none; }
}
.lv-sh { margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-sh b { color: var(--fg); }
.lv-rt { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.lv-lines summary { cursor: pointer; list-style: none; }
.lv-lines summary::-webkit-details-marker { display: none; }
.lv-lines summary h3::after { content: " ▾"; color: var(--muted); font-weight: 400; }
.lv-lines:not([open]) summary h3::after { content: " ▸"; }
table.lv-st { width: 100%; border-collapse: collapse; font-size: 13px; }
table.lv-st td, table.lv-st th { padding: 4px 6px; }
table.lv-st .n { text-align: right; font-variant-numeric: tabular-nums; }
table.lv-st { margin-bottom: 10px; }
.lv-kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 6px 0 0; font-size: 14px; }
.lv-kv dt { color: var(--muted); }
.lv-kv dd { margin: 0; }
.lv-kv .tm.t1, .lv-ev .tm.t1 { color: var(--home); font-weight: 600; }
.lv-kv .tm.t2, .lv-ev .tm.t2 { color: var(--away); font-weight: 600; }
.lv-gd { margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); }
.lv-ev.sum { background: var(--soft); border-radius: 6px; padding-left: 6px; padding-right: 6px; }
.lv-ev.sys .lv-b { color: var(--muted); font-style: italic; }
.lv-stats h3, .lv-lines h3 { margin: 0 0 8px; font-size: 16px; display: inline; }
/* squads by line (Sastāvi un maiņas): the line on the ice is outlined */
.lv-sq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.lv-sq-t { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lv-sq-t h4 { margin: 0; font-size: 14px; color: var(--home); }
.lv-sq-t.t2 h4 { color: var(--away); }
.lv-ln-h { display: flex; align-items: center; gap: 6px; }
.lv-ln-pts { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.lv-onb { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--lv); color: #fff; border-radius: 99px; padding: 1px 7px; }
.lv-sq-t.t2 .lv-onb { background: var(--away); }
.lv-ln-m { color: var(--fg); font-size: 12px; margin-top: 1px; }
.lv-pos { color: var(--muted); font-size: 10px; font-weight: 700; }
.lv-unread { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--lv); color: #fff; font-size: 11px; line-height: 18px; text-align: center; vertical-align: middle; }
.lv-prev, .lv-fold-i { display: none; }
@media (max-width: 860px) {
  .lv-sq { grid-template-columns: 1fr; }
  main { padding-bottom: 64px; }
  /* chat: bar fixed to the bottom; the header folds / unfolds it */
  .lv-chat { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 15; margin: 0; border-radius: 14px 14px 0 0; border-bottom: 0;
    max-height: 72vh; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
  .lv-chat-head { cursor: pointer; gap: 8px; align-items: center; min-height: 28px; }
  .lv-chat-head h3 { margin: 0; white-space: nowrap; }
  .lv-fold-i { display: inline; margin-left: auto; color: var(--muted); }
  .lv-fold-i::after { content: "▾"; }
  .lv-chat.folded .lv-fold-i::after { content: "▴"; }
  .lv-chat.folded .lv-msgs, .lv-chat.folded .lv-emotes, .lv-chat.folded .lv-form { display: none; }
  .lv-chat.folded .lv-prev { display: block; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: var(--muted); }
  .lv-chat.folded #lvViewers { display: none; }
  .lv-msgs { min-height: 0; max-height: 38vh; }
}
/* layout v3: right column = feed + chat (desktop); line-up tables */
main .lv-grid { grid-template-columns: minmax(0, 1fr) 380px; }
.lv-side { position: sticky; top: 76px; height: calc(100vh - 92px); display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.lv-side .lv-feed-card { flex: 1 1 auto; min-height: 160px; display: flex; flex-direction: column; }
.lv-side .lv-feed { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
.lv-chat { position: static; top: auto; flex: 0 0 auto; max-height: none; }
.lv-chat-head { cursor: pointer; gap: 8px; align-items: center; }
.lv-chat-head h3 { margin: 0; white-space: nowrap; }
.lv-msgs { flex: none; min-height: 0; height: 150px; }
.lv-fold-i { display: inline; margin-left: auto; color: var(--muted); }
.lv-fold-i::after { content: "▾"; }
.lv-chat.folded .lv-fold-i::after { content: "▴"; }
.lv-chat.folded .lv-msgs, .lv-chat.folded .lv-emotes, .lv-chat.folded .lv-form { display: none; }
.lv-chat.folded .lv-prev { display: block; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: var(--muted); }
table.lv-sqt { width: 100%; border-collapse: collapse; font-size: 13px; }
table.lv-sqt td, table.lv-sqt th { padding: 3px 6px; }
table.lv-sqt .n { text-align: right; font-variant-numeric: tabular-nums; width: 32px; }
table.lv-sqt td.lv-pos { width: 22px; color: var(--muted); font-size: 11px; font-weight: 700; }
table.lv-sqt tr.lv-lh td { background: var(--soft); padding-top: 6px; padding-bottom: 6px; border-top: 6px solid var(--card); }
table.lv-sqt tbody.on td { background: var(--accent-soft); }
table.lv-sqt tbody.on tr.lv-lh td { background: var(--lv); color: #fff; }
table.lv-sqt tbody.on tr.lv-lh .lv-ln-m, table.lv-sqt tbody.on tr.lv-lh .lv-ln-pts { color: rgba(255,255,255,.85); }
table.lv-sqt tbody.on .lv-onb { background: #fff; color: var(--lv); }
.lv-sq-t.t2 table.lv-sqt tbody.on tr.lv-lh td { background: var(--away); }
.lv-sq-t.t2 table.lv-sqt tbody.on .lv-onb { color: var(--away); }
.lv-sq-t.t2 table.lv-sqt tbody.on td { background: var(--soft); }
table.lv-sqt tbody.sp tr.lv-lh td { background: none; border-bottom: 1px solid var(--line); }
table.lv-sqt tbody.sp.on tr.lv-lh td { background: var(--lv); }
@media (max-width: 1060px) { .lv-sq { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  main .lv-grid { grid-template-columns: minmax(0, 1fr); }
  .lv-side { position: static; height: auto; display: block; }
  .lv-side .lv-feed-card { display: block; }
  .lv-side .lv-feed { max-height: 60vh; }
  .lv-chat { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 15; margin: 0; border-radius: 14px 14px 0 0; border-bottom: 0;
    max-height: 72vh; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
  /* open chat: room under the inputs so they are easy to tap */
  .lv-chat:not(.folded) { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .lv-msgs { height: auto; max-height: 36vh; }
}
.lv-unread[hidden] { display: none; }
/* folded line groups: header row only; click unfolds ratings + players */
table.lv-sqt tr.lv-lh { cursor: pointer; }
table.lv-sqt tr.lv-lh:focus-visible td { outline: 2px solid var(--lv); outline-offset: -2px; }
.lv-car::before { content: "▸"; display: inline-block; width: 12px; color: var(--muted); font-size: 11px; }
tbody.open .lv-car::before { content: "▾"; }
table.lv-sqt tbody.on .lv-car::before { color: rgba(255,255,255,.85); }
.lv-ln-h .lv-ln-m { margin-left: 2px; }
table.lv-sqt tr.lv-lr td { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
table.lv-sqt td.n { width: auto; white-space: nowrap; color: var(--muted); font-size: 12px; }
.lv-gk.out { opacity: .7; }
/* final statistics: head-to-head rows, goalie cards, stars */
.lv-cmp { display: grid; grid-template-columns: 1fr minmax(120px, 1.4fr) 1fr; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.lv-cmp-h { border-bottom: 2px solid var(--line); padding-top: 2px; }
.lv-cmp-h .lv-cv { font-size: 14px; font-weight: 700; }
.lv-cmp-h .lv-cv.t1 { color: var(--home); }
.lv-cmp-h .lv-cv.t2 { color: var(--away); }
.lv-cv { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; color: var(--muted); }
.lv-cv.lead { color: var(--fg); }
.lv-cv.t1 { text-align: left; }
.lv-cv.t2 { text-align: right; }
.lv-cv small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.lv-cl { text-align: center; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lv-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin-top: 4px; background: var(--soft); gap: 2px; }
.lv-bar i { display: block; height: 100%; }
.lv-bar i.t1 { background: var(--home); }
.lv-bar i.t2 { background: var(--away); }
.lv-cmp-h .lv-bar { display: none; }
.lv-sub { margin: 16px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lv-gkg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lv-gkg > div { display: flex; flex-direction: column; gap: 6px; }
.lv-gkc { border-left: 3px solid var(--home); background: var(--soft); border-radius: 0 8px 8px 0; padding: 7px 10px; }
.lv-gkc.t2 { border-left-color: var(--away); }
.lv-gkc-n { font-weight: 600; font-size: 14px; }
.lv-gkc-v { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-gkc-v b { font-size: 18px; color: var(--fg); margin-right: 4px; }
.lv-gkc-s { font-size: 12px; color: var(--muted); }
.lv-stars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lv-star { background: var(--soft); border-radius: 8px; padding: 8px 10px; text-align: center; border-top: 3px solid var(--line); }
.lv-star.t1 { border-top-color: var(--home); }
.lv-star.t2 { border-top-color: var(--away); }
.lv-star-r { font-size: 13px; letter-spacing: 1px; }
.lv-star-n { font-weight: 600; font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.lv-star-t { font-size: 12px; color: var(--muted); }
.lv-star-s { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.lv-star-s b { font-size: 14px; }
.lv-star-p { font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (max-width: 520px) {
  .lv-cmp { grid-template-columns: 1fr 1.2fr 1fr; gap: 6px; }
  .lv-cv { font-size: 17px; }
  .lv-gkg, .lv-stars { grid-template-columns: 1fr; }
}
.lv-flag { height: 0.85em; width: auto; vertical-align: -0.05em; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.lv-flag-big { display: block; margin: 0 auto 6px; height: 44px; width: 66px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
@media (max-width: 520px) { .lv-flag-big { height: 30px; width: 45px; } }
table.lv-sqt tr.lv-ch td { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 1px solid var(--line); }
table.lv-sqt td.n { min-width: 40px; color: var(--fg); font-variant-numeric: tabular-nums; }

/* OPEN līga */
.ol-sel { font: inherit; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--fg); max-width: 100%; }
.ol-d { text-align: right; white-space: nowrap; }
.ol-d .up, .ol-tbl .up { color: var(--good); } .ol-d .dn, .ol-tbl .dn { color: var(--bad); }
.ol-tbl tr.ol-cut td { border-bottom: 2px solid var(--accent); }
.ol-tbl tr.ol-left td { opacity: .55; }
.ol-br { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.ol-series { border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; margin-bottom: 8px; }
.ol-sr { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.ol-sr .team { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-sr b { font-variant-numeric: tabular-nums; min-width: 1.5em; text-align: right; }
.ol-sr.win .team { font-weight: 700; } .ol-sr.out { opacity: .55; }
.ol-seed { font-size: 11px; color: var(--muted); width: 1.6em; text-align: right; }
@media (max-width: 640px) { .hero .ol-sel { width: 100%; } .hero > div:has(.ol-sel) { flex-wrap: wrap; } .game .ol-d { grid-column: 1 / 4; text-align: center; } }
.form .N { background: #8a8486; }
.ol-my { margin: 16px 0 4px; }
.ol-ch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ol-btn { display: inline-block; background: var(--lv); color: #fff; font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 6px; white-space: nowrap; }
.ol-btn:hover { text-decoration: none; filter: brightness(1.1); }
.ol-btn.sent { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.ol-btn.arm { background: #b26b00; }
.game.ol-mine { background: var(--accent-soft); border-radius: 6px; padding-left: 6px; padding-right: 6px; }

/* Tiešraide: evening series strip */
.lv-queue { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.lv-q-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.lv-q { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lv-q li { display: flex; gap: 6px; align-items: baseline; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: var(--soft); }
.lv-q li i { font-style: normal; font-size: 11px; color: var(--muted); }
.lv-q li.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.lv-q li.on i { color: var(--bad); }
.lv-q li.done { opacity: .6; }
.lv-q li.next { border-color: var(--muted); }

/* articles (raksts.php) */
.artlink { display: flex; flex-direction: column; gap: 2px; margin: 12px 0; color: var(--fg); border-left: 4px solid var(--lv); }
.artlink:hover { text-decoration: none; border-color: var(--lv); }
.artlink .ai-badge { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--lv); border-radius: 4px; padding: 2px 7px; margin-bottom: 4px; }
.art { max-width: 820px; }
.art > p, .art > ul { font-size: 16px; line-height: 1.65; }
.art > ul li { margin-bottom: 6px; }
.art .art-tbl { margin: 14px 0; }
.art td.dvc { white-space: nowrap; }
.art .art-fold > summary b { font-size: 18px; }
.art .tr-mk { display: inline-block; min-width: 1.1em; text-align: center; font-size: 1.15em; line-height: 1; }
.art .art-fold .body > p, .art .art-fold .body > ul { font-size: 15px; line-height: 1.6; }
.dv { display: inline-block; position: relative; width: 80px; height: 8px; margin-right: 8px; background: var(--soft); border-radius: 4px; vertical-align: middle; }
.dv::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--muted); }
.dv i { position: absolute; top: 0; bottom: 0; }
.dv i.p { left: 50%; background: var(--good); border-radius: 0 4px 4px 0; }
.dv i.m { right: 50%; background: var(--bad); border-radius: 4px 0 0 4px; }
b.pos { color: var(--good); } b.neg { color: var(--bad); }
.pb { display: inline-block; width: 60px; height: 6px; margin-left: 8px; background: var(--soft); border-radius: 3px; vertical-align: middle; overflow: hidden; }
.pb i { display: block; height: 100%; background: var(--lv); }
@media (max-width: 640px) { .dv { width: 44px; margin-right: 4px; } .pb { display: none; } .art > p, .art > ul { font-size: 15px; } }

/* article charts: one series, bars from a zero baseline, 4px rounded data end, hover tooltip */
.chart { margin: 14px 0; }
.chart h3 { margin: 0 0 2px; font-size: 15px; }
.chart .csub { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart path.col { fill: var(--chart); }
.chart rect.hit { fill: transparent; }
.chart g.c:hover path.col { opacity: .7; }
.ctip { position: fixed; z-index: 50; pointer-events: none; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.hb { display: grid; grid-template-columns: minmax(70px, 160px) 1fr 70px; gap: 5px 10px; align-items: center; font-size: 13px; }
.hb .l { color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb .t { height: 14px; background: var(--soft); border-radius: 0 4px 4px 0; }
.hb .t i { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.hb .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); }
.hb .l.sub, .hb .v.sub { color: var(--muted); margin: 0; font-size: inherit; }   /* not the page-subtitle .sub */
.chart details { margin-top: 8px; font-size: 13px; }
.chart details summary { cursor: pointer; color: var(--link); }

/* raksts-komandai.php: order form */
.order { display: grid; grid-template-columns: 160px minmax(0,1fr) auto; gap: 10px; align-items: end; }
.order label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.order input, .order select { font: inherit; font-size: 15px; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; min-width: 0; }
.order button { font: inherit; font-weight: 600; color: #fff; background: var(--lv); border: 0; border-radius: 6px; padding: 9px 16px; cursor: pointer; }
.order button:disabled { opacity: .5; cursor: default; }
.order-msg { margin: 12px 0 0; }
.order-msg.wait::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--line); border-top-color: var(--lv); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) { .order { grid-template-columns: 1fr; } }

/* front page: articles (left) + order an article about your team (right) */
.artrow { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; margin: 12px 0; align-items: start; }
.artrow > .artlink { margin: 0; }
.artrow #home-ordered { display: flex; flex-direction: column; gap: 2px; }
.order.mini { grid-template-columns: minmax(0,1fr) auto; margin: 10px 0 2px; max-width: 360px; }
@media (max-width: 760px) { .artrow { grid-template-columns: 1fr; } .order.mini { grid-template-columns: minmax(0,1fr) auto; } }
.ol-cal { grid-column: 1 / -1; font-size: 12px; margin-top: -4px; }
.ol-cal.ok { color: var(--good); } .ol-cal.bad { color: var(--bad); } .ol-cal.open { color: var(--muted); }
.ol-plan td { padding-top: 5px; padding-bottom: 5px; } .ol-plan tr.ol-past td { opacity: .55; } .ol-plan .nowrap { white-space: nowrap; }
.olg { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.olg:last-of-type { border-bottom: 0; }
.olg.ol-mine { background: var(--accent-soft); border-radius: 6px; padding-left: 6px; padding-right: 6px; }
.olg-m { flex: 1; min-width: 0; }
.olg-r { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; line-height: 1.45; }
.olg-n { min-width: 0; overflow-wrap: anywhere; }
.olg-e { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.olg-x { font-size: 12px; color: var(--bad); margin-top: 2px; }
.olg-pre { display: none; margin-top: 2px; }
.ol-showpre .olg-pre { display: block; } .ol-legend .olg-pre { display: none; } .ol-legend.ol-showpre .olg-pre { display: inline; }
.oli { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; margin-top: 2px; vertical-align: -4px; }
.oli.ok { background: var(--good); } .oli.open { background: #e0b400; } .oli.bad { background: var(--bad); } .oli.unk { background: var(--line); color: var(--muted); }
.ol-legend .oli { margin: 0 3px 0 8px; } .ol-legend .oli:first-child { margin-left: 0; }
.ol-pretg { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); cursor: pointer; }

/* international cups: PL / VČK switch, Latvian rows in game lists, knockout bracket */
.intl-sw { margin: 4px 0 6px; }
.intl-sw button { font-size: 15px; padding: 8px 18px; }
.intl-lv { margin-top: 8px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.intl-me { background: var(--accent-soft); border-radius: 6px; padding: 0 6px; }
.intl-br { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.intl-br .pair span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intl-rd details summary { cursor: pointer; color: var(--link); margin: 8px 0; }
@media (max-width: 760px) { .intl-br { grid-template-columns: minmax(0, 1fr); } }
/* weekly review transfers: whole row green (joined) / red (left) */
.art tr.row-in > td { background: color-mix(in srgb, var(--good) 14%, transparent); }
.art tr.row-out > td { background: color-mix(in srgb, var(--bad) 14%, transparent); }
/* weekly review: transfer cards per team */
.art .trf { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.art .trf .card { padding: 12px 14px; margin: 0; }
.art .trf h4 { margin: 0 0 10px; font-size: 16px; }
.art .trf .tr-col { border-left: 3px solid var(--bad); padding-left: 10px; margin-bottom: 10px; }
.art .trf .tr-col.in { border-left-color: var(--good); }
.art .trf .lbl { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--bad); margin-bottom: 2px; }
.art .trf .tr-col.in .lbl { color: var(--good); }
.art .trf .pl { font-size: 14px; margin: 5px 0; line-height: 1.35; }
.art .trf .pl small { display: block; color: var(--muted); font-size: 12.5px; }
.art .trf .chg { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.art .trf .chip { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.art .trf .chip.up { background: color-mix(in srgb, var(--good) 14%, transparent); }
.art .trf .chip.up b, .art .trf .chip.up { color: var(--good); }
.art .trf .chip.down { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.order label.wish { grid-column: 1 / -1; display: block; }
.order label.wish input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; }

/* national-team article: flags, the groups -> quarterfinals scheme, team-vs-team comparison */
img.nf { width: 20px; height: 13px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); vertical-align: middle; flex: none; }
img.nf.big { width: 30px; height: 20px; border-radius: 3px; }
html { scroll-behavior: smooth; }
.art h2.anchor { scroll-margin-top: 16px; }
.natbr .nb { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 14px; align-items: center; }
.natbr h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: center; }
.nb-grp { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--soft); }
.nb-row { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 5px; font-size: 14px; }
.nb-row .pos { width: 14px; color: var(--muted); font-size: 12px; text-align: right; }
.nb-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-row .pts { color: var(--muted); font-size: 12px; }
.nb-row.in { background: color-mix(in srgb, var(--good) 12%, transparent); font-weight: 600; }
.nb-row.out { opacity: .6; }
.nb-row.me .nm, .nb-t.me .nm { color: var(--lv); }
.nb-grp.l .nb-row.in { box-shadow: inset -3px 0 0 var(--good); }
.nb-grp.r .nb-row.in { box-shadow: inset 3px 0 0 var(--good); }
.nb-mid { display: flex; flex-direction: column; gap: 10px; }
.natbr .nb.solo { grid-template-columns: 1fr; }
.nb.solo .nb-mid { display: grid; grid-template-columns: 1fr 1fr; }
.nb.solo .nb-mid h4, .nb.solo .nb-next { grid-column: 1 / -1; }
.nb-pair { display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); text-decoration: none; transition: border-color .15s, transform .15s; }
.nb-pair:hover { border-color: var(--accent); transform: translateY(-1px); }
.nb-t { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; }
.nb-t .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-t .seed { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.nb-t .pc { font-size: 12px; color: var(--muted); margin-left: auto; }
.nb-t.fav .pc { color: var(--good); font-weight: 700; }
.nb-bar { height: 4px; border-radius: 3px; background: var(--away); overflow: hidden; }
.nb-bar i { display: block; height: 100%; background: var(--home); }
.nb-next { text-align: center; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
@media (max-width: 760px) {
  .natbr .nb { grid-template-columns: 1fr 1fr; }
  .nb-mid { grid-column: 1 / -1; order: -1; }
  .nb.solo .nb-mid { grid-template-columns: 1fr; }
}
.vs { padding: 12px 14px; }
.vs-h { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 8px; }
.vs-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vs-t.b { flex-direction: row-reverse; text-align: right; }
.vs-t b { font-size: 17px; }
.vs-p { font-size: 18px; font-weight: 700; color: var(--muted); }
.vs-x { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.vs table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vs th { font-weight: 400; color: var(--muted); font-size: 12.5px; text-align: center; padding: 4px 6px; white-space: nowrap; }
.vs td { padding: 4px 6px; width: 40%; border-top: 1px solid var(--line); }
.vs th { border-top: 1px solid var(--line); }
.vs td.n { text-align: right; }
.vs td.vs-b { color: var(--good); font-weight: 700; }

/* articles: league metric small multiples (chips choose panels), ranked lists, two-column grid */
.metrics .mchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.mchip { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--card); color: var(--muted); padding: 4px 11px; border-radius: 999px; cursor: pointer; }
.mchip:hover { border-color: var(--chart); color: var(--fg); }
.mchip.on { background: var(--chart); border-color: var(--chart); color: #fff; font-weight: 600; }
.mpanel { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }
.mph { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.mph span { color: var(--muted); font-size: 12px; }
.metrics svg .lx, .metrics svg .tier { fill: var(--muted); font-size: 10px; }
.metrics svg .tier { font-size: 12px; font-weight: 700; }
.metrics svg .vl { fill: var(--fg); font-size: 11px; font-weight: 600; }
.metrics svg .sep { stroke: var(--line); stroke-width: 1; }
.metrics svg .base { stroke: var(--muted); stroke-width: 1; }
.metrics path.col { opacity: .78; } .metrics path.col.ext { opacity: 1; }
.metrics g.c:hover path.col { opacity: 1; }
.ranks { margin: 14px 0; }
.ranks h3 { margin: 0 0 2px; font-size: 15px; }
.ranks .csub { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.ranks ol { list-style: none; margin: 0; padding: 0; }
.ranks li { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ranks li:last-child { border-bottom: 0; }
.ranks .rk { width: 24px; height: 24px; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ranks .rk.top { background: var(--accent-soft); color: var(--chart); }
.ranks .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranks .rs { color: var(--muted); font-size: 12px; margin-top: 1px; }
.ranks .rb { display: block; height: 4px; margin-top: 5px; background: var(--soft); border-radius: 2px; overflow: hidden; }
.ranks .rb i { display: block; height: 100%; background: var(--chart); border-radius: 2px; }
.ranks .rb i.m { background: var(--bad); }
.ranks .rv { text-align: right; font-variant-numeric: tabular-nums; }
.ranks .rv b { display: block; font-size: 16px; }
.ranks .rv small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.art-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0 14px; align-items: start; }
.art-grid > .ranks, .art-grid > .card { margin: 7px 0; }
@media (max-width: 760px) { .art-grid { grid-template-columns: minmax(0,1fr); } }

/* league play-off series (liga.php) */
.po-series { border-bottom: 1px solid var(--line); padding: 2px 0 6px; }
.po-series:last-child { border-bottom: 0; }
.po-series .pair { border-bottom: 0; padding-bottom: 0; }
.po-series .pair b { min-width: 34px; text-align: center; }
.po-games { padding: 0 4px; line-height: 1.5; }

/* OPEN līga: Elo over time (one line per team, highlighted teams in colour, crosshair tooltip = that day's table) */
.oe .oe-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.oe .oe-mode, .oe .oe-teams { display: contents; }
.oe .oe-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.oe .oe-chip { color: var(--fg); padding: 3px 10px 3px 8px; }
.oe .oe-chip i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--line); }
.oe .oe-chip.on { background: var(--card); color: var(--fg); border-color: var(--muted); font-weight: 600; }
.oe .oe-chip.oe-full { border-color: var(--bad); }
.oe .oe-plot { position: relative; }
.oe .oe-plot svg { touch-action: pan-y; }
.oe .grid line { stroke: var(--line); stroke-width: 1; }
.oe path.ln { fill: none; stroke: var(--muted); stroke-opacity: .32; stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; }
.oe path.ln.sel { stroke-opacity: 1; stroke-width: 2; }
.oe path.ln.hov { stroke: var(--fg); stroke-opacity: 1; stroke-width: 2.5; }
.oe path.ln.sel.hov { stroke-width: 3; }
.oe .xh { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.oe .mk circle { stroke: var(--card); stroke-width: 2; pointer-events: none; }
.oe .lab { fill: var(--fg); font-size: 11.5px; }
.oe rect.hit { fill: transparent; cursor: crosshair; }
.oe .oe-hint { margin: 6px 0 0; }
.oe .oe-tbl td, .oe .oe-tbl th { padding: 3px 6px; font-size: 12px; }
.oe-tip { padding: 7px 9px; }
.oe-tip table { border-collapse: collapse; margin-top: 4px; font-variant-numeric: tabular-nums; }
.oe-tip td { padding: 0 4px; border: 0; font-size: 12px; white-space: nowrap; line-height: 1.45; }
.oe-tip td.n { text-align: right; }
.oe-tip tr.hv td { font-weight: 700; }
.oe-tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.oe-tip .up { color: var(--good); } .oe-tip .dn { color: var(--bad); }
@media (max-width: 640px) {
  .oe .oe-chip { font-size: 12px; padding: 2px 8px 2px 6px; white-space: nowrap; flex: none; }
  .oe .oe-sep { display: none; }
  .oe .oe-teams { display: flex; gap: 6px; width: 100%; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
}

/* season switcher (app.js seasons, user 2026-11-30) */
.season-sel { font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; flex: none; }
.season-sel option { color: #111; background: #fff; }
.season-banner { background: var(--accent-soft); border-bottom: 1px solid var(--line); color: var(--fg); font-size: 14px; }
.season-banner .wrap { padding-top: 8px; padding-bottom: 8px; }
.season-banner a { font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .season-sel { font-size: 12px; padding: 3px 4px; } }
