/* Argentina vs Benin — static match guide. Tokens first. */
:root {
  --sky: #75aadb;
  --sky-deep: #1a4e80;
  --sky-ink: #143652;
  --paper: #f4f8fb;
  --card: #ffffff;
  --ink: #12202e;
  --muted: #3e5164;
  --line: #d4e2ee;
  --green: #008751;
  --yellow: #c8960a;
  --red: #c41028;
  --stripe-y: #fcd116;
  --stripe-r: #e8112d;
  --shadow: 0 10px 30px rgba(18, 40, 64, 0.08);
  --radius: 16px;
  --header: 64px;
  --nav-h: 62px;
  --ad-sticky: 54px;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --max: 1120px;
  --content: 740px;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #0c1824;
  --card: #132536;
  --ink: #e7f0f8;
  --muted: #b7c9d9;
  --line: #27445c;
  --sky-ink: #d7ebf9;
  --sky-deep: #8ec4ef;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.has-sticky-ad { padding-bottom: calc(var(--nav-h) + var(--ad-sticky) + env(safe-area-inset-bottom)); }
body.no-sticky-ad { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }

@media (min-width: 960px) {
  body.has-sticky-ad,
  body.no-sticky-ad { padding-bottom: 0; }
}

img, svg { max-width: 100%; display: block; }
a { color: var(--sky-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button, [role="button"], summary { cursor: pointer; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 8px; }

.wrap { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.prose { width: min(var(--content), 100%); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sky-ink);
}
h1 { font-size: clamp(2rem, 4vw, 3.25rem); margin: 0 0 12px; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: 2rem 0 0.6rem; }
h3 { font-size: 1.2rem; margin: 1.4rem 0 0.4rem; }
p { margin: 0 0 0.95rem; }
.lead { font-size: 1.12rem; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 1rem; color: var(--muted); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar {
  height: var(--header);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.03em;
  min-height: 44px;
}
.brand small { display: block; font-weight: 600; color: var(--muted); letter-spacing: 0.08em; font-size: 0.62rem; text-transform: uppercase; }
.flag-pair { display: flex; gap: 4px; }
.flag-pair svg { width: 28px; height: 18px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }

.primary { display: none; gap: 4px; margin-left: auto; }
.primary a, .menu-panel a {
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.92rem;
}
.primary a:hover, .menu-panel a:hover, .primary a[aria-current="page"] {
  background: color-mix(in srgb, var(--sky) 28%, transparent);
}
.icon-btn, .menu-btn {
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-btn { margin-left: 0; }
@media (min-width: 960px) {
  .primary { display: flex; }
  .menu-btn { display: none; }
  .icon-btn { margin-left: 0; }
}

.menu-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 8px 0 16px;
}
.menu-panel.open { display: block; }
.menu-panel .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.menu-panel a { padding: 8px 4px; }

.hero {
  position: relative;
  overflow: hidden;
  background: #123048;
  color: #f7fbff;
  border-bottom: 8px solid var(--green);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 14px;
  background: linear-gradient(var(--green) 0 0) left / 14px 100% no-repeat,
    linear-gradient(var(--stripe-y), var(--stripe-y)) 0 0 / 0 0;
}
.hero-stripe {
  height: 8px;
  background: linear-gradient(90deg, var(--green) 0 33%, var(--stripe-y) 33% 66%, var(--stripe-r) 66% 100%);
}
.hero-inner { padding: 28px 0 32px; position: relative; }
.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: #d7ebfa;
}
.hero h1 { color: white; max-width: 16ch; }
.hero .lead { color: #e7f3fb; max-width: 62ch; }
.hero-grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.4fr 0.8fr; align-items: end; }
}

.scoreboard {
  background: rgba(6, 22, 38, 0.35);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.scoreboard .team { font-family: var(--serif); font-size: 1.15rem; }
.sb-flag {
  width: 72px;
  height: 48px;
  margin: 0 auto 6px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.sb-side { min-width: 0; }
.scoreboard .countdown { grid-column: 1 / -1; margin-top: 6px; }
.scoreboard .countdown span { color: inherit; opacity: 0.82; }
.hero .scoreboard {
  background: #0d2740;
  color: #f7fbff;
  border-color: rgba(255, 255, 255, 0.16);
}
.scoreboard-solid {
  background: #1a4e80;
  color: #fff;
  border-color: transparent;
}
.scoreboard-light {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.scoreboard-light .countdown div,
.scoreboard-mini .countdown div {
  background: color-mix(in srgb, var(--sky) 24%, var(--card));
  color: var(--ink);
}
.scoreboard-mini .sb-flag { width: 54px; height: 36px; }
.scoreboard-mini .team { font-size: 1rem; }
.scoreboard-mini .vs { font-size: 1.25rem; }
.scoreboard-mini .countdown b { font-size: 1.05rem; }
.scoreboard-mini .countdown div { padding: 6px 2px; }
.scoreboard .vs {
  font-family: var(--mono);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
}
.scoreboard .meta { grid-column: 1 / -1; font-size: 0.92rem; }
.hero .scoreboard .meta { color: #d5e7f6; }
.sb-mid { display: grid; gap: 2px; justify-items: center; }
.sb-status {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 750;
}
.scoreboard.is-live .sb-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1faf4a;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(31, 175, 74, 0.6);
}
.sb-source { font-size: 0.78rem; opacity: 0.85; }
.scoreboard-mini { margin: 8px 0 12px; background: transparent; border: 0; padding: 0; }
.kicker-side {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--muted);
}
.match-card h2 { margin: 4px 0 8px; }
@media (prefers-reduced-motion: no-preference) {
  .scoreboard.is-live .sb-status::before { animation: live-pulse 1.4s ease-out infinite; }
}
@keyframes live-pulse {
  70% { box-shadow: 0 0 0 8px rgba(31, 175, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 175, 74, 0); }
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.countdown div {
  background: rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
}
.countdown b {
  display: block;
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 650;
}
.countdown span { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }

.layout {
  display: grid;
  gap: 22px;
  padding: 22px 0 48px;
}
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .sidebar { position: sticky; top: calc(var(--header) + 16px); }
}

.card, .facts, .faq, .author, .related, .notice, .ticket, .ad-slot, .hub a, details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card, .notice, .author, .related, .ticket { padding: 16px 18px; }
.section { margin: 0 0 18px; }

.facts { width: 100%; border-collapse: collapse; overflow: hidden; }
.facts th, .facts td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 34%; color: var(--muted); font-weight: 650; font-size: 0.92rem; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 14px 0 0; margin: 0; font-size: 0.88rem; }
.crumbs li { display: flex; gap: 6px; color: var(--muted); }
.crumbs a { color: var(--muted); }

.hub { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .hub { grid-template-columns: 1fr 1fr; } }
.hub a {
  display: block;
  padding: 14px 14px 12px;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}
.hub a strong { display: block; font-family: var(--serif); font-size: 1.12rem; }
.hub a span { color: var(--muted); font-size: 0.9rem; }
.hub a:hover { border-color: var(--sky); }

.bars { display: grid; gap: 12px; }
.bar-row { display: grid; gap: 4px; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 0.92rem; }
.track { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.fill { height: 100%; background: var(--sky-deep); border-radius: 99px; }
.fill.alt { background: var(--green); }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; }
.timeline time { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

details { padding: 0 14px; margin: 0 0 8px; box-shadow: none; }
details summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  font-weight: 700;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; margin-left: auto; font-family: var(--mono); color: var(--muted); }
details[open] summary::after { content: "–"; }
details p:last-child { margin-bottom: 12px; }

.tabs { display: flex; gap: 8px; margin: 8px 0; }
.tabs button {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 14px;
}
.tabs button[aria-selected="true"] { background: var(--sky-deep); color: white; border-color: var(--sky-deep); }
.panel[hidden] { display: none; }

.notice { border-left: 5px solid var(--yellow); }
.notice.danger { border-left-color: var(--red); }
.notice.ok { border-left-color: var(--green); }

.ad-slot {
  min-height: 100px;
  box-shadow: none;
  background: color-mix(in srgb, var(--paper) 70%, var(--card));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
}
.ad-slot.tall { min-height: 250px; }
.ad-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.ad-frame { min-height: 60px; }
.ad-slot.tall .ad-frame { min-height: 210px; }

.ad-sticky {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  z-index: 35;
  min-height: var(--ad-sticky);
  height: var(--ad-sticky);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-sticky .close-ad {
  position: absolute;
  right: 4px;
  top: 4px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
@media (min-width: 960px) { .ad-sticky { display: none; } }
body.no-sticky-ad .ad-sticky { display: none; }

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--card);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.bottom-nav a, .bottom-nav button {
  background: none;
  border: 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.68rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
}
.bottom-nav svg { width: 20px; height: 20px; }
.bottom-nav a[aria-current="page"] { color: var(--sky-deep); font-weight: 750; }
@media (min-width: 960px) { .bottom-nav { display: none; } }

.site-footer {
  border-top: 8px solid transparent;
  border-image: linear-gradient(90deg, var(--green) 0 33%, var(--stripe-y) 33% 66%, var(--stripe-r) 66% 100%) 1;
  padding: 28px 0 40px;
  background: #10283c;
  color: #e7f3fb;
}
[data-theme="dark"] .site-footer { background: #071018; }
.site-footer strong { color: white; }
.site-footer a { display: block; margin: 0 0 8px; color: #d5e7f6; text-decoration: none; min-height: 24px; }
.site-footer a:hover { color: white; text-decoration: underline; }
.foot-top {
  display: grid;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.foot-brand, .foot-editor { display: grid; gap: 8px; }
.foot-brand { grid-template-columns: auto 1fr; align-items: center; }
.foot-brand .flag-pair { width: 86px; }
.foot-editor p, .foot-brand p, .foot-base p { margin: 0; color: #d5e7f6; font-size: 0.92rem; }
.foot-grid { display: grid; gap: 18px; }
.foot-base {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.16);
  display: grid;
  gap: 8px;
}
@media (min-width: 800px) {
  .foot-top { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .foot-grid { grid-template-columns: repeat(4, 1fr); }
}
.legal { font-size: 0.82rem; color: var(--muted); }

.author {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sky-deep);
  color: #fff;
  font-weight: 750;
  letter-spacing: 0.04em;
}
[data-theme="dark"] .avatar { color: #0c1824; }
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--sky) 30%, var(--card));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th, table.data td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
table.data th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 12px;
  min-height: 44px;
}
textarea { min-height: 140px; }
.form-row { margin-bottom: 12px; }
button.primary-btn, a.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: var(--sky-deep);
  color: white;
  text-decoration: none;
  font-weight: 700;
}
[data-theme="dark"] button.primary-btn { color: #082033; }

.cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-h) + var(--ad-sticky) + 10px + env(safe-area-inset-bottom));
  z-index: 50;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
@media (min-width: 960px) {
  .cookie { left: auto; max-width: 420px; bottom: 16px; }
}
body.no-sticky-ad .cookie { bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) {
  body.no-sticky-ad .cookie, body.has-sticky-ad .cookie { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
