/* ===================================================================
   Tennis Manager — Luxury Tennis Brand Design System
   Palette: deep forest green · warm ivory · honey gold
   Typography: Cormorant Garamond (headings) · Inter (body)
   =================================================================== */

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  /* Greens */
  --g-950: #0a2416;
  --g-900: #0f3220;
  --g-800: #14482c;
  --g-700: #1a6038;
  --g-500: #2a8f54;
  --g-200: #c6ddd1;
  --g-100: #e8f2ec;

  /* Ivory / warm whites */
  --ivory:  #faf7f2;
  --cream:  #f2ece0;
  --parch:  #e8dfce;

  /* Gold */
  --gold:       #c4974b;
  --gold-light: #deb96e;
  --gold-deep:  #8f6b2e;
  --gold-rule:  #c4974b;

  /* Type */
  --ink:      #1a2620;
  --ink-mid:  #3d5047;
  --ink-soft: #607069;
  --ink-mute: #8a9e94;

  /* UI chrome */
  --line:       #e2dbd0;
  --line-soft:  #ede8e0;
  --bg:         #f7f4ee;
  --card:       #ffffff;
  --card-hover: #fdfcfa;

  /* Status */
  --danger:     #a83228;
  --danger-bg:  #f9e8e6;
  --info:       #1a6038;
  --info-bg:    #e4f0e9;

  /* Elevation */
  --sh-xs: 0 1px 2px rgba(10,36,22,0.07);
  --sh-sm: 0 2px 8px rgba(10,36,22,0.08);
  --sh-md: 0 6px 24px rgba(10,36,22,0.10);
  --sh-lg: 0 16px 48px rgba(10,36,22,0.12);

  /* Shape */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  20px;
}

/* ── Reset / base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Headings */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--g-950);
  margin: 0 0 0.45em;
  line-height: 1.15;
  font-weight: 700;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-family: 'Inter', sans-serif; font-weight: 600; }

a { color: var(--g-700); text-decoration: none; }
a:hover { color: var(--g-800); text-decoration: underline; }

.muted { color: var(--ink-mute); }
.small  { font-size: 0.84rem; }
.muted.small { font-size: 0.84rem; }

/* ── Layout ────────────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.site-main {
  padding: 2.5rem 0 4rem;
  min-height: calc(100vh - 300px);
}
.page-head {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 0.2rem; }
.page-head .muted {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  font-size: 0.92rem;
}

.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; }
.grid-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 840px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.inline-form { display: inline; }

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
  background: var(--g-950);
  color: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(10,36,22,0.28);
}
.site-header::after {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, transparent 100%);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
  gap: 1.5rem;
}

/* Brand */
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ivory) !important; text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 1.25rem; }
.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ivory);
}

/* Primary nav */
.primary-nav {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 0;
}
.primary-nav a {
  color: rgba(250,247,242,0.75);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 1rem;
  height: 64px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
}
.primary-nav a:hover {
  color: var(--ivory);
  text-decoration: none;
  border-bottom-color: rgba(196,151,75,0.5);
}
.primary-nav a.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

/* Account nav */
.account-nav { display: inline-flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.account-nav .muted { color: rgba(250,247,242,0.5); font-size: 0.82rem; }
.hidden-sm { display: inline; }
@media (max-width: 900px) {
  .header-row { height: auto; padding: 0.6rem 1rem; flex-wrap: wrap; }
  .primary-nav { width: 100%; order: 3; justify-content: flex-start; overflow-x: auto; }
  .primary-nav a { height: 40px; font-size: 0.78rem; padding: 0 0.7rem; }
  .hidden-sm { display: none; }
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 0.55rem 1.1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.87rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer; line-height: 1;
  text-decoration: none;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.06s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-sm  { padding: 0.38rem 0.75rem; font-size: 0.8rem; }
.btn-lg  { padding: 0.7rem 1.4rem; font-size: 0.95rem; }

.btn-primary {
  background: var(--gold);
  border-color: var(--gold-deep);
  color: var(--g-950);
}
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold); }

/* ghost in header context */
.btn-ghost {
  background: transparent;
  color: rgba(250,247,242,0.85);
  border-color: rgba(250,247,242,0.25);
}
.btn-ghost:hover { background: rgba(250,247,242,0.10); color: var(--ivory); border-color: rgba(250,247,242,0.4); }

