/* ============================================================
   RR GOLF PERFORMANCE — Junior Elite Academy Portal
   Brand system: navy + gold, Helvetica, clean editorial feel
   ============================================================ */

:root {
  --navy: #0A1628;
  --navy-mid: #1A2E4A;
  --navy-light: #2C4A6E;
  --gold: #C9A84C;
  --gold-light: #E8D89A;
  --gold-soft: #F5EBCC;
  --cream: #FBF9F2;
  --light-bg: #F7F8FA;
  --mid-grey: #8A9BB0;
  --soft-grey: #C7D1DC;
  --rule: #DDE3EC;
  --dark-text: #1A1A2E;
  --white: #FFFFFF;
  --green-ok: #27AE60;
  --green-light: #EEF7F1;
  --red-risk: #C0392B;
  --amber: #E67E22;
  --blue-info: #2980B9;

  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 8px 28px rgba(10, 22, 40, 0.12);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-sans);
  color: var(--dark-text);
  background: var(--light-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== TOP NAV ===== */
.nav {
  background: var(--navy);
  color: var(--white);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-brand {
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--gold);
  border-radius: 1px;
  transform: rotate(45deg);
}
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  list-style: none;
}
.nav-links a {
  color: var(--soft-grey);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
/* ===== PATH-TO-GOAL WIDGET ===== */
.path-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.path-header { margin-bottom: 16px; }
.path-kicker {
  font-size: 11px; letter-spacing: 0.2em; color: var(--gold);
  font-weight: 700; text-transform: uppercase; margin-bottom: 4px;
}
.path-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px; color: var(--navy); font-weight: 600;
  margin: 0 0 6px; line-height: 1.2;
}
.path-sub {
  font-size: 13px; color: var(--navy-mid); line-height: 1.5;
  margin: 0 0 6px;
}
.path-rows {
  display: flex; flex-direction: column; gap: 8px;
  margin: 14px 0 0;
}
.path-row {
  display: grid;
  grid-template-columns: 1fr auto auto 36px;
  align-items: center; gap: 14px;
  padding: 10px 14px;
  background: #F7F2E8;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 13.5px;
}
.path-row.path-green  { border-left-color: #6B8B4E; }
.path-row.path-yellow { border-left-color: #D4A84C; }
.path-row.path-red    { border-left-color: #C76757; }

.path-metric {
  font-weight: 600; color: var(--navy);
  font-size: 14px;
}
.path-actual {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px; color: var(--navy); font-weight: 700;
  white-space: nowrap;
}
.path-target {
  font-size: 12px; color: var(--mid-grey);
  white-space: nowrap;
}
.path-target .path-target-label {
  display: inline-block;
  font-size: 9px; letter-spacing: 0.15em;
  color: var(--gold); font-weight: 700;
  text-transform: uppercase; margin-right: 4px;
}
.path-pill {
  justify-self: end;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-weight: 700; font-size: 14px;
  color: #fff;
  cursor: default;           /* not a button */
  user-select: none;
  pointer-events: none;      /* kill hover + click affordance */
  line-height: 1;
}
.path-pill-green  { background: #6B8B4E; }
.path-pill-yellow { background: #D4A84C; color: var(--navy); }
.path-pill-red    { background: #C76757; }

.path-missing-hint {
  margin-top: 16px; padding: 12px 16px;
  background: #F7F2E8;
  border: 1px dashed var(--rule);
  border-radius: 6px;
  font-size: 13px; line-height: 1.5;
  color: var(--navy-mid);
}
.path-missing-hint b { color: var(--navy); }
.path-missing-hint em {
  font-style: normal; color: var(--navy);
  font-weight: 600;
}
.path-missing-hint a {
  display: inline-block; margin-top: 6px;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; text-decoration: none;
}
.path-missing-hint a:hover { color: var(--navy); }

/* ===== COACH EDIT BANNER =====
   Shown at the top of any page where a coach is editing on behalf of a
   player (via ?userId=X). Prominent so there's no confusion about whose
   data you're touching. */
.coach-banner {
  background: linear-gradient(180deg, var(--navy) 0%, #162E54 100%);
  color: #fff;
  border-radius: 12px;
  padding: 16px 22px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 3px solid var(--gold);
}
.coach-banner .cb-label {
  font-size: 10px;
  letter-spacing: 2.4px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.coach-banner .cb-player {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
}
.coach-banner .cb-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.coach-banner .cb-nav a {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
}
.coach-banner .cb-nav a:hover {
  background: var(--gold);
  color: var(--navy);
}
.coach-banner .cb-nav a.cb-current {
  background: var(--gold);
  color: var(--navy);
}
.coach-banner .cb-exit {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.coach-banner .cb-exit:hover { color: #fff; }

/* ===== INFO TOOLTIP (ⓘ with hover title) ===== */
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  cursor: help;
  margin-left: 4px;
  vertical-align: baseline;
  transform: translateY(1px);
  user-select: none;
}
.info-tip:hover { background: var(--gold); color: var(--white); }

/* ===== CHIP-GROUP (multi-select checkbox chips) ===== */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.chip-group .chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--navy-mid);
  background: var(--white);
  transition: all .12s ease;
  user-select: none;
  font-weight: 500;
}
.chip-group .chip:hover {
  border-color: var(--gold);
  color: var(--navy);
}
.chip-group .chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip-group .chip:has(input[type="checkbox"]:checked) {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
  font-weight: 700;
}
.chip-group .chip input[type="checkbox"]:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== MILESTONES WIDGET (beginner / developing tiers) ===== */
.ms-section-label {
  font-size: 10px; letter-spacing: 1.6px; color: var(--gold);
  font-weight: 700; text-transform: uppercase;
  margin: 18px 0 8px;
}
.ms-list {
  display: flex; flex-direction: column; gap: 8px;
}
.ms-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px; align-items: center;
  padding: 10px 14px;
  background: #F7F2E8;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 13.5px;
}
.ms-row.ms-done {
  border-left-color: #6B8B4E;
  background: #F2F6EE;
}
.ms-row.ms-next {
  border-left-color: var(--gold);
}
.ms-icon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 16px; font-weight: 700;
  background: #6B8B4E; color: #fff;
}
.ms-icon.ms-target {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 18px;
}
.ms-title {
  font-weight: 600; color: var(--navy);
  font-size: 14.5px; line-height: 1.3;
}
.ms-sub {
  font-size: 12px; color: var(--mid-grey); margin-top: 2px;
}
.ms-best {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px; letter-spacing: 0.5px;
  color: var(--navy-mid);
}
.ms-best b {
  color: var(--navy); font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
}

/* ===== TREND CHARTS ===== */
.trend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 760px) {
  .trend-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .trend-grid { grid-template-columns: 1fr; }
}
.trend-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  border-radius: 10px;
  padding: 12px 14px 8px;
}
.trend-card.trend-empty { opacity: 0.6; }
.trend-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.trend-label {
  font-size: 10px; letter-spacing: 1.4px; color: var(--gold);
  text-transform: uppercase; font-weight: 700;
}
.trend-delta {
  font-size: 12px; font-weight: 700;
}
.trend-delta.trend-up   { color: #6B8B4E; }
.trend-delta.trend-down { color: #C76757; }
.trend-delta.trend-flat { color: var(--mid-grey); }
.trend-subempty {
  font-size: 12px; color: var(--mid-grey); padding: 16px 0;
}
.spark-title {
  font-size: 10px; letter-spacing: 1.4px; color: var(--gold);
  text-transform: uppercase; font-weight: 700;
  margin-bottom: 2px;
}
.spark-svg {
  width: 100%; height: auto; display: block;
}
.spark-empty {
  font-size: 12px; color: var(--mid-grey);
  padding: 16px 0; text-align: center;
}

/* ===== HANDICAP PAGE ===== */
.hcp-hero {
  background: linear-gradient(180deg, var(--navy) 0%, #162E54 100%);
  color: #fff;
  border-radius: 14px;
  padding: 36px 32px 30px;
  margin-bottom: 22px;
  text-align: center;
}
.hcp-hero .kicker {
  font-size: 11px; letter-spacing: 0.22em; color: var(--gold);
  font-weight: 700; text-transform: uppercase; margin-bottom: 8px;
}
.hcp-hero .index-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 72px; font-weight: 600; color: var(--gold);
  line-height: 1; margin: 8px 0;
}
.hcp-hero .index-num small {
  font-size: 20px; color: rgba(255,255,255,0.6);
  font-weight: 400; margin-left: 6px;
}
.hcp-hero .index-label {
  font-size: 14px; color: rgba(255,255,255,0.85);
  margin-top: 6px;
}
.hcp-hero .index-sub {
  font-size: 12px; color: rgba(255,255,255,0.55);
  margin-top: 10px;
  font-style: italic;
}
.hcp-empty {
  background: #F7F2E8;
  border: 1px dashed var(--rule);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
}
.hcp-empty h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy); font-size: 20px; font-weight: 600; margin: 0 0 6px;
}
.hcp-empty p { color: var(--navy-mid); margin: 4px 0; font-size: 14px; }

.hcp-diff-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.hcp-diff-table th {
  background: #F7F2E8;
  padding: 9px 12px;
  font-size: 10px; letter-spacing: 1.4px;
  color: var(--gold); font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.hcp-diff-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--navy-mid);
}
.hcp-diff-table tr.used td { background: rgba(201,168,76,0.06); color: var(--navy); font-weight: 600; }
.hcp-diff-table td.diff-val {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700; color: var(--navy);
}
.hcp-diff-table td.used-chip {
  text-align: right;
}
.hcp-diff-table .used-badge {
  display: inline-block;
  font-size: 9px; letter-spacing: 1.2px;
  background: var(--gold); color: var(--navy);
  padding: 2px 8px; border-radius: 999px;
  font-weight: 700; text-transform: uppercase;
}

.path-focus {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.path-focus-label {
  font-size: 10px; letter-spacing: 0.2em; color: var(--gold);
  font-weight: 700; text-transform: uppercase; margin-bottom: 6px;
}
.path-focus-goal {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px; color: var(--navy); font-style: italic;
  margin: 0 0 10px;
}
.path-focus ul {
  margin: 8px 0 0 20px; padding: 0;
}
.path-focus ul li {
  font-size: 13.5px; color: var(--navy-mid); line-height: 1.5;
  margin-bottom: 6px;
}
.path-footer-link {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px dashed var(--rule);
  text-align: right;
}
.path-footer-link a {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; text-decoration: none;
}
.path-footer-link a:hover { color: var(--navy); }

@media (max-width: 560px) {
  .path-card { padding: 20px 18px; }
  .path-row {
    grid-template-columns: 1fr auto 30px;
    padding: 8px 12px;
    gap: 10px;
  }
  .path-row .path-target { display: none; }
}

/* Group labels — hidden on desktop horizontal nav, visible only in mobile drawer */
.nav-group-label { display: none; }

/* ===== DROPDOWN NAV GROUPS ===== */
.nav-group { position: relative; list-style: none; }
.nav-group-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--soft-grey);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  line-height: 1;
}
.nav-group-toggle:hover,
.nav-group.open > .nav-group-toggle {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.nav-group-toggle .caret {
  font-size: 9px;
  transition: transform .15s ease;
  opacity: 0.8;
}
.nav-group.open > .nav-group-toggle .caret {
  transform: rotate(180deg);
}

/* Top-level nav link (no dropdown) — sits alongside dropdown groups,
   styled gold to mark it as the primary CTA in the nav. */
.nav-top-link { list-style: none; }
.nav-top-link > a {
  color: var(--gold); font-weight: 700; letter-spacing: 0.3px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 2px solid var(--gold);
  display: inline-flex; align-items: center;
  text-decoration: none;
  font-family: inherit; line-height: 1;
  transition: opacity .12s ease;
}
.nav-top-link > a:hover { opacity: 0.85; }

.nav-group-items {
  position: absolute;
  top: calc(100% + 6px);
  left: -14px;
  min-width: 260px;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 2px solid var(--gold);
  border-radius: 0 0 10px 10px;
  padding: 8px 0;
  list-style: none;
  box-shadow: 0 14px 32px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
  z-index: 100;
}
.nav-group.open > .nav-group-items {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear 0s;
}
.nav-group-items li { width: 100%; border: none; }
.nav-group-items a {
  display: block;
  padding: 9px 18px;
  color: var(--soft-grey);
  font-size: 13px;
  border-bottom: none;
  white-space: nowrap;
  text-decoration: none;
}
.nav-group-items a:hover,
.nav-group-items a.active {
  background: rgba(201,168,76,0.12);
  color: var(--gold);
  border-bottom: none;
}
.nav-group-items .nav-sublabel {
  padding: 10px 18px 4px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.75;
  pointer-events: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
}
.nav-group-items li.nav-sublabel:first-child,
.nav-group-items li:first-child + .nav-sublabel {
  border-top: none;
  margin-top: 0;
}
/* End EVENTS dropdown is wide — let it use two columns on desktop if long */
.nav-group[data-group="events"] .nav-group-items { min-width: 280px; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--soft-grey);
  font-size: 13px;
}
.nav-user .avatar {
  width: 32px; height: 32px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.nav-user button {
  background: transparent;
  color: var(--soft-grey);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
}
.nav-user button:hover { border-color: var(--gold); color: var(--gold); }

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.page-header {
  margin-bottom: 24px;
}
.page-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 6px;
}
.page-subtitle {
  color: var(--mid-grey);
  font-size: 14px;
  max-width: 640px;
}
.gold-rule {
  height: 2px;
  background: var(--gold);
  border: none;
  width: 60px;
  margin: 12px 0 24px;
}

/* ===== CARD ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border-top: 2px solid var(--gold);
}
.card-cream {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 3px solid var(--gold);
}
.card-navy {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border-top: 2px solid var(--gold);
}
.card-navy h2, .card-navy h3 { color: var(--white); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover { background: #B8993C; color: var(--navy); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-mid); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--rule);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-block { display: flex; width: 100%; }

/* ===== FORMS ===== */
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--navy);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field .hint {
  font-size: 12px;
  color: var(--mid-grey);
  margin-top: 4px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--dark-text);
  font-size: 14px;
  transition: border-color 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}
