
:root {
  --paper: #f2f5f1;
  --paper-2: #e6ebe4;
  --ink: #1c2b33;
  --ink-soft: #4b5c64;
  --rule: #c5cfc6;
  --fairway: #2e6b4b;
  --fairway-tint: #cfe3d4;
  --accent: #e5760f;
  --accent-tint: #f8dcc0;
  --halved-tint: #dfe4e8;
  --focus: #0b57d0;
  --wdth-tight: 70;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121c21;
    --paper-2: #1a272e;
    --ink: #e8eee9;
    --ink-soft: #a5b4ba;
    --rule: #33454d;
    --fairway: #7fc29a;
    --fairway-tint: #1f4733;
    --accent: #f59a45;
    --accent-tint: #5a3510;
    --halved-tint: #2a3840;
    --focus: #8ab4f8;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.55 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--fairway); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Type scale: 1.0625 base, then 1.25 steps. Archivo's width axis does the display work. */
h1, h2, h3 { font-weight: 800; line-height: 1.05; margin: 0; letter-spacing: -0.01em; font-stretch: 78%; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 8.5vw, 5.75rem); font-stretch: 62%; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; font-stretch: 85%; }
p { margin: 0 0 1em; max-width: 68ch; }
.title { font-size: clamp(2.2rem, 6vw, 3.6rem); font-stretch: 70%; }
.lead-in { margin-top: 12px; }
.note { margin-top: 14px; }
.small { font-size: 0.92rem; }
.block { margin-top: 40px; }
.block-h { margin-top: 36px; }
.prose { margin-top: 22px; max-width: 68ch; }
.prose h2 { margin: 2.1em 0 0.5em; }
.prose h2:first-child { margin-top: 0.4em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.2em; }
.serif { font-family: "Newsreader", Georgia, serif; font-size: 1.1875rem; line-height: 1.65; }
.muted { color: var(--ink-soft); }
.num { font-variant-numeric: tabular-nums; }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 30; background: var(--paper); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: end; gap: 6px 28px; padding-block: 14px 0; }
.brand { font-weight: 800; font-stretch: 62%; font-size: 1.55rem; letter-spacing: 0.005em; color: var(--ink); text-decoration: none; padding-bottom: 12px; line-height: 1; }
.brand span { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 22px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 10px 0 11px; border-bottom: 3px solid transparent; font-weight: 500; }
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 700; }

/* Phone menu: a no-script <details>. The full nav is used from 720px up. */
.menu { display: none; }
@media (max-width: 719px) {
  .site-head .wrap { align-items: center; flex-wrap: nowrap; padding-block: 12px; }
  .brand { padding-bottom: 0; }
  .site-nav { display: none; }
  .menu { display: block; margin-left: auto; }
  .menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 0 10px 14px; font-weight: 600; color: var(--ink); }
  .menu summary::-webkit-details-marker { display: none; }
  .bars { display: block; width: 20px; height: 2px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
  .menu[open] .bars { box-shadow: none; transform: rotate(45deg); }
  .menu[open] .bars::after { content: ""; display: block; width: 20px; height: 2px; background: currentColor; transform: rotate(90deg); }
  .menu-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12); }
  .menu-list a { display: block; padding: 15px var(--gutter); color: var(--ink); text-decoration: none; border-top: 1px solid var(--rule); border-left: 4px solid transparent; font-size: 1.1rem; font-weight: 500; }
  .menu-list a[aria-current="page"] { border-left-color: var(--accent); font-weight: 700; background: var(--paper-2); }
}

/* Notices */
.notice { background: var(--accent-tint); color: var(--ink); border-bottom: 1px solid var(--accent); }
.notice .wrap { padding-block: 10px; font-size: 0.95rem; }
.notice p { margin: 0; max-width: none; }

/* Hero */
.hero { padding-block: clamp(28px, 6vw, 64px) clamp(18px, 3vw, 32px); }
.hero h1 { max-width: 14ch; }
.hero .lede { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.4; margin-top: 18px; max-width: 46ch; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 22px 0 0; padding: 0; list-style: none; }
.facts li { border-left: 3px solid var(--accent); padding-left: 12px; }
.facts b { display: block; font-weight: 700; }
.facts span { color: var(--ink-soft); font-size: 0.95rem; }

/* Sections */
.section { padding-block: clamp(24px, 4vw, 44px); }
.section + .section { border-top: 1px solid var(--rule); }
.section > .wrap > h2, .head-row h2 { margin-bottom: 6px; }
.head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 14px; }
.sub { color: var(--ink-soft); margin: 0 0 16px; max-width: 62ch; }
.two > * { min-width: 0; }
.two { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr; }
@media (min-width: 900px) { .two { grid-template-columns: 1.15fr 1fr; align-items: start; } }

