/* SillyScout: webbsidans stil. Mobil först, ingen kursiv. Se docs/design-webbsida.md.
   Samma utseende som videorna (Veckans lag): djupblå yta, Bebas Neue i versaler för rubriker, lag och siffror, Inter för etiketter
   och text, mörka plattor med raka hörn och cyan på det som är valt. Ligan syns bara i banderollen med ligans namn (--lg, banner:
   i leagues/<liga>.yaml). Loggan är SILLY i vitt och SCOUT i gult; gult används inte till något annat. Bara mörkt läge tills vidare. */

@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("fonts/bebas-neue.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --top: #11365c; --bottom: #050f1f; --glow: #1e8ed2;
  --plate: #0f2746; --plate-2: #16335a; --plate-hi: #1a3d68; --line: rgba(255, 255, 255, .12);
  --text: #ffffff; --muted: #a5b4cd; --faint: #7d8eab;
  --accent: #46c8f5; --accent-ink: #04121f; --link: #6fd6fa;
  --brand: #ffd000; --lg: #46c8f5; --lg-ink: #04121f;
  --up: #4ee39a; --down: #ff8080; --score: #fbfaf7; --score-ink: #17151c;
  --r: 3px;
  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 60px;
  --head-h: 56px;
  color-scheme: dark;
}

/* ---------- grunden ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { font-style: normal; }                         /* ingen kursiv någonstans, inte ens i em, i, cite eller address */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bottom); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 400 16px/1.5 var(--sans); font-feature-settings: "tnum" 1;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .022) 0 2px, transparent 2px 64px),
    radial-gradient(60% 40% at 85% 0%, rgba(30, 142, 210, .35), transparent 70%),
    linear-gradient(180deg, var(--top), var(--bottom) 70%);
  background-color: var(--bottom); background-attachment: fixed;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 2px; }
abbr[title] { text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: var(--r); font-weight: 700; }
.skip:focus { top: 8px; }
main { max-width: 760px; margin: 0 auto; padding: 0 16px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* gemensamma etiketter: liten Inter i versaler, glest, i cyan (RESULTAT, TABELLEN NU) */
.eyebrow, .group-head, .day-head, .block-sub, .moves h4 {
  font: 700 12px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}

/* ---------- sidhuvud ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--head-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(16px, calc((100% - 760px) / 2 + 16px)); background: rgba(5, 15, 31, .9); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; font: 400 32px/1 var(--display); letter-spacing: .03em; min-height: 44px; padding-top: 3px; }
.brand-mark { color: var(--text); }
.brand-word { color: var(--brand); }

/* ---------- ligans banderoll (som ligaetiketten i videorna) ---------- */
.bug { display: inline-flex; align-items: stretch; max-width: 100%; font: 400 22px/1 var(--display); letter-spacing: .04em; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.bug-lg { position: relative; z-index: 1; background: var(--lg); color: var(--lg-ink); padding: 8px 20px 5px 10px; margin-right: -12px; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bug-when { background: var(--plate-hi); color: var(--text); padding: 8px 12px 5px 22px; white-space: nowrap; }
.bug-sm { font-size: 19px; box-shadow: none; }
.bug-sm .bug-lg { padding: 6px 18px 3px 8px; }
.bug-sm .bug-when { padding: 6px 10px 3px 20px; color: var(--muted); }
h1.bug { font-size: 26px; }
@media (min-width: 560px) { h1.bug { font-size: 32px; } }

/* ---------- ligaväljare och chips ---------- */
.picker { border-bottom: 1px solid var(--line); background: rgba(5, 15, 31, .55); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; scroll-padding: 0 16px; max-width: 760px; margin: 0 auto; }
.chips::-webkit-scrollbar { display: none; }
.chips li { flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 3px 12px 0; border-radius: var(--r);
  background: var(--plate); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  font: 400 19px/1 var(--display); letter-spacing: .05em; white-space: nowrap;
}
.chip-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lg); margin-top: -3px; }
.chip[aria-current="page"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 16px rgba(70, 200, 245, .35); }
.chip-num { min-width: 44px; justify-content: center; padding: 3px 10px 0; font-size: 22px; }
.chips-rounds { padding: 4px 0 12px; }

/* ---------- sidans rubrik och flikar ---------- */
.page-head { padding: 22px 0 12px; display: grid; gap: 10px; justify-items: start; }
.title { font: 400 56px/.9 var(--display); letter-spacing: .005em; text-wrap: balance; }
.title::after { content: ""; display: block; width: 72px; height: 6px; margin-top: 12px; background: var(--accent); }
.subtabs { display: flex; gap: 2px; margin: 8px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a {
  display: inline-flex; align-items: center; min-height: 46px; padding: 4px 12px 0; color: var(--muted); text-decoration: none;
  font: 400 21px/1 var(--display); letter-spacing: .05em; border-bottom: 4px solid transparent; margin-bottom: -1px; white-space: nowrap; flex: none;
}
.subtabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- block och kort ---------- */
.block { margin: 20px 0 30px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.block-head h2, .section-title { font: 400 34px/1 var(--display); letter-spacing: .01em; }
.section-title { margin: 28px 0 12px; }
.block-sub { text-align: right; }
.more { font-size: 14px; font-weight: 600; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.card { margin: 0 0 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font: inherit; }
.card-head a { text-decoration: none; }
.card-sub { color: var(--muted) !important; font: 700 12px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; min-height: 40px; display: inline-flex; align-items: center; }
.lead { font-size: 17px; color: var(--muted); margin: 6px 0 16px; max-width: 62ch; }
.note { color: var(--muted); font-size: 13px; margin: 10px 0; }
.group-head { margin: 22px 0 10px; }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 4px 18px 0; border-radius: var(--r);
  background: transparent; border: 2px solid rgba(255, 255, 255, .45); color: var(--text); text-decoration: none;
  font: 400 21px/1 var(--display); letter-spacing: .06em; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- brickor för lag utan klubbmärke (som reservbrickorna i videorna, lib/teams.badge) ---------- */
.badge {
  flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--bc); color: var(--bi); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9);
  font: 400 12px/1 var(--display); letter-spacing: .02em; padding-top: 2px; overflow: hidden;
}
.badge-sm { width: 20px; height: 20px; font-size: 9px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .9); }
/* klubbmärken som bild: en svag ljus kant så att mörka märken syns mot de mörka plattorna */
.crest { flex: none; width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)); }
.crest-sm { width: 20px; height: 20px; }

