/*
 * BogeyHunter™ Leagues — what only Leagues has, built on the main site's stylesheet.
 *
 * Every page loads bogeyhunter.ai's /css/main.css first and this file after it. main.css
 * owns the tokens (--bg, --cream, --accent, --muted, --dim, --border…), the base styles
 * (reset, body, links), the type families and the public page structure (.header, .footer,
 * .content-wide, .page-header, .section, .breadcrumbs). This file adds the rest:
 *   - the Leagues bar under the site header, and its phone groups in the site's menu;
 *   - forms, buttons, cards, notices, badges and tables;
 *   - the Broadcast scoreboards.
 * It never redefines a main.css token or selector, and its element rules are scoped under
 * :where(main) (text), :where(.table-wrap) (tables) or :where(main, .lg-form) (forms),
 * so long-form public pages keep main.css's look and no element rule outranks a component.
 *
 * The TV-scoreboard ("Broadcast") character is kept on purpose, and only inside
 * .scoreboard: the standings board, the stat strip, the landing's sample board and points
 * chips — condensed tabular numerals, caps names, alternating rows. A few score numerals
 * outside it (table number cells, the log form's counts and total) share the condensed
 * face, never the caps.
 *
 * Colours come from tokens only; hex values appear in :root and nowhere else. Gold means
 * first place or a champion — nothing else borrows it.
 */
:root {
  /* Aliases onto main.css's tokens, under the names this stylesheet has always used. */
  --text: var(--cream);
  --action: var(--accent);
  --action-hover: var(--accent-light);
  --hi: var(--accent-light);
  --surface: var(--bg-elevated);
  --line-strong: var(--deep);

  /* Leagues-only colours: scoreboard rows and rules, ink on green and gold, notices. */
  --row-a: #17251d;
  --row-b: #121e17;
  --line: #1f3027;
  --text-2: #c2c8bd;
  --action-ink: #07100a;
  --you-bg: #15301f;
  --gold-ink: #1a1405;
  --down: #e0866b;
  --notice-bg: #1d1806;
  --notice-line: #5a4710;
  /* The redesign's tokens. site2.css defines them on its .v2 page wrapper only, and its v2-
     classes read them, so a Leagues page (no .v2 wrapper) gets the same values here. */
  --ink: #f3ede3;
  --v2-ink: var(--ink);
  --v2-body: #c9c1b4;
  --v2-quiet: #8da396;
  --v2-line: rgba(60, 90, 72, 0.45);
  --v2-panel: #141f19;

  --rule-width: 2px;
  --radius-control: 10px;
  --radius-card: 12px;
  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  /* The scoreboard face and case: used only inside .scoreboard and for score numerals. */
  --font-score: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --score-case: uppercase;
  --score-tracking: 0.01em;
  --shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
}

/* Scales: sizes and spacing, no colour. */
:root {
  /* Type scale. Five roles, no in-between sizes. */
  --text-display: 2rem;
  --text-title: 1.5rem;
  --text-subtitle: 1.15rem;
  --text-body: 1.0625rem; /* 17px, the redesign's body size */
  --text-caption: 0.82rem;

  /* Space scale. Every margin, padding and gap comes from here. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --gap: 16px;
  --touch: 44px;
}

/* ---------------------------------------------------------------------------
   Page text and spacing that main.css's reset leaves at zero. :where() keeps
   these at element weight, so every component below still wins.
   --------------------------------------------------------------------------- */
:where(main) { font-size: var(--text-body); line-height: 1.5; }
:where(main) h2, :where(main) h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: normal;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}
:where(main) h2 { font-size: 1.4rem; margin-top: var(--space-6); }
:where(main) h3 { font-size: var(--text-subtitle); }
/* Running text in the redesign's body colour; headings above in its ink. */
:where(main) p { color: var(--v2-body); }
:where(main) p { margin: 0 0 var(--space-3); }
:where(main) img { max-width: 100%; height: auto; }

/* One focus ring everywhere, visible on the palette. */
:where(main) :focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; border-radius: 2px; }

.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;
}

.muted { color: var(--muted); font-size: 0.92rem; }
.dim { color: var(--muted); }
.gold { color: var(--gold); }