.field textarea { min-height: 100px; resize: vertical; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.field-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

@media (max-width: 640px) {
  .field-row, .field-row-3, .field-row-4 { grid-template-columns: 1fr; }
}

/* ===== GRIDS ===== */
.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

/* ===== WEEK CARDS (DASHBOARD) ===== */
.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.week-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  text-decoration: none;
  color: var(--dark-text);
  display: block;
}
.week-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.week-card.complete {
  border-top-color: var(--green-ok);
  background: var(--green-light);
}
.week-card.current {
  border-top: 3px solid var(--gold);
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-md);
}
.week-card.locked {
  opacity: 0.55;
  cursor: default;
}
.week-card .week-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
}
.week-card .week-date {
  font-size: 12px;
  color: var(--mid-grey);
  margin-top: 2px;
}
.week-card .week-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 10px;
  line-height: 1.3;
}
.week-card .week-codes {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-top: 8px;
}
.week-card .week-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 3px;
  margin-top: 12px;
}
.week-card.complete .week-status {
  background: var(--green-ok); color: var(--white);
}
.week-card.current .week-status {
  background: var(--gold); color: var(--navy);
}
.week-card.pending .week-status {
  background: var(--rule); color: var(--mid-grey);
}

/* ===== LOGIN / AUTH ===== */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.auth-hero {
  background: var(--navy);
  color: var(--white);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.auth-hero .brand {
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 14px;
}
.auth-hero .hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.05;
}
.auth-hero .hero-title em {
  color: var(--gold);
  font-style: normal;
}
.auth-hero .hero-sub {
  color: var(--soft-grey);
  font-size: 15px;
  margin-top: 16px;
  max-width: 480px;
  line-height: 1.55;
}
.auth-hero .hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 28px;
}
.auth-hero .hero-stat { }
.auth-hero .hero-stat .n {
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
}
.auth-hero .hero-stat .l {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--soft-grey);
  text-transform: uppercase;
  margin-top: 2px;
}
.auth-hero .hero-foot {
  font-size: 12px;
  color: var(--mid-grey);
  margin-top: 32px;
}
.auth-hero .hero-foot strong { color: var(--gold-light); }

