/* Last Major Trophy: a quiet ledger. One serif for headlines and numerals,
   the system sans for everything else, one accent colour (old gold). */

:root {
  --paper: #f6f4ef;
  --ink: #16130f;
  --muted: #6d665b;
  --rule: #ddd7cb;
  --soft: #ece8df;
  --gold: #9a7a2f;
  --gold-ink: #7a5f1f;
  --focus: #2e5cb8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 46rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131211;
    --ink: #ece8df;
    --muted: #a29b8f;
    --rule: #34312c;
    --soft: #1d1b19;
    --gold: #d1ad5b;
    --gold-ink: #e2c47e;
    --focus: #8fb0ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.55 var(--sans);
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: var(--paper); padding: 0.4rem 0.8rem; }
.skip:focus { left: 0.5rem; }

/* ── Header / footer ───────────────────────────────────────────── */
.site-header, main, .site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font: 600 1.15rem/1 var(--serif);
  letter-spacing: 0.01em;
}
.brand img { display: block; }

.site-header nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--ink); }

main { padding-block: 2.5rem 3rem; min-height: 60vh; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.75rem 2.5rem;
  color: var(--muted);
}

.social { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; font-size: 0.9rem; }
.social a { text-decoration: none; color: var(--ink); }
.social a:hover { color: var(--gold-ink); }
.social .soon { opacity: 0.45; cursor: default; }

.fine { font-size: 0.8125rem; color: var(--muted); margin: 0.35rem 0; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ── Type ──────────────────────────────────────────────────────── */
h1, h2, .h2 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 0.6rem; }
h2, .h2 { font-size: 1.35rem; margin: 2.25rem 0 0.75rem; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.75rem; max-width: 36rem; }

/* ── Search ────────────────────────────────────────────────────── */
.intro { margin-bottom: 2.5rem; }
.intro.compact { margin-bottom: 1.5rem; }

.search label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.4rem; }
.search-row { display: flex; gap: 0.5rem; }
.search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.1rem;
  padding: 0.7rem 0.9rem;
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.search input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.search button {
  font: 600 0.95rem var(--sans);
  padding: 0 1.1rem;
  border-radius: 6px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}
.search button:hover { background: var(--gold-ink); border-color: var(--gold-ink); }
.js .search button { display: none; } /* live filtering makes it redundant */

/* ── Club index (the ledger) ───────────────────────────────────── */
.tier h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.35rem;
  margin-top: 2.5rem;
}
.tier:first-child h2 { margin-top: 0; }
.tier h2 small { font: 0.78rem var(--sans); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

.clubs { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2.5rem; }
.clubs.single { columns: 1; }
@media (max-width: 40rem) { .clubs { columns: 1; } }

.clubs li { break-inside: avoid; }
.clubs a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.clubs a:hover .name { color: var(--gold-ink); }
.clubs .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clubs .leader { flex: 1; }
.clubs .yr { font: 600 1rem var(--serif); font-variant-numeric: tabular-nums lining-nums; color: var(--gold-ink); }
.clubs .yr.none { color: var(--muted); font-weight: 400; }

.empty { color: var(--muted); font-style: italic; }

/* ── Club page ─────────────────────────────────────────────────── */
.back { margin: 0 0 1.5rem; font-size: 0.9rem; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--ink); }

.eyebrow, .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.verdict {
  margin: 2rem 0 1.5rem;
  padding: 1.75rem 0 1.5rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.verdict .year, .error-page .year {
  font: 600 clamp(4.5rem, 17vw, 8rem)/0.9 var(--serif);
  font-variant-numeric: lining-nums;
  letter-spacing: -0.03em;
  color: var(--gold);
  margin: 0.25rem 0 1rem;
}
.verdict.is-none .year { color: var(--muted); }
.verdict .detail { margin: 0; display: grid; gap: 0.15rem; }
.verdict .detail strong { font: 600 1.2rem var(--serif); }
.ago { color: var(--muted); font-size: 0.95rem; }

.also { padding: 0 0 1.5rem; border-bottom: 1px solid var(--rule); }
.also p:last-child { margin: 0; }
.year-sm { font: 600 1.15rem var(--serif); margin-right: 0.35rem; }

.note { font-size: 0.95rem; color: var(--muted); border-left: 3px solid var(--rule); padding-left: 0.9rem; margin: 1.5rem 0; }

.tally { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }
.tally b { font: 600 1.1rem var(--serif); color: var(--ink); }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th { text-align: left; font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 0.4rem 0.75rem 0.4rem 0; }
td { padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
td.num { font: 600 1rem var(--serif); font-variant-numeric: tabular-nums lining-nums; width: 4.5rem; }
tr.won td.num { color: var(--gold-ink); }
tr.lost td { color: var(--muted); }
.season, .vs { color: var(--muted); font-size: 0.85em; }

/* ── About ─────────────────────────────────────────────────────── */
.prose p, .prose li { max-width: 38rem; }
.comp-list { padding-left: 1.1rem; }
.comp-list li { margin: 0.3rem 0; }

.error-page { text-align: left; }

@media (prefers-reduced-motion: no-preference) {
  .clubs a, .search input { transition: color 0.15s, border-color 0.15s, box-shadow 0.15s; }
}