/* ---------------------------------------------------------------------------
   The Leagues bar: one row under the site header, at the top of <main>. It is built from
   the site's own menu classes, so main.css supplies the dropdown panels, the open and hover
   behaviour and the phone panel; this adds the row's layout and the site's nav type for the
   triggers, which main.css scopes to .header-nav.
   --------------------------------------------------------------------------- */
.lg-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4);
  margin: 0 0 var(--space-5); padding: 0 0 var(--space-2);
  border-bottom: 1px solid var(--border-light);
}
.lg-bar > a:not(.btn), .lg-bar .nav-trigger, span.lg-bar-league {
  display: inline-flex; align-items: center; gap: 0.3rem;
  min-height: var(--touch); padding: 0;
  font: inherit; font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--dim); text-decoration: none;
  background: none; border: 0; cursor: pointer;
  transition: color 0.2s;
}
.lg-bar > a:not(.btn):hover, .lg-bar .nav-dropdown:hover > .nav-trigger, .lg-bar .nav-trigger:hover { color: var(--cream); }
.lg-bar > a.lg-bar-home { font-weight: 700; color: var(--cream); }
span.lg-bar-league, .lg-bar-league > .nav-trigger { color: var(--cream); cursor: default; }
.lg-bar-league > .nav-trigger { cursor: pointer; }
/* The right-hand group: Log a round and the account menu, or Start a league and Sign in. */
.lg-bar > .lg-bar-end, .lg-bar > .btn, .lg-bar > .lg-bar-account { margin-left: auto; }
.lg-bar > .btn ~ .lg-bar-account { margin-left: 0; }
.lg-bar-account .nav-dropdown-menu { left: auto; right: 0; }
.lg-bar .nav-dropdown-menu { z-index: 20; }
.lg-bar .nav-dropdown-menu form { margin: 0; }
.lg-bar .nav-dropdown-menu button, .mobile-nav .lg-section button[type="submit"] {
  display: block; width: 100%; text-align: left;
  font: inherit; font-size: 0.78rem; font-weight: 500; color: var(--muted);
  background: none; border: 0; cursor: pointer;
}
.lg-bar .nav-dropdown-menu button { padding: 0.55rem 1.2rem; }
.lg-bar .nav-dropdown-menu button:hover { color: var(--cream); background: rgba(46, 168, 84, 0.08); }
/* The current page only: main.js marks every link whose path is a prefix of this page's, so
   the league dashboard link (the league's root) is "active" on every league page. Only the
   item the server marked aria-current, and its menu (.lg-current), look current. */
.lg-bar [aria-current="page"], .mobile-nav .lg-section [aria-current="page"],
.lg-bar .nav-dropdown.lg-current > .nav-trigger { color: var(--accent); }
.lg-bar .nav-dropdown-menu a.active:not([aria-current]):not(:hover),
.mobile-nav .lg-section a.active:not([aria-current]):not(:hover) { color: var(--muted); }
/* Counts waiting on you. A notice, not a trophy: green, never gold. */
.lg-badge {
  display: inline-block; min-width: 18px; padding: 0 var(--space-1);
  border-radius: 999px; background: var(--action); color: var(--action-ink);
  font-size: 0.7rem; font-weight: 800; line-height: 18px; text-align: center;
}
/* Phone menu groups moved into the site's panel: a group can run past main.css's 200px. */
.mobile-nav-section.lg-section.open .mobile-nav-section-links { max-height: 40rem; }
.mobile-nav .lg-section .mobile-nav-section-links form { margin: 0; }
.mobile-nav .lg-section button[type="submit"] { padding: 0.65rem 0 0.65rem 1rem; font-size: 0.82rem; }

/* Phones: one menu. With script running (.lg-js) the bar's dropdowns and links fold into the
   site's menu panel, leaving the league name (or "Leagues") and Log a round on one line. */