/* ---------- matcher: en platta per match ---------- */
.day { margin-bottom: 16px; }
.day-head {
  position: sticky; top: var(--head-h); z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 0 8px;
  background: linear-gradient(180deg, var(--bottom) 70%, transparent);
}
.day-head::before { content: ""; width: 22px; height: 3px; background: var(--accent); flex: none; }
.matches { display: grid; gap: 6px; }
.match {
  display: grid; grid-template-columns: 62px 1fr; align-items: center; min-height: 76px;
  padding: 8px 14px 8px 0; background: var(--plate); border-radius: var(--r);
}
.m-time {
  align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 10px 0 4px;
  color: var(--muted); font: 700 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; text-align: center;
}
.m-ko { color: var(--text); font: 400 24px/1 var(--display); letter-spacing: .02em; padding-top: 2px; }
.m-special { color: var(--down); }
.m-teams { display: grid; gap: 8px; min-width: 0; padding-left: 14px; border-left: 1px solid var(--line); }
.m-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.m-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 23px/1 var(--display); letter-spacing: .02em; padding-top: 3px; }
.m-score {
  font: 400 26px/1 var(--display); min-width: 30px; text-align: center; padding: 4px 0 0; border-radius: 2px;
  background: var(--score); color: var(--score-ink);
}
.m-team.is-lose .m-name { color: var(--muted); }
.m-team.is-lose .m-score { background: rgba(255, 255, 255, .7); }
.m-goals { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin: 10px 0 2px 14px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.m-goals-away { text-align: right; }
.g-min { color: var(--accent); font-weight: 700; }
.g-kind { color: var(--faint); }

/* ---------- tabell: plattor per rad, placering och poäng i Bebas ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14px; }
.tbl th, .tbl td { padding: 0 6px; height: 48px; text-align: center; white-space: nowrap; background: var(--plate); }
.tbl thead th { height: 28px; background: transparent; color: var(--muted); font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.tbl tbody th { font-weight: 400; }
.tbl tbody tr > :first-child { border-radius: var(--r) 0 0 var(--r); }
.tbl tbody tr > :last-child { border-radius: 0 var(--r) var(--r) 0; }
.tbl .c-pos { position: sticky; left: 0; z-index: 2; width: 44px; min-width: 44px; padding: 0 2px 0 10px; text-align: left; }
.tbl tbody .c-pos { font: 400 24px/1 var(--display); padding-top: 3px; }
.tbl .c-pos.has-zone { box-shadow: inset 4px 0 0 var(--z); }
.tbl.has-moves .c-pos { width: 68px; min-width: 68px; }
.tbl .c-team { position: sticky; left: 44px; z-index: 2; text-align: left; width: 100%; max-width: 0; min-width: 140px; }
.tbl.has-moves .c-team { left: 68px; }
.tbl-wrap.is-full .tbl tbody .c-team { box-shadow: 8px 0 8px -8px rgba(0, 0, 0, .7); }
.team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tbl tbody .team { font: 400 22px/1 var(--display); letter-spacing: .02em; }
.tbl tbody .team-name { padding-top: 3px; }
.team-name { overflow: hidden; text-overflow: ellipsis; }
.tbl td { color: var(--muted); min-width: 32px; font-weight: 500; }
.tbl tbody td.c-pts { font: 400 26px/1 var(--display); color: var(--text); min-width: 38px; padding-top: 3px; }
.tbl .c-goals { min-width: 56px; padding-right: 12px; }
.tbl-wrap.is-full .tbl .c-team { min-width: 156px; max-width: none; width: auto; }
.pos { display: inline-block; min-width: 18px; }
.mv { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; font: 700 11px/1 var(--sans); vertical-align: 4px; }
.mv svg { width: 9px; height: 9px; fill: currentColor; }
.mv-up { color: var(--up); }
.mv-down { color: var(--down); }
.mv-same { color: var(--faint); }
.zones { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 2px; color: var(--muted); font-size: 13px; }
.zones li { display: inline-flex; align-items: center; gap: 7px; }
.zones li::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--z); }
.scroll-hint { display: none; }
@media (max-width: 559px) { .scroll-hint { display: block; } }

/* ---------- startsidan: ligalistan ---------- */
.league-list, .window-list { display: grid; gap: 6px; }
.league-item { display: flex; align-items: stretch; background: var(--plate); border-radius: var(--r); box-shadow: inset 5px 0 0 var(--lg); }
.league-link, .window-list a { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 70px; padding: 10px 14px 10px 18px; color: var(--text); text-decoration: none; }
.league-name { font: 400 28px/1 var(--display); letter-spacing: .02em; padding-top: 3px; }
.league-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-weight: 500; }
.league-round { margin-left: auto; color: var(--faint); }
.league-today { align-self: flex-start; font: 700 11px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.league-table { display: flex; align-items: center; justify-content: center; min-width: 84px; padding: 3px 14px 0; border-left: 1px solid var(--line); font: 400 20px/1 var(--display); letter-spacing: .06em; text-decoration: none; color: var(--accent); }
.window-list li { background: var(--plate); border-radius: var(--r); box-shadow: inset 5px 0 0 var(--lg); }

/* ---------- omgångar ---------- */
.round-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: 4px 0 8px; }
.round-title { text-align: center; font: 400 44px/1 var(--display); padding-top: 4px; }
.round-step { min-width: 64px; }
.round-step.is-off { visibility: hidden; }
.round-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; }
.round-grid a {
  display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: var(--r); background: var(--plate);
  color: var(--text); text-decoration: none; font: 400 24px/1 var(--display); padding-top: 3px;
}
.round-grid a.is-latest { background: var(--accent); color: var(--accent-ink); }

