/* ==========================================================================
   SixGP — design system
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* ink (background scale) */
  --ink-950: #06080b;
  --ink-900: #0b0f15;
  --ink-850: #10151d;
  --ink-800: #161c25;
  --ink-700: #1e2531;
  --ink-600: #2a3140;
  --ink-500: #3a4252;

  /* foreground */
  --fg-50:  #f7f9fc;
  --fg-100: #e6eaf2;
  --fg-300: #a6aebd;
  --fg-500: #7d8696;  /* lightened for WCAG AA body contrast on ink-950 */
  --fg-700: #4a5161;

  /* brand */
  --brand:      #ffd60a;
  --brand-dim:  #e0b400;
  --brand-soft: rgba(255, 214, 10, 0.14);
  --brand-glow: rgba(255, 214, 10, 0.35);

  /* accents */
  --warm:  #ff7849;
  --cool:  #38bdf8;

  /* axes (data viz) */
  --axis-strength:  #ff8a50;  /* warm orange — red reads as an error state */
  --axis-power:     #a3e635;
  --axis-speed:     #38bdf8;
  --axis-endurance: #4ade80;
  --axis-agility:   #c084fc;
  --axis-flexibility: #f472b6;
  --axis-feats: #e8b954;  /* medal gold - the bonus badge axis, never
                             one of the six */

  /* states */
  --success: #34d399;
  --danger:  #f87171;
  --warning: #fbbf24;

  /* fonts */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* radii */
  --r-xs: 4px;  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;
  --r-xl: 28px; --r-full: 999px;

  /* shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px var(--brand-soft), 0 0 40px var(--brand-glow);

  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html, body {
  margin: 0; padding: 0;
  background: var(--ink-950);
  color: var(--fg-100);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 214, 10, 0.08), transparent 60%),
    radial-gradient(800px 500px at 100% 10%, rgba(56, 189, 248, 0.05), transparent 60%),
    radial-gradient(900px 600px at 0% 80%, rgba(255, 120, 73, 0.04), transparent 60%),
    var(--ink-950);
  min-height: 100vh;
}

a {
  color: var(--fg-100);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--brand); }

::selection {
  background: var(--brand);
  color: var(--ink-950);
}

/* Keyboard focus — the default outline disappears against the dark
   theme, so give every interactive element a visible brand ring. */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 var(--s-4);
  color: var(--fg-50);
}
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(22px, 3vw, 28px); margin: var(--s-7) 0 var(--s-5); }
h3 { font-size: 15px; font-weight: 600; letter-spacing: 0.06em;
     text-transform: uppercase; color: var(--fg-500); margin-bottom: var(--s-3); }
h4 { font-size: 14px; margin: 0 0 var(--s-2); }

p { margin: 0 0 var(--s-3); color: var(--fg-100); }
.muted { color: var(--fg-500); }
.mono  { font-family: var(--font-mono); font-feature-settings: 'tnum'; }
.tabular { font-variant-numeric: tabular-nums; }

code, pre {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--ink-800);
  padding: 2px 6px;
  border-radius: var(--r-xs);
  border: 1px solid var(--ink-700);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--s-5); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }

/* Page header: title block on the left, optional action on the right.
   Wraps (action drops below) on narrow screens, with room before content. */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6);
}

.grid       { display: grid; gap: var(--s-4); }
.grid-2     { grid-template-columns: 1fr 1fr; }
.grid-3     { grid-template-columns: repeat(3, 1fr); }
.grid-4     { grid-template-columns: repeat(4, 1fr); }
.grid-6     { grid-template-columns: repeat(6, 1fr); }
.grid-hero  { grid-template-columns: 1.2fr 1fr; align-items: center; gap: var(--s-7); }
.grid-hero--top { align-items: start; }  /* headline top aligns with card top */

@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4, .grid-6, .grid-hero { grid-template-columns: 1fr; }
}

main.container { padding: var(--s-8) var(--s-5) var(--s-9); }

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 21, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--ink-700);
}
.topbar .row { padding: var(--s-4) 0; }

.brand {
  display: inline-flex; align-items: baseline; gap: var(--s-3);
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: 28px;
  line-height: 1;
  color: var(--fg-50);
  text-decoration: none;
  transition: opacity var(--transition);
}
.brand:hover { color: var(--fg-50); opacity: 0.9; }
.brand-logo {
  width: 36px; height: 36px;
  flex-shrink: 0;
  align-self: center;
  filter: drop-shadow(0 0 10px var(--brand-glow));
}
/* Inner SVG scales to the container so bumping .brand-logo resizes the
   gauge (the footer's inline width override keeps it small there). */
.brand-logo svg { width: 100%; height: 100%; display: block; }
.brand-logo-live { display: inline-flex; }
.brand-logo-live .hexm-fill { filter: none; }

/* The rev logo (macros/logo.html). Static = lit. */
.hexrev { display: block; }
.hexrev .seg { stroke-dasharray: 101; stroke-dashoffset: 0; }
/* Rev once: arrival/achievement moments only. Each segment fills in
   sequence (per-seg duration/delay via --d/--t), then the mark
   punches and glows. */
/* Lead-in before the arrival rev: the gauge holds empty this long, then
   revs up. Only the once (arrival) mode waits; loaders are unaffected. */
.hexrev--once { --rev-start: 2s; }
.hexrev--once .seg {
  stroke-dashoffset: 101;
  animation: hexrev-fill var(--d) calc(var(--rev-start) + var(--t)) linear forwards;
}
.hexrev--once .seg.s1 { animation-timing-function: cubic-bezier(.45, 0, 1, 1); }
@keyframes hexrev-fill { to { stroke-dashoffset: 0; } }
.hexrev--once .mark {
  transform-origin: 48px 48px;
  animation: hexrev-punch .38s calc(var(--rev-start) + 1.05s) ease-out,
             hexrev-glow .6s calc(var(--rev-start) + 1.05s) ease-out;
}
@keyframes hexrev-punch { 50% { transform: scale(1.05); } }
@keyframes hexrev-glow { 35% { filter: drop-shadow(0 0 10px rgba(255, 214, 10, .9)); } }
/* Loop: loading states ONLY. Perpetual motion = "still working". */
.hexrev--loop .seg {
  stroke-dashoffset: 101;
  animation: hexrev-chase 1.5s calc(var(--i) * .18s) linear infinite;
}
@keyframes hexrev-chase {
  0%   { stroke-dashoffset: 101; }
  35%  { stroke-dashoffset: 0; }
  72%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 101; }
}
@media (prefers-reduced-motion: reduce) {
  .hexrev .seg { animation: none !important; stroke-dashoffset: 0; }
  .hexrev .mark { animation: none !important; }
}

/* Hex loader: the loop variant + label, swapped in for spinners. */
.hex-loader {
  display: none;
  align-items: center; gap: var(--s-3);
  margin-top: var(--s-3);
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-300);
}
.hex-loader.is-active { display: flex; }
.brand-text {
  display: inline-flex; align-items: baseline; gap: 10px;
  position: relative;
  top: 4px;          /* nudge the wordmark down */
  margin-left: -8px; /* and pull it closer to the gauge */
}
.brand-word { letter-spacing: -0.035em; }
/* Footer only: pull the wordmark closer to the (small) gauge. The navbar
   uses .brand-text spacing and is left as-is. */
.footer-brand .brand { gap: 5px; }
.brand-accent {
  color: var(--brand);
  text-shadow: 0 0 24px var(--brand-glow);
}
.brand-text small {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--fg-500);
  text-transform: uppercase;
  position: relative;
  padding-left: 10px;
}
.brand-text small::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 1px; height: 12px;
  background: var(--ink-500);
  transform: translateY(-50%);
}

