/* Public theme. Colors and fonts are tokens: change them here. */
:root {
  --paper: #f6f8f6;
  --surface: #ffffff;
  --ink: #14241e;
  --muted: #56665f;
  --line: #d6dfda;
  --tint: #edf3ef;
  --turf: #0e3b2c;
  --turf-2: #155c43;
  --turf-line: rgba(255, 255, 255, .14);
  --lamp: #ffb627;
  --live: #e5484d;
  --link: #0b6b4b;
  --link-hover: #084e37;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --measure: 42rem;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.board :focus-visible { outline-color: var(--lamp); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ------------------------------------------------------------- header */
.admin-bar { background: var(--turf-2); color: #fff; font-size: .875rem; }
.admin-bar .wrap { display: flex; gap: 18px; align-items: center; min-height: 34px; flex-wrap: wrap; }
.admin-bar a { color: #fff; }
.admin-bar-warn { background: var(--lamp); color: var(--ink); padding: 0 8px; border-radius: 3px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.75rem; letter-spacing: .01em; color: var(--ink); text-decoration: none; line-height: 1; }
.brand:hover { color: var(--ink); }
.brand img { display: block; max-height: 40px; width: auto; }
.nav-toggle { display: none; font: 600 1rem var(--body); background: none; border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; color: var(--ink); cursor: pointer; }
.main-nav { display: flex; align-items: center; gap: 18px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 18px; flex-wrap: wrap; }
.main-nav a { color: var(--ink); text-decoration: none; font-size: 1rem; padding: 6px 0; display: inline-block; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--lamp); }
.nav-search input { font: inherit; font-size: .95rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; width: 15rem; background: var(--paper); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 14px; }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); width: 100%; }
  .nav-search input { width: 100%; margin-top: 8px; }
}

/* ------------------------------------------------- scoreboard band */
.board { background: var(--turf); color: #fff; padding: 36px 0 30px; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.board-title { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5vw + 1rem, 4.25rem); line-height: .95; margin: 0; letter-spacing: -.005em; }
.board-date { font-family: var(--display); font-weight: 500; font-size: 1.4rem; margin: 0; color: rgba(255, 255, 255, .78); }
.board-league { margin: 0 0 6px; color: var(--lamp); font-family: var(--display); font-weight: 600; font-size: 1.3rem; }
.board-note { margin: 18px 0 0; font-size: .9rem; color: rgba(255, 255, 255, .72); max-width: 60ch; }
.board .games-empty { color: rgba(255, 255, 255, .85); }

.games-day { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin: 22px 0 4px; }
.games-dark .games-day { color: rgba(255, 255, 255, .82); }
.game-rows { list-style: none; margin: 0; padding: 0; }
.game-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  gap: 4px 18px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.games-dark .game-row { border-top-color: var(--turf-line); }
.g-time { font-family: var(--display); font-weight: 600; font-size: 1.35rem; color: var(--turf-2); line-height: 1.1; }
.games-dark .g-time { color: var(--lamp); font-size: 1.6rem; }
.g-time .t-main { display: block; white-space: nowrap; }
.g-time .t-zone { display: block; font-family: var(--body); font-size: .78rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.games-dark .g-time .t-zone { color: rgba(255, 255, 255, .7); }
.t-zone { font-size: .7em; font-weight: 500; }
.g-match { min-width: 0; }
.g-league { display: block; font-size: .8rem; color: var(--muted); line-height: 1.2; }
.games-dark .g-league { color: rgba(255, 255, 255, .66); }
.g-match a { font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1.15; color: var(--ink); text-decoration: none; }
.g-match a:hover { text-decoration: underline; }
.games-dark .g-match a { color: #fff; font-size: 1.55rem; }
.g-watch { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-block; font-size: .82rem; font-weight: 700; line-height: 1.3; padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--ink); white-space: nowrap; }
.games-dark .chip, .board .chip { background: transparent; border-color: rgba(255, 255, 255, .38); color: #fff; }
.chip-muted { font-weight: 400; color: var(--muted); }
.board .chip-muted { color: rgba(255, 255, 255, .7); }
.score { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-left: 8px; }
.status { font-size: .8rem; font-weight: 700; margin-left: 8px; padding: 1px 6px; border-radius: 3px; border: 1px solid currentColor; vertical-align: middle; white-space: nowrap; font-family: var(--body); }
.status-live { color: var(--live); border-color: var(--live); }
.board .status-live { color: #fff; background: var(--live); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 5px; vertical-align: 1px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.games-empty { color: var(--muted); margin: 12px 0; }
.tbd { color: var(--muted); font-size: 1rem; }

@media (max-width: 680px) {
  .game-row { grid-template-columns: 5.6rem minmax(0, 1fr); }
  .g-watch { grid-column: 2; justify-content: flex-start; }
  .games-dark .g-time { font-size: 1.3rem; }
  .games-dark .g-match a { font-size: 1.35rem; }
}

/* game page */
.board-game { padding-top: 26px; }
.game-title { font-size: clamp(2.2rem, 5vw + .6rem, 4rem); }
.game-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 14px 28px; margin-top: 22px; border-top: 1px solid var(--turf-line); padding-top: 16px; }
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact-label { font-size: .85rem; color: rgba(255, 255, 255, .7); }
.fact-value { font-family: var(--display); font-weight: 600; font-size: 1.45rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fact-value time { color: var(--lamp); }
.fact-score .score { font-size: 2rem; margin: 0; }
.fact-value .status { margin-left: 0; }

/* ------------------------------------------------------------ article */
.page { padding-top: 22px; padding-bottom: 56px; }
.article { max-width: var(--measure); }
.page-wide .article { max-width: 60rem; }
.crumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line); }
.crumbs a { color: var(--muted); }
.board-game + .page, .wrap + .board { margin-top: 0; }
.wrap > .crumbs { padding-top: 18px; }

.page-title { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 3.6vw + 1.2rem, 3.4rem); line-height: 1.02; margin: 0 0 12px; letter-spacing: -.005em; }
.byline { color: var(--muted); font-size: .95rem; margin: 0 0 24px; }
.byline a { color: var(--muted); }
.lead { font-size: 1.25rem; color: var(--muted); }
.hero-img { display: block; width: 100%; border-radius: 4px; margin: 0 0 24px; }
.preview-note { background: #fff4d6; border-left: 4px solid var(--lamp); padding: 8px 12px; font-size: .95rem; }

.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose table, .prose blockquote { margin: 0 0 1.15em; }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 2rem; line-height: 1.1; margin: 1.9em 0 .5em; scroll-margin-top: 16px; }
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; margin: 1.6em 0 .4em; }
.prose h4 { font-size: 1.1rem; margin: 1.4em 0 .3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--turf-2); }
.prose blockquote { border-left: 4px solid var(--turf-2); padding: 2px 0 2px 16px; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose img { border-radius: 4px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 1rem; max-width: 100%; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--tint); font-weight: 700; }
.prose .note, .prose .callout { background: var(--tint); border-left: 4px solid var(--turf-2); padding: 12px 16px; border-radius: 0 4px 4px 0; }
.prose iframe { max-width: 100%; }
.prose code { font-size: .92em; background: var(--tint); padding: 1px 5px; border-radius: 3px; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 10px 16px; margin: 0 0 28px; }
.toc summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.25rem; }
.toc ol { margin: 10px 0 4px; padding-left: 1.3em; font-size: 1rem; }