/* ghost in page context */
.site-main .btn-ghost {
  color: var(--g-800);
  border-color: var(--line);
}
.site-main .btn-ghost:hover { background: var(--cream); border-color: var(--parch); }

.btn-link {
  background: none; border: 0;
  color: rgba(250,247,242,0.7);
  text-decoration: underline;
  cursor: pointer; padding: 0.4rem 0.5rem; font-size: 0.84rem;
}
.btn-link:hover { color: var(--ivory); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8e2820; }

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 1.75rem 2rem;
  box-shadow: var(--sh-sm);
  margin-bottom: 1.5rem;
}
.card-title {
  margin-top: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 1.2rem;
}

.sub-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
}

/* ── Flash ─────────────────────────────────────────────────────── */
.flash { padding: 0.75rem 0; font-size: 0.93rem; border-bottom: 1px solid var(--line); }
.flash-success { background: var(--info-bg); color: var(--info); }
.flash-error   { background: var(--danger-bg); color: var(--danger); }
.flash-info    { background: #e9f1fc; color: #1f44a0; }

.alert { padding: 0.8rem 1.1rem; border-radius: var(--r-md); margin-bottom: 1rem; font-size: 0.93rem; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-left: 3px solid var(--danger); }

/* ── Forms ─────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 1.15rem; max-width: 480px; }
.form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 500; font-size: 0.9rem; color: var(--ink-mid); }
.form input, .form select, .form textarea {
  font-family: inherit; font-size: 0.95rem; padding: 0.6rem 0.85rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card);
  color: var(--ink);
  transition: border-color 0.14s, box-shadow 0.14s;
}
.form input:focus, .form select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,151,75,0.15);
}
.form .hint { font-size: 0.8rem; color: var(--ink-mute); }

.form-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 1rem 0; }
.num-input { width: 5rem; padding: 0.42rem 0.6rem; border: 1px solid var(--line); border-radius: var(--r-sm); font-family: inherit; }

.auth-card {
  max-width: 440px; margin: 2rem auto;
  background: var(--card); border: 1px solid var(--line-soft);
  padding: 2.2rem 2.5rem; border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}

.filter-form { display: inline-flex; gap: 0.6rem; align-items: flex-end; margin-top: 0.6rem; }
.filter-form label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.84rem; color: var(--ink-mute); }
.filter-form input { padding: 0.4rem 0.55rem; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 0.88rem; }

/* ── Tables ─────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-mute);
  border-bottom: 2px solid var(--gold);
  background: transparent;
}
.data-table td {
  padding: 0.8rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--cream); }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr.row-dim td { color: var(--ink-mute); }
.data-table.compact th, .data-table.compact td { padding: 0.5rem 0.7rem; }

.win  { color: var(--g-700); font-weight: 600; }
.loss { color: var(--danger); }

/* ── Pills ──────────────────────────────────────────────────────── */
.surface-pill, .tier-pill, .rep-pill, .badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: 999px;
  line-height: 1.5;
  color: white;
}