.nav {
  display: flex; align-items: center; gap: var(--s-1);
}
.nav a {
  color: var(--fg-300); font-size: 15px; font-weight: 500;
  padding: 10px 16px; border-radius: var(--r-sm);
  transition: background var(--transition), color var(--transition);
}
.nav a:hover { color: var(--fg-50); background: var(--ink-800); }
.nav a.active { color: var(--brand); }

.nav .btn-cta { margin-left: var(--s-2); }

/* ==========================================================================
   Buttons
   ========================================================================== */

/* The global button rule below is author-origin and would otherwise
   override the UA [hidden] { display:none }, rendering hidden buttons
   (e.g. the leaderboard's Enter-submit helper) as empty boxes. */
[hidden] { display: none !important; }

button, .btn, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--ink-600); background: var(--ink-800); color: var(--fg-50);
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; line-height: 1;
}
button:hover, .btn:hover {
  background: var(--ink-700); border-color: var(--ink-500);
  transform: translateY(-1px);
}

.btn-primary, button.primary {
  background: var(--brand); color: var(--ink-950); border-color: transparent;
  font-weight: 700;
}
.btn-primary:hover, button.primary:hover {
  background: var(--brand-dim); color: var(--ink-950);
  box-shadow: 0 8px 24px var(--brand-glow);
}

.btn-ghost {
  background: transparent; border-color: var(--ink-600); color: var(--fg-100);
}
.btn-ghost:hover { background: var(--ink-800); }

/* Icon-only back button — the return affordance in every page's top-left.
   The destination lives in aria-label/title; the arrow nudges on hover. */
.btn-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  padding: 0;
  border-radius: var(--r-full);
  border: 1px solid var(--ink-700);
  background: var(--ink-900);
  color: var(--fg-300);
  text-decoration: none;
  margin-bottom: var(--s-4);
  transition: border-color var(--transition), background var(--transition),
              color var(--transition), transform var(--transition);
}
.btn-back::before {
  content: "";
  width: 17px; height: 17px;
  background: currentColor;
  transition: transform var(--transition);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='M12 19l-7-7 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='M12 19l-7-7 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-back:hover {
  border-color: var(--ink-500);
  background: var(--ink-800);
  color: var(--fg-50);
}
.btn-back:hover::before { transform: translateX(-2px); }
.btn-back:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

/* Header row: back button on the same line as the page eyebrow/title.
   The button sits left; whatever header block follows (a plain title
   stack, a .page-header, or a .flex-between) fills the rest and keeps
   its own internal layout + bottom margin. */
.page-head { display: flex; align-items: flex-start; gap: var(--s-3); }
.page-head > .btn-back { margin-bottom: 0; margin-top: 3px; }
.page-head > :not(.btn-back) { flex: 1 1 auto; min-width: 0; }
/* Drop the eyebrow pill so its center lines up with the taller back
   button (h1-only headers already align, so they're left alone). */
.page-head .hero-eyebrow { margin-top: 7px; }

.btn-cta {
  background: var(--brand); color: var(--ink-950) !important;
  padding: 9px 16px; border-radius: var(--r-full);
  font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
}
.btn-cta:hover { background: var(--brand-dim); transform: translateY(-1px);
                 box-shadow: 0 6px 20px var(--brand-glow); }

.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: var(--r-md); }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
}
.card:hover { border-color: var(--ink-600); }

a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-2px); border-color: var(--brand-soft); }
a.card:hover h3 { color: var(--brand); }

.card-elevated { box-shadow: var(--shadow-md); }

/* Recording protocol: the rules block athletes must follow. Lifted
   off the page black (elevated panel + brand edge, brighter text)
   so it reads as a checklist, not body copy. */
.protocol-card {
  background: var(--ink-800);
  border: 1px solid var(--ink-600);
  border-left: 3px solid var(--brand);
}
.protocol-card:hover { border-color: var(--ink-600); border-left-color: var(--brand); }
.protocol-list {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 8px;
  color: var(--fg-100); font-size: 14px;
}
.protocol-list li {
  position: relative; padding-left: 18px; line-height: 1.45;
}
.protocol-list li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--brand); opacity: 0.7;
}
.protocol-list .proto-key { color: var(--fg-50); font-weight: 600; }
.card-glow {
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Pills, chips, badges
   ========================================================================== */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--ink-800); border: 1px solid var(--ink-600);
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 500; color: var(--fg-300);
  letter-spacing: 0.02em;
}
.pill-brand   { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.pill-warm    { background: rgba(255,120,73,0.14); border-color: transparent; color: var(--warm); }
.pill-success { background: rgba(52,211,153,0.14); border-color: transparent; color: var(--success); }
/* .pill-dot kept as a no-op class: the leading dot was removed site-wide
   (too many bullets in front of the yellow title pills). */

/* Join-policy indicator: a small colored dot next to muted text instead of
   a filled color pill — status stays scannable without shouting. */
.join-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: var(--r-full); flex-shrink: 0;
}
.join-dot-open { background: var(--success); opacity: 0.75; }
.join-dot-approval { background: var(--warm); opacity: 0.75; }

/* status pills (registration / event statuses) */
.pill[data-status="open"], .pill[data-status="confirmed"], .pill[data-status="active"]
  { background: rgba(52,211,153,0.14); color: var(--success); border-color: transparent; }
.pill[data-status="draft"], .pill[data-status="pending"]
  { background: var(--ink-800); color: var(--fg-300); }
.pill[data-status="closed"], .pill[data-status="complete"]
  { background: rgba(56,189,248,0.14); color: var(--cool); border-color: transparent; }