/* The cross-table: the one loud thing on the site. */
.scroller { position: relative; overflow-x: auto; overflow-y: hidden; overscroll-behavior: none; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); background: var(--paper); }
.grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-variant-numeric: tabular-nums; }
.grid caption { text-align: left; padding: 0 0 10px; caption-side: top; color: var(--ink-soft); font-size: 0.95rem; }
.grid th, .grid td { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0; text-align: center; }
.grid thead th { font-weight: 700; font-stretch: 82%; padding: 10px 6px; background: var(--paper-2); vertical-align: bottom; font-size: 0.95rem; }
.grid tbody th { text-align: left; font-weight: 700; font-stretch: 82%; padding: 0 12px; background: var(--paper-2); position: sticky; left: 0; z-index: 1; white-space: nowrap; box-shadow: 1px 0 0 var(--rule); }
.grid thead th:first-child { position: sticky; left: 0; z-index: 2; text-align: left; box-shadow: 1px 0 0 var(--rule); }
.grid td { height: 52px; min-width: 88px; font-weight: 500; }
.grid td span { display: block; padding: 6px 4px; line-height: 1.2; }
.grid .win { background: var(--fairway-tint); font-weight: 700; }
.grid .loss { background: var(--accent-tint); }
.grid .half { background: var(--halved-tint); }
.grid .next { color: var(--ink-soft); font-style: italic; font-weight: 400; }
.grid .void { color: var(--ink-soft); font-size: 0.85rem; }
.grid .self { background: repeating-linear-gradient(135deg, var(--accent) 0 7px, var(--ink) 7px 14px); opacity: 0.85; }
.grid tbody tr:hover th, .grid tbody tr:hover td:not(.self) { filter: brightness(0.97); }
.key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--ink-soft); }
.key li { display: inline-flex; align-items: center; gap: 8px; }
.key i { width: 18px; height: 18px; border: 1px solid var(--rule); display: inline-block; }
.key .k-win { background: var(--fairway-tint); } .key .k-loss { background: var(--accent-tint); } .key .k-half { background: var(--halved-tint); }
.key .k-self { background: repeating-linear-gradient(135deg, var(--accent) 0 4px, var(--ink) 4px 8px); }

/* League table */
.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data caption { text-align: left; color: var(--ink-soft); padding-bottom: 8px; font-size: 0.95rem; }
.data th, .data td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--rule); }
.data thead th { font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.data th:first-child, .data td:first-child { text-align: left; width: 2.2em; padding-left: 0; color: var(--ink-soft); }
.data th:nth-child(2), .data td:nth-child(2) { text-align: left; font-weight: 700; }
.data td:last-child, .data th:last-child { font-weight: 800; }
.data tbody tr:first-child td:nth-child(2) { box-shadow: inset 4px 0 0 var(--accent); padding-left: 12px; }
.table-wrap { position: relative; overflow-x: auto; overflow-y: hidden; overscroll-behavior: none; }
.data abbr { text-decoration: none; }

/* Match lists */
.matches { list-style: none; margin: 0; padding: 0; }
.matches li { display: grid; grid-template-columns: 5.2em 1fr auto; gap: 4px 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.matches .when { color: var(--ink-soft); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.matches .teams b { font-weight: 700; }
.matches .score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.matches .meta { grid-column: 2 / -1; color: var(--ink-soft); font-size: 0.9rem; }
.month { font-size: 1.1rem; font-stretch: 85%; margin: 26px 0 4px; }
.empty { border: 1px dashed var(--rule); padding: 18px; color: var(--ink-soft); max-width: 62ch; }

/* Club filter: a plain GET form, works without script */
.club-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.club-filter label { font-weight: 600; }
.club-filter select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 6px; padding: 9px 12px; min-width: 12em; max-width: 100%; }
.club-filter button { font: inherit; font-weight: 600; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 6px; padding: 9px 18px; cursor: pointer; }
.club-filter button:hover { background: var(--fairway); border-color: var(--fairway); }

/* Lists with a rule between rows */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { padding: 16px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 4px 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .rows > li { grid-template-columns: 14em 1fr; } }
.rows h3 { font-size: 1.25rem; }
.rows p { margin: 0; }

.rules { counter-reset: none; }
.rules p { margin-bottom: 0.9em; }
.callout { border-left: 4px solid var(--accent); padding: 4px 0 4px 18px; margin: 22px 0; max-width: 68ch; }
.callout p { margin-bottom: 0.5em; }

.button { display: inline-block; background: var(--ink); color: var(--paper); padding: 10px 18px; text-decoration: none; font-weight: 700; border-radius: 2px; }
.button:hover { background: var(--fairway); }
.button.plain { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }

.honour { columns: 2 16em; column-gap: 40px; padding: 0; list-style: none; margin: 0; }
.honour li { break-inside: avoid; display: flex; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.honour b { min-width: 3.2em; font-variant-numeric: tabular-nums; }
.honour.one { columns: auto; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); margin-top: 40px; padding-block: 22px 34px; color: var(--ink-soft); font-size: 0.92rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }
.site-foot p { margin: 0; max-width: none; }

@media (max-width: 560px) {
  .matches li { grid-template-columns: 1fr auto; }
  .matches .when { grid-column: 1 / -1; }
  .matches .meta { grid-column: 1 / -1; }
  .data th, .data td { padding: 9px 5px; }
}
@media print {
  .site-nav, .menu, .notice, .actions, .club-filter { display: none; }
  body { background: #fff; color: #000; }
}

:root { --accent: #e5760f; --accent-tint: #f8dcc0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent: #f59a45; --accent-tint: #5a3510; } }