.schedule { margin: 8px 0 32px; }

.faq { margin-top: 40px; }
.faq h2 { font-family: var(--display); font-weight: 600; font-size: 2rem; margin: 0 0 8px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-family: var(--display); font-size: 1.6rem; color: var(--turf-2); }
.faq details[open] summary::after { content: "–"; }
.faq-answer { padding: 0 0 10px; }

.disclosure { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

.related { margin-top: 40px; }
.related h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; margin: 0 0 8px; }
.related ul { margin: 0; padding-left: 1.2em; }
.related li { margin: 6px 0; }

/* lists */
.post-feed { list-style: none; padding: 0; margin: 0; }
.post-feed li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.post-feed h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1.15; margin: 0 0 4px; }
.post-feed h2 a { color: var(--ink); text-decoration: none; }
.post-feed h2 a:hover { text-decoration: underline; }
.post-feed .byline { margin: 0 0 6px; }
.post-feed p { margin: 0; }
.post-list { padding-left: 1.2em; }
.post-list li { margin: 8px 0; }
.post-list time { display: block; color: var(--muted); font-size: .9rem; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* home */
.home-body { padding-top: 34px; padding-bottom: 64px; }
.home-intro { max-width: var(--measure); }
.home-section { margin-top: 44px; }
.home-section h2 { font-family: var(--display); font-weight: 700; font-size: 2.1rem; margin: 0 0 14px; line-height: 1.05; }
.hub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 30px; }
.hub-list a { font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: var(--ink); text-decoration: underline; text-decoration-color: var(--lamp); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.hub-list a:hover { color: var(--turf-2); }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 0 40px; }
.guide-list li { border-top: 1px solid var(--line); padding: 14px 0 16px; }
.guide-link { font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.15; color: var(--ink); text-decoration: none; }
.guide-link:hover { text-decoration: underline; }
.guide-list p { margin: 6px 0 0; color: var(--muted); font-size: 1rem; }

/* forms */
.search-form label { display: block; font-weight: 700; margin-bottom: 6px; }
.search-row { display: flex; gap: 8px; margin-bottom: 24px; }
.search-row input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.search-row button { font: 700 1rem var(--body); background: var(--turf); color: #fff; border: 0; border-radius: 4px; padding: 10px 18px; cursor: pointer; }
.search-row button:hover { background: var(--turf-2); }

/* footer */
.site-footer { background: var(--tint); border-top: 1px solid var(--line); margin-top: 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 48px; padding-top: 36px; padding-bottom: 24px; }
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin: 0 0 8px; }
.footer-text { color: var(--muted); max-width: 52ch; }
.footer-text p { margin: 0 0 .8em; }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.footer-links li { margin: 0 0 8px; break-inside: avoid; }
.footer-links a { color: var(--ink); }
.footer-base { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 24px; color: var(--muted); font-size: .875rem; }
.footer-base p { margin: 0; }
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .admin-bar, .nav-toggle { display: none; }
  .board { background: none; color: #000; }
}