.pill[data-status="checked_in"]
  { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.pill[data-status="retired"]
  { background: rgba(251,113,133,0.12); color: #fb7185; border-color: transparent; }
.pill[data-status="accepted"], .pill[data-status="verified"]
  { background: rgba(52,211,153,0.14); color: var(--success); border-color: transparent; }
.pill[data-status="rejected"], .pill[data-status="banned"]
  { background: rgba(251,113,133,0.14); color: #fb7185; border-color: transparent; }
.pill[data-status="needs_review"]
  { background: rgba(251,191,36,0.14); color: #fbbf24; border-color: transparent; }
.pill[data-status="pending_review"], .pill[data-status="deleted"]
  { background: var(--ink-800); color: var(--fg-400); border-color: transparent; }

/* Inline country flag icon (vendored Twemoji SVGs; Windows has no
   flag emoji font, so images render everywhere). */
.flag-ic { height: 0.95em; width: auto; max-width: 2em;
  vertical-align: -0.12em; border-radius: 2px; display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* Estimator: collapsible axis groups, filesystem-tree style. */
.est-ax { margin-bottom: var(--s-4); border-left: 3px solid color-mix(in srgb, var(--axis-color, transparent) 55%, transparent); padding-left: 10px; }
.est-ax > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.est-ax > summary::-webkit-details-marker { display: none; }
.est-ax > summary::before { content: '▸'; color: var(--fg-500); font-size: 10px; flex: none; transition: transform 0.15s; }
.est-ax[open] > summary::before { transform: rotate(90deg); }
.est-ax .est-fill { font-size: 10px; }
.est-ax-body { padding-top: 8px; }

/* Admin filter bars: labeled controls, one consistent look. */
.filter-bar { padding: var(--s-3); margin-bottom: var(--s-4); }
.filter-bar .flt-row { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: flex-end; }
.filter-bar .field { margin: 0; }
.filter-bar label { font-size: 11px; }
.filter-bar input, .filter-bar select {
  padding: 7px 10px; background: var(--ink-900);
  border: 1px solid var(--ink-700); color: var(--fg-100);
  border-radius: var(--r-sm); font-size: 13px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

form .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); }
form label  { color: var(--fg-300); font-size: 12px; font-weight: 600;
              letter-spacing: 0.04em; text-transform: uppercase; }

input, select, textarea {
  background: var(--ink-900);
  border: 1px solid var(--ink-600);
  color: var(--fg-50);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font: inherit; font-family: var(--font-sans);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input[type=number] { font-family: var(--font-mono); font-feature-settings: 'tnum'; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
input::placeholder { color: var(--fg-700); }

input[type=checkbox] {
  width: auto; accent-color: var(--brand);
  vertical-align: middle; margin-right: 6px;
}

select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-300) 50%),
                    linear-gradient(135deg, var(--fg-300) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

/* ==========================================================================
   Pager — count on the left, Prev / page-jump / Next cluster on the right
   ========================================================================== */

.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); flex-wrap: wrap;
  margin: var(--s-4) 0 var(--s-6);
}
.pager-count {
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-500);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.pager-count strong { color: var(--fg-200); font-weight: 600; }
/* The control cluster reads as one segmented group. */
.pager-nav {
  display: inline-flex; align-items: stretch; gap: 4px;
  padding: 4px;
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
}
.pager-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--fg-300);
  text-decoration: none; line-height: 1.4;
  transition: background var(--transition), color var(--transition);
}
.pager-btn:hover { background: var(--ink-800); color: var(--fg-50); }
.pager-jump {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 6px 0 10px;
}
.pager-jump-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-500);
}
.pager-select {
  width: auto; min-width: 92px;
  padding: 6px 32px 6px 11px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  background-color: var(--ink-850);
  border: 1px solid var(--ink-600); border-radius: var(--r-sm);
  color: var(--fg-50); cursor: pointer;
}
.pager-select:hover { border-color: var(--ink-500); }

/* ==========================================================================
   Flash
   ========================================================================== */

.flash {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  margin-bottom: var(--s-4);
  border: 1px solid var(--ink-700);
  background: var(--ink-850);
  font-size: 14px;
}
.flash-success { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.08); color: var(--success); }
.flash-error   { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); color: var(--danger); }
.flash-info    { border-color: var(--ink-600); }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap { overflow-x: auto; border-radius: var(--r-md); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--ink-700); }
th {
  color: var(--fg-500); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--ink-900);
}
th:first-child { border-top-left-radius: var(--r-md); }
th:last-child  { border-top-right-radius: var(--r-md); }
tbody tr { transition: background var(--transition); }
tbody tr:hover td { background: var(--ink-850); }
tbody tr:last-child td { border-bottom: 0; }

.rank-cell { font-family: var(--font-mono); font-weight: 600; color: var(--fg-500); width: 64px; }
.rank-badge {
  display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  border-radius: var(--r-full); font-family: var(--font-mono); font-weight: 700;
  font-size: 13px; color: var(--ink-950);
}
.rank-1 { background: linear-gradient(135deg, #ffd700, #ffae00); box-shadow: 0 4px 14px rgba(255,174,0,0.4); }
.rank-2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); }
.rank-3 { background: linear-gradient(135deg, #d97706, #92400e); color: var(--fg-50); }

/* Leaderboard hex rank badges: one consistent shape down the list,
   only color marks the podium. Matches the hexagonal brand language. */
.hex-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 34px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  background: var(--ink-800); color: var(--fg-300);
}
.hex-rank.r1 { background: linear-gradient(135deg, #ffd700, #ffae00); color: var(--ink-950); }
.hex-rank.r2 { background: linear-gradient(135deg, #f8fafc, #94a3b8); color: var(--ink-950); }
.hex-rank.r3 { background: linear-gradient(135deg, #e08c3c, #9a5b1e); color: var(--ink-950); }

/* The Hex Meter: six edges = six axes, fill = axis score. */
.hexm { display: block; }
.hexm-base {
  stroke: var(--ink-700);
  stroke-linecap: round;
  fill: none;
}
.hexm-fill {
  stroke: var(--brand);
  stroke-linecap: round;
  fill: none;
  filter: drop-shadow(0 0 6px var(--brand-glow));
  transition: stroke-dasharray 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hexm-label {
  font-family: var(--font-mono);
  font-size: 7.5px; font-weight: 600;
  letter-spacing: 0.08em;
  fill: var(--fg-500);
}
.hexm-label-val { fill: var(--brand); font-weight: 700; }
.hexm-score {
  font-family: var(--font-sans);
  font-size: 19px; font-weight: 800;
  letter-spacing: -0.02em;
  fill: var(--fg-50);
}
.hexm-sub {
  font-family: var(--font-mono);
  font-size: 5.5px; letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--fg-500);
}

/* The Axis Gauge: single-dial tachometer for specialists (macros/hex.html). */
.axg { display: block; }
.axg-track { stroke: var(--ink-700); stroke-linecap: round; fill: none; }
.axg-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dasharray 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.axg-tick { stroke: var(--ink-700); }
.axg-needle { transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1); }
.axg-cap {
  fill: var(--ink-900);
  stroke-width: 1.6;
  stroke-opacity: 0.55;
}
.axg-score {
  font-family: var(--font-sans);
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.02em;
  fill: var(--fg-50);
}
.axg-axis {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em;
}
.axg-sub {
  /* Must fit the r=30 hub disc: "axis score" at 5.5px/0.1em is ~38px
     wide against a ~49px chord at its height. */
  font-family: var(--font-mono);
  font-size: 5.5px; letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: var(--fg-500);
}

/* Per-row six-axis silhouette */
.spark-col { width: 44px; }
.spark-col .hexm-fill { filter: none; }  /* 100 glows per page lags */
.hex-spark { width: 34px; height: 34px; display: block; }
.hex-spark-frame { fill: none; stroke: var(--ink-600); stroke-width: 1; }
.hex-spark-data {
  fill: rgba(255, 214, 10, 0.16);
  stroke: var(--brand); stroke-width: 1.2; stroke-linejoin: round;
}

/* One score color, hard right edge */
.lb-score { font-size: 18px; font-weight: 700; color: var(--fg-50); }

/* Clickable rows */
.lb-table tbody tr[data-href] { cursor: pointer; transition: background var(--transition); }
.lb-table tbody tr[data-href]:hover { background: var(--ink-850); }
.lb-table tbody tr[data-href]:hover .lb-score { color: var(--brand); }

/* Segmented control (Verified / Open) */
.seg-control {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px;
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--r-full);
}
.seg-control a {
  padding: 7px 18px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 600; color: var(--fg-300);
  transition: all var(--transition);
}
.seg-control a:hover { color: var(--fg-50); }
.seg-control a.active { background: var(--brand); color: var(--ink-950); }
.seg-control a.active.active-open { background: #fb923c; color: var(--ink-950); }

/* Cohort pills, lightly coded by sex for scanning mixed views */
.pill-sex-M { border-color: rgba(56, 189, 248, 0.35); color: #7dd3fc; background: rgba(56, 189, 248, 0.08); }
.pill-sex-F { border-color: rgba(244, 114, 182, 0.35); color: #f9a8d4; background: rgba(244, 114, 182, 0.08); }

/* Themed autocomplete dropdown (replaces the unstyleable native
   <datalist>). The menu matches the input width via left/right:0 on a
   relatively-positioned wrapper. */
.lb-ac { position: relative; }
.lb-ac-menu {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  z-index: 40;
  background: var(--ink-850);
  border: 1px solid var(--ink-600);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  max-height: 248px; overflow-y: auto;
  padding: 4px;
}
.lb-ac-opt {
  padding: 8px 10px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono); font-size: 13px;
  color: var(--fg-100); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-ac-opt:hover, .lb-ac-opt.is-active {
  background: var(--brand-soft); color: var(--brand);
}

/* Self-log disclosure on the exercise detail page */
.selflog { border-top: 1px solid var(--ink-800); padding-top: var(--s-3); }
.selflog > summary {
  cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--fg-300);
}
.selflog > summary::-webkit-details-marker { display: none; }
.selflog > summary::before { content: "+ "; color: var(--fg-500); }
.selflog[open] > summary::before { content: "− "; }
.selflog > summary:hover { color: var(--brand); }

/* Inline info tooltip dot */
.info-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 999px;
  border: 1px solid var(--ink-500); color: var(--fg-500);
  font-size: 9px; font-style: normal; font-weight: 700;
  font-family: var(--font-mono); text-transform: lowercase;
  cursor: help;
}
.info-dot:hover, .info-dot:focus-visible { color: var(--brand); border-color: var(--brand); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--ink-700);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
  padding: var(--s-8) 0 var(--s-5);
  color: var(--fg-300);
  font-size: 14px;
  margin-top: var(--s-9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-7);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
}

.footer-brand .muted { font-size: 13px; line-height: 1.6; }

.footer-status {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: var(--s-4);
  padding: 6px 12px;
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-300);
}
.footer-status-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
  animation: pulse 2.2s ease-in-out infinite;
}

.footer-col h4 {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-50);
  margin: 0 0 var(--s-3);
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col a {
  color: var(--fg-300);
  font-size: 14px;
  transition: color var(--transition), padding-left var(--transition);
}
.footer-col a:hover {
  color: var(--brand);
  padding-left: 4px;
  text-decoration: none;
}

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s-4); flex-wrap: wrap;
  padding-top: var(--s-5);
  border-top: 1px solid var(--ink-700);
  color: var(--fg-500);
  font-size: 12px;
}
.footer-legal a { color: var(--fg-300); }
.footer-legal a:hover { color: var(--brand); text-decoration: none; }

.footer-social {
  display: inline-flex; gap: var(--s-2);
}
.footer-social a {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  color: var(--fg-300);
  transition: all var(--transition);
}
.footer-social a:hover {
  color: var(--ink-950);
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--brand-glow);
  text-decoration: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  /* main.container already pads 64px above; anything more pushes the
     headline below the first eye-fixation zone. */
  padding: var(--s-4) 0 var(--s-8);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 70%);
          mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  opacity: 0.45;
}
.hero > * { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: var(--s-4);
}
/* Ghost variant: quiet mono text with a small brand dot instead of a
   filled pill — for heroes where the h1 accent + primary CTA should be
   the only saturated brand moments. */