.surface-hard  { background: #2861b0; }
.surface-clay  { background: #a84e24; }
.surface-grass { background: #267a3e; }

.tier-junior     { background: #5d6870; }
.tier-challenger { background: #4b5586; }
.tier-tour_250   { background: #1e7a54; }
.tier-tour_500   { background: #155c3c; }
.tier-masters    { background: #5f228a; }
.tier-grand_slam { background: var(--gold-deep); color: #fdf8ef; letter-spacing: 0.1em; }

.rep-local    { background: #7a7052; }
.rep-national { background: #25617c; }
.rep-elite    { background: var(--gold-deep); color: #fdf8ef; }

.badge { background: var(--g-700); }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--g-950) 0%, var(--g-800) 100%);
  color: var(--ivory);
  padding: 4rem 2rem;
  border-radius: var(--r-lg);
  margin-bottom: 2.5rem;
  box-shadow: var(--sh-lg);
  border: 1px solid rgba(196,151,75,0.2);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(196,151,75,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { max-width: 700px; margin: 0 auto; text-align: center; position: relative; }
.hero-title { color: var(--ivory); font-size: 3.2rem; line-height: 1.05; margin-bottom: 0.6rem; }
.hero-tag { font-size: 1.1rem; color: rgba(250,247,242,0.75); margin: 0 0 1.8rem; }
.hero-cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn-ghost { color: var(--ivory); border-color: rgba(250,247,242,0.3); }
.hero-cta .btn-ghost:hover { background: rgba(250,247,242,0.1); }

.hero-pillars { background: var(--cream); margin-top: 0; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 0.75rem; }
.pillars > div { background: var(--card); padding: 1.1rem 1rem; border-radius: var(--r-md); border: 1px solid var(--line-soft); }
.pillars strong { color: var(--g-700); display: block; margin-bottom: 0.3rem; font-size: 0.94rem; }
@media (max-width: 840px) { .pillars { grid-template-columns: 1fr 1fr; } .hero-title { font-size: 2.2rem; } }

.academy-list { list-style: none; padding: 0; margin: 0; }
.academy-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); }
.academy-list li:last-child { border-bottom: 0; }
.academy-dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; vertical-align: middle; margin-right: 0.4rem; }

/* ── Dashboard ──────────────────────────────────────────────────── */
.dash-grid { display: grid; gap: 1.5rem; grid-template-columns: 2fr 1fr; }
@media (max-width: 1040px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-header {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--g-950) 0%, var(--g-800) 100%);
  border: none;
  border-radius: var(--r-lg);
  padding: 1.8rem 2rem;
  box-shadow: var(--sh-md);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  color: var(--ivory);
  position: relative;
  overflow: hidden;
}
.dash-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.dash-title {
  display: inline;
  margin: 0 0 0 0.3rem;
  color: var(--ivory);
}
.dash-meta {
  display: flex; align-items: center; gap: 0.55rem;
  margin-top: 0.3rem; font-size: 0.88rem;
  color: rgba(250,247,242,0.65);
  flex-wrap: wrap;
}
.dash-meta .rep-pill, .dash-meta .flag { vertical-align: middle; }
.dash-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.dash-stats > div { display: flex; flex-direction: column; align-items: flex-end; }
.dash-stats strong { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 700; color: var(--ivory); line-height: 1; }
.dash-stats .muted { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(250,247,242,0.55); margin-top: 0.1rem; }

/* ── Bars ───────────────────────────────────────────────────────── */
.bar { width: 88px; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar-fill { height: 100%; background: var(--g-500); border-radius: 999px; transition: width 0.3s ease; }
.bar-fill.bar-form { background: var(--gold); }

/* ── Tournament lists ───────────────────────────────────────────── */
.tour-list { list-style: none; padding: 0; margin: 0; }
.tour-list li { border-bottom: 1px solid var(--line-soft); }
.tour-list li:last-child { border-bottom: 0; }
.tour-row { display: flex; gap: 0.6rem; align-items: center; padding: 0.65rem 0.5rem; flex-wrap: wrap; color: inherit; border-radius: var(--r-sm); }
.tour-row:hover { background: var(--cream); text-decoration: none; }
.tour-row strong { font-weight: 600; }

.tour-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tour-card {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--card);
  color: inherit;
  box-shadow: var(--sh-xs);
  transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}
.tour-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.18s;
}
.tour-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--sh-md); }
.tour-card:hover::before { opacity: 1; }

.tour-card-top, .tour-card-meta, .tour-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap;
}
.tour-card-country { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.tour-card-status  { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--g-700); }
.tour-card-title   { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 700; line-height: 1.05; color: var(--g-950); }
.tour-card-dates   { font-size: 0.88rem; color: var(--ink-soft); }
.tour-card-foot    { font-size: 0.8rem; color: var(--ink-mute); border-top: 1px solid var(--line-soft); padding-top: 0.5rem; margin-top: 0.1rem; }

.calendar-strip { display: flex; flex-direction: column; gap: 0.75rem; }
.calendar-week-group { border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; background: var(--card); box-shadow: var(--sh-xs); }
.calendar-week-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--g-950); color: var(--ivory);
}
.calendar-week-num   { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 700; }
.calendar-week-dates { font-size: 0.78rem; color: rgba(250,247,242,0.6); }
.calendar-week-events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calendar-event {
  display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.6rem; align-items: center;
  padding: 0.75rem 1rem; border-top: 1px solid var(--line-soft); color: inherit;
}
.calendar-event:hover { background: var(--cream); text-decoration: none; }
.calendar-event-country { grid-row: 1 / span 2; line-height: 0; }
.calendar-event-name    { font-weight: 600; font-size: 0.9rem; color: var(--g-950); }
.calendar-event-meta    { font-size: 0.76rem; color: var(--ink-mute); }

/* ── Bracket ────────────────────────────────────────────────────── */
.bracket { display: flex; gap: 1.25rem; overflow-x: auto; padding-bottom: 0.75rem; }
.bracket-round { min-width: 240px; }
.round-head { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); margin-bottom: 0.6rem; }
.bracket-round ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.match-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 0.65rem 0.9rem;
  box-shadow: var(--sh-xs); font-size: 0.88rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.match-card:hover { border-color: var(--gold); box-shadow: var(--sh-sm); }