@media (max-width: 768px) {
  .lg-js .lg-bar { flex-wrap: nowrap; justify-content: space-between; }
  .lg-js .lg-bar .nav-dropdown:not(.lg-bar-league),
  .lg-js .lg-bar > a:not(.lg-bar-home):not(.btn) { display: none; }
  .lg-js .lg-bar:has(.lg-bar-league) > .lg-bar-home { display: none; }
  .lg-js .lg-bar > .btn { flex: none; white-space: nowrap; }
  .lg-bar-league { min-width: 0; }
  /* text-overflow does not apply to a flex container's own text, so the plain-text name is a block
     and the switcher's name sits in its own span inside the trigger. */
  span.lg-bar-league { display: block; line-height: var(--touch); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lg-bar-league > .nav-trigger { max-width: 100%; min-width: 0; }
  .lg-bar-league .lg-bar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lg-bar-league .nav-arrow { flex: none; }
}


/* ---------------------------------------------------------------------------
   Cards, notices
   --------------------------------------------------------------------------- */

/* Cards: the site's card (main.css .info-card) — translucent green over the page. */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  min-width: 0;
}
/* Section headings inside a card: no rule under them, as on the main site. */
.card h2 {
  font-family: var(--font-heading); font-weight: 700; letter-spacing: normal; color: var(--ink); line-height: 1.2;
  margin: 0 0 var(--space-3);
  font-size: 1.2rem;
}
.card h3 { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-subtitle); }
.card > :last-child { margin-bottom: 0; }
/* Gold means a champion or first place. Only those cards carry it. */
.card--gold { border-color: var(--gold); box-shadow: inset 0 var(--rule-width) 0 var(--gold); }
/* A nudge, a link to share, something to act on: green edge, never gold. */
.card--chase, .card--accent { border-color: var(--line-strong); box-shadow: inset var(--rule-width) 0 0 var(--action); }
.card--narrow { max-width: 440px; margin: var(--space-6) auto; }
.card--narrow h1 { font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.02em; font-size: var(--text-display); }

/* The notice bar: amber-dark, for things waiting on you. */
.notice, .flash {
  display: flex; align-items: center; gap: var(--space-3);
  margin: 0 0 var(--space-4); padding: var(--space-3);
  background: var(--notice-bg); border: 1px solid var(--notice-line);
  border-radius: var(--radius-control);
  font-size: 0.95rem; color: var(--text);
}
.notice > span, .flash > span { flex: 1; }
.flash--ok { background: var(--you-bg); border-color: var(--action); }
.flash--err { background: var(--notice-bg); border-color: var(--down); }
.errors {
  margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-6);
  color: var(--text); font-size: 0.95rem;
  background: var(--notice-bg); border: 1px solid var(--down); border-radius: var(--radius-control);
}
.errors li::marker { color: var(--down); }

/* ---------------------------------------------------------------------------
   The scoreboard: the one place the Broadcast character stays. Anything inside
   .scoreboard (stat strip, standings board, sample board, points chips) gets condensed
   tabular numerals and caps names; nothing outside it does.
   --------------------------------------------------------------------------- */
/* The boards keep their own 16px base; the redesign's 17px body text stops at their edge. */
.scoreboard { min-width: 0; font-size: 1rem; }

/* The scoreboard strip: label over a big condensed numeral, cells ruled apart. */
.strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 0 0 var(--space-5);
  background: var(--row-a);
  border: 1px solid var(--line); border-radius: var(--radius-card);
  overflow: hidden;
}
.tile {
  display: flex; flex-direction: column; gap: var(--space-1);
  min-width: 0; padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 0 -1px -1px 0;
}
.scoreboard .tile-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: var(--score-case);
  color: var(--muted);
}
.scoreboard .tile-value {
  font-family: var(--font-score); font-weight: 800; font-size: 2.1rem; line-height: 1;
  font-variant-numeric: tabular-nums; text-transform: var(--score-case); letter-spacing: var(--score-tracking);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text);
}
.tile:first-child .tile-value { color: var(--hi); }

/* ---------------------------------------------------------------------------
   Standings board (rank / name / points rows)
   --------------------------------------------------------------------------- */