.hero-eyebrow--ghost {
  /* Flow as one run of text: the pill's inline-flex + gap would turn
     each <strong> into its own flex item with 8px on both sides. */
  display: inline-block;
  background: transparent;
  padding: 0;
  color: var(--fg-500);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
}
.hero-eyebrow--ghost::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px; border-radius: var(--r-full);
  background: var(--brand);
  opacity: 0.8;
  margin-right: 8px;
  vertical-align: 1px;
}
.hero-eyebrow--ghost strong { color: var(--fg-100); font-weight: 600; }
/* The leading pulsing dot before eyebrow titles was removed site-wide
   (too many bullets in front of the yellow titles). */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: var(--s-5);
  padding-bottom: 0.08em;
  text-wrap: balance;
  /* Barely-there fade: a hard 30% start made the lower line look dingy
     at 76px. The accent gradient carries the color moment. */
  background: linear-gradient(180deg, var(--fg-50) 70%, var(--fg-100) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--brand) 0%, #ff9f0a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--fg-300);
  max-width: 560px;
  margin: 0 0 var(--s-6);
  line-height: 1.55;
}
.hero-ctas { display: flex; gap: var(--s-3); flex-wrap: wrap; }
/* The primary button should win harder inside the hero. */
.hero-ctas .btn-ghost { border-color: var(--ink-700); color: var(--fg-300); }
.hero-ctas .btn-ghost:hover { color: var(--fg-100); }

/* Compact how-it-works strip between the lead and the CTAs. */
.hero-steps {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  list-style: none; margin: 0 0 var(--s-5); padding: 0;
  font-size: 14px; color: var(--fg-300);
}
.hero-steps li { display: inline-flex; align-items: center; gap: 8px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 999px;
  background: transparent;
  border: 1px solid var(--ink-600);
  color: var(--fg-300);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
}

/* Tier + archetype line under the hero score number. */
.score-tier {
  display: flex; align-items: center; justify-content: center;
  gap: var(--s-2); flex-wrap: wrap;
  margin: var(--s-2) 0 var(--s-3);
}
.tier-chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--tier-color, var(--brand));
  border: 1px solid color-mix(in srgb, var(--tier-color, var(--brand)) 40%, transparent);
  background: color-mix(in srgb, var(--tier-color, var(--brand)) 12%, transparent);
}
.archetype-line { font-size: 12px; color: var(--fg-300); }

/* hero metric panel */
.hero-panel {
  position: relative;
  padding: var(--s-6);
  background: linear-gradient(180deg, var(--ink-850) 0%, var(--ink-900) 100%);
  border: 1px solid var(--ink-700);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-panel::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at top right, var(--brand-glow), transparent 50%);
  opacity: 0.4; pointer-events: none;
}
.hero-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-4); }

/* Panels with less content than their carousel siblings: stretch to the
   stage height and let .panel-center absorb the surplus, so a sparse
   slide reads as centered rather than top-heavy with dead space. */
.hero-panel--fill {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.hero-panel--fill .panel-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) 0;
}

/* hero carousel — crossfades stacked hero-panels.
   No overflow:hidden wrapper, so each panel keeps its border-radius + glow shadow.
   The active slide is in normal flow and defines the stage height; the others
   sit absolutely on top at opacity 0, so there is never an empty gap. */
.hero-carousel { position: relative; zoom: 0.85; }  /* 15% smaller overall */
.carousel-stage {
  position: relative;
  display: grid;
  grid-template-areas: 'stack';
}
.carousel-slide {
  grid-area: stack;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 360ms cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide > .hero-panel { height: 100%; }
/* Trim the carousel's height — cut vertical padding (more off the bottom),
   leave the horizontal padding so the width is unchanged. */
.carousel-slide .hero-panel { padding-top: var(--s-4); padding-bottom: var(--s-2); }
.carousel-slide.is-active {
  opacity: 1; visibility: visible; pointer-events: auto;
}

.carousel-controls {
  display: flex; align-items: center; justify-content: center;
  gap: var(--s-4); margin-top: var(--s-4);
}
.carousel-dots { display: inline-flex; align-items: center; gap: var(--s-2); }
.carousel-dot {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: var(--r-full);
  background: var(--ink-600); cursor: pointer;
  transition: width var(--transition), background var(--transition), box-shadow var(--transition);
}
.carousel-dot:hover { background: var(--ink-500); }
.carousel-dot.is-active {
  width: 22px; background: var(--brand);
  box-shadow: 0 0 10px var(--brand-glow);
}
.carousel-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--ink-700); border-radius: var(--r-full);
  background: var(--ink-800); color: var(--fg-100);
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.carousel-arrow:hover {
  border-color: var(--brand-soft); color: var(--brand);
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .carousel-slide { transition: none; }
}