.match-card .winner { font-weight: 600; color: var(--g-800); }
.match-card .winner::before { content: '▸ '; color: var(--gold); }
.match-card .loser  { color: var(--ink-mute); text-decoration: line-through; }
.match-score { color: var(--ink-mute); font-size: 0.78rem; margin-top: 0.25rem; }

/* ── Scout cards ────────────────────────────────────────────────── */
.prospect-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 1.35rem 1.25rem;
  box-shadow: var(--sh-xs); display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.prospect-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--gold); }
.prospect-head { display: flex; justify-content: space-between; align-items: center; }
.prospect-name { margin: 0; text-align: center; }
.prospect-portrait { display: flex; justify-content: center; padding: 0.35rem 0; }
.prospect-card > .muted { text-align: center; }

.stars     { color: var(--gold-deep); font-weight: 700; letter-spacing: 0.04em; font-size: 1rem; }
.stars-5   { color: #9a7020; }
.stars-4   { color: #9a7020; }
.blurb     {
  margin: 0;
  padding: 0.65rem 0.85rem;
  background: var(--cream);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.55;
}
.prospect-actions { display: flex; gap: 0.45rem; margin-top: auto; }

.scout-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.scout-mini {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
}
.scout-mini-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.1rem; }
.scout-mini .stars { font-size: 0.82rem; }
.scout-mini strong { margin: 0; font-size: 0.92rem; }
.scout-mini .blurb { margin-top: 0.25rem; font-size: 0.82rem; padding: 0.35rem 0.55rem; }

/* ── Player profile ─────────────────────────────────────────────── */
.attrs { display: grid; grid-template-columns: 150px 1fr; gap: 0.6rem 1rem; margin: 0.75rem 0; align-items: center; }
.attrs dt { color: var(--ink-mute); font-size: 0.86rem; font-weight: 500; }
.attrs dd { margin: 0; display: flex; align-items: center; gap: 0.7rem; }
.attr-num { font-weight: 700; min-width: 2rem; font-variant-numeric: tabular-nums; color: var(--g-800); }
.attrs .bar { width: 200px; }

.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; }
.kv li:last-child { border-bottom: 0; }
.kv li span { color: var(--ink-mute); }
.kv li strong { font-weight: 600; }

.radio-tile {
  display: inline-flex; align-items: center;
  padding: 0.45rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; background: var(--card); font-size: 0.88rem; font-weight: 500;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.radio-tile input { display: none; }
.radio-tile.active { background: var(--g-800); border-color: var(--g-800); color: var(--ivory); }
.radio-tile:hover:not(.active) { background: var(--cream); border-color: var(--parch); }

.release-block { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft); }

/* ── Player head (profile page) ─────────────────────────────────── */
.player-head {
  display: flex; align-items: center; gap: 1.75rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, var(--card) 0%, var(--cream) 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  margin-bottom: 1.75rem;
}
.player-head h1 { margin: 0 0 0.2rem; }
.player-head-text { min-width: 0; flex: 1; }
@media (max-width: 600px) { .player-head { flex-direction: column; align-items: flex-start; gap: 1rem; } }