.board-head, .board-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center;
  gap: var(--space-3);
}
.scoreboard .board-head {
  padding: 0 var(--space-3) var(--space-2);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: var(--score-case); color: var(--muted);
}
.board-head span:last-child { text-align: right; }
.board {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius-control); overflow: hidden;
}
.board-row {
  min-height: 52px; padding: var(--space-2) var(--space-3);
  background: var(--row-a); border-bottom: 1px solid var(--line);
}
.board-row:nth-child(even) { background: var(--row-b); }
.board-row:last-child { border-bottom: 0; }
.scoreboard .board-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  font-family: var(--font-score); font-weight: 800; font-size: 1.25rem;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
.board-rank--gold, .scoreboard .board-rank--gold { background: var(--gold); color: var(--gold-ink); }
.board-name { display: flex; flex-direction: column; min-width: 0; }
.scoreboard .board-player {
  font-weight: 700; text-transform: var(--score-case); letter-spacing: 0.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-meta { font-size: 0.78rem; color: var(--muted); }
.scoreboard .board-pts {
  font-family: var(--font-score); font-weight: 800; font-size: 1.6rem; line-height: 1;
  font-variant-numeric: tabular-nums; text-align: right;
}
.board-row.is-you { background: var(--you-bg); box-shadow: inset var(--rule-width) 0 0 var(--action); }
.board-row.is-you .board-rank, .board-row.is-you .board-pts { color: var(--hi); }
.board-row.is-you .board-rank--gold { color: var(--gold-ink); }
.board-row.is-you .board-player { font-weight: 800; }
.board-row.is-unqualified .board-player, .board-row.is-unqualified .board-pts { color: var(--muted); }

/* ---------------------------------------------------------------------------
   Tables — wide ones scroll inside their own box, never the page. main.css styles
   table/th/td for its prose pages; these rules restate them for Leagues' ruled rows,
   and only inside .table-wrap (every Leagues table sits in one). :where() keeps each
   rule at the specificity it had as a bare element rule.
   --------------------------------------------------------------------------- */
.table-wrap {
  max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius-control);
}
.card > .table-wrap:not(:last-child) { margin-bottom: var(--space-3); }
:where(.table-wrap) table { width: 100%; margin: 0; border-collapse: collapse; font-size: 0.95rem; }
:where(.table-wrap) thead th {
  text-align: left; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); padding: var(--space-2) var(--space-3);
  background: var(--surface); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
:where(.table-wrap) th { text-align: left; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); }
:where(.table-wrap) td { padding: var(--space-3); border-bottom: 1px solid var(--line); vertical-align: middle; }
:where(.table-wrap) tbody tr:last-child td, :where(.table-wrap) tbody tr:last-child th { border-bottom: 0; }
:where(.table-wrap) tbody tr:nth-child(odd) td { background: var(--row-a); }
:where(.table-wrap) tbody tr:nth-child(even) td { background: var(--row-b); }
:where(.table-wrap) td.num, :where(.table-wrap) th.num { text-align: right; font-variant-numeric: tabular-nums; }
:where(.table-wrap) td.num { font-family: var(--font-score); font-weight: 700; font-size: 1.2rem; }
:where(.table-wrap) tr.is-you td { background: var(--you-bg); }
:where(.table-wrap) tr.is-you td:first-child { box-shadow: inset var(--rule-width) 0 0 var(--action); }
:where(.table-wrap) tr.is-first td:first-child { box-shadow: inset var(--rule-width) 0 0 var(--gold); }
:where(.table-wrap) tr.is-unqualified td { color: var(--muted); }

/* Roster: seven narrow day columns beside the contact details. */
.roster td.num, .roster th.num { text-align: center; font-family: var(--font-body); font-size: 0.85rem; }
.day-mark {
  display: inline-block; padding: 2px var(--space-2);
  border-radius: var(--radius-control); background: var(--you-bg); color: var(--hi);
  font-size: var(--text-caption); font-weight: 700;
}
.availability-grid th { font-size: var(--text-caption); color: var(--muted); }
.availability-grid td { text-align: center; padding: 0; }
/* The whole 44px cell is the tick box's hit area, not just the 24px box. */
.availability-grid .avail-hit {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--touch); min-height: var(--touch); margin: 0; cursor: pointer;
}
.availability-grid input { width: 24px; height: 24px; margin: 0; }

/* ---------------------------------------------------------------------------
   Badges and tags
   --------------------------------------------------------------------------- */
.badge {
  display: inline-block; padding: 1px var(--space-2);
  border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); vertical-align: middle; white-space: nowrap;
}
.badge--bonus { border-color: var(--action); color: var(--hi); }
.badge--gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.badge--bad { border-color: var(--down); color: var(--down); }
.tag {
  display: inline-block; padding: 1px var(--space-2); border-radius: 999px;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.tag--pending { background: var(--notice-bg); border: 1px solid var(--notice-line); color: var(--text); }
.tag--declined, .tag--unattested { border: 1px solid var(--down); color: var(--down); }

/* ---------------------------------------------------------------------------
   Forms and buttons — every control at least 44px tall, 16px text (no iOS zoom).
   The element rules apply on signed-in pages and in the public form sections (.lg-form).
   --------------------------------------------------------------------------- */
:where(main, .lg-form) label { display: block; margin-bottom: var(--space-1); font-size: var(--text-caption); font-weight: 600; color: var(--text-2); }
:where(main, .lg-form) input:not([type="checkbox"]):not([type="radio"]), :where(main, .lg-form) select, :where(main, .lg-form) textarea {
  width: 100%; min-height: var(--touch); padding: var(--space-2) var(--space-3);
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-control);
}
:where(main, .lg-form) textarea { min-height: 120px; line-height: 1.5; }
:where(main, .lg-form) input::placeholder, :where(main, .lg-form) textarea::placeholder { color: var(--muted); opacity: 1; }
:where(main, .lg-form) input[type="checkbox"], :where(main, .lg-form) input[type="radio"] { width: 22px; height: 22px; margin: 0; accent-color: var(--action); flex: none; }
:where(main, .lg-form) input:focus-visible, :where(main, .lg-form) select:focus-visible, :where(main, .lg-form) textarea:focus-visible { outline: 2px solid var(--hi); outline-offset: 1px; border-color: var(--hi); }
:where(main, .lg-form) input[type="number"] { font-variant-numeric: tabular-nums; }
:where(main, .lg-form) input[readonly] { color: var(--text-2); }
.readonly { margin: 0; padding: var(--space-2) 0; min-height: var(--touch); color: var(--text-2); overflow-wrap: anywhere; }
.field { margin-bottom: var(--space-4); min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-3); }
.field-row--fit { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* A label with a tick box inside it: box beside the sentence, whole row tappable. */
.field label:has(> input[type="checkbox"]), .field--check, .plain-list label:has(> input[type="checkbox"]) {
  display: flex; align-items: flex-start; gap: var(--space-3);
  min-height: var(--touch); padding: var(--space-2) 0;
  font-size: 1rem; font-weight: 500; color: var(--text); cursor: pointer;
}
.field--check label {
  display: flex; align-items: flex-start; gap: var(--space-3);
  font-size: 1rem; font-weight: 500; color: var(--text); cursor: pointer; margin: 0;
}
.field--check input { margin-top: 1px; }

/* Buttons: the pair on bogeyhunter.ai/tracker/ — filled green with dark ink, or outlined
   green — 10px corners, 600 weight, in the body face. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--touch); padding: 0 var(--space-5);
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  text-decoration: none;
  background: var(--action); color: var(--action-ink);
  border: 1px solid var(--action); border-radius: 10px; cursor: pointer;
}
.btn:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--action-ink); }
.btn--quiet { background: transparent; color: var(--action); border-color: var(--action); }
.btn--quiet:hover { background: var(--accent-glow); color: var(--action-hover); border-color: var(--action-hover); }
.btn--danger { background: transparent; color: var(--down); border-color: var(--down); }
.btn--danger:hover { background: var(--notice-bg); color: var(--down); border-color: var(--down); }
.btn--small { min-height: var(--touch); padding: 0 var(--space-4); font-size: 0.92rem; }
.btn--hero { min-height: 54px; padding: 0 var(--space-6); font-size: 1.05rem; }
/* Forms in narrow cards end in a full-width primary button, as in the mockups. */
.card--narrow form > .btn { width: 100%; }

/* Buttons that sit side by side, each in its own POST form. */
.form-inline { display: inline-flex; margin: 0 var(--space-2) var(--space-2) 0; vertical-align: middle; }
.form-actions { margin: var(--space-3) 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.actions .form-inline { margin: 0; }
.w-auto { width: auto !important; }

/* A list of people with their buttons underneath: the captain's member screens. */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list > li { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.plain-list > li:last-child { border-bottom: 0; }
.plain-list .actions { margin-top: var(--space-2); }
.plain-list .form-inline { margin: var(--space-2) var(--space-2) 0 0; }

.league-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-control); overflow: hidden; }
.league-list li a {
  display: flex; align-items: center; min-height: 56px; padding: 0 var(--space-4);
  background: var(--row-a); border-bottom: 1px solid var(--line);
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
  letter-spacing: normal; color: var(--text); text-decoration: none;
}
.league-list li:nth-child(even) a { background: var(--row-b); }
.league-list li:last-child a { border-bottom: 0; }
.league-list li a::after { content: '›'; margin-left: auto; color: var(--hi); font-size: 1.6rem; }
.league-list li a:hover { color: var(--hi); }

/* ---------------------------------------------------------------------------
   Log a round / edit a round
   --------------------------------------------------------------------------- */
/* One player's card on the log form, collapsible. */
.score-block > summary {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: var(--touch); margin: 0;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem;
  letter-spacing: normal;
  cursor: pointer; list-style: none;
}
.score-block > summary::-webkit-details-marker { display: none; }
/* The caret, pushed to the far edge so it reads as the control. */
.score-block > summary::after {
  content: ''; margin-left: auto; width: 0.45em; height: 0.45em;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-0.1em, -0.1em);
}
.score-block:not([open]) > summary::after { transform: rotate(-45deg); }
.score-block[open] > summary { margin-bottom: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--line); }
.card .score-block { background: var(--row-b); }