/* ==========================================================================
   Score display
   ========================================================================== */

.score-display {
  text-align: center;
  padding: var(--s-5) 0;
}
.score-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(72px, 12vw, 128px);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--brand);
  text-shadow: 0 0 60px var(--brand-glow);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.score-number-sm {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 36px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.score-label {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-500);
  margin-bottom: var(--s-2);
}
.score-meta {
  display: inline-flex; gap: var(--s-5);
  padding: var(--s-3) var(--s-5);
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--r-full);
  margin-top: var(--s-3);
}
.score-meta .stat-num {
  font-family: var(--font-mono); font-weight: 700; color: var(--fg-50);
  font-size: 16px;
}
.score-meta .stat-label {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-500);
  display: block;
}

/* ==========================================================================
   Station tiles (six stations on landing)
   ========================================================================== */

.stations {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-3);
  margin: var(--s-6) 0;
}
@media (max-width: 960px) { .stations { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stations { grid-template-columns: repeat(2, 1fr); } }

.station-tile {
  position: relative;
  padding: var(--s-4);
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
  transition: all var(--transition);
  overflow: hidden;
}
.station-tile::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--axis-color, var(--brand));
}
.station-tile::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at bottom, var(--axis-color, var(--brand)), transparent 70%);
  opacity: 0.0; transition: opacity var(--transition);
  pointer-events: none;
}
.station-tile:hover { transform: translateY(-2px); border-color: var(--ink-500); }
.station-tile:hover::after { opacity: 0.08; }
.station-tile .axis-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--axis-color, var(--brand));
  margin-bottom: var(--s-2);
}
.station-tile .station-name {
  font-weight: 600; color: var(--fg-50); font-size: 14px;
  line-height: 1.3; margin-bottom: 4px;
}
.station-tile .station-meta {
  font-size: 11px; color: var(--fg-500);
  font-family: var(--font-mono);
}

/* Exercise catalog cards — the V1 storefront. Unlike .station-tile
   (a compact six-up strip), these are full destination cards: axis
   accent, big readable name, and an explicit CTA. */
.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s-4);
}
.exercise-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: var(--s-5);
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  transition: all var(--transition);
}
.exercise-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--axis-color, var(--brand));
}
.exercise-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at top, var(--axis-color, var(--brand)), transparent 65%);
  opacity: 0; transition: opacity var(--transition);
  pointer-events: none;
}
.exercise-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--axis-color, var(--brand)) 45%, transparent);
}
.exercise-card:hover::after { opacity: 0.07; }
.axis-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--axis-color, var(--brand));
}
.ex-name {
  display: block;
  font-size: 19px; font-weight: 700; letter-spacing: -0.015em;
  line-height: 1.25; color: var(--fg-50);
  margin: 10px 0 6px;
}
/* Unit folded into the name line, kept quiet so it doesn't add a row. */
.ex-name .ex-unit {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0; color: var(--fg-500); white-space: nowrap;
}
.exercise-card .ex-meta {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--fg-500);
}
.exercise-card .ex-meta .ex-first { color: var(--brand); }
.exercise-card .ex-cta {
  margin-top: auto; padding-top: var(--s-4);
  font-size: 13px; font-weight: 600; color: var(--brand);
  opacity: 0.75; transition: opacity var(--transition);
}
.exercise-card:hover .ex-cta { opacity: 1; }

/* Mini pose-interpolated animation embedded in an exercise card. Hidden
   until ex_sims.js finds a pose set for the tile's exercise code. */
.ex-sim {
  display: none; justify-content: center; align-items: flex-end;
  height: 78px; margin: 6px 0 2px;
  pointer-events: none;
}
.ex-sim.on { display: flex; }
.ex-sim-svg { height: 100%; width: auto; overflow: visible; }

/* Race map pins: labeled distance badges (5K / 1/2 M / M) with a
   pointer tail, anchored above the race location. */
.race-pin-wrap { background: none; border: none; }
.race-pin {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, calc(-100% - 7px));
  display: inline-block; white-space: nowrap;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em; line-height: 1;
  padding: 5px 8px; border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.race-pin::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
}
.race-pin--5k { background: #ffd60a; color: #1a1503; }
.race-pin--5k::after { border-top-color: #ffd60a; }
.race-pin--half { background: #3987e5; color: #fff; }
.race-pin--half::after { border-top-color: #3987e5; }
.race-pin--marathon { background: #cf4534; color: #fff; }
.race-pin--marathon::after { border-top-color: #cf4534; }

/* Responsive 16:9 video embed (exercise demo clip). */
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--r-md); overflow: hidden; background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.axis-color-strength  { --axis-color: var(--axis-strength); }
.axis-color-power     { --axis-color: var(--axis-power); }
.axis-color-speed     { --axis-color: var(--axis-speed); }
.axis-color-endurance { --axis-color: var(--axis-endurance); }
.axis-color-agility   { --axis-color: var(--axis-agility); }
.axis-color-flexibility { --axis-color: var(--axis-flexibility); }
.axis-color-feats     { --axis-color: var(--axis-feats); }

/* ==========================================================================
   Radar + profile blocks
   ========================================================================== */

.radar-wrap { max-width: 460px; margin: 0 auto; padding: var(--s-4); }

.axes-list { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.axes-list .axis-row {
  display: grid; grid-template-columns: 120px 1fr 50px;
  align-items: center; gap: var(--s-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-700);
}
.axes-list .axis-row:last-child { border-bottom: 0; }
.axes-list .axis-name {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--axis-color, var(--fg-300));
}
.axes-list .axis-bar {
  height: 6px; background: var(--ink-700); border-radius: var(--r-full);
  overflow: hidden;
}
.axes-list .axis-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--axis-color, var(--brand)), color-mix(in srgb, var(--axis-color, var(--brand)) 70%, white));
  border-radius: var(--r-full);
  box-shadow: 0 0 12px color-mix(in srgb, var(--axis-color, var(--brand)) 60%, transparent);
}
.axes-list .axis-value {
  font-family: var(--font-mono); font-weight: 600; text-align: right;
  color: var(--fg-50); font-variant-numeric: tabular-nums;
  font-size: 14px;
}

/* ==========================================================================
   Stat cards (admin dashboard, etc.)
   ========================================================================== */

.stat-card {
  position: relative;
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
  padding: var(--s-5);
}

/* Hover/focus info affordance: a small ⓘ that reveals a styled box
   explaining the metric. Reusable anywhere via .info-tip[data-tip]. */
.info-tip {
  position: absolute; top: 12px; right: 12px;
  width: 17px; height: 17px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  font-style: normal;
  color: var(--fg-500); background: transparent;
  border: 1px solid var(--ink-600);
  cursor: help; user-select: none;
  transition: color var(--transition), border-color var(--transition);
}
.info-tip:hover, .info-tip:focus-visible {
  color: var(--fg-100); border-color: var(--ink-500); outline: none;
}
.info-tip::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 8px); right: -6px;
  width: max-content; max-width: 240px;
  padding: 9px 11px;
  background: var(--ink-800); border: 1px solid var(--ink-600);
  border-radius: var(--r-sm);
  color: var(--fg-200); font-family: var(--font-sans);
  font-size: 12px; font-weight: 400; line-height: 1.45;
  letter-spacing: normal; text-transform: none; text-align: left;
  white-space: normal;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 30; pointer-events: none;
}
.info-tip:hover::after, .info-tip:focus-visible::after {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.stat-card .stat-label-up {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-500); margin-bottom: var(--s-3);
}
.stat-card .stat-value {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 40px; color: var(--fg-50);
  line-height: 1; font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Insights charts — hand-rolled, one visual system
   ========================================================================== */

:root {
  --data-blue: #3987e5;    /* default magnitude hue (validated, dark) */
  --data-orange: #d95926;  /* categorical slot 2 (M/F pair) */
}

.insights-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4);
}
.insights-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 900px) { .insights-grid { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--ink-900); border: 1px solid var(--ink-700);
  border-radius: var(--r-md); padding: var(--s-5); min-width: 0;
}
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--ink-800); flex-wrap: wrap; }
.chart-title { font-size: 14px; font-weight: 600; color: var(--fg-100); margin: 0; }
.chart-sub { font-size: 12px; color: var(--fg-500); margin: 2px 0 0; }
.chart-note { font-family: var(--font-mono); font-size: 11px; color: var(--fg-500); }
.chart-note strong { color: var(--fg-100); font-weight: 700; }
.chart-empty { font-size: 13px; color: var(--fg-500); padding: var(--s-4) 0; }