.auth-panel {
  background: var(--white);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-panel .form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.auth-panel h1 {
  font-size: 28px;
  color: var(--navy);
  margin-bottom: 24px;
}
.auth-panel .alt {
  font-size: 13px;
  color: var(--mid-grey);
  margin-top: 24px;
  text-align: center;
}
.auth-panel .alt a {
  color: var(--gold);
  font-weight: 600;
  border-bottom: 1px dotted var(--gold);
  padding-bottom: 1px;
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { padding: 40px 28px; }
  .auth-hero .hero-title { font-size: 36px; }
  .auth-panel { padding: 40px 28px; }
}

/* ===== STAT STRIP ===== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  background: var(--white);
  border-radius: var(--radius);
  border-top: 2px solid var(--gold);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-cell {
  padding: 18px 16px;
  text-align: center;
  border-right: 1px solid var(--rule);
}
.stat-cell:last-child { border-right: none; }
.stat-cell .val {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.stat-cell .lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--navy);
  text-transform: uppercase;
  margin-top: 6px;
}

/* ===== WEEK DETAIL ===== */
.week-hero {
  background: var(--navy);
  color: var(--white);
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--gold);
  margin-bottom: 28px;
  position: relative;
}
.week-hero .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
}
.week-hero h1 {
  color: var(--white);
  font-size: 32px;
  font-weight: 800;
  margin-top: 6px;
  line-height: 1.1;
}
.week-hero .meta {
  display: flex;
  gap: 24px;
  color: var(--soft-grey);
  font-size: 13px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.week-hero .meta .m { }
.week-hero .meta .m b { color: var(--gold-light); margin-right: 4px; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 28px;
  margin-bottom: 8px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.kv-list {
  display: grid;
  gap: 14px;
}
.kv-row {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  border-left: 3px solid var(--gold);
}
.kv-row .kv-key {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.kv-row .kv-val {
  color: var(--dark-text);
  line-height: 1.55;
}

/* ===== TIGER 5 SCORECARD ===== */
.tiger5-grid {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border-top: 2px solid var(--gold);
  box-shadow: var(--shadow-sm);
}
.tiger5-row {
  display: grid;
  grid-template-columns: 70px 1fr 120px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}
.tiger5-row:last-child { border-bottom: none; }
.tiger5-row .t5-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
}
.tiger5-row .t5-desc b { color: var(--navy); }
.tiger5-row .t5-count {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.tiger5-row .t5-count button {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--navy);
  font-size: 18px;
  cursor: pointer;
  font-weight: 700;
}
.tiger5-row .t5-count button:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.tiger5-row .t5-count .n {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--navy);
}

.tiger5-summary {
  margin-top: 18px;
  padding: 18px 22px;
  background: var(--cream);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}
.tiger5-summary .total {
  font-size: 13px;
  color: var(--navy-mid);
}
.tiger5-summary .total b {
  font-size: 28px;
  color: var(--gold);
  margin-right: 4px;
}
.tiger5-summary .status {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
}
.tiger5-summary .status.good { background: var(--green-ok); color: var(--white); }
.tiger5-summary .status.ok { background: var(--amber); color: var(--white); }
.tiger5-summary .status.bad { background: var(--red-risk); color: var(--white); }

/* ===== WEDGE MATRIX ===== */
.wedge-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.wedge-table th {
  background: var(--navy);
  color: var(--white);
  padding: 12px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
}
.wedge-table th:first-child { text-align: left; padding-left: 18px; }
.wedge-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.wedge-table td.club {
  font-weight: 700;
  color: var(--navy);
  text-align: left;
  padding-left: 18px;
  background: var(--light-bg);
}
.wedge-table input {
  width: 72px;
  padding: 8px 6px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}
.wedge-table input:focus { border-color: var(--gold); outline: none; }
.wedge-table tr:last-child td { border-bottom: none; }

/* ===== HISTORY TABLE ===== */
.history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.history-table th {
  background: var(--navy);
  color: var(--white);
  padding: 12px 14px;
  font-size: 11px;
  letter-spacing: 1px;
  text-align: left;
  font-weight: 700;
}
.history-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.history-table tr:hover td { background: var(--light-bg); }
.history-table tr:last-child td { border-bottom: none; }
.history-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--mid-grey);
  background: var(--white);
  border-radius: var(--radius);
  border-top: 2px solid var(--gold);
}

/* ===== LESSON ROW (dashboard "Every Session, Logged") ===== */
.lesson-row {
  display: grid;
  grid-template-columns: 52px 1fr 110px 110px;
  column-gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  margin-bottom: 10px;
  color: var(--navy);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.lesson-row:hover {
  transform: translateX(2px);
  box-shadow: 0 6px 14px rgba(15, 27, 53, 0.08);
}
.lesson-row.complete  { border-left-color: var(--green-ok); }
.lesson-row.scheduled { border-left-color: var(--gold); }
.lesson-row.pending   { border-left-color: var(--rule); }
.lesson-row .lnum {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.lesson-row .lfocus {
  font-size: 12px;
  color: var(--mid-grey);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lesson-row .ldate {
  font-size: 13px;
  color: var(--navy-mid);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .lesson-row {
    grid-template-columns: 44px 1fr auto;
    grid-template-areas:
      "num title  badge"
      "num date   date";
    column-gap: 12px;
    row-gap: 2px;
    padding: 12px 14px;
  }
  .lesson-row .lnum   { grid-area: num; }
  .lesson-row > div:nth-child(2) { grid-area: title; min-width: 0; }
  .lesson-row .ldate  { grid-area: date; text-align: left; font-size: 11px; }
  .lesson-row > div:last-child { grid-area: badge; }
}

/* ===== HELPERS ===== */
.muted { color: var(--mid-grey); }
.gold { color: var(--gold); }
.navy { color: var(--navy); }
.small { font-size: 12px; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.mt-6 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }
.text-center { text-align: center; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 3px;
}
.badge-gold { background: var(--gold); color: var(--navy); }
.badge-navy { background: var(--navy); color: var(--white); }
.badge-ghost { background: transparent; border: 1px solid var(--rule); color: var(--navy); }
.badge-green { background: var(--green-ok); color: var(--white); }
.badge-amber { background: var(--amber); color: var(--white); }

.callout {
  background: var(--cream);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--navy-mid);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: var(--white);
  padding: 14px 20px;
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-width: 360px;
  animation: toast-in 0.25s ease;
}
@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy);
  color: var(--soft-grey);
  padding: 24px;
  font-size: 12px;
  text-align: center;
  border-top: 2px solid var(--gold);
  margin-top: 64px;
}
.site-footer a { color: var(--gold-light); }