/* The six hole counts as rows: label left, a big score numeral box right. */
.field-row--counts {
  display: block;
  margin-bottom: var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-control); overflow: hidden;
}
.field-row--counts .field {
  display: flex; align-items: center; gap: var(--space-3);
  margin: 0; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  background: var(--row-a); border-bottom: 1px solid var(--line);
}
.field-row--counts .field:nth-child(even) { background: var(--row-b); }
.field-row--counts .field:last-child { border-bottom: 0; }
.field-row--counts label {
  flex: 1; margin: 0;
  font-size: 0.95rem; font-weight: 600; color: var(--text);
}
.field-row--counts input:not([type="checkbox"]) {
  flex: none; width: 84px; min-height: 48px; text-align: center;
  font-family: var(--font-score); font-weight: 800; font-size: 1.6rem;
}

/* Live scoring preview: the footer bar of the log mockup, kept above the tab bar. */
.preview {
  position: sticky; bottom: env(safe-area-inset-bottom, 0px); z-index: 5;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 var(--space-4);
  margin: 0 calc(var(--gap) * -1); padding: var(--space-3) var(--gap);
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.preview > .muted { grid-column: 1; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.preview .total {
  grid-column: 1; font-family: var(--font-score); font-weight: 800; font-size: 2.2rem; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--hi);
}
.preview .form-actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.preview .form-actions .btn { width: 100%; min-height: 54px; font-size: 1.05rem; }
.preview .breakdown { grid-column: 1 / -1; margin-top: var(--space-2); font-size: 0.82rem; color: var(--muted); }
.preview .earned { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-1); }
.preview .earned:empty { display: none; }

/* ---------------------------------------------------------------------------
   Stat tiles (quarter winners, fun stats)
   --------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-2); }
.stat {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  background: var(--row-b); border: 1px solid var(--line); border-radius: var(--radius-control);
  padding: var(--space-3);
}
.stat .label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat .value {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--text);
  overflow-wrap: anywhere;
}
.stat .value--champion { color: var(--gold); }

/* Hall of Fame season switcher: the redesign's outlined button (site2.css .v2-btn--line),
   the selected year filled like its solid button. */