/* Horizontal magnitude bars */
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar { display: grid; grid-template-columns: 116px 1fr 40px; align-items: center; gap: 10px; padding: 1px 0; border-radius: var(--r-xs); }
.hbar-label { font-size: 12px; color: var(--fg-300); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color var(--transition); }
.hbar-track { height: 13px; border-radius: var(--r-full); background: rgba(255,255,255,0.045); }
.hbar-fill { display: block; height: 100%; border-radius: var(--r-full); min-width: 3px; transition: filter var(--transition); }
.hbar-val { font-family: var(--font-mono); font-size: 12px; color: var(--fg-100); text-align: right; font-variant-numeric: tabular-nums; }
.hbar:hover .hbar-fill { filter: brightness(1.15); }
.hbar:hover .hbar-label { color: var(--fg-50); }

/* Vertical bars (time series, histogram) — with a scale + baseline */
.plot { position: relative; padding-top: 14px; }
.plot-max { position: absolute; top: 0; right: 0; font-family: var(--font-mono); font-size: 10px; color: var(--fg-500); font-variant-numeric: tabular-nums; }
.vbars { display: flex; align-items: flex-end; gap: 6px; border-top: 1px solid var(--ink-800); border-bottom: 1px solid var(--ink-700); padding-top: 0; }
.vbar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 2px; border-radius: 3px 3px 0 0; transition: background var(--transition); }
.vbar-col:hover { background: rgba(255,255,255,0.04); }
.vbar-seg { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; transition: filter var(--transition); }
.vbar-col:hover .vbar-seg, .vbar-group:hover .vbar-seg { filter: brightness(1.18); }
.vbars.grouped .vbar-group { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-radius: 3px 3px 0 0; transition: background var(--transition); }
.vbars.grouped .vbar-group:hover { background: rgba(255,255,255,0.04); }
.vbars.grouped .vbar-seg { width: 42%; }
.vbar-axis { display: flex; gap: 6px; margin-top: 7px; }
.vbar-axis span { flex: 1; min-width: 0; text-align: center; font-family: var(--font-mono); font-size: 9px; color: var(--fg-500); overflow: hidden; white-space: nowrap; }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 140px 1fr auto; align-items: center; gap: 12px; }
.funnel-label { font-size: 13px; color: var(--fg-300); }
.funnel-track { height: 22px; border-radius: var(--r-sm); background: rgba(255,255,255,0.04); }
.funnel-fill { display: block; height: 100%; border-radius: var(--r-sm); min-width: 3px; }
.funnel-val { font-family: var(--font-mono); font-size: 13px; color: var(--fg-100); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; }
.funnel-pct { font-size: 11px; color: var(--fg-500); }

/* Legend */
.chart-legend { display: flex; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-3); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-300); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* Time-window selector + custom range */
.win-bar { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-4); }
.win-select, .win-custom { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: var(--ink-900); border: 1px solid var(--ink-700); border-radius: var(--r-md); }
.win-select { gap: 2px; }
.win-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-500); padding: 0 8px; }
.win-opt { padding: 5px 12px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; color: var(--fg-300); text-decoration: none; border: none; background: transparent; cursor: pointer; font-family: inherit; }
.win-opt:hover { background: var(--ink-800); color: var(--fg-50); }
.win-opt.active { background: var(--brand-soft); color: var(--brand); }
.win-custom input[type="date"] { width: auto; padding: 5px 8px; font-size: 12px; font-family: var(--font-mono); background: var(--ink-850); border: 1px solid var(--ink-700); border-radius: var(--r-sm); color: var(--fg-100); color-scheme: dark; }
.win-arrow { color: var(--fg-500); font-size: 12px; }

/* Retention heatmap */
.heatmap { display: flex; flex-direction: column; gap: 3px; overflow-x: auto; }
.heat-row { display: grid; grid-template-columns: 92px repeat(6, minmax(38px, 1fr)); gap: 3px; align-items: stretch; }
.heat-rowlabel { font-size: 11px; color: var(--fg-300); display: flex; align-items: center; gap: 5px; }
.heat-rowlabel small { font-family: var(--font-mono); color: var(--fg-500); font-size: 10px; }
.heat-cell { display: flex; align-items: center; justify-content: center; height: 30px; border-radius: var(--r-xs); font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; background: rgba(255,255,255,0.03); color: var(--fg-500); }
.heat-colhead, .heat-rowlabel { background: none; }
.heat-colhead { font-size: 10px; color: var(--fg-500); text-transform: uppercase; letter-spacing: 0.04em; }
.heat-empty { background: repeating-linear-gradient(-45deg, transparent, transparent 4px, rgba(255,255,255,0.03) 4px, rgba(255,255,255,0.03) 5px); }

/* Shared chart tooltip */
.chart-tip {
  position: absolute; z-index: 60; pointer-events: none;
  max-width: 240px; padding: 7px 10px;
  background: var(--ink-800); border: 1px solid var(--ink-600);
  border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
  font-size: 12px; line-height: 1.4; color: var(--fg-100);
  font-family: var(--font-sans);
}
.chart-tip[hidden] { display: none; }
[data-tip] { cursor: default; }
[data-tip]:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ==========================================================================
   Misc utilities
   ========================================================================== */

.divider { border: 0; border-top: 1px solid var(--ink-700); margin: var(--s-6) 0; }
.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }

.empty-state {
  padding: var(--s-7) var(--s-5);
  text-align: center;
  color: var(--fg-500);
}
.empty-state .empty-icon {
  display: inline-grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: var(--r-full);
  background: var(--ink-800); border: 1px solid var(--ink-700);
  margin-bottom: var(--s-3);
  font-size: 24px;
}

/* ==========================================================================
   Avatars
   ========================================================================== */

.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  flex-shrink: 0;
  display: block;
}
.avatar-sm { width: 28px; height: 28px; }
.avatar-md { width: 56px; height: 56px; }
.avatar-lg { width: 96px; height: 96px; border-width: 2px; }
.avatar-xl {
  width: 140px; height: 140px;
  border: 3px solid var(--ink-700);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.avatar-ring {
  padding: 3px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dim));
  border-radius: 50%;
  display: inline-block;
  line-height: 0;
}
.avatar-ring .avatar { border: 2px solid var(--ink-950); }