/* ── Player avatars ─────────────────────────────────────────────── */
.player-avatar {
  --av-bg-1: var(--g-800);
  --av-bg-2: var(--gold-deep);
  position: relative;
  display: inline-block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 28%, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 50%),
    linear-gradient(150deg, var(--av-bg-1) 0%, var(--av-bg-2) 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.16), var(--sh-sm);
  flex-shrink: 0;
  overflow: visible;
  user-select: none;
}
.player-avatar-art {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.player-avatar-flag {
  position: absolute; right: -2px; bottom: -2px;
  background: white;
  border: 1px solid rgba(0,0,0,0.08); border-radius: var(--r-sm);
  padding: 1px; box-shadow: var(--sh-xs); line-height: 0; display: inline-flex;
}
.player-avatar-flag .flag { margin: 0; border-radius: 2px; box-shadow: none; }
.player-avatar-xs .player-avatar-flag,
.player-avatar-sm .player-avatar-flag { padding: 0; border-radius: 2px; }
.player-avatar-xs .player-avatar-flag .flag { width: 12px; height: 8px; }
.player-avatar-sm .player-avatar-flag .flag { width: 14px; height: 10px; }
.player-avatar-md .player-avatar-flag .flag { width: 18px; height: 13px; }
.player-avatar-lg .player-avatar-flag .flag { width: 22px; height: 16px; }
.player-avatar-xl .player-avatar-flag .flag { width: 28px; height: 20px; }

.player-cell { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.player-cell a { font-weight: 600; color: var(--g-800); }
.player-cell a:hover { color: var(--g-700); }

/* ── Hall of Fame ───────────────────────────────────────────────── */
.hof-list { padding-left: 1.2rem; margin: 0.5rem 0 0; }
.hof-list li { margin-bottom: 0.4rem; }
.hof-detail { padding-left: 0; list-style: none; margin: 0; counter-reset: hof; }
.hof-detail li { counter-increment: hof; padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.hof-detail li::before { content: counter(hof) '.'; font-weight: 700; color: var(--gold); margin-right: 0.6rem; font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; }
.hof-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hof-stats { display: flex; gap: 1.25rem; }
.hof-stats > div { display: flex; flex-direction: column; align-items: center; min-width: 5rem; }
.hof-stats strong { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; color: var(--g-800); line-height: 1; }
.hof-stats span { font-size: 0.7rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 0.15rem; }
.hof-summary { color: var(--ink-soft); font-style: italic; margin: 0.5rem 0 0; font-size: 0.92rem; }

/* ── Flags ──────────────────────────────────────────────────────── */
.flag { display: inline-block; vertical-align: middle; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.07); margin-right: 0.25rem; }
.flag-sm { width: 20px; height: 14px; }
.flag-md { width: 28px; height: 20px; }
.flag-lg { width: 40px; height: 28px; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  background: var(--g-950);
  color: var(--cream);
  padding: 2.5rem 0;
  margin-top: 4rem;
  border-top: 2px solid rgba(196,151,75,0.4);
}
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: var(--ivory); margin-bottom: 0.25rem; }
.footer-tag   { color: var(--ink-mute); font-size: 0.87rem; }
.footer-links { display: flex; gap: 1.25rem; align-items: flex-start; }
.footer-links a { color: rgba(250,247,242,0.65); font-size: 0.87rem; }
.footer-links a:hover { color: var(--gold); text-decoration: none; }
.footer-fineprint { color: var(--ink-mute); font-size: 0.8rem; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .tour-grid, .calendar-week-events { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .player-head { flex-direction: column; align-items: flex-start; }
  .calendar-week-head { flex-direction: column; align-items: flex-start; }
  .dash-stats > div { align-items: flex-start; }
  .card { padding: 1.25rem 1.25rem; }
  .dash-header { padding: 1.25rem; }
}

/* ── Utilities ──────────────────────────────────────────────────── */
.dash-roster .data-table td:first-child,
.dash-roster .data-table th:first-child { padding-left: 0.25rem; }
.tier-grand_slam { box-shadow: 0 0 0 1px rgba(143,107,46,0.4); }
.dash-week { /* card holding this week's tournaments on dashboard — no extra styling needed beyond .card */ }
.tour-card-body { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }