/* Innings & Alleys — one small stylesheet, system fonts, no web-font downloads (fast on mobile data). */

:root {
  --bg: #f5f6f3;
  --card: #ffffff;
  --ink: #15191f;
  --muted: #5a6470;
  --line: #e1e5e2;
  --pitch: #0e5a36;
  --pitch-soft: #e3f1ea;
  --court: #d9540d;
  --court-soft: #fdeee4;
  --live: #d32f55;
  --header: #0c2a1c;
  --header-ink: #f3f7f4;
  --shadow: 0 1px 2px rgba(16, 24, 20, .06), 0 2px 8px rgba(16, 24, 20, .04);
  --radius: 12px;
  --wrap: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1113;
    --card: #161a1e;
    --ink: #edf1ee;
    --muted: #9aa5ae;
    --line: #262d31;
    --pitch: #45c283;
    --pitch-soft: #13261c;
    --court: #ff8a42;
    --court-soft: #2a1a10;
    --live: #ff5c7f;
    --header: #0a1a12;
    --header-ink: #edf1ee;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--pitch); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin: 2rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 740px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--court); outline-offset: 2px; }

/* Header --------------------------------------------------------------- */
.site-header { background: var(--header); color: var(--header-ink); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--header-ink); text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span b { color: #ffb37e; font-weight: 800; }
.nav-toggle {
  background: none; border: 1px solid rgba(255,255,255,.25); color: var(--header-ink);
  border-radius: 8px; padding: 6px 12px; font: inherit; font-size: .9rem; cursor: pointer;
}
#site-nav { display: none; }
#site-nav.open { display: block; position: absolute; left: 0; right: 0; top: 56px; background: var(--header); padding: 8px 16px 16px; }
#site-nav a { display: block; color: var(--header-ink); text-decoration: none; padding: 10px 0; font-weight: 600; }
#site-nav a[aria-current="page"] { color: #ffb37e; }
@media (min-width: 760px) {
  .nav-toggle { display: none; }
  #site-nav, #site-nav.open { display: flex; position: static; padding: 0; gap: 22px; background: none; }
  #site-nav a { padding: 0; }
}

/* Hero ----------------------------------------------------------------- */
.hero { padding-top: 28px; padding-bottom: 8px; }
.hero p.lede { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0; }
.kicker { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--court); margin: 0 0 .35rem; }

/* Follow bar ------------------------------------------------------------ */
.follow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  background: var(--pitch-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 20px 0;
}
.follow strong { font-size: .98rem; }
.follow-links { display: flex; flex-wrap: wrap; gap: 8px; }
.follow-btn {
  display: inline-block; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  text-decoration: none; color: #fff; background: var(--pitch);
}
.follow-btn.f-telegram { background: #2481cc; }
.follow-btn.f-whatsapp { background: #1c9d57; }
.follow-btn.f-facebook { background: #1b64d8; }

/* Tabs ---------------------------------------------------------------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 24px 0 16px; }
.tabs [role="tab"] {
  appearance: none; background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 10px 14px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--court); }

/* Match cards ------------------------------------------------------------ */
.match-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 720px) { .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.match {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow); min-width: 0;
}
.match.state-in { border-left: 4px solid var(--live); }
.match-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.league { font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; flex: none; }
.badge.live { background: var(--live); color: #fff; }
.badge.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #fff; margin-right: 5px; vertical-align: 1px; animation: pulse 1.4s infinite; }
.badge.soon { background: var(--pitch-soft); color: var(--pitch); }
.badge.done { background: var(--court-soft); color: var(--court); }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .badge.live::before { animation: none; } }
.team { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 0; }
.team + .team { border-top: 1px dashed var(--line); }
.chip {
  font-size: .7rem; font-weight: 800; min-width: 44px; text-align: center; padding: 3px 6px;
  border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted);
}
.tname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.team.is-winner .tname, .team.is-winner .score { color: var(--pitch); }
.status { margin: 8px 0 0; font-size: .92rem; font-weight: 600; }
.match.state-in .status { color: var(--live); }
.note { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.updated, .more-link { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.more-link a { font-weight: 700; }
.scores-empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; color: var(--muted); }
.skeleton { min-height: 118px; display: grid; gap: 10px; align-content: center; }
.skeleton span { display: block; height: 12px; border-radius: 6px; background: var(--line); }
.skeleton span:nth-child(1) { width: 40%; } .skeleton span:nth-child(3) { width: 70%; }

/* Ad slots ---------------------------------------------------------------- */
/* Clearly labelled, set apart from buttons and links to avoid accidental taps. */
.ad-slot { margin: 32px auto; text-align: center; }
.ad-slot::before {
  content: "Advertisement"; display: block; font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.ad-slot[hidden] { display: none; }
.ad-body { display: flex; justify-content: center; min-height: 50px; }
.ad-placeholder {
  display: flex; align-items: center; justify-content: center; max-width: 100%;
  background: repeating-linear-gradient(45deg, var(--line), var(--line) 8px, transparent 8px, transparent 16px);
  border: 1px dashed var(--muted); color: var(--muted); font-size: .8rem; border-radius: 8px;
}

/* Guide cards ------------------------------------------------------------- */
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
}
.card:hover { border-color: var(--pitch); }
.card .tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--court); }
.card h3 { margin: 6px 0; }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }

.points { display: grid; gap: 12px; grid-template-columns: 1fr; padding: 0; list-style: none; }
@media (min-width: 720px) { .points { grid-template-columns: repeat(3, 1fr); } }
.points li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.points b { display: block; margin-bottom: 2px; }

/* Articles ---------------------------------------------------------------- */
.article { padding-top: 24px; padding-bottom: 8px; }
.article .meta { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.article p, .article li { font-size: 1.04rem; }
.article table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: .95rem; display: block; overflow-x: auto; }
.article th, .article td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { background: var(--pitch-soft); }
.article code, .scoreline {
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
}
.callout { background: var(--court-soft); border-left: 4px solid var(--court); border-radius: 8px; padding: 12px 16px; margin: 18px 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0; }
.share-label { font-weight: 700; font-size: .9rem; margin-right: 4px; }
.share-btn {
  appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .88rem; text-decoration: none; cursor: pointer;
}
.share-btn:hover { border-color: var(--pitch); }

/* Footer ------------------------------------------------------------------- */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 6px 0; }