.lg-year-switch { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.lg-year-link {
  display: inline-flex; align-items: center;
  min-height: var(--touch); padding: 0 var(--space-4);
  border-radius: 8px; border: 1.5px solid var(--action);
  color: var(--text); text-decoration: none;
  font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.lg-year-link:hover { background: rgba(46, 168, 84, 0.12); color: var(--ink); }
.lg-year-link[aria-current="page"] { background: var(--action); border-color: var(--action); color: var(--action-ink); }

/* Season / page switcher pills. */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 40px; padding: 0 var(--space-3);
  background: var(--row-b); border: 1px solid var(--line); border-radius: var(--radius-control);
  font-size: 0.95rem;
}
.chip b { font-weight: 700; }
.chip i { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
/* The points-per-hole chips are a scoreboard: caps labels, condensed numerals. */
.scoreboard .chip b { text-transform: var(--score-case); letter-spacing: 0.02em; }
.scoreboard .chip i { font-family: var(--font-score); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.chip--best, .chip--good { border-color: var(--action); }
.chip--best i, .chip--good i { color: var(--hi); }
.chip--bad i { color: var(--down); }


/* ---------------------------------------------------------------------------
   Intro band (the members' How it works page)
   --------------------------------------------------------------------------- */
.lg-hero {
  margin: 0 0 var(--space-5);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border);
}
.lg-hero h1 { font-family: var(--font-heading); font-weight: 800; font-size: 2.4rem; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 var(--space-4); }
.lg-hero-lede { font-size: 1.1rem; line-height: 1.55; color: var(--text-2); margin: 0 0 var(--space-5); }
.lg-hero .btn--hero { width: 100%; }
.lg-hero-note { margin: var(--space-3) 0 0; }
.lg-hero--footer { margin: var(--space-5) 0 0; border-bottom: 0; border-top: 1px solid var(--border); }

/* Numbered steps */
.howto { list-style: none; margin: 0; padding: 0; }
.howto li {
  display: flex; align-items: baseline; gap: var(--space-2) var(--space-3);
  padding: var(--space-3) 0; border-top: 1px solid var(--line);
}
/* The number stays beside its step, never above it. */
.howto li > div { flex: 1; min-width: 0; }
.howto li:last-child { border-bottom: 1px solid var(--line); }
.howto-num {
  flex: none; min-width: 1ch;
  font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--hi);
}

/* "Why everyone has a shot" tiles */
.reasons { display: grid; gap: var(--space-3); margin: var(--space-4) 0 var(--space-1); }
.reason { background: var(--row-b); border: 1px solid var(--line); border-radius: var(--radius-control); padding: var(--space-3) var(--space-4); }
.reason h3 { margin: 0 0 var(--space-2); color: var(--hi); }
.reason p { margin: var(--space-2) 0 0; font-size: 0.92rem; color: var(--text-2); }

/* best-8-of-12 diagram */
.squares { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.sq { width: 16px; height: 16px; border-radius: 2px; background: var(--line); }
.sq.on { background: var(--action); }

/* beat-your-own-average diagram */
.bars { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-2); align-items: center; }
.bar-label { font-size: 0.76rem; color: var(--muted); }
.bar { height: 10px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--muted); }
.bar i.hot { background: var(--action); }
.bar i.bar--w55 { width: 55%; }
.bar i.bar--w85 { width: 85%; }

/* played-every-month diagram */
.months { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.mo { font-size: 0.76rem; font-weight: 700; padding: 2px var(--space-2); border-radius: var(--radius-control); border: 1px solid var(--line-strong); color: var(--muted); }
.mo.done { border-color: var(--action); color: var(--hi); }

/* Quarter facts: four small cells. */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-3); }
.fact { background: var(--row-b); border: 1px solid var(--line); border-radius: var(--radius-control); padding: var(--space-2) var(--space-3); font-size: 0.85rem; }
.fact b { display: block; font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; letter-spacing: normal; }
.fact span { color: var(--muted); }

/* A rule called out so nobody can claim they missed it. */
.rulebox {
  display: flex; flex-direction: column; gap: var(--space-1);
  margin: var(--space-3) 0; padding: var(--space-3) var(--space-4);
  background: var(--row-b); border: 1px solid var(--line); border-left: var(--rule-width) solid var(--action);
  border-radius: var(--radius-control);
}
.rulebox b { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; }
.rulebox span { font-size: 0.92rem; color: var(--text-2); }

/* Fine / not fine */
.dodont { display: grid; gap: var(--space-3); margin: var(--space-3) 0; }
.do, .dont { background: var(--row-b); border: 1px solid var(--line); border-radius: var(--radius-control); padding: var(--space-3) var(--space-4); }
.do h3, .dont h3 { margin: 0 0 var(--space-2); font-size: 1rem; }
.do h3 { color: var(--hi); }
.dont h3 { color: var(--down); }
.do ul, .dont ul { margin: 0; padding-left: var(--space-4); font-size: 0.92rem; color: var(--text-2); }
.do li, .dont li { margin-bottom: var(--space-1); }

.rules { margin: 0 0 var(--space-3); padding-left: var(--space-4); }
.rules li { margin-bottom: var(--space-2); }