.avatar-upload {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4); background: var(--ink-900);
  border: 1px solid var(--ink-700); border-radius: var(--r-md);
  margin-bottom: var(--s-4);
}
.avatar-upload-actions {
  display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.avatar-upload input[type=file] {
  background: transparent; border: 1px dashed var(--ink-600);
  padding: 10px; font-size: 13px; color: var(--fg-300);
  cursor: pointer;
}
.avatar-upload input[type=file]::file-selector-button {
  background: var(--ink-800); color: var(--fg-100);
  border: 1px solid var(--ink-600); border-radius: var(--r-sm);
  padding: 6px 12px; margin-right: 12px;
  font: inherit; cursor: pointer;
}
.avatar-upload input[type=file]::file-selector-button:hover {
  background: var(--ink-700);
}

/* ==========================================================================
   Visibility radio cards
   ========================================================================== */

.visibility-options { display: flex; flex-direction: column; gap: 8px; }
.visibility-option {
  display: grid !important;
  grid-template-columns: 22px 1fr;
  align-items: start; gap: var(--s-3);
  padding: 14px;
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--r-sm);
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 500 !important;
  color: var(--fg-100) !important;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.visibility-option:hover { border-color: var(--ink-500); }
.visibility-option input[type=radio] {
  width: auto; margin: 4px 0 0 0; accent-color: var(--brand);
}
.visibility-option:has(input:checked) {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(255, 214, 10, 0.05), transparent);
}

/* Highlight-score picker: pill radios; each axis pill wears its own
   axis color (via --hl-color) once selected. */
.hl-options { display: flex; flex-wrap: wrap; gap: 8px; }
.hl-option {
  display: inline-flex !important;
  align-items: center; gap: 7px;
  padding: 8px 14px;
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.02em; text-transform: none;
  color: var(--fg-300);
  cursor: pointer; user-select: none;
  transition: border-color 140ms, color 140ms, background 140ms,
              box-shadow 140ms;
}
.hl-option:hover { border-color: var(--ink-500); color: var(--fg-100); }
.hl-option input[type=radio] {
  position: absolute; opacity: 0; pointer-events: none;
  width: 0; height: 0; margin: 0;
}
.hl-axis::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hl-color);
  opacity: 0.55;
  transition: opacity 140ms, box-shadow 140ms;
}
.hl-option:has(input:checked) {
  border-color: var(--hl-color);
  color: var(--hl-color);
  background: color-mix(in srgb, var(--hl-color) 9%, var(--ink-900));
}
.hl-option:has(input:focus-visible) {
  outline: 2px solid var(--hl-color); outline-offset: 2px;
}
.hl-axis:has(input:checked)::before {
  opacity: 1;
  box-shadow: 0 0 6px var(--hl-color);
}
.hl-hint {
  font-size: 9.5px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-500);
}

/* ==========================================================================
   Capacity / progress bar
   ========================================================================== */

.capacity-bar {
  position: relative;
  height: 10px;
  background: var(--ink-700);
  border-radius: var(--r-full);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}
.capacity-bar-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--fill-color, var(--brand)),
    color-mix(in srgb, var(--fill-color, var(--brand)) 65%, white)
  );
  border-radius: var(--r-full);
  box-shadow:
    0 0 16px color-mix(in srgb, var(--fill-color, var(--brand)) 60%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Photo carousel (event galleries)
   ========================================================================== */

.photo-carousel { position: relative; }

.photo-carousel-stage {
  position: relative;
  display: grid;
  grid-template-areas: 'stack';
  aspect-ratio: 16 / 9;
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.photo-slide {
  grid-area: stack;
  opacity: 0; visibility: hidden;
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.photo-slide.is-active { opacity: 1; visibility: visible; }
.photo-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transform: none !important;
  transition: none;
}
.photo-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: var(--s-5) var(--s-5) var(--s-4);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7) 60%);
  color: var(--fg-50);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.photo-arrow {
  position: absolute;
  top: calc(50% - 24px - 28px); /* offset to vertically center on image area */
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  background: rgba(6, 8, 11, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--fg-50);
  border: 1px solid var(--ink-600);
  border-radius: 50%;
  font-size: 24px;
  font-weight: 300;
  line-height: 0;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 2;
}
.photo-arrow:hover {
  background: var(--brand);
  color: var(--ink-950);
  border-color: var(--brand);
  box-shadow: 0 8px 24px var(--brand-glow);
}
.photo-arrow-prev { left: 16px; }
.photo-arrow-next { right: 16px; }

.photo-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.photo-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--ink-800);
  border: 2px solid var(--ink-700);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: opacity var(--transition), border-color var(--transition), box-shadow var(--transition);
  opacity: 0.55;
}
.photo-thumb:hover {
  opacity: 0.85;
  border-color: var(--ink-500);
  transform: none;
  background-color: var(--ink-800);
}
.photo-thumb.is-active {
  opacity: 1;
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 4px 16px var(--brand-glow);
}

/* Bright table link — bold, near-white default, brand-lime on hover. */
a.row-link {
  color: var(--fg-50);
  font-weight: 700;
  transition: color var(--transition);
}
a.row-link:hover { color: var(--brand); }

/* Event venue strip — gym name, address, get-directions button. */
.event-venue {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
  max-width: 720px;
}
@media (max-width: 640px) {
  .event-venue { flex-direction: column; align-items: flex-start; }
}

/* keyboard-friendly focus */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ===========================================================
 *  TIER INDICATORS — Verified / Open / Estimate
 *  Single source of truth so every score-rendering surface
 *  uses the same green-check / yellow-star / dashed-estimate
 *  language. Macro lives at templates/macros/tier.html
 * =========================================================== */

/* Inline pill — used in tables, list rows, captions. */
.tier-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}
.tier-pill svg { width: 13px; height: 13px; }
/* Verified pill: muted emerald text/border. The hex SVG inside carries
 * its own deep-emerald body + white check; the pill chrome is just a
 * soft container in the same hue family. Mint-tinged emerald-300 for
 * the text reads as premium (not "checkbox-checked" toast green). */
.tier-pill--verified {
  background: rgba(6, 95, 70, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.28);
}
.tier-pill--open {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
}
.tier-pill--estimate {
  background: rgba(251, 146, 60, 0.08);
  color: #fb923c;
  border: 1px dashed rgba(251, 146, 60, 0.4);
}

/* Inline tick wrapper — just a positioning container. The verified
 * variant has its own hexagon SVG inside, so no background or border
 * on the wrapper (the SVG is the badge). Open/estimate still use the
 * circular badge style since their content is a text glyph (★). */
.tier-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 0;
}
.tier-tick--verified {
  /* No bg / border / radius — the hex SVG IS the badge. The body
   * fill, inner highlight, and check all live in the SVG itself. */
  width: 18px; height: 18px;
}
.tier-tick--verified svg { width: 18px; height: 18px; display: block; }
.tier-tick--open {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(251, 146, 60, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.5);
  color: #fb923c;
  font-size: 11px;
}
.tier-tick--estimate {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(251, 146, 60, 0.08);
  border: 1px dashed rgba(251, 146, 60, 0.5);
  color: #fb923c;
  font-size: 11px;
}

/* Superscript tick — sits at the top-right corner of a big score
 * exactly where a copyright/® mark would. Anchored to the score-
 * number's top-right by `top: 0` + a tiny negative right offset, so
 * the badge hugs the rightmost digit with a hair of breathing room.
 * Scales proportionally with the score's font-size at any size.
 * Parent needs `position: relative; display: inline-block`. */
.tier-tick--super {
  position: absolute;
  top: 0;
  right: -0.46em;
  width: 0.34em; height: 0.34em;
  margin-left: 0;
  font-size: inherit;
}
.tier-tick--super.tier-tick--verified svg {
  width: 100%; height: 100%;
  /* Subtle drop-shadow keeps the deep-emerald body legible against
   * radar/score colors behind it; doesn't add a glow. */
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.55));
}

