/* Layout: matchday-programme pages (single dark plum theme) — condensed signage headings, a deadline band,
   data tables that scroll inside their own panels. */
:root {
  /* Night-match look: deep plum ground, white type, mint highlight. */
  --bg: #1d0624;
  --surface: #2a0b33;
  --ink: #ffffff;
  --muted: #c7b3cf;
  --line: #45204f;
  --accent: #3ff0b3;
  --accent-soft: #3a1745;
  --band: #3ff0b3;
  --band-ink: #1d0624;
  --up: #3ff0b3;
  --down: #ff5c8a;
  --warn: #ffc24b;
  --fdr1: #138a5b; --fdr1-ink: #ffffff;
  --fdr2: #3ff0b3; --fdr2-ink: #1d0624;
  --fdr3: #5a3366; --fdr3-ink: #ffffff;
  --fdr4: #ff5c8a; --fdr4-ink: #1d0624;
  --fdr5: #b0174a; --fdr5-ink: #ffffff;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 12px; }
.brand {
  font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: .02em;
  text-transform: uppercase; color: var(--ink); text-decoration: none; line-height: 1;
}
.brand span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a, .nav button {
  font: 600 .95rem/1 var(--body); color: var(--muted); text-decoration: none;
  padding: 8px 10px; border-radius: 6px; border: 0; background: none; cursor: pointer;
}
.nav a:hover, .nav button:hover { color: var(--ink); background: var(--accent-soft); }
.nav [aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* Deadline band */
.band { background: var(--band); color: var(--band-ink); font-size: .92rem; }
.band .wrap { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-block: 8px; }
.band b { font-family: var(--display); font-size: 1.05rem; letter-spacing: .03em; text-transform: uppercase; }
.sample-tag { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1.5px solid currentColor; border-radius: 4px; padding: 1px 6px; align-self: center; }

/* Page */
main { padding-block: 28px 48px; }
.page-head { margin-bottom: 22px; max-width: 68ch; }
.eyebrow { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: 1.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
h3 { font-size: 1.25rem; font-weight: 600; }
.lede { color: var(--muted); font-size: 1.05rem; margin: 10px 0 0; }
.prose { max-width: 68ch; }
.prose h2 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.panel-sub { margin: 4px 0 12px; color: var(--muted); font-size: .92rem; }
.stack { display: grid; gap: 18px; }
.two-col { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.up-h { color: var(--up); }
.down-h { color: var(--down); }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.toolbar label { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
select {
  font: 600 .95rem var(--body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  font: 600 .9rem/1 var(--body); padding: 8px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .95rem; }
.tbl th {
  font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.r { text-align: right !important; }
.pc { display: flex; flex-direction: column; line-height: 1.2; }
.pn { font-weight: 700; }
.pm { font-size: .8rem; color: var(--muted); }
.num-up { color: var(--up); font-weight: 700; }
.num-down { color: var(--down); font-weight: 700; }
.bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 2px; }
.bar.up i { background: var(--up); }
.bar.down i { background: var(--down); }
.bar.acc i { background: var(--accent); }

.change-chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line); font-size: .9rem; font-variant-numeric: tabular-nums; }
.change-chip b { font-weight: 700; }

/* Fixture grid */
.fdr-tbl { border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; min-width: 560px; width: 100%; }
.fdr-tbl th { font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .08em; color: var(--muted); padding: 4px; text-transform: uppercase; }
.fdr-tbl td { text-align: center; border-radius: 5px; padding: 0; height: 40px; font-weight: 700; font-size: .85rem; }
.fdr-tbl td.team { text-align: left; font-family: var(--display); font-size: 1.05rem; letter-spacing: .03em; padding: 0 8px 0 0; position: sticky; left: 0; background: var(--surface); white-space: nowrap; }
.fdr-tbl td.team small { display: block; font-family: var(--body); font-size: .72rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.fdr-tbl td.ease { font-family: var(--mono); font-weight: 500; color: var(--muted); }
.fx { display: flex; flex-direction: column; gap: 2px; height: 100%; }
.fx span { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: 5px; padding: 2px 4px; }
.fx small { font-weight: 400; margin-left: 3px; opacity: .85; }
.blank { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px); color: var(--muted); }
.f1 { background: var(--fdr1); color: var(--fdr1-ink); }
.f2 { background: var(--fdr2); color: var(--fdr2-ink); }
.f3 { background: var(--fdr3); color: var(--fdr3-ink); }
.f4 { background: var(--fdr4); color: var(--fdr4-ink); }
.f5 { background: var(--fdr5); color: var(--fdr5-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .82rem; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

/* Captain podium */
.podium { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-bottom: 18px; }
.pod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; }
.pod.first { border: 2px solid var(--accent); }
.pod-rank { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pod-name { font-family: var(--display); font-size: 1.9rem; font-weight: 700; line-height: 1; text-transform: uppercase; }
.pod-meta { color: var(--muted); font-size: .9rem; }
.pod-stats { display: flex; gap: 16px; font-variant-numeric: tabular-nums; }
.pod-stats div { display: flex; flex-direction: column; }
.pod-stats b { font-size: 1.25rem; }
.pod-stats small { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.opp { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.opp span { font-size: .78rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }

/* Availability */
.flag-list { display: grid; gap: 0; }
.flag { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.flag:last-child { border-bottom: 0; }
.flag-news { grid-column: 1 / -1; color: var(--muted); font-size: .92rem; }
.pill { font: 700 .75rem/1 var(--body); padding: 5px 8px; border-radius: 999px; white-space: nowrap; align-self: start; }
.st-d { background: var(--warn); color: var(--band-ink); }
.st-i { background: var(--down); color: var(--surface); }
.st-s { background: var(--ink); color: var(--bg); }
.st-u, .st-n { background: var(--line); color: var(--ink); }

/* Home */
.tool-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.tool-card { display: grid; gap: 10px; align-content: start; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.teaser { border-top: 1px dashed var(--line); padding-top: 10px; font-size: .92rem; }
.teaser b { font-weight: 700; }
.go { font-weight: 700; color: var(--accent); }
.method { font-size: .9rem; color: var(--muted); margin-top: 16px; max-width: 68ch; }

/* Ads: hidden until AdSense is switched on */
.ad-slot:empty { display: none; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .88rem; }
.site-foot .wrap { display: grid; gap: 8px; padding-block: 22px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 14px; }
.loading, .error { color: var(--muted); padding: 20px 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Guides */
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.guide-list a { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.guide-list a:hover { border-color: var(--accent); }
.gl-title { font-family: var(--display); font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.gl-desc { color: var(--muted); font-size: .92rem; }
.home-guides { margin-top: 36px; display: grid; gap: 14px; }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; }
.prose .tbl-wrap { margin: 10px 0 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.prose .tbl td, .prose .tbl th { padding-inline: 12px; }
.updated { color: var(--muted); font-size: .88rem; margin-top: 28px; }
.more-guides { margin-top: 36px; display: grid; gap: 14px; }
