/* GoalPublic — rebuilt on the original 2021 look: black nav, red accent,
   Raleway, light-grey page, white cards, dark-grey footer. */

:root {
  --bg: #f1f1f1;
  --card: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --line: #e2e2e2;
  --nav: #000000;
  --accent: #bd2b2b;
  --accent-dark: #8f1f1f;
  --live: #d62828;
  --footer: #616161;
  --shadow: 0 2px 5px rgba(0, 0, 0, .16), 0 2px 10px rgba(0, 0, 0, .12);
  --radius: 4px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Raleway", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }

/* ---------- Top nav (same as the original .topnav) ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  background: var(--nav);
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  flex: none;
  padding: 14px 16px;
  color: #f2f2f2;
  font-size: 19px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.topnav a:hover { background: #ddd; color: #000; }
.topnav a.current { background: #800000; color: #fff; }
.topnav .follow { margin-left: auto; background: var(--accent); color: #fff; }

/* ---------- Header ---------- */
.site-header { padding: 32px 16px 20px; text-align: center; }
.site-header img { margin: 0 auto; width: 260px; height: auto; }
.tagline { margin: 8px 0 0; font-size: 16px; font-style: italic; font-weight: 700; }
.updated { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- Score ticker ---------- */
.ticker {
  display: flex;
  gap: 10px;
  max-width: 1400px;
  margin: 0 auto 8px;
  padding: 4px 16px 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.ticker .match-chip {
  flex: none;
  min-width: 190px;
  padding: 8px 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  scroll-snap-align: start;
}
.match-chip .meta { display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.match-chip .row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.match-chip .row img { width: 18px; height: 18px; object-fit: contain; }
.match-chip .row span:first-of-type { flex: 1; }
.match-chip .row.win { font-weight: 700; }

/* ---------- Layout ---------- */
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.card-body { padding: 12px 16px 16px; }
.card .section { padding: 12px 16px; border-bottom: 3px solid var(--accent); font-size: 18px; }

/* Lead story: the big card from the original homepage */
.lead img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #ddd; }
.lead h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.byline { margin: 6px 0 10px; font-size: 15px; font-weight: 600; }
.byline .when { opacity: .6; font-weight: 400; }
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid #ccc;
  background: #fff;
  font-weight: 700;
  transition: background .15s;
}
.btn:hover { background: #ccc; }

/* Story grid */
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.stories .card { margin: 0; display: flex; flex-direction: column; }
.stories img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #ddd; transition: opacity .15s; }
.stories a:hover img { opacity: .8; }
.stories h3 { font-size: 17px; font-weight: 700; }
.stories p { margin: 8px 0 0; color: #333; font-size: 14px; }
.stories .byline { margin: 0 0 6px; font-size: 13px; }
.noimg { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--nav); }
.noimg img { width: 45%; aspect-ratio: auto; object-fit: contain; background: none; }

/* Sidebar lists (the original "Recent Posts") */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list a { display: flex; gap: 12px; align-items: center; padding: 14px 16px; transition: background .15s; }
.list a:hover { background: #ccc; }
.list img { flex: none; width: 64px; height: 48px; object-fit: cover; background: #ddd; }
.list .t { font-size: 15px; font-weight: 600; }
.list .s { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }


/* League switcher on the sidebar table */
.mini-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 8px; }
.mini-tabs button {
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.mini-tabs button[aria-pressed="true"] { background: var(--nav); border-color: var(--nav); color: #fff; }

/* GoalPublic story page */
.story-hero {
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
  border-left: 10px solid var(--accent);
  background: var(--nav);
  color: #fff;
}
.story-hero .kicker { margin: 0 0 12px; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.story-hero .kicker span { color: #aaa; font-weight: 600; letter-spacing: .04em; text-transform: none; }
.story-hero h1 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.story-hero .dek { margin: 14px 0 0; max-width: 60ch; color: #ddd; font-size: 19px; font-weight: 600; }
.story .card-body > p { max-width: 70ch; font-size: 17px; line-height: 1.65; }
.quick-hits { margin: 24px 0; padding: 16px 20px; border-left: 4px solid var(--accent); background: #f7f7f7; }
.quick-hits h2 { font-size: 18px; font-weight: 800; }
.quick-hits ul { margin: 8px 0 0; padding-left: 20px; }
.quick-hits li + li { margin-top: 6px; }
.source-note { padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px !important; }
.source-note a { color: var(--accent); font-weight: 700; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; text-align: right; font-variant-numeric: tabular-nums; }
th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; }
th:nth-child(2), td:nth-child(2) { text-align: left; }
td:first-child, th:first-child { width: 32px; text-align: center; color: var(--muted); }
tbody tr:nth-child(odd) { background: #f7f7f7; }
td .team { display: flex; align-items: center; gap: 8px; font-weight: 600; }
td .team img { width: 20px; height: 20px; object-fit: contain; }
td.pts { font-weight: 800; }
.mini th.x, .mini td.x { display: none; }
@media (max-width: 520px) { th.x, td.x { display: none; } }

/* Games page */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.tabs button, .datebar button {
  flex: none;
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.tabs button[aria-pressed="true"] { background: var(--nav); border-color: var(--nav); color: #fff; }
.datebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; font-weight: 700; }
.fixtures { list-style: none; margin: 0; padding: 0; }
.fixture { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.fixture:first-child { border-top: 0; }
.fixture .side { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.fixture .side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixture .side.home { justify-content: flex-end; text-align: right; }
.fixture .side img { flex: none; width: 28px; height: 28px; object-fit: contain; }
.fixture .side.win { font-weight: 800; }
.fixture .mid { min-width: 84px; text-align: center; }
.fixture .score { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fixture .status { color: var(--muted); font-size: 12px; }
.fixture .venue { grid-column: 1 / -1; margin-top: -6px; color: var(--muted); font-size: 12px; text-align: center; }

.live { color: var(--live); font-weight: 700; }
.live::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--live);
  vertical-align: 1px;
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 50% { opacity: .3; } }

.empty, .loading { padding: 24px 16px; color: var(--muted); text-align: center; }
.skeleton { background: linear-gradient(90deg, #e6e6e6 25%, #f3f3f3 50%, #e6e6e6 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Footer ---------- */
.site-footer { margin-top: 32px; padding: 32px 16px; background: var(--footer); color: #fff; text-align: center; }
.site-footer .follow-title { margin: 0 0 12px; font-size: 15px; }
.site-footer img { width: 50px; height: 50px; margin: 0 auto; }
.site-footer small { display: block; max-width: 900px; margin: 16px auto 0; font-size: 11px; opacity: .85; }
.site-footer small a { text-decoration: underline; }

/* Narrow phones */
@media (max-width: 480px) {
  .topnav a { padding: 12px 11px; font-size: 16px; }
  .fixture { gap: 8px; padding: 12px; }
  .fixture .side .full { display: none; }
  .fixture .side .abbr { display: inline; }
}
.fixture .side .abbr { display: none; }
.card h2, .card h3, .list .t { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

[hidden] { display: none !important; }

/* Trust pages */
.site-footer .footer-links { margin: 16px 0 0; font-size: 14px; }
.site-footer .footer-links a { text-decoration: underline; }
.site-footer .footer-links a:hover { opacity: .8; }
.trust { max-width: 820px; margin-left: auto; margin-right: auto; }
.trust .card-body { padding: 24px 28px 28px; }
.trust h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; }
.trust h2 { margin: 28px 0 8px; padding-bottom: 4px; border-bottom: 3px solid var(--accent); font-size: 21px; font-weight: 800; }
.trust h3 { margin: 20px 0 6px; font-size: 17px; font-weight: 700; }
.trust p, .trust li { max-width: 70ch; font-size: 17px; line-height: 1.65; }
.trust ul { padding-left: 22px; }
.trust li + li { margin-top: 6px; }
.trust .lede { margin: 12px 0 0; font-size: 19px; font-weight: 600; color: #333; }
.trust .role { margin: 6px 0 0; color: var(--muted); font-size: 17px; font-weight: 700; }
.trust .updated { margin-top: 8px; font-size: 14px; }
.trust p a:not(.btn), .trust li a { color: var(--accent); font-weight: 600; text-decoration: underline; }
@media (max-width: 520px) { .trust .card-body { padding: 16px; } }