/* ==========================================================
   MOBILE  —  full pass for phones (< 768px)
   ========================================================== */

/* --- Hamburger button (hidden on desktop, shown on mobile) --- */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.nav-user-mobile { display: none; }

/* --- Width <= 900: start tightening --- */
@media (max-width: 900px) {
  .nav { padding: 0 16px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; }
  .container, .container-narrow { padding: 24px 18px 60px; }
  .page-title { font-size: 24px; }
  .week-hero { padding: 24px 20px; }
  .week-hero h1 { font-size: 24px; }
}

/* --- Width <= 768: mobile drawer nav + component overhaul --- */
@media (max-width: 768px) {

  /* NAV: hide inline link row + desktop user chip; show hamburger */
  .nav {
    height: 56px;
    padding: 0 14px;
  }
  .nav-brand { font-size: 12px; letter-spacing: 1px; }
  .nav-brand::before { width: 8px; height: 8px; }

  .nav-toggle { display: block; }

  .nav-user { display: none; }

  /* The <ul> becomes a full-screen drawer sliding in from the right */
  .nav-links {
    position: fixed;
    top: 56px; right: 0; bottom: 0;
    width: 82vw;
    max-width: 320px;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 60px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 60;
    overflow-y: auto;
    box-shadow: -8px 0 24px rgba(0,0,0,0.25);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { width: 100%; border: none; }

  /* Group subheadings inside the mobile drawer */
  .nav-group-label {
    display: block;
    padding: 18px 22px 6px;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: none;
  }
  .nav-group-label:first-child { padding-top: 12px; }
  .nav-links a {
    display: block;
    padding: 16px 22px;
    color: var(--soft-grey);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-radius: 0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
  }
  .nav-links a.active {
    background: rgba(201,168,76,0.1);
    color: var(--gold);
    border-left: 3px solid var(--gold);
    padding-left: 19px;
  }

  /* ----- MOBILE DRAWER: dropdowns become collapsible accordion sections ----- */
  .nav-group { position: static; }
  .nav-group-toggle {
    display: flex;
    width: 100%;
    padding: 16px 22px;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
  }
  .nav-group-toggle:hover,
  .nav-group.open > .nav-group-toggle {
    border-bottom-color: rgba(255,255,255,0.06);
    background: rgba(201,168,76,0.06);
  }
  .nav-group-toggle .caret {
    font-size: 11px;
    opacity: 0.9;
  }

  /* Mobile: top-level nav link gets a row treatment matching dropdown
     headers, with a gold left accent bar marking it as primary. */
  .nav-top-link > a {
    display: flex; width: 100%;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-left: 3px solid var(--gold);
    background: rgba(201,168,76,0.08);
    color: var(--gold);
    font-size: 11px; letter-spacing: 2px;
    text-transform: uppercase; font-weight: 700;
    text-decoration: none;
  }
  .nav-top-link > a.active { background: rgba(201,168,76,0.15); }

  .nav-group-items {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0,0,0,0.22);
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: none;
    min-width: 0;
    transition: none;
  }
  .nav-group.open > .nav-group-items { display: block; }
  .nav-group-items a {
    display: block;
    padding: 13px 22px 13px 34px;
    color: var(--soft-grey);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: normal;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .nav-group-items a.active {
    background: rgba(201,168,76,0.1);
    color: var(--gold);
    border-left: 3px solid var(--gold);
    padding-left: 31px;
  }
  .nav-group-items .nav-sublabel {
    padding: 10px 22px 4px 34px;
    font-size: 9px;
    letter-spacing: 0.2em;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 2px;
  }
  .nav-group[data-group="events"] .nav-group-items { min-width: 0; }

  /* Mobile user chip lives inside the drawer */
  .nav-user-mobile {
    display: block;
    margin-top: 20px;
    padding: 18px 22px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-user-mobile .who {
    color: var(--soft-grey);
    font-size: 13px;
    margin-bottom: 10px;
  }
  .nav-user-mobile button {
    display: block;
    width: 100%;
    padding: 12px 14px;
    background: transparent;
    color: var(--soft-grey);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
  }
  .nav-user-mobile button:hover { border-color: var(--gold); color: var(--gold); }

  /* Scrim (click outside drawer to close) */
  .nav-scrim {
    position: fixed;
    top: 56px; left: 0; right: 0; bottom: 0;
    background: rgba(10,22,40,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 55;
  }
  .nav-scrim.open { opacity: 1; pointer-events: auto; }

  /* Typography scale */
  .page-title { font-size: 22px; line-height: 1.25; }
  .page-subtitle { font-size: 13px; }
  .page-label { font-size: 10px; letter-spacing: 1.5px; }
  .page-header { margin-bottom: 18px; }
  .section-title { font-size: 17px; }

  /* Containers: tighter padding */
  .container, .container-narrow { padding: 20px 14px 50px; }

  /* Cards */
  .card, .card-navy, .card-cream { padding: 18px 16px; border-radius: 8px; }
  .card h2, .card-navy h2, .card-cream h2 { font-size: 17px; }
  .card h3, .card-navy h3, .card-cream h3 { font-size: 15px; }

  /* Stat strip — 2 per row, smaller */
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-cell { padding: 14px 10px; border-right: 1px solid var(--rule); }
  .stat-cell:nth-child(2n) { border-right: none; }
  .stat-cell:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .stat-cell .val { font-size: 20px; }
  .stat-cell .lbl { font-size: 9px; }

  /* Week hero */
  .week-hero { padding: 20px 16px; border-radius: 10px; margin-bottom: 18px; }
  .week-hero h1 { font-size: 20px; line-height: 1.2; }
  .week-hero .tag { font-size: 10px; letter-spacing: 1.2px; }
  .week-hero .meta { gap: 12px; font-size: 12px; }
  .week-hero .meta .m { }

  /* Week cards grid: tighter */
  .week-grid { grid-template-columns: 1fr; gap: 12px; }
  .week-card { padding: 16px; }

  /* ALL button rows stack vertically on mobile */
  .flex.gap-2,
  .flex.gap-3,
  .flex.gap-4 {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  /* Restore inline for elements that need to stay inline (icon + text) */
  .flex.gap-2.flex-inline,
  .flex.gap-3.flex-inline,
  .flex.gap-4.flex-inline {
    flex-direction: row;
  }
  /* .flex-between — keep label on top, buttons stacked beneath */
  .flex-between {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  /* Buttons go full-width on mobile */
  .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
  }
  .btn-sm {
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Grids */
  .grid.grid-2,
  .grid.grid-3,
  .grid.grid-4,
  .grid.grid-5 {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  /* Tables: horizontal scroll with momentum */
  .history-table,
  .wedge-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border-radius: 8px;
  }
  .history-table thead,
  .history-table tbody,
  .wedge-table thead,
  .wedge-table tbody {
    display: table;
    width: 100%;
    min-width: 540px;
  }
  .history-table th,
  .history-table td,
  .wedge-table th,
  .wedge-table td {
    padding: 10px 12px;
    font-size: 12.5px;
  }
  .history-empty { padding: 32px 16px; font-size: 13px; }

  /* Forms */
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;  /* prevents iOS Safari zoom on focus */
    padding: 12px 12px;
  }
  .field-row,
  .field-row-3,
  .field-row-4 { grid-template-columns: 1fr; gap: 0; }

  /* Tiger 5 rows */
  .tiger5-row {
    grid-template-columns: 50px 1fr 96px;
    padding: 12px 12px;
  }
  .tiger5-row .t5-num { font-size: 20px; }
  .tiger5-row .t5-count button { width: 38px; height: 38px; font-size: 20px; }
  .tiger5-row .t5-count .n { min-width: 24px; font-size: 16px; }

  /* Tiger 5 summary — stack total + status */
  .tiger5-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  /* kv list */
  .kv-row { padding: 14px 16px; }

  /* Auth shell (login/signup) — already responsive but tighten */
  .auth-shell { display: flex; flex-direction: column; }
  .auth-hero { padding: 32px 20px; }
  .auth-hero .hero-title { font-size: 28px; }
  .auth-hero .hero-sub { font-size: 14px; }
  .auth-hero .hero-stats { gap: 20px; flex-wrap: wrap; }
  .auth-panel { padding: 28px 20px; }
  .auth-panel h1 { font-size: 22px; }

  /* Footer */
  .site-footer { padding: 20px 16px; font-size: 11px; margin-top: 40px; }

  /* Toast */
  .toast { bottom: 16px; right: 16px; left: 16px; max-width: none; font-size: 13px; }

  /* Callouts */
  .callout { padding: 14px 16px; font-size: 13px; }

  /* Week card grid (dashboard) */
  .week-grid { grid-template-columns: 1fr; }
}

/* --- Width <= 420: very small phones --- */
@media (max-width: 420px) {
  .page-title { font-size: 20px; }
  .week-hero h1 { font-size: 18px; }
  .card, .card-navy, .card-cream { padding: 16px 14px; }
  .stat-cell .val { font-size: 18px; }
  .auth-hero .hero-title { font-size: 24px; }
}

/* ===== PRINT ===== */
@media print {
  .nav, .site-footer, .no-print { display: none !important; }
  body { background: white; }
  .container, .container-narrow { padding: 0; max-width: 100%; }
  .card, .week-hero, .tiger5-grid, .wedge-table {
    box-shadow: none !important;
    border: 1px solid #ccc;
  }
  .card-navy, .week-hero { background: var(--navy) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .gold, .page-label, .section-label, .week-card .week-num { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== ROUND SUMMARY (post-Submit Good / Bad / Ugly panel) ===== */
.round-summary {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 30px;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(10,22,40,0.06);
}
.rs-header { text-align: center; margin-bottom: 22px; }
.rs-kicker {
  font-size: 11px; letter-spacing: 0.22em;
  color: var(--gold); font-weight: 700;
  text-transform: uppercase; margin-bottom: 6px;
}
.rs-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy); font-size: 26px;
  margin: 0 0 8px; font-weight: 600; line-height: 1.15;
}
.rs-subhead { color: var(--mid-grey); font-size: 14px; margin: 0; line-height: 1.45; }

.rs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.rs-col {
  border-radius: 10px;
  padding: 16px 16px 18px;
  border-top: 4px solid;
}
.rs-col h3 {
  font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 700;
  margin: 0 0 12px; line-height: 1;
}
.rs-good { background: #F0F8F2; border-top-color: #2E7D4F; }
.rs-good h3 { color: #2E7D4F; }
.rs-bad  { background: #FBF6E9; border-top-color: #C9A84C; }
.rs-bad h3  { color: #8C7423; }
.rs-ugly { background: #FDF0EE; border-top-color: #C13A2A; }
.rs-ugly h3 { color: #A8302A; }

.rs-items { list-style: none; padding: 0; margin: 0; }
.rs-items li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(10,22,40,0.08);
}
.rs-items li:last-child { border-bottom: none; }
.rs-n {
  flex: 0 0 auto;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700; font-size: 22px;
  line-height: 1; color: var(--navy);
  min-width: 36px; text-align: center;
}
.rs-good .rs-n { color: #2E7D4F; }
.rs-bad  .rs-n { color: #8C7423; }
.rs-ugly .rs-n { color: #A8302A; }
.rs-label { font-weight: 600; color: var(--navy); font-size: 14px; line-height: 1.3; }
.rs-sub { font-size: 12px; color: var(--mid-grey); margin-top: 2px; line-height: 1.35; }
.rs-empty { font-size: 13px; color: var(--mid-grey); font-style: italic; margin: 0; }

.rs-where-note {
  background: #F7F8FA;
  border-left: 3px solid var(--navy);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 13px; line-height: 1.55;
  color: #1A1A2E;
  margin-bottom: 20px;
}
.rs-where-note strong { color: var(--navy); }
.rs-where-note a { color: var(--gold); font-weight: 600; text-decoration: underline; }

.rs-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 720px) {
  .round-summary { padding: 22px 18px; }
  .rs-grid { grid-template-columns: 1fr; gap: 12px; }
  .rs-header h2 { font-size: 22px; }
}