/* ==========================================================================
   Admin scoring console
   ========================================================================== */
.adm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-5); align-items: start; }
.adm-side { position: sticky; top: 16px; display: grid; gap: var(--s-3); }
@media (max-width: 1080px) {
  .adm-layout { grid-template-columns: 1fr; }
  .adm-side { position: static; }
}
.adm-nav {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 0; margin-bottom: var(--s-3);
  background: var(--ink-950); border-bottom: 1px solid var(--ink-800);
}
.adm-nav a.axis-chip { text-decoration: none; }
.adm-filter {
  margin-left: auto; width: 220px; padding: 6px 10px;
  background: var(--ink-900); border: 1px solid var(--ink-700);
  color: var(--fg-100); border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 12px;
}
.adm-num, .adm-num-sm, .adm-text {
  background: var(--ink-900); border: 1px solid var(--ink-700);
  color: var(--fg-100); border-radius: var(--r-sm);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.adm-num { width: 66px; padding: 6px 8px; font-size: 12px; text-align: right; }
.adm-num-sm { width: 82px; padding: 5px 6px; font-size: 11px; text-align: right; border-color: var(--ink-800); color: var(--fg-300); }
.adm-num-xs { width: 100%; min-width: 0; flex: 1; padding: 5px 6px; font-size: 11px; text-align: right; border-color: var(--ink-800); color: var(--fg-300); }
.adm-text { flex: 1; min-width: 0; padding: 6px 10px; font-size: 12px; border-color: var(--ink-800); color: var(--fg-300); }
.adm-try { border-style: dashed !important; border-color: var(--ink-700) !important; }
.adm-dirty { border-color: #f59e0b !important; }
.adm-ex {
  border-bottom: 1px solid var(--ink-800);
  border-left: 3px solid color-mix(in srgb, var(--axis-color, transparent) 55%, transparent);
  padding-left: 10px;
}
.adm-ex > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.adm-ex > summary::-webkit-details-marker { display: none; }
.adm-ex > summary::before { content: '▸'; color: var(--fg-500); font-size: 10px; flex: none; transition: transform 0.15s; }
.adm-ex[open] > summary::before { transform: rotate(90deg); }
.adm-ex-name { flex: 1; font-size: 14px; min-width: 140px; }
.adm-chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.adm-chip {
  font-family: var(--font-mono); font-size: 10px; padding: 1px 7px;
  border: 1px solid var(--ink-600); border-radius: 999px;
  color: var(--brand); background: rgba(255, 214, 10, 0.07); white-space: nowrap;
}
.adm-chip-off {
  color: #fb7185; border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.08);
}
/* Admin tab bar (catalog / verifier models) + model rows. */
.adm-tabbar { display: flex; gap: 2px; border-bottom: 1px solid var(--ink-700); margin-bottom: var(--s-4); }
.adm-tab {
  background: none; border: none; cursor: pointer; font: inherit;
  padding: 8px 14px; color: var(--fg-500); font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.adm-tab:hover { color: var(--fg-100); }
.adm-tab.active { color: var(--fg-100); border-bottom-color: var(--brand); }
.adm-model-row { display: grid; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--ink-800); }
.adm-model-row:first-of-type { padding-top: 0; }

/* Dotted box: the decay fill controls belong together. */
.adm-decay-group {
  border: 1px dotted var(--ink-600); border-radius: var(--r-sm);
  padding: 4px 8px;
}
.adm-ex-body { padding: 2px 0 12px 16px; display: grid; gap: 6px; }
.adm-frow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-flabel { width: 34px; text-align: center; font-size: 10px; font-weight: 700; color: var(--fg-500); font-family: var(--font-mono); flex: none; }
.adm-decay-curve { width: 120px; height: 26px; flex: none; opacity: 0.55; transition: opacity 0.15s; }
.adm-frow:focus-within .adm-decay-curve { opacity: 1; }
/* The try row is a sandbox, visibly apart from the algorithm rows. */
.adm-sandbox {
  background: rgba(255, 214, 10, 0.05);
  border: 1px dashed rgba(255, 214, 10, 0.28);
  border-radius: var(--r-sm);
  padding: 6px 8px;
}
.adm-axis-head { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-4) 0 4px; flex-wrap: wrap; scroll-margin-top: 60px; }
/* Filesystem-style disclosure caret for a whole axis. */
.adm-tree-caret {
  background: none; border: none; padding: 0 2px; cursor: pointer;
  color: var(--fg-500); font-size: 11px; line-height: 1;
  transition: transform 0.15s;
}
.adm-tree-caret:hover { color: var(--fg-100); }
.adm-tree-caret.open { transform: rotate(90deg); }
.adm-savebar {
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: 10px 14px; margin-top: var(--s-4);
  background: color-mix(in srgb, var(--ink-850) 94%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--ink-700); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}
.adm-dirty-count { font-family: var(--font-mono); font-size: 12px; color: #f59e0b; min-width: 140px; }
.adm-dry-chips { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; min-height: 20px; align-items: center; }
.adm-dry-chip { padding: 2px 8px; border: 1px solid var(--ink-700); border-radius: 999px; color: var(--fg-300); }
.adm-dry-chip strong { color: var(--fg-100); }
.adm-reset { background: none; border: none; color: var(--fg-500); font-size: 11px; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.adm-reset:hover { color: var(--fg-100); }

/* ==========================================================================
   Verified athletic credential tiles (college / pro)
   School colors drive the whole card: --cp primary, --cs secondary,
   --cink readable text on primary (computed server-side).
   ========================================================================== */

.cred-row {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  margin: var(--s-4) 0;
}
.cred-tile {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  flex: 1 1 340px; max-width: 560px; min-width: 0;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background:
    linear-gradient(120deg,
      color-mix(in srgb, var(--cp) 88%, #000) 0%,
      var(--cp) 52%,
      color-mix(in srgb, var(--cp) 72%, #000) 100%);
  border: 1px solid color-mix(in srgb, var(--cs) 55%, transparent);
  box-shadow:
    0 6px 22px color-mix(in srgb, var(--cp) 35%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
}
/* The secondary-color sash: one diagonal ribbon of the second school
   color across the far edge, clipped by the card. */
.cred-tile::after {
  content: ""; position: absolute; top: -40%; right: -34px;
  width: 74px; height: 180%;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--cs) 85%, transparent),
    color-mix(in srgb, var(--cs) 45%, transparent));
  transform: rotate(16deg); pointer-events: none; opacity: 0.9;
}
.cred-medal {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--cink) 94%, var(--cp));
  border: 2px solid var(--cs);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  overflow: hidden;
}
.cred-medal img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cred-monogram {
  font-family: var(--font-mono); font-weight: 700; font-size: 19px;
  letter-spacing: 0.04em; color: var(--cp);
}
.cred-body { min-width: 0; position: relative; z-index: 1; }
.cred-eyebrow {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ceye, var(--cs)); margin-bottom: 3px;
}
.cred-eyebrow svg { width: 11px; height: 11px; }
.cred-org {
  font-weight: 800; font-size: 19px; line-height: 1.15;
  letter-spacing: -0.015em; color: var(--cink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cred-line {
  font-size: 13px; margin-top: 2px;
  color: color-mix(in srgb, var(--cink) 86%, var(--cp));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cred-years {
  font-size: 11px; margin-top: 4px;
  color: color-mix(in srgb, var(--cink) 68%, var(--cp));
}
@media (max-width: 480px) {
  .cred-tile { flex: 1 1 100%; }
  .cred-org { white-space: normal; }
}