/* ---------- annonsplatser: fast höjd så att sidan inte hoppar när en annons laddas ---------- */
.ad { display: flex; align-items: center; justify-content: center; margin: 16px auto; border: 1px dashed var(--line); border-radius: var(--r); color: var(--faint); background: transparent; }
.ad-banner { width: 100%; max-width: 320px; min-height: 100px; }
.ad-box { width: 100%; max-width: 300px; min-height: 250px; }
.ad-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- sidfot ---------- */
.foot { max-width: 760px; margin: 32px auto 0; padding: 18px 16px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot p { margin: 0 0 8px; }

/* ---------- flikraden i botten (tummen) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(5, 15, 31, .94); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); text-decoration: none; font: 400 16px/1 var(--display); letter-spacing: .08em; position: relative;
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] svg { color: var(--accent); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 4px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* ---------- cookie-ruta (avstängd tills annonser finns) ---------- */
.consent {
  position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); z-index: 40;
  max-width: 560px; margin: 0 auto; padding: 16px; border-radius: var(--r); background: var(--plate-2); border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}
.consent p { margin: 0 0 12px; font-size: 14px; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- större skärmar ---------- */
@media (min-width: 560px) {
  .title { font-size: 76px; }
  .block-head h2, .section-title { font-size: 40px; }
  .tbl th, .tbl td { padding: 0 10px; }
}
@media (min-width: 900px) {
  .tabbar { left: 50%; right: auto; transform: translateX(-50%); width: 480px; bottom: 12px; border: 1px solid var(--line); border-radius: var(--r); height: var(--tabbar-h); padding: 0; box-shadow: 0 8px 30px rgba(0, 0, 0, .45); }
}

/* ---------- övergångar ---------- */
.transfers .transfer { display: grid; grid-template-columns: 62px 1fr; align-items: center; min-height: 76px; padding: 10px 14px 10px 0; background: var(--plate); border-radius: var(--r); }
.tr-body { min-width: 0; padding-left: 14px; border-left: 1px solid var(--line); }
.tr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tr-player { font: 400 24px/1 var(--display); letter-spacing: .02em; padding-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-top .pill { flex: none; display: inline-block; padding: 4px 7px 3px; border-radius: 2px; background: var(--plate-hi); color: var(--accent); font: 700 10px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.tr-move { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 7px; color: var(--muted); font-size: 13.5px; min-width: 0; }
.tr-side { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tr-club { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-arrow { color: var(--accent); font-weight: 700; }
.tr-fee { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--text); }
.muted { color: var(--muted); }
.club-moves { background: var(--plate); border-radius: var(--r); padding: 12px 14px 4px; }
.club-moves .card-head .team { display: flex; align-items: center; gap: 10px; font: 400 26px/1 var(--display); letter-spacing: .02em; }
.club-moves .card-head .team-name { padding-top: 3px; }
.moves { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 0 10px; font-size: 14px; }
.moves h4 { margin: 0 0 6px; }
.moves li { margin-bottom: 6px; line-height: 1.35; }
@media (max-width: 420px) { .moves { grid-template-columns: 1fr; } }