/* The landing's sample leaderboard: a Broadcast board with a green title bar. */
.sample-board { margin: 0 0 var(--space-6); }
.sample-board-head {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--action); color: var(--action-ink);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.scoreboard .sample-board-title {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--font-score); font-weight: 800; font-size: 1.25rem;
  text-transform: var(--score-case); letter-spacing: var(--score-tracking); overflow-wrap: anywhere;
}
.scoreboard .sample-board-tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: var(--score-case); }
.sample-board-rows { border-top: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); }
.sample-board-note { margin: var(--space-2) 0 0; }
.sample-board { max-width: 600px; }

/* ---------------------------------------------------------------------------
   The redesign (bogeyhunter.ai's site2.css). Leagues pages use its v2- classes inside
   <main class="content-wide">; site2.css scopes its heading face and ink to a .v2 page,
   so these supply them here. Every gap is the space scale's.
   --------------------------------------------------------------------------- */
:where(.lg-v2-hero, .lg-v2-cols, .lg-v2-section) :is(.v2-h1, .v2-h2, h3) { font-family: var(--font-heading); color: var(--ink); margin: 0; }
:where(.lg-v2-section) h3 { letter-spacing: normal; }
.lg-v2-hero { padding: var(--space-4) 0 var(--space-5); }
.lg-v2-hero .v2-small { margin: 0; }
.lg-v2-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: var(--space-5); align-items: start; }
.lg-v2-cols > * { min-width: 0; }
.lg-v2-cols .sample-board { margin: 0; }
.lg-v2-section { margin-top: var(--space-6); }
.lg-v2-section .v2-points { margin-top: var(--space-3); }
.lg-v2-section .v2-point p { margin: 0; }
/* The document pages: site2.css turns tables into scroll blocks; .table-wrap does that already. */
.v2-doc .table-wrap table { display: table; width: 100%; }

/* ---------------------------------------------------------------------------
   Public pages: main.css gives the structure (.page-header, .section, .section-title,
   .section-desc, .info-card); these fill the gaps it leaves for Leagues' content.
   --------------------------------------------------------------------------- */
/* main.css zeroes every margin; inside these blocks consecutive pieces get a gap. */
:where(.lg-flow) > * + * { margin-top: var(--space-3); }
/* A wide page's title row: the h1 and, when the page has one, its action button. */
.lg-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.lg-head-row h1 { margin-bottom: 0; }
/* Blocks of a long page (the landing) are spaced by a gap, not by the site's 6rem section padding. */
.lg-band { margin-top: var(--space-6); }
/* A small line under a lede or a row of buttons (the landing's "every application is read"). */
.lg-note { margin-top: var(--space-3); }
/* A form section: a narrow column, close under the page header; a second form follows ruled. */
.lg-form { max-width: 480px; padding: 0 0 var(--space-6); }
.lg-form + .lg-form { padding-top: var(--space-6); }
.lg-form form > .btn { width: 100%; }
/* FAQ answers are site info cards, set a little closer than its 2rem. */
.faq-item { margin: var(--space-4) 0; }

/* The public How it works page's points table and worked example. */
.points-table th[scope="row"] { font-weight: 600; text-align: left; }
.points-table td.num { font-family: var(--font-score); font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.worked-steps li { align-items: flex-start; }
.worked-steps p { margin: var(--space-1) 0 0; }
/* The tally inside a step is a plain list, not another .howto row. */
.worked-steps .worked-lines li, .worked-steps .worked-lines li:last-child { display: list-item; padding: 0; border: 0; }
.worked-lines { margin: var(--space-1) 0 0; padding-left: var(--space-4); font-variant-numeric: tabular-nums; color: var(--text-2); }
.worked-total { font-family: var(--font-score); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--hi); }

@media (min-width: 720px) {
  .field-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg-hero h1 { font-size: 3rem; }
  .lg-hero .btn--hero { width: auto; }
  .reasons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dodont { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The one-time "share your phone and playing days" prompt on a league home (R31). */
.share-prompt { flex-wrap: wrap; justify-content: space-between; }
.share-prompt > span { flex: 1 1 16rem; }
.share-prompt form { margin: 0; }
.share-prompt-hint strong { color: var(--text); }

/* The sprite itself never renders; only its symbols are used. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Respect a request for less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
   Printing: no Leagues bar. (Paper scorecards are BH Tracker's printables on
   bogeyhunter.ai/tracker/.)
   --------------------------------------------------------------------------- */
@media print {
  .noprint, .lg-bar, .icon-sprite { display: none !important; }
}