/* Colors and type taken from the Pinterest inspiration board:
   deep indigo night, an orange-to-rust glow, off-white #EDEDF3 and gold #FDA136.
   The board uses General Sans + Halvar Breitschrift; Halvar is a paid font, so
   headings use Archivo at its widest setting as a free stand-in. */
:root {
  /* THEME VARIABLES. A theme (css/theme-*.css) is a block that redefines these; this block is the "Original" theme
     (deep indigo, orange to rust glow, gold). The -rgb ones hold "r, g, b" so rules can add their own opacity:
     rgba(var(--accent-rgb), 0.3). */
  --bg: #0b0920;
  --bg-raised: #15122f;
  --bg-hover: #1e1a3d;
  --line: rgba(237, 237, 243, 0.12);
  --text: #ededf3;
  --muted: #a9a7bf;
  --gold: #fda136;            /* the main accent */
  --ember: #e2572b;           /* the second accent, deeper */
  --magenta: #b5307a;         /* the third accent, the end of the glow */
  --rust: #a8432a;
  --glow: linear-gradient(135deg, var(--gold) 0%, var(--ember) 55%, var(--magenta) 100%);
  --on-accent: #1a0d05;       /* text on a gold/glow fill */
  --accent-rgb: 253, 161, 54;
  --ember-rgb: 226, 87, 43;
  --magenta-rgb: 181, 48, 122;
  --card-rgb: 21, 18, 47;     /* cards and panels */
  --bg-rgb: 11, 9, 32;        /* header and page-colored overlays */
  --shade-rgb: 5, 4, 15;      /* dialog backdrops */
  --haze-left-rgb: 226, 87, 43;     /* the three glows behind the page */
  --haze-bottom-rgb: 253, 161, 54;
  --haze-right-rgb: 80, 60, 160;
  --region-bg: rgba(var(--ember-rgb), 0.3);
  --region-solid: var(--glow);
  --btn-main: linear-gradient(180deg, #ffbe66 0%, #fda136 45%, #e98a1f 100%); /* main button: gold, lit from above */
  --btn-satin: linear-gradient(180deg, #2a2650 0%, #1b1838 100%);              /* secondary button: dark satin */
  /* text fields (Component Library 8): border at rest is >= 3:1 against the box and the card behind it */
  --field-bg: #0e0c26;            /* inside of a text box */
  --field-line: #915e2f;          /* border at rest: the buttons' gold rim, at 55% so it passes 3:1 (3.5:1; the old --line was 1.4:1) */
  --field-line-hover: #fda136;    /* border under the mouse: lights up to full gold, like the buttons */
  --field-ring: #fda136;          /* focus ring, and the label of the box you're in */
  --field-bad: #ff7a6b;           /* error border and message */
  --field-ring-rgb: 253, 161, 54; --field-bad-rgb: 255, 122, 107;   /* the same two as r, g, b, for the soft glow */

  --font-body: "General Sans", system-ui, sans-serif;
  --font-display: "Archivo", "General Sans", system-ui, sans-serif;
  --radius: 14px;
  --page: min(1120px, 100% - 32px);
}

.region-R62 { --region-bg: rgba(var(--ember-rgb), 0.3); --region-solid: var(--glow); }
.region-R61 { --region-bg: rgba(32, 178, 190, 0.3); --region-solid: linear-gradient(135deg, #7ff0d6 0%, #25b4c4 55%, #3a7bd5 100%); }
.region-champ { --region-bg: rgba(150, 105, 235, 0.35); --region-solid: linear-gradient(135deg, #d6b8ff 0%, #9a6be0 55%, #6a4bc4 100%); }

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-padding-top: 90px; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* The diagonal orange haze from the inspiration image, fixed behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50% 70% at 0% 35%, rgba(var(--haze-left-rgb), 0.38), transparent 70%),
    radial-gradient(40% 60% at 25% 90%, rgba(var(--haze-bottom-rgb), 0.18), transparent 70%),
    radial-gradient(60% 50% at 100% 0%, rgba(var(--haze-right-rgb), 0.25), transparent 70%);
}

main { width: var(--page); margin: 0 auto; flex: 1; padding-bottom: 80px; }
main > section { margin-top: 64px; }

h1, h2, h3 { font-family: var(--font-display); font-stretch: 125%; line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
code { font-size: 0.9em; background: var(--bg-raised); padding: 0.1em 0.4em; border-radius: 6px; }
kbd { font: 500 0.8em var(--font-body); border: 1px solid var(--line); border-radius: 5px; padding: 0.05em 0.45em; color: var(--muted); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.eyebrow { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.8em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.muted { color: var(--muted); }
.panel { background: rgba(var(--card-rgb), 0.7); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(8px); }


/* ---- Header -------------------------------------------------------------- */
#site-header { position: sticky; top: 0; z-index: 10; background: rgba(var(--bg-rgb), 0.75); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { width: var(--page); margin: 0 auto; display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1rem var(--font-display); font-stretch: 125%; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.5); }
nav { display: flex; gap: 4px; margin-right: auto; }
nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; }
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); font-weight: 600; background: rgba(var(--accent-rgb), 0.14); box-shadow: inset 0 0 0 1.5px var(--gold); }
.search-trigger { display: flex; align-items: center; gap: 8px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px 6px 14px; color: var(--muted); }
.search-trigger:hover { color: var(--text); }

@media (max-width: 640px) {
  .header-inner { gap: 8px 16px; padding: 10px 0; }
  nav { order: 3; width: 100%; margin: 0 -12px; flex-wrap: wrap; }
  nav a { white-space: nowrap; padding: 6px 10px; }
  .search-trigger { margin-left: auto; }
  .search-trigger kbd { display: none; }
}

/* ---- Search dialog ------------------------------------------------------- */
.search-dialog { width: min(640px, 100% - 32px); max-height: min(70vh, 640px); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); color: var(--text); }
.search-dialog::backdrop { background: rgba(var(--shade-rgb), 0.7); backdrop-filter: blur(4px); }
.search-panel { display: flex; flex-direction: column; max-height: inherit; }
.search-form { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.search-form input { flex: 1; background: none; border: 0; color: var(--text); font: inherit; font-size: 1.1rem; padding: 6px; }
.search-form input:focus { outline: none; }
.search-form input::-webkit-search-cancel-button { display: none; } /* we already have an Esc button */
.search-close { background: none; border: 1px solid var(--line); border-radius: 6px; font-size: 0.75rem; color: var(--muted); padding: 2px 8px; }
.search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.search-results a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a:focus { background: var(--bg-hover); outline: none; }
.result-type { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.result-snippet { font-size: 0.9rem; color: var(--muted); }
.search-results mark { background: rgba(var(--accent-rgb), 0.25); color: var(--text); border-radius: 3px; padding: 0 2px; }
.search-empty { padding: 16px 12px; color: var(--muted); }

/* ---- Home hero ----------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 40px; margin-top: 28px; }
.hero > * { min-width: 0; }
/* The sections under the hero sit closer together than the 64px used elsewhere. */
main > .hero ~ section { margin-top: 44px; }
.hero-actions { display: flex; flex-wrap: nowrap; gap: 5px; margin-top: 48px; }
.hero-actions .button { white-space: nowrap; padding: 0.85em 0.7em; font-size: min(0.95rem, calc((100vw - 48px) / 30)); }
@media (min-width: 560px) { .hero-actions { gap: 10px; } .hero-actions .button { padding: 0.7em 1.05em; } }
/* The three buttons always stay on one line; on narrow screens they shrink with the screen width (the min() font size above) to fit. */
/* "A SenderPics Media Production": a byline tucked under the big headline. */
.hero h1:has(+ .hero-byline) { margin-bottom: 0.1em; }
.hero-byline { margin: 0 0 1.4em 0.15em; font: 600 clamp(1rem, 1.6vw, 1.25rem)/1.3 var(--font-body); color: var(--gold); letter-spacing: 0.01em; }
.hero-byline a { color: inherit; text-decoration: underline; text-underline-offset: 3px; } /* same gold as the line, just underlined */
.hero-byline:has(+ .hero-disclaimer) { margin-bottom: 0.35em; }
.hero-disclaimer { margin: 0 0 1.4em 0.15em; max-width: 46ch; font-size: 0.75rem; line-height: 1.4; color: var(--muted); }

/* The row of five glowing circles from the inspiration board. */
.orbs { display: flex; justify-content: center; }
.orbs span { width: clamp(70px, 11vw, 130px); aspect-ratio: 1; border-radius: 50%; margin-left: -6%; flex-shrink: 0; }
.orbs span:nth-child(1) { background: linear-gradient(90deg, rgba(200, 110, 90, 0.15), rgba(200, 110, 90, 0.55)); }
.orbs span:nth-child(2) { background: linear-gradient(90deg, var(--text) 30%, #6e6a80); }
.orbs span:nth-child(3) { background: radial-gradient(circle at 25% 85%, var(--magenta), transparent 45%), linear-gradient(160deg, var(--gold), var(--ember)); box-shadow: 0 0 60px rgba(var(--ember-rgb), 0.45); z-index: 1; }
.orbs span:nth-child(4) { background: linear-gradient(90deg, #3d2a1c, var(--gold)); }
.orbs span:nth-child(5) { background: linear-gradient(90deg, rgba(120, 115, 150, 0.1), rgba(120, 115, 150, 0.6)); }
/* A circle holding an athlete photo: the photo fades in over the gradient. */
.orbs span.has-photo { position: relative; overflow: hidden; box-shadow: 0 0 0 2px rgba(237, 237, 243, 0.12), 0 10px 40px rgba(0, 0, 0, 0.45); z-index: 2; }
.orbs span:nth-child(3).has-photo { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.5), 0 0 60px rgba(var(--ember-rgb), 0.45); z-index: 3; }
.orbs .has-photo a { position: absolute; inset: 0; display: block; }
.orbs .has-photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s, transform 0.3s; }
.orbs .has-photo img.is-loaded { opacity: 1; }
.orbs .has-photo a:hover img { transform: scale(1.06); }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; margin-top: 28px; }
  .orbs-wrap { order: -1; }
  .orbs { justify-content: center; }
}

.page-intro { margin-top: 56px; }
.section-foot { margin: 20px 0 0; text-align: right; }
.section-links { display: inline-flex; flex-wrap: wrap; gap: 4px 24px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }

/* ---- Event cards --------------------------------------------------------- */
.event-list { display: grid; gap: 12px; }
.event-card { display: flex; gap: 18px; padding: 16px 18px; background: rgba(var(--card-rgb), 0.7); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.3s; }
.event-card.is-highlighted { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 30px rgba(var(--accent-rgb), 0.2); }
.event-date { flex-shrink: 0; width: 56px; height: 60px; display: grid; place-content: center; text-align: center; border-radius: 10px; background: var(--region-solid); color: var(--on-accent); line-height: 1; }
.event-date span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.event-date strong { font: 700 1.5rem var(--font-display); }
.event-body { flex: 1; min-width: 0; } /* use the whole card, so the who's-going names can spread out */
.event-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 4px; }
.event-body h3 { margin: 0; }
/* The Results button: filled with the site's glow gradient, a soft halo, and a shimmer that sweeps across now and then. */
.event-body .event-results { position: relative; overflow: hidden; padding: 5px 16px; border: 0; border-radius: 999px; background: var(--glow); color: var(--on-accent); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; text-decoration: none; box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.55), 0 0 28px rgba(var(--ember-rgb), 0.3); transition: transform 0.2s, box-shadow 0.2s; }
.event-body .event-results::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent); transform: skewX(-20deg); animation: results-shine 3.2s ease-in-out infinite; }
.event-body .event-results:hover, .event-body .event-results:focus-visible { transform: translateY(-1px) scale(1.05); box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.85), 0 0 40px rgba(var(--ember-rgb), 0.5); }
@keyframes results-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .event-body .event-results::after { animation: none; display: none; } }
.event-body h3 a { color: var(--text); text-decoration: none; }
.event-body h3 a:hover { color: var(--gold); }
.event-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.event-body .event-meta { color: var(--gold); font-size: 0.85rem; margin-bottom: 4px; }
.event-body .event-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.event-tags span { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); }
.event-tags span:first-child { background: var(--region-bg); border-color: transparent; }
/* The countdown is plain text, not a pill: a big number and a few words, so it does not look like a button. */
.event-tags .event-countdown { margin-left: auto; display: inline-flex; align-items: baseline; gap: 6px; padding: 0; border: 0; border-radius: 0; background: none; text-transform: none; letter-spacing: 0; font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.event-countdown b { font: 700 1.5rem/1 var(--font-display); font-variant-numeric: tabular-nums; font-stretch: 125%; letter-spacing: -0.01em; color: var(--gold); }
.event-tags .event-countdown.is-soon { color: var(--gold); font-size: 1rem; font-weight: 700; }
.event-tags .event-countdown.is-live { color: #ff8a65; font-weight: 600; }
.event-countdown.is-live::before { content: ""; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: #ff5a36; box-shadow: 0 0 8px #ff5a36; }
.event-body .event-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 0.85rem; }
.event-going { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.event-going-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
/* Who's going: a count, a wrapping strip of round photos, and a button that opens the names. */
.going { display: grid; gap: 8px; min-width: 0; }
.going-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.going-count { font-weight: 600; font-size: 0.9rem; }
.going-toggle, .going-more { border: 1px solid var(--line); background: none; color: var(--gold); border-radius: 999px; font: inherit; font-size: 0.8rem; cursor: pointer; }
.going-toggle { padding: 2px 12px; }
.going-toggle:hover, .going-more:hover { background: var(--bg-hover); }
.going-spots { display: flex; flex-wrap: wrap; gap: 6px; }
.going-spots a { display: block; border-radius: 50%; transition: transform 0.15s; }
.going-spots a:hover { transform: translateY(-2px); }
.going-more { width: 34px; height: 34px; padding: 0; color: var(--text); background: var(--bg-hover); }
.going-names { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; }
.going-names[hidden] { display: none; }
.going-names a { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-size: 0.92rem; }
.going-names a:hover { color: var(--gold); }
.going-inline { margin: 0; font-size: 0.9rem; color: var(--muted); }
.athlete-initials.athlete-initials-sm { width: 34px; height: 34px; font-size: 0.7rem; }

/* ---- Season timeline ------------------------------------------------------ */
.timeline { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.timeline li { display: grid; gap: 4px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); border-top: 3px solid var(--ember); }
.timeline li:last-child { border-top-color: var(--gold); }
.timeline-when { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.timeline li span:last-child { color: var(--muted); font-size: 0.92rem; }
.fine-print { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }

/* ---- Calendar ------------------------------------------------------------ */
.calendar-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; margin-top: 32px; }
.calendar { padding: 18px; }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-toolbar h2 { margin: 0; }
.cal-buttons { display: flex; gap: 6px; }
.cal-buttons button { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; }
.cal-buttons button:hover { background: var(--bg-hover); }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-weekdays span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); text-align: center; padding-bottom: 6px; }
.cal-cell { min-height: 88px; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 6px; text-align: left; background: rgba(237, 237, 243, 0.03); border: 1px solid transparent; border-radius: 10px; }
.cal-cell.is-blank { background: none; }
button.cal-cell:hover { background: var(--bg-hover); }
.cal-num { font-size: 0.85rem; color: var(--muted); }
.cal-cell.is-today .cal-num { display: inline-grid; place-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 600; }
.cal-cell.is-selected { border-color: var(--gold); }
.cal-chip { font-size: 0.72rem; line-height: 1.3; padding: 2px 6px; border-radius: 5px; background: var(--region-bg); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: 0.7rem; color: var(--muted); }
.day-panel h2 { font-size: 1.1rem; }

/* Small colored dots (one per event) stand in for the titles on a phone. */
.cal-dots { display: none; gap: 3px; justify-content: center; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--region-solid); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 0.85rem; color: var(--muted); }
.cal-legend li { display: flex; align-items: center; gap: 7px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--region-solid); }
@media (max-width: 900px) {
  .calendar-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .calendar { padding: 12px; }
  .cal-weekdays, .cal-grid { gap: 3px; }
  .cal-cell { min-height: 48px; align-items: center; padding: 4px 2px; }
  /* No room for titles on a phone: show a dot instead. */
  .cal-chip, .cal-more { display: none; }
  .cal-dots { display: flex; }
}

/* ---- Athletes ------------------------------------------------------------ */
.athlete-filter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.athlete-filter input { flex: 1; min-width: 220px; max-width: 420px; }
.athlete-card[hidden] { display: none; }
.athlete-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 20px; }
.athlete-grid:has(.stat-card) { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.athlete-card { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); color: var(--text); text-decoration: none; transition: border-color 0.2s, background 0.2s; }
.athlete-card:hover { border-color: var(--gold); background: var(--bg-hover); }
.athlete-card h2 { margin: 0; font-size: 1.15rem; flex: 1; }
.athlete-arrow { color: var(--muted); transition: transform 0.2s, color 0.2s; }
.athlete-card:hover .athlete-arrow { color: var(--gold); transform: translateX(3px); }

/* Stat card (compact): a small photo with a curved edge on the left; name, team and four stats on the right. */
.stat-card { display: grid; grid-template-columns: 84px 1fr; grid-template-rows: auto 1fr; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.sc-photo { grid-row: 1 / 3; position: relative; display: grid; place-content: center; font: 700 1.6rem var(--font-display); font-stretch: 125%; color: var(--on-accent); background: var(--glow); border-bottom-right-radius: 90% 60%; overflow: hidden; }
.sc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.sc-head { display: flex; padding: 10px 14px 0 12px; min-width: 0; }
.stat-card h2 { margin: 0; flex: 0 1 auto; min-width: 0; font: 800 0.95rem/1.15 var(--font-display); font-stretch: 125%; text-transform: uppercase; letter-spacing: 0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-stats { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.2fr; align-self: end; margin: 0; padding: 0 6px 8px 8px; }
.sc-stats > div { display: grid; gap: 1px; padding: 4px 4px 0; text-align: center; }
.sc-stats > div + div { border-left: 1px solid var(--line); }
.sc-stats dt { font-size: 0.56rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sc-stats dd { margin: 0; font: 700 1.05rem/1.15 var(--font-display); }
.sc-badges dd { font-weight: 800; font-size: 1.35rem; line-height: 1; background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-stats dd small { display: block; font: 500 0.6rem var(--font-body); color: var(--muted); }
.athlete-initials { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-content: center; background: var(--glow); color: var(--on-accent); font: 700 1rem var(--font-display); font-stretch: 125%; }
.athlete-initials[hidden] { display: none; }
/* A photo sits on top of the initials and is cropped to fill the circle. */
.athlete-initials { position: relative; overflow: hidden; }
.athlete-initials img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.athlete-initials-lg { width: 96px; height: 96px; font-size: 1.8rem; box-shadow: 0 0 40px rgba(var(--ember-rgb), 0.35); }
.athlete-hero-row { display: flex; align-items: center; gap: 24px; margin-top: 20px; }
.athlete-hero-row h1 { margin: 0; }
/* Name with the athlete's USAC member number in small type beside it. */
.athlete-name-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.member-no { font: 500 0.85rem var(--font-body); letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
.member-no[hidden] { display: none; }
.athlete-team { margin: 6px 0 0; font: 600 1rem var(--font-body); letter-spacing: 0.03em; color: var(--gold); }
.athlete-team[hidden] { display: none; }
.admin-athlete-name .member-no { margin-left: 8px; font-size: 0.8rem; }
.back-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.back-link:hover { color: var(--gold); }

/* ---- Admin page ----------------------------------------------------------- */
.admin-flash { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); max-width: 46ch; }
.admin-flash.is-ok { border-color: rgba(var(--accent-rgb), 0.6); background: rgba(var(--accent-rgb), 0.12); }
.admin-flash.is-error { border-color: rgba(var(--ember-rgb), 0.7); background: rgba(var(--ember-rgb), 0.15); }
.admin-list { display: grid; gap: 12px; margin-top: 20px; }
.admin-row, .admin-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.admin-row strong, .admin-card strong { flex: 1; min-width: 10ch; }
.admin-card-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-card-actions form { margin: 0; }
.admin-row input[type="file"] { max-width: 100%; color: var(--muted); font: inherit; font-size: 0.9rem; }
.admin-row button:not(.button, .button-2), .admin-event button:not(.button, .button-2) { border: 0; } /* design-system buttons keep their gold rim */
.admin-event { display: block; margin: 0; }
.admin-event button { justify-self: start; }
.admin-event-head { display: grid; gap: 2px; }
.admin-event-head span { font-size: 0.85rem; }
.admin-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-check { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.admin-check:has(input:checked) { border-color: var(--gold); background: rgba(var(--accent-rgb), 0.12); }
.admin-check input { accent-color: var(--gold); width: 18px; height: 18px; }
#athletes, #events, #galleries, #going, #photos { scroll-margin-top: 24px; }
.admin-gallery-form { display: grid; gap: 14px; margin: 18px 0 24px; padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); }
.admin-gallery-form label { display: grid; gap: 6px; font-weight: 500; }
.admin-gallery-form label .muted { font-weight: 400; font-size: 0.85rem; }
.admin-gallery-form textarea { resize: vertical; font-family: ui-monospace, Menlo, monospace; }
.admin-gallery-form button { justify-self: start; }
.admin-kind { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.admin-kind legend { font-weight: 500; margin-bottom: 6px; }
.admin-kind .admin-check { font-weight: 400; display: grid; grid-template-columns: auto 1fr; align-items: start; column-gap: 10px; row-gap: 2px; padding: 12px 16px; border-radius: 14px; }
.admin-kind .admin-check input { margin: 2px 0 0; }
.admin-kind .admin-check .muted { grid-column: 2; font-size: 0.85rem; }
.admin-gallery-cover { width: 72px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.admin-gallery-cover.is-empty { display: grid; place-content: center; background: var(--bg-raised); color: var(--muted); font-size: 1.3rem; }
.admin-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 18px 0; }
.admin-search label { display: grid; gap: 6px; flex: 1 1 260px; max-width: 420px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); } /* label above its box */
.admin-search label :is(input, select) { width: 100%; font-weight: 400; }
.admin-search input { flex: 1; min-width: 220px; }
.admin-matches { display: grid; gap: 8px; margin-bottom: 24px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.admin-match { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; border-radius: 10px; background: rgba(var(--card-rgb), 0.7); }
.admin-match > div { display: grid; gap: 2px; }
.admin-match span { font-size: 0.85rem; }
.admin-match.is-manual { background: none; padding-top: 4px; }
.admin-athlete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.admin-athlete-name { flex: 1; min-width: 14ch; }
.admin-athlete form { margin: 0; }
.admin-history { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.85rem; }
.admin-history label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); }
.admin-history input { width: 12ch; }
/* Compact athlete rows, two to a line: small avatar, name and details on one line, buttons underneath. */
#athletes .admin-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#athletes .admin-athlete { display: grid; grid-template-columns: 76px 1fr; align-items: start; gap: 4px 10px; padding: 10px 12px; }
#athletes .admin-athlete[hidden] { display: none; }
#athletes .admin-athlete .athlete-initials { width: 76px; height: 76px; font-size: 1.4rem; }
#athletes .admin-photo { grid-row: 1 / 3; margin: 0; }
.admin-photo-pick { position: relative; display: block; width: 76px; height: 76px; cursor: pointer; border-radius: 50%; }
.admin-photo-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-photo-pick:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.admin-photo-badge { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; display: grid; place-content: center; border-radius: 50%; background: var(--bg-raised); border: 1px solid var(--gold); color: var(--gold); font: 700 0.95rem/1 var(--font-body); padding: 0; cursor: pointer; }
.admin-photo-pick:hover .athlete-initials { filter: brightness(1.15); }
.admin-photo-pick.is-busy { opacity: 0.5; cursor: progress; }
#athletes .admin-athlete-name { min-width: 0; line-height: 1.3; }
#athletes .admin-athlete-name strong { font-size: 0.98rem; }
#athletes .admin-details { margin-top: 1px; }
#athletes .admin-details .cell-sub { display: inline; font-size: 0.76rem; }
#athletes .admin-details .cell-sub + .cell-sub::before { content: " · "; }
#athletes .admin-actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
#athletes .admin-actions form, #athletes .admin-actions .admin-history { margin: 0; padding: 0; border: 0; flex-basis: auto; }
#athletes .admin-remove { margin: 0; }
#athletes .admin-remove .button { color: #ff8a65; border-color: rgba(var(--ember-rgb), 0.45); background: transparent; }
#athletes .admin-remove .button:hover { background: rgba(var(--ember-rgb), 0.15); }
#athletes .admin-removed { margin-top: 28px; }
#athletes .admin-removed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); margin: 0; }
#athletes .admin-removed-row:first-of-type { border-top: 0; }
#athletes .admin-actions .admin-history.muted { font-size: 0.76rem; }
.admin-filter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 4px; }
.admin-filter input { flex: 1; min-width: 220px; max-width: 420px; }
@media (max-width: 720px) { #athletes .admin-list { grid-template-columns: 1fr; } }
.admin-athlete .admin-check { padding: 2px 10px 2px 6px; gap: 7px; font-size: 0.85rem; }
.admin-athlete .admin-check input { width: 15px; height: 15px; }
.status-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.status-tag.is-draft { border-color: rgba(var(--accent-rgb), 0.6); color: var(--gold); }
.admin-row button:disabled { opacity: 0.6; cursor: progress; }
.admin-row-error { flex-basis: 100%; margin: 0; color: #ff8a65; font-size: 0.9rem; }

/* ---- Athlete stats -------------------------------------------------------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 40px; }
.stat-tile { display: grid; gap: 2px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.stat-tile strong { font: 700 2rem/1.1 var(--font-display); font-stretch: 125%; background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tile span { font-weight: 500; }
.stat-tile small { color: var(--muted); font-size: 0.8rem; }
.ranking-list { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 6px; }
.ranking-list strong { color: var(--gold); display: inline-block; min-width: 3ch; }
.results-head { align-items: center; margin-bottom: 8px; }
.results-head h2 { margin: 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-bar[hidden] { display: none; }
.filter-bar button { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 0.9rem; }
.filter-bar button[aria-pressed="true"] { background: var(--glow); color: var(--on-accent); border-color: transparent; font-weight: 500; }
/* "Season at a glance": seasons across, levels down, best finish in each square. */
.top6-wrap { margin-bottom: 40px; padding: 18px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.top6-bars { display: flex; align-items: flex-end; gap: clamp(4px, 1.5vw, 14px); height: 200px; }
.top6-col { position: relative; flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.top6-bar { width: 100%; max-width: 64px; min-height: 3px; display: flex; flex-direction: column; border-radius: 8px 8px 3px 3px; overflow: hidden; background: var(--line); box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.18); }
.top6-bar i { display: block; border-top: 1px solid rgba(var(--bg-rgb), 0.55); }
.top6-bar i:first-child { border-top: 0; }
/* One color per place, following the site's glow (gold, ember, magenta) on into violet. */
[data-p="1"] { background: var(--gold); }
[data-p="2"] { background: #f47a30; }
[data-p="3"] { background: var(--ember); }
[data-p="4"] { background: var(--magenta); }
[data-p="5"] { background: #8a4fb0; }
[data-p="6"] { background: #6a66c4; }
[data-p="10"] { background: #4f86d6; }
.top6-num { font: 700 1.1rem var(--font-display); }
.top6-label { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.top6-sentence { margin: 14px 0 0; font-size: 1.05rem; }
.top6-sentence strong { color: var(--gold); }
.top6-legend { display: flex; gap: 16px; margin: 12px 0 0; font-size: 0.85rem; color: var(--muted); }
.top6-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.badge-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 40px; }
.badge { position: relative; color: inherit; font: inherit; cursor: pointer; display: grid; justify-items: center; text-align: center; gap: 4px; padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.badge-medal { width: 52px; height: 52px; display: grid; place-content: center; border-radius: 50%; background: var(--glow); color: var(--on-accent); font-size: 1.5rem; box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.4); margin-bottom: 6px; }
.badge strong { font-weight: 600; line-height: 1.25; }
.badge small { color: var(--muted); }
.glance-help { margin-top: -6px; font-size: 0.9rem; }
.season-grid-wrap { margin-bottom: 40px; }
.season-grid { border-collapse: collapse; font-size: 0.85rem; min-width: 100%; }
.season-grid th { padding: 10px 8px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.season-grid thead th { font-size: 0.75rem; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); }
.season-grid tbody th { text-align: left; position: sticky; left: 0; background: var(--bg-raised); z-index: 1; } /* level names stay put while seasons scroll */
.season-grid td { padding: 4px; text-align: center; border-bottom: 1px solid var(--line); }
.season-grid tr:last-child td, .season-grid tr:last-child th { border-bottom: 0; }
.grid-empty { color: rgba(237, 237, 243, 0.25); }
.grid-cell { display: inline-flex; align-items: baseline; gap: 3px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; background: none; white-space: nowrap; }
.grid-cell:hover { border-color: var(--line); background: var(--bg-hover); }
.grid-cell.is-active { border-color: var(--gold); background: rgba(var(--accent-rgb), 0.12); }
.grid-cell small { font-size: 0.7rem; color: var(--muted); }
/* Phone layout: seasons down, five levels across, sized to fit a narrow screen. */
.season-grid.is-flipped { width: 100%; table-layout: fixed; }
.season-grid.is-flipped thead th:first-child { width: 4.6em; }
.season-grid.is-flipped th { padding: 9px 2px; }
.season-grid.is-flipped tbody th { padding-left: 10px; font-size: 0.75rem; }
.season-grid.is-flipped td { padding: 3px 0; }
.season-grid.is-flipped .grid-cell { flex-direction: column; align-items: center; padding: 4px 2px; gap: 0; font-size: 0.8rem; line-height: 1.25; }
.season-grid.is-flipped .place { padding: 0 6px; }
.season-grid.is-flipped .grid-cell small { font-size: 0.6rem; } /* "×2" sits under the place, so wide cells still fit */

/* Results filter bar: discipline and level chips, season, podiums, count. */
.results-filters { display: grid; gap: 10px; margin-bottom: 8px; }
.results-filters .filter-bar { flex-wrap: wrap; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.filter-select { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.filter-toggle { font-size: 0.9rem; }
.filter-count { font-size: 0.85rem; }
.filter-clear { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; font-size: 0.85rem; }
.results-empty { margin-top: 20px; }

/* Collapsible season cards in the results list. */
.season-block.fold { margin: 12px 0 0; }
.season-block.fold > .table-wrap { padding: 0; }
.season-block .table-wrap { border: 0; border-radius: 0; background: none; }

.season-heading { margin: 28px 0 10px; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.results-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.results-table th { text-align: left; font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.results-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.results-table tr:last-child td { border-bottom: 0; }
.results-table td a { color: var(--text); text-decoration: none; }
.results-table td a:hover { color: var(--gold); }
.cell-sub { display: block; font-size: 0.8rem; }
.nowrap { white-space: nowrap; }
.place { font-weight: 600; }
.place-1, .place-2, .place-3 { display: inline-block; padding: 0 8px; border-radius: 999px; color: var(--on-accent); }
.place-1 { background: var(--gold); }
.place-2 { background: #d9d9e3; }
.place-3 { background: #d08a5c; }

@media (max-width: 640px) {
  /* Phones: too narrow for five columns, so each row becomes a small card —
     date, event and discipline stacked on the left, place on the right. */
  .results-table thead { display: none; }
  .results-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .results-table tr:last-child { border-bottom: 0; }
  .results-table td { padding: 0; border: 0; }
  .results-table td:nth-child(1) { grid-row: 1; font-size: 0.8rem; color: var(--muted); }
  .results-table td:nth-child(2) { grid-row: 2; }
  .results-table td:nth-child(3) { grid-row: 3; font-size: 0.8rem; color: var(--muted); }
  .results-table td:nth-child(4) { display: none; }
  .results-table td:nth-child(5) { grid-column: 2; grid-row: 1 / span 3; align-self: center; text-align: right; }
}

/* ---- Gallery ------------------------------------------------------------- */
/* Link galleries: cover-photo cards that open the gallery in a new tab. */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gallery-grid:empty { display: none; }
.gallery-card { position: relative; display: flex; align-items: flex-end; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  background: radial-gradient(circle at 30% 70%, rgba(var(--accent-rgb), 0.35), transparent 60%), var(--bg-raised); }
.gallery-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-card:hover img { transform: scale(1.04); }
.gallery-card-text { position: relative; display: grid; gap: 2px; width: 100%; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(var(--shade-rgb), 0.88)); }
.gallery-card-text strong { font-family: var(--font-display); font-stretch: 125%; font-size: 1rem; line-height: 1.25; }
.gallery-card-text span { font-size: 0.85rem; color: var(--gold); }

/* Embedded galleries: the same card, with the gallery (e.g. a slideshow) playing inside.
   The name strip lets clicks pass through to the gallery, except on its link. */
.gallery-card-embed { margin: 0; }
/* The slideshow fits each photo inside its frame and fills leftover space with
   its own (white) background, which we can't restyle. Making the frame 10% larger
   than the card and centring it trims those thin edge strips off. */
.gallery-card-embed iframe { position: absolute; top: -5%; left: -5%; width: 110%; height: 110%; border: 0; }
/* The slideshow is a frame from another site, which swallows clicks, so a clear link lies over the whole card. */
.gallery-card-hit { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.gallery-card-embed:hover, .gallery-card-embed:focus-within { border-color: var(--gold); }
.gallery-card-embed .gallery-card-text { position: relative; z-index: 2; pointer-events: none; }
.gallery-card-embed .gallery-card-text a { pointer-events: auto; font-size: 0.85rem; color: var(--gold); text-decoration: none; justify-self: start; }
.gallery-card-embed .gallery-card-text a:hover { text-decoration: underline; }

/* ---- Footer -------------------------------------------------------------- */
#site-footer { border-top: 1px solid var(--line); }
.footer-inner { width: var(--page); margin: 0 auto; padding: 28px 0; color: var(--muted); font-size: 0.85rem; display: grid; gap: 6px; }

.admin-team-row { display: grid; grid-template-columns: minmax(10ch, 1fr) minmax(12ch, 2fr); gap: 10px; align-items: center; }

/* Admin tabs: one area at a time. */
.admin-tabs { position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; margin-top: 28px; padding: 10px 0; overflow-x: auto; background: var(--bg); border-bottom: 1px solid var(--line); }
.admin-tabs[hidden] { display: none; }
.admin-tabs a { flex: none; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; }
.admin-tabs a:hover { color: var(--text); background: var(--bg-hover); }
.admin-tabs a.is-active { color: var(--text); border-color: var(--gold); background: rgba(var(--accent-rgb), 0.12); }
main > section.is-hidden { display: none; }
main > section { scroll-margin-top: 70px; }
.admin-tabs + section { margin-top: 36px; }

/* Popover with the exact numbers: on hover (mouse), focus (keyboard), or tap (phone). */
.top6-tip { position: absolute; bottom: calc(100% - 20px); left: 50%; transform: translateX(-50%); z-index: 2; display: none; gap: 4px; min-width: 150px; padding: 10px 12px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-hover); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); pointer-events: none; font-size: 0.85rem; line-height: 1.35; }
.top6-col:hover .top6-tip, .top6-col:focus-visible .top6-tip, .top6-col:focus .top6-tip { display: grid; }
.top6-col:first-child .top6-tip { left: 0; transform: none; }
.top6-col:last-child .top6-tip { left: auto; right: 0; transform: none; }
.top6-tip strong { font: 600 0.95rem var(--font-display); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.top6-tip small { color: var(--muted); }
.top6-col:hover .top6-bar, .top6-col:focus .top6-bar { filter: brightness(1.15); }
@media (max-width: 640px) { .top6-label { font-size: 0.65rem; line-height: 1.15; text-align: center; white-space: normal; } }

/* Badge hover/tap text: how the badge was earned. */
.badge-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 2; display: none; width: min(260px, 90vw); padding: 10px 12px; text-align: left; font-size: 0.85rem; line-height: 1.4; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-hover); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); pointer-events: none; }
.badge:hover .badge-tip, .badge:focus .badge-tip { display: block; }
.badge:first-child .badge-tip { left: 0; transform: none; }
.badge:last-child .badge-tip { left: auto; right: 0; transform: none; }

/* Ladder: four steps, each taller than the last. */
.ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 10px; margin-bottom: 40px; }
.ladder-step { position: relative; display: grid; align-content: end; justify-items: center; gap: 4px; padding: 14px 8px; min-height: calc(120px + var(--step) * 34px); color: inherit; font: inherit; cursor: pointer; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(var(--card-rgb), 0.7), rgba(253, 161, 54, calc(0.05 + var(--step) * 0.05))); }
.ladder-step:hover, .ladder-step:focus { border-color: var(--gold); }
.ladder-step strong { font: 600 0.95rem var(--font-display); margin-top: 4px; }
.ladder-step small { color: var(--muted); font-size: 0.8rem; line-height: 1.25; }
.ladder-place, .ladder-none { display: inline-block; min-width: 3.2ch; padding: 2px 14px; border-radius: 999px; font: 700 clamp(1.2rem, 4vw, 1.8rem)/1.3 var(--font-display); color: var(--on-accent); }
.ladder-place:not([data-p]) { color: var(--text); background: rgba(169, 167, 191, 0.25); }
.ladder-none { color: var(--muted); background: none; }
.ladder-place[data-p="4"], .ladder-place[data-p="5"], .ladder-place[data-p="6"] { color: #fff; }
.ladder-step:first-child .badge-tip { left: 0; transform: none; }
.ladder-step:last-child .badge-tip { left: auto; right: 0; transform: none; }
.ladder-step:hover .badge-tip, .ladder-step:focus .badge-tip { display: block; }

/* Boulder vs lead cards. */
.versus { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 40px; }
.vs-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); display: grid; gap: 10px; }
.vs-card h3 { margin: 0 0 4px; font-size: 1.3rem; }
.vs-row { position: relative; display: grid; grid-template-columns: 4.6em 1fr auto; align-items: center; gap: 10px; padding: 4px 6px; margin: 0 -6px; color: inherit; font: inherit; cursor: pointer; text-align: left; border: 0; border-radius: 8px; background: none; }
.vs-row:hover, .vs-row:focus { background: var(--bg-hover); }
.vs-label { font-weight: 500; }
.vs-track { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.vs-track i { display: block; height: 100%; border-radius: 999px; }
.vs-count { min-width: 5.5em; text-align: right; color: var(--muted); font-size: 0.9rem; }
.vs-count strong { color: var(--text); font: 700 1.2rem var(--font-display); }
.vs-card-wide .vs-row { grid-template-columns: minmax(8.5em, 11em) 1fr auto; }
.vs-label small { display: block; color: var(--muted); font-size: 0.75rem; }
.vs-count small { display: block; font-size: 0.75rem; }
.vs-row .badge-tip { left: 0; transform: none; }
.vs-row:hover .badge-tip, .vs-row:focus .badge-tip { display: block; }
.vs-note { margin: 0; color: var(--muted); font-size: 0.85rem; }

.vs-fast { position: relative; display: grid; gap: 2px; padding: 10px 12px; color: inherit; font: inherit; cursor: pointer; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: rgba(var(--accent-rgb), 0.08); }
.vs-fast:hover, .vs-fast:focus { border-color: var(--gold); }
.vs-fast small { color: var(--muted); }
.vs-fast strong { font: 700 1.9rem/1.1 var(--font-display); font-stretch: 125%; background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vs-fast .badge-tip { left: 0; transform: none; }
.vs-fast:hover .badge-tip, .vs-fast:focus .badge-tip { display: block; }

/* Athlete page tabs (Overview / Strengths / Results). */
/* The tabs are boxes like the cards below them: same border, corner radius and dark fill; the chosen one glows.
   On a phone they wrap into rows that fill the width (no sideways scrolling). */
.athlete-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.athlete-tabs button { flex: 0 0 auto; padding: 12px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); color: var(--muted); font: 600 0.95rem var(--font-body); cursor: pointer; white-space: nowrap; transition: border-color 0.2s, color 0.2s; }
.athlete-tabs button:hover { color: var(--text); border-color: rgba(var(--accent-rgb), 0.5); }
.athlete-tabs button[aria-selected="true"] { background: var(--glow); border-color: transparent; color: var(--on-accent); }
@media (max-width: 640px) {
  .athlete-tabs { gap: 6px; }
  .athlete-tabs button { flex: 1 1 auto; padding: 10px 8px; font-size: 0.85rem; }
}
.athlete-panel[hidden] { display: none; }

/* Phones: popups must stay on screen. Things in the left half anchor to their left
   edge, things in the right half to their right edge (the rest stay centered). */
@media (max-width: 640px) {
  .badge:nth-child(odd) .badge-tip { left: 0; right: auto; transform: none; }
  .badge:nth-child(even) .badge-tip { left: auto; right: 0; transform: none; }
  .top6-col:nth-child(-n+3) .top6-tip { left: 0; right: auto; transform: none; }
  .top6-col:nth-last-child(-n+3) .top6-tip { left: auto; right: 0; transform: none; }
  .ladder-step:nth-child(-n+2) .badge-tip { left: 0; right: auto; transform: none; }
  .ladder-step:nth-child(n+3) .badge-tip { left: auto; right: 0; transform: none; }
}

/* Phones: four ladder steps have to fit in the screen width. */
@media (max-width: 640px) {
  .ladder { gap: 6px; }
  .ladder-step { padding: 10px 4px; min-height: calc(110px + var(--step) * 30px); }
  .ladder-place, .ladder-none { min-width: 0; padding: 2px 8px; font-size: 1.1rem; }
  .ladder-step strong { font-size: 0.75rem; }
  .ladder-step small { font-size: 0.68rem; overflow-wrap: anywhere; }
}

.admin-refresh-all { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
/* Athletes page header: three labelled groups (Find in your list / Add an athlete / Updates), one spacing rhythm.
   Intro 16px to the first group, 24px between groups; inside a group the label sits 8px above, hints 6px below, the rest 12px. */
.ath-group { margin-top: 24px; }
#athletes > p.muted + .ath-group { margin-top: 16px; }
.ath-label { display: block; margin: 0 0 8px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
#athletes .ath-group:has(> * input:focus, > input:focus) .ath-label { color: var(--field-ring); }
#athletes .admin-filter, #athletes .admin-search { margin: 0; }
.ath-hint { margin: 6px 0 0; font-size: 0.875rem; }
.field-row > .ath-hint { margin: 0; }
#database { padding-bottom: 32px; }
#matches .ath-group + details.fold { margin-top: 24px; }
#matches > details.fold { margin-top: 8px; }
#matches h3 { margin: 32px 0 6px; }
/* Linked athletes: short one-line rows (name · member # · results · Unlink), like a table */
.linked-list { gap: 6px; }
.linked-list .admin-card { min-height: 52px; padding: 6px 6px 6px 16px; gap: 8px 16px; }
.linked-list .admin-card strong { font-size: 0.95rem; }
.linked-list .member-no, .linked-list .linked-count { font-size: 0.85rem; }
.linked-list .linked-count { min-width: 13ch; text-align: right; }
.linked-list .admin-card[hidden] { display: none; }
#matches .ath-group + details.fold, #matches .ath-group + .admin-list { margin-top: 24px; }
#matches .ath-group .admin-search { margin: 12px 0 0; }
/* "When to use this page" box at the top of an Admin page */
.how-to { margin: 16px 0 24px; padding: 16px 20px; border: 1px dashed rgba(var(--accent-rgb), .45); border-radius: var(--radius); font-size: 0.9375rem; line-height: 1.5; }
.how-to p { margin: 0 0 8px; }
.how-to ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.how-to b { color: var(--text); font-weight: 600; }
#athletes .ath-group .admin-matches { margin-top: 12px; }
#athletes .ath-group .add-many.fold { margin: 12px 0 0; }
.ath-updates { margin: 0 0 10px; font-size: 0.875rem; }
.ath-group .admin-refresh-all { margin: 0; }
#athletes .admin-refresh-all { margin: 0; }
#athletes > .photo-note-top { margin: 24px 0 0; }
#athletes > details.fold { margin: 8px 0 0; }
#athletes > .photo-note-top + details.fold { margin-top: 12px; }
#athletes > .admin-pills { margin-top: 24px; }

.top-pct { color: var(--gold); font-size: 0.85em; }
.ladder-step small.top-pct { font-weight: 600; }

/* Extra detail on the discipline cards and in the results list. */
.vs-stats { display: grid; gap: 4px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.vs-stats p { margin: 0; }
.vs-stats strong { color: var(--text); font: 700 1.15rem var(--font-display); }
.vs-stats h4 { margin: 0 0 4px; font: 600 0.95rem var(--font-body); color: var(--muted); }
.vs-stats small { margin-top: 4px; }
.vs-trend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pb-tag { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: var(--on-accent); background: var(--glow); }
.cell-detail { display: block; }

/* Team dashboard (Team_PlanetRock.html) */
.team-tiles { margin-top: 20px; }
.team-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.team-table th { text-align: left; font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.team-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.team-table tr:last-child td { border-bottom: 0; }
.team-table td a { color: var(--text); text-decoration: none; }
.team-table td a:hover { color: var(--gold); }
.team-table tr.is-quiet td { color: var(--muted); }
.team-athlete { display: flex; align-items: center; gap: 10px; }
a.athlete-team-link { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.filter-bar button small { opacity: 0.7; margin-left: 2px; }
.filter-bar button[aria-pressed="true"] small { color: inherit; }
#levels-disc { margin: 4px 0 6px; }
.ladder-place[data-time] { white-space: nowrap; min-width: 0; padding: 2px 8px; font-size: clamp(0.95rem, 3.2vw, 1.4rem); }
#levels-note { margin-top: 10px; }
#levels-note:empty { display: none; }

/* Gamified badges: tracks with Bronze → Diamond tiers (tier-0 = locked) */
.badge-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding: 18px 22px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.badge-total { display: grid; }
.badge-total strong { font: 700 2.6rem/1 var(--font-display); font-stretch: 125%; background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.badge-total span { color: var(--muted); font-size: 0.9rem; }
.tier-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tier-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-raised); font-size: 0.9rem; }
.tier-chip i { width: 14px; height: 14px; border-radius: 50%; background: var(--tier); border: 2px solid #0d0b24; box-shadow: 0 0 0 1px var(--tier), 0 0 8px var(--tier); }
.badge-group.fold { margin: 20px 0 0; }
.badge-group.fold > summary h2.fold-title { margin: 0; }
.badge-group.fold > .badge-row { padding: 14px; }
.track-row { margin-bottom: 8px; }
.tier-chip.tier-1, .track.tier-1, .level-pip.tier-1 { --tier: #b8bdd1; }
.tier-chip.tier-2, .track.tier-2, .level-pip.tier-2 { --tier: #4ade80; }
.tier-chip.tier-3, .track.tier-3, .level-pip.tier-3 { --tier: #2dd4bf; }
.tier-chip.tier-4, .track.tier-4, .level-pip.tier-4 { --tier: #60a5fa; }
.tier-chip.tier-5, .track.tier-5, .level-pip.tier-5 { --tier: #fbbf24; }
.tier-chip.tier-6, .track.tier-6, .level-pip.tier-6 { --tier: #fb923c; }
.tier-chip.tier-7, .track.tier-7, .level-pip.tier-7 { --tier: #f43f5e; }
.tier-chip.tier-8, .track.tier-8, .level-pip.tier-8 { --tier: #e879f9; }
.tier-chip.tier-9, .track.tier-9, .level-pip.tier-9 { --tier: #a78bfa; }
.tier-chip.tier-10, .track.tier-10, .level-pip.tier-10 { --tier: #fff3b0; }
.track.tier-0 { --tier: #4a4766; }
.track { border-color: color-mix(in srgb, var(--tier) 45%, var(--line)); }
.track .badge-medal { width: 56px; height: 56px; background: #0d0b24; border: 4px solid var(--tier); font-size: 1.5rem; box-shadow: 0 0 18px color-mix(in srgb, var(--tier) 60%, transparent), inset 0 0 10px rgba(0, 0, 0, 0.6); }
.track.tier-0 { opacity: 0.7; }
.track.tier-0 .badge-medal { box-shadow: none; }
.track.tier-0 .badge-medal { color: transparent; text-shadow: 0 0 0 #8a87a8; }
.track.tier-10 { box-shadow: 0 0 26px rgba(255, 243, 176, 0.3); }
.track-level { color: var(--muted); font-size: 0.75rem; }
.track .track-tier { color: var(--tier); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.track.tier-0 .track-tier { color: var(--muted); }
.track-bar { width: 100%; height: 8px; margin-top: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.track-bar i { display: block; height: 100%; border-radius: 999px; background: var(--tier); }
.track.tier-0 .track-bar i { background: var(--muted); }

/* "How badges work" explainer */
.badge-help.fold { margin: 14px 0 0; }
.badge-help.fold > :not(summary) { padding-left: 20px; padding-right: 20px; }
.badge-help ul { margin: 12px 0 14px; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.badge-help li strong { color: var(--text); }
.level-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.level-pip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-raised); font-size: 0.85rem; }
.level-pip i { width: 26px; height: 26px; display: grid; place-content: center; border-radius: 50%; background: #0d0b24; border: 3px solid var(--tier); font: 700 0.75rem var(--font-body); font-style: normal; color: var(--text); }
.level-pip small { margin-left: 4px; color: var(--muted); }
.level-legend-note { margin: 8px 0 0; font-size: 0.85rem; }
.link-button { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; cursor: pointer; text-decoration: underline; }
.inline-form { display: inline; margin: 0 0 0 4px; }
/* Teams you added: one chip each (name, region, × to stop watching) */
.watch-added { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.875rem; }
.watch-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 4px 0 12px; min-height: 32px; border: 1px solid var(--line); border-radius: 999px; background: rgba(var(--card-rgb), .6); }
.watch-chip button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.watch-chip button:hover, .watch-chip button:focus-visible { background: rgba(var(--ember-rgb), .2); color: var(--text); }
#watch-teams .ath-group { margin: 16px 0 24px; }
#watch-pills { margin: 0 0 10px; }
.admin-event textarea { width: 100%; box-sizing: border-box; }

/* Admin: the Sign out button sits at the top right of the page heading. */
.page-intro:has(.admin-logout) { position: relative; }
.admin-logout { position: absolute; top: 0; right: 0; margin: 0; }
.admin-logout .button { cursor: pointer; }
.admin-logout .button:hover { color: var(--text); border-color: var(--gold); }

/* ---- QE Rankings page and the athlete QE tab ---- */
.qe-search { min-width: 12rem; }
.qe-table { width: 100%; border-collapse: collapse; }
.qe-table th, .qe-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.qe-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.qe-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.qe-table .qe-rank { font: 700 1.1rem/1.2 var(--font-display); width: 3.5rem; }
.qe-table tr.is-ours { background: rgba(var(--accent-rgb), 0.07); }
.qe-table .cell-sub { display: block; font-size: 0.8rem; }
.status-tag.is-pr { border-color: rgba(var(--accent-rgb), 0.6); color: var(--gold); }
.status-tag.is-qualified { border-color: rgba(120, 220, 160, 0.6); color: #8de0b0; }
.qe-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qe-chip { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.78rem; background: var(--bg-raised); white-space: nowrap; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; }
.qe-chip b { color: var(--gold); }
.qe-chip i { font-style: normal; color: var(--muted); }
.qe-chip.is-dropped { opacity: 0.45; }
.qe-card { padding: 18px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); display: grid; gap: 8px; }
.qe-card h3 { margin: 0; font-size: 1.05rem; }
.qe-card .qe-big { font: 700 1.8rem/1.1 var(--font-display); font-stretch: 125%; background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 640px) { .qe-chip { max-width: 14rem; } }

/* Admin: reminder to upload a photo */
.photo-note { display: block; font-size: 0.8rem; color: var(--gold); }
.photo-note-top { padding: 12px 16px; border: 1px dashed rgba(var(--accent-rgb), 0.5); border-radius: var(--radius); color: var(--muted); }
.photo-note-top strong { color: var(--gold); }

/* Compare page (climber_compare.html; hidden from the menu until launch) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cmp-link { display: inline-block; margin-top: 10px; font-size: 0.9rem; color: var(--gold); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; }
.cmp-link:hover { border-color: var(--gold); background: var(--bg-hover); }
.cmp-picks { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-top: 32px; }
.cmp-pick { display: grid; gap: 4px; flex: 1; min-width: 200px; max-width: 320px; font-size: 0.85rem; }
.cmp-vs { padding-bottom: 12px; color: var(--muted); font: 600 0.9rem var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; }
.cmp-controls { display: grid; gap: 10px; margin-top: 24px; }
.cmp-note { margin: 10px 0 0; font-size: 0.9rem; max-width: 70ch; }
.cmp-empty { margin-top: 28px; }
.cmp-heads { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.cmp-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.cmp-head:hover { border-color: var(--gold); }
.cmp-head-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.cmp-remove { flex-shrink: 0; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--muted); font: 400 1.2rem/1 var(--font-body); cursor: pointer; }
.cmp-remove:hover, .cmp-remove:focus-visible { color: var(--text); border-color: var(--gold); background: var(--bg-hover); }
.cmp-head strong { font-size: 1.05rem; flex: 1; min-width: 0; }
.cmp-head .cmp-key { margin-left: 0; flex-shrink: 0; }
.cmp-h { margin: 40px 0 8px; font-size: 1.3rem; }
.cmp-sentence { margin: 0; font-size: 1.1rem; }
.cmp-sentence strong { color: var(--gold); }
.cmp-rows { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.cmp-event { display: grid; gap: 2px; min-width: 0; }
.cmp-event small { font-size: 0.8rem; }
.cmp-pair { display: grid; gap: 8px; }
.cmp-side { display: grid; grid-template-columns: 4.5em 1fr; align-items: center; gap: 8px; }
.cmp-who { font-size: 0.85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-bar { position: relative; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.cmp-track { flex: 1; height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; }
.cmp-track i { display: block; height: 100%; border-radius: 7px; background: var(--glow); opacity: 0.55; }
.cmp-bar-b .cmp-track i { background: linear-gradient(135deg, #7ff0d6 0%, #25b4c4 55%, #3a7bd5 100%); }
.cmp-bar-c .cmp-track i { background: linear-gradient(135deg, #d6b8ff 0%, #9a6be0 55%, #6a4bc4 100%); }
.cmp-val { min-width: 5.5em; font: 600 0.95rem var(--font-display); }
.cmp-side.is-ahead .cmp-track i { opacity: 1; box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.35); }
.cmp-side.is-ahead .cmp-bar-b .cmp-track i { box-shadow: 0 0 14px rgba(37, 180, 196, 0.4); }
.cmp-side.is-ahead .cmp-bar-c .cmp-track i { box-shadow: 0 0 14px rgba(154, 107, 224, 0.45); }
.cmp-tip { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 2; display: none; width: max-content; max-width: 260px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-hover); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); pointer-events: none; font-size: 0.85rem; line-height: 1.35; }
.cmp-bar:hover .cmp-tip, .cmp-bar:focus .cmp-tip { display: block; }
.cmp-table { width: 100%; max-width: 620px; margin-top: 14px; border-collapse: collapse; }
.cmp-table th, .cmp-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.cmp-table thead th { font: 600 0.95rem var(--font-display); }
.cmp-table tbody th { font-weight: 500; color: var(--muted); }
.cmp-table td { font: 600 1.1rem var(--font-display); color: var(--muted); }
.cmp-table td.is-edge { color: var(--gold); }
@media (max-width: 640px) {
  .cmp-picks { flex-direction: column; align-items: stretch; gap: 6px; }
  .cmp-pick { max-width: none; }
  .cmp-vs { padding: 0; text-align: center; }
  /* Name cards stay side by side on a phone, each one a compact avatar over the name. */
  .cmp-heads { gap: 8px; margin-top: 20px; }
  .cmp-head { position: relative; flex-direction: column; justify-content: flex-start; gap: 6px; padding: 10px 6px; text-align: center; }
  .cmp-head-link { flex: none; flex-direction: column; gap: 6px; }
  .cmp-remove { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; }
  .cmp-head .athlete-initials { width: 44px; height: 44px; font-size: 0.9rem; }
  .cmp-head strong { flex: none; font-size: 0.8rem; line-height: 1.2; overflow-wrap: anywhere; }
  .cmp-head .cmp-key { position: absolute; top: 10px; left: 10px; width: 8px; height: 8px; }
  .cmp-vs { display: none; }
  .cmp-row { grid-template-columns: 1fr; gap: 10px; }
}

/* Compare: timeline chart, levels, badges */
.cmp-h3 { margin: 28px 0 0; font-size: 1.05rem; }
.cmp-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 6px; margin-top: 14px; font-size: 0.9rem; }
.cmp-key { display: inline-block; width: 12px; height: 12px; margin-left: 12px; border-radius: 50%; }
.cmp-key:first-child { margin-left: 0; }
.cmp-key-c, .cmp-dot-c { background: linear-gradient(135deg, #d6b8ff, #9a6be0 55%, #6a4bc4); }
.cmp-key-a, .cmp-dot-a { background: linear-gradient(135deg, var(--gold), var(--ember) 60%, var(--magenta)); }
.cmp-key-b, .cmp-dot-b { background: linear-gradient(135deg, #7ff0d6, #25b4c4 55%, #3a7bd5); }
.cmp-chart-wrap { display: flex; gap: 8px; margin-top: 10px; }
.cmp-yaxis { position: relative; width: 3.2em; font-size: 0.75rem; color: var(--muted); }
.cmp-yaxis span { position: absolute; right: 0; transform: translateY(-50%); }
.cmp-yaxis span:nth-child(1) { top: 8%; }
.cmp-yaxis span:nth-child(2) { top: 50%; }
.cmp-yaxis span:nth-child(3) { top: 92%; }
.cmp-chart { position: relative; flex: 1; height: 260px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.cmp-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); }
.cmp-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cmp-line { fill: none; stroke-width: 2; stroke-linejoin: round; opacity: 0.7; }
.cmp-line-a { stroke: var(--gold); }
.cmp-line-b { stroke: #25b4c4; }
.cmp-line-c { stroke: #b48cf0; }
.cmp-dot { position: absolute; width: 16px; height: 16px; padding: 0; border: 2px solid var(--bg); border-radius: 50%; transform: translate(-50%, -50%); cursor: pointer; }
.cmp-dot-b { z-index: 1; }
.cmp-dot:hover, .cmp-dot:focus { z-index: 3; box-shadow: 0 0 0 3px rgba(237, 237, 243, 0.35); }
.cmp-dot .cmp-tip { bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); text-align: left; }
.cmp-dot.tip-left .cmp-tip { left: -8px; transform: none; }
.cmp-dot.tip-right .cmp-tip { left: auto; right: -8px; transform: none; }
.cmp-dot:hover .cmp-tip, .cmp-dot:focus .cmp-tip, .cmp-hover:hover .cmp-tip, .cmp-hover:focus .cmp-tip { display: block; }
.cmp-xaxis { display: flex; justify-content: space-between; margin: 6px 0 0 calc(3.2em + 8px); font-size: 0.75rem; color: var(--muted); }
.cmp-none { font-size: 0.9rem; }
.cmp-hover { position: relative; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.cmp-hover .cmp-tip { left: 0; font: 400 0.85rem var(--font-body); color: var(--text); text-align: left; }
@media (max-width: 640px) { .cmp-chart { height: 220px; } .cmp-yaxis { width: 2.6em; } .cmp-xaxis { margin-left: calc(2.6em + 8px); } }
.cmp-table td:last-child .cmp-tip { left: auto; right: 0; }

/* Compare: actions, roster button, notice, print */
.cmp-actions { margin-top: 16px; }
.cmp-notice { color: var(--gold); }
.cmp-add { padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-raised); color: var(--muted); font: inherit; font-size: 0.8rem; white-space: nowrap; cursor: pointer; }
.cmp-add:hover, .cmp-add:focus-visible { color: var(--text); border-color: var(--gold); }
.cmp-print-title { display: none; }
@media print {
  :root { --bg: #fff; --bg-raised: #f4f3fa; --bg-hover: #eceaf6; --text: var(--bg-raised); --muted: #555266; --line: rgba(var(--card-rgb), 0.2); }
  html, body { background: #fff !important; }
  body::before { display: none; }
  body.print-compare #site-header, body.print-compare #site-footer, body.print-compare .page-intro { display: none; }
  body.print-compare #team-body > :not(#team-compare) { display: none; }
  body.print-compare main { width: 100%; padding: 0; }
  body.print-compare main > section { margin-top: 0; }
  body.print-compare .cmp-picks, body.print-compare .cmp-controls, body.print-compare .cmp-actions, body.print-compare .cmp-remove,
  body.print-compare .cmp-notice, body.print-compare #team-compare > h2, body.print-compare #team-compare > p { display: none; }
  body.print-compare .cmp-print-title { display: block; margin: 0 0 12px; font: 700 1.3rem var(--font-display); color: var(--bg-raised); }
  body.print-compare .cmp-print-title span { font: 400 0.85rem var(--font-body); color: var(--muted); }
  body.print-compare .cmp-chart-wrap, body.print-compare .cmp-chart, body.print-compare .cmp-dot, body.print-compare .cmp-track i,
  body.print-compare .cmp-line, body.print-compare .cmp-key { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-compare .cmp-head, body.print-compare .cmp-row, body.print-compare .cmp-chart { background: #f4f3fa; }
  body.print-compare .cmp-track { background: rgba(var(--card-rgb), 0.12); }
  body.print-compare .cmp-row, body.print-compare .cmp-head, body.print-compare .cmp-chart-wrap, body.print-compare .cmp-table { break-inside: avoid; }
  body.print-compare .cmp-h { break-after: avoid; }
  body.print-compare .cmp-tip, body.print-compare .cmp-screen-only { display: none !important; }
  body.print-compare .cmp-sentence strong, body.print-compare .cmp-table td.is-edge { color: #b35a00; }
  body.print-compare .cmp-table td { color: #333; }
  body.print-compare .cmp-head-link { color: var(--bg-raised); }
}
@media (max-width: 640px) {
  /* On a phone the roster scrolls sideways; keep the Compare button pinned to the right edge. */
  .team-table .cmp-add-cell { position: sticky; right: 0; background: var(--bg-raised); box-shadow: -8px 0 8px -4px rgba(0, 0, 0, 0.5); padding-left: 8px; padding-right: 8px; }
}

/* Who's going: athletes registered with USA Climbing are checked by themselves and locked. */
.admin-check.is-registered { border-color: var(--gold); background: rgba(var(--accent-rgb), 0.12); cursor: default; }
.admin-check.is-registered input { cursor: default; }
.admin-check .status-tag { margin-left: 4px; }

/* Athlete page: "Upcoming events" with an optional finish range under each event. */
#athlete-upcoming { margin-top: 28px; }
#athlete-upcoming h2 { margin-bottom: 12px; }
.predict { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(237, 237, 243, 0.05); border: 1px solid var(--line); }
.predict strong { display: block; font: 700 1.05rem/1.3 var(--font-display); }
.predict small { display: block; margin-top: 4px; font-size: 0.8rem; line-height: 1.4; color: var(--muted); }

/* Fun forecast: a playful box under the real finish range. */
.fun { margin-top: 10px; padding: 12px 14px; border-radius: 10px; border: 1px dashed rgba(var(--accent-rgb), 0.55); background: rgba(var(--accent-rgb), 0.06); }
.fun-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fun-head strong { font: 700 1rem var(--font-display); }
.fun-tag { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.fun-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.fun-chip { border: 1px solid var(--line); background: none; color: var(--text); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.fun-chip small { color: var(--muted); }
.fun-chip:hover { background: var(--bg-hover); }
.fun-chip[aria-pressed="true"] { background: var(--glow); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.fun-chip[aria-pressed="true"] small { color: rgba(26, 13, 5, 0.7); }
.fun-result { margin: 4px 0 6px; font-size: 1.05rem; }
.fun-result strong { font: 700 1.1rem var(--font-display); }
.fun-vs { font-size: 0.82rem; color: var(--muted); }
.fun-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.fun-lines strong { color: var(--text); margin-right: 4px; }
.fun-lines em { font-size: 0.78rem; }
.fun-delta { font-weight: 600; white-space: nowrap; }
.fun-delta.is-up { color: #7ee2a8; }
.fun-delta.is-down { color: #ff9a76; }
.fun-delta.is-flat { color: var(--muted); }

/* Fun forecast: the "How?" breakdown under each chip, and the snack picker. */
.fun-why { display: inline; }
/* "How?" on a forecast chip: a small gold pill with a ▸ that turns, same as the phone "N events" pills. */
.fun-why summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .45); cursor: pointer; color: #ffd29b; font-size: 0.78rem; transition: background-color .15s, border-color .15s; }
.fun-why summary::-webkit-details-marker { display: none; }
.fun-why summary::after { content: "▸"; color: var(--gold); font-size: .7rem; transition: transform .3s cubic-bezier(.34, 1.8, .64, 1); }
.fun-why[open] summary::after { transform: rotate(90deg); }
.fun-why summary:hover { background: rgba(var(--accent-rgb), .18); border-color: var(--gold); }
.fun-why[open] summary { margin-top: 4px; }
.fun-why-body { margin: 6px 0 4px; padding: 8px 10px; border-left: 2px solid var(--gold); background: rgba(237, 237, 243, 0.04); border-radius: 0 8px 8px 0; font-size: 0.82rem; line-height: 1.45; }
.fun-why-body p { margin: 0 0 6px; }
.fun-why-body ul { margin: 0 0 6px; padding-left: 18px; }
.fun-why-body li { display: list-item; }
.fun-comps { margin-top: 2px; }
.fun-comps.fold { margin-top: 6px; }
.fun-comps ul { margin: 6px 0 0; padding-left: 18px; font-size: 0.78rem; color: var(--muted); }

/* Fun forecast: the odds tiles, the intro line and the typed temperature. */
.fun-intro { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted); }
.fun-odds { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 8px 0 10px; }
.fun-odd { display: grid; gap: 1px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(237, 237, 243, 0.04); }
.fun-odd span { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fun-odd strong { font: 700 1.5rem/1.1 var(--font-display); background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fun-odd small { font-size: 0.74rem; color: var(--muted); }
.fun-odd .is-up { color: #7ee2a8; font-weight: 600; }
.fun-odd .is-down { color: #ff9a76; font-weight: 600; }
.fun-degrees { white-space: nowrap; }
.fun-temp { width: 4.5em; }
.fun-fineprint { font-size: 0.74rem; color: var(--muted); }
.fun-odds[hidden] { display: none; }
.fun-base { margin: 8px 0 0; padding: 6px 10px; border-left: 2px solid var(--gold); background: rgba(237, 237, 243, 0.04); border-radius: 0 8px 8px 0; font-size: 0.84rem; color: var(--muted); }
.fun-base strong { color: var(--text); }
.fun-tip { display: block; margin: 1px 0 1px; color: var(--gold); font-style: italic; font-size: 0.8rem; }
.fun-claim { margin-left: 6px; font-style: normal; font-size: 0.78rem; color: var(--text); white-space: nowrap; cursor: pointer; }
.fun-claim input { accent-color: var(--gold); vertical-align: -2px; cursor: pointer; }
.fun-claim strong { color: #7ee2a8; }
.fun-bonus strong { color: #7ee2a8; }
.admin-athlete:focus-visible, #photos .admin-row:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* The photo menu under an athlete's round picture: choose a file, paste, or remove. */
.admin-photo-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: 250px; padding: 6px; display: grid; gap: 2px; text-align: left; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }
.admin-photo-menu[hidden] { display: none; }
.admin-photo-menu button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 0.88rem; text-align: left; cursor: pointer; }
.admin-photo-menu button:hover, .admin-photo-menu button:focus-visible { background: var(--bg-hover); outline: none; }
.admin-photo-menu button.is-danger { color: #ff8a65; }
/* Athlete card "More" menu: the rare actions (Update history, Move out, Remove) tucked away so the card keeps one button row */
.card-more { position: relative; }
.card-more > summary { list-style: none; }
.card-more > summary::-webkit-details-marker { display: none; }
.card-more[open] > summary { border-color: var(--gold); }
.card-more-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; min-width: 190px; padding: 6px; display: grid; gap: 2px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }
.card-more-menu form { margin: 0; }
.card-more-menu button { display: block; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; }
.card-more-menu button:hover, .card-more-menu button:focus-visible { background: var(--bg-hover); outline: none; }
.card-more-menu button.is-danger { color: #ff8a65; }

/* ---- Admin photo dialog (drop / paste, then crop) ------------------------ */
.photo-dialog { width: min(640px, 100% - 32px); max-height: 92vh; margin: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); color: var(--text); overflow: auto; }
.photo-dialog::backdrop { background: rgba(var(--shade-rgb), 0.7); backdrop-filter: blur(4px); }
.photo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.photo-head h2 { margin: 0; font-size: 1.1rem; }
.photo-close { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.photo-close:hover { background: var(--bg-hover); }
.photo-step { padding: 16px; }
.photo-step[hidden] { display: none; }
.photo-drop { display: grid; justify-items: center; gap: 8px; padding: 32px 16px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--text-dim, var(--text)); transition: border-color .15s, background .15s; }
.photo-drop strong { color: var(--text); font-size: 1.05rem; }
.photo-drop.is-over { border-color: var(--gold, #ffb84d); background: rgba(255, 184, 77, 0.08); box-shadow: 0 0 24px rgba(255, 184, 77, 0.25); }
.photo-cloud { color: var(--gold, #ffb84d); }
.photo-drop-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.photo-error { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: rgba(var(--ember-rgb), 0.15); color: #ff8a65; font-size: 0.88rem; }
.photo-error[hidden] { display: none; }
.photo-crop-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: center; }
.photo-stage { position: relative; flex: none; user-select: none; touch-action: none; background: #000; }
.photo-stage img { display: block; width: 100%; height: 100%; pointer-events: none; }
.photo-box { position: absolute; border: 2px solid var(--gold, #ffb84d); box-shadow: 0 0 0 9999px rgba(var(--shade-rgb), 0.6); cursor: move; touch-action: none; }
.photo-handle { position: absolute; width: 16px; height: 16px; background: var(--gold, #ffb84d); border-radius: 4px; }
.photo-handle[data-h=nw] { left: -9px; top: -9px; cursor: nwse-resize; }
.photo-handle[data-h=ne] { right: -9px; top: -9px; cursor: nesw-resize; }
.photo-handle[data-h=sw] { left: -9px; bottom: -9px; cursor: nesw-resize; }
.photo-handle[data-h=se] { right: -9px; bottom: -9px; cursor: nwse-resize; }
.photo-stage { overflow: hidden; }
.photo-preview { display: grid; justify-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-dim, var(--text)); }
.photo-preview-canvas { width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--line); }
.photo-preview p { margin: 0; }
.photo-hint { margin: 12px 0 0; font-size: 0.85rem; color: var(--text-dim, var(--text)); text-align: center; }
.photo-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.photo-spacer { flex: 1; }
.photo-remove { color: #ff8a65; }
.photo-step[data-step=pick] .photo-foot { margin-top: 12px; }

/* ---- Live results page (results.html) ------------------------------------ */
.results-meta { margin: 6px 0 0; color: var(--gold); font-size: 0.95rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: rgba(var(--ember-rgb), 0.18); border: 1px solid rgba(var(--ember-rgb), 0.6); color: #ff8a65; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: #ff5a36; box-shadow: 0 0 8px #ff5a36; animation: live-blink 1.4s ease-in-out infinite; }
@keyframes live-blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .live-pill i { animation: none; } }
.final-pill { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.results-warn { color: #ff8a65; }
.results-picker { display: grid; gap: 10px; margin: 24px 0 8px; }
.results-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.results-group-name { min-width: 4.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.results-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 12px; }
.results-round { margin: 0; }
.results-ours { padding: 4px 14px; font-size: 0.9rem; background: var(--bg-raised); cursor: pointer; }
.results-ours[aria-pressed="true"] { background: var(--glow); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.results-note { margin: 24px 0; padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.live-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); overflow: hidden; }
.live-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.live-table th { padding: 10px 14px; text-align: left; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.live-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.live-table tr:last-child td { border-bottom: 0; }
.live-table small { display: block; color: var(--muted); font-size: 0.78rem; }
.live-table .rank-col { width: 4.5rem; font: 700 1.05rem var(--font-display); font-stretch: 125%; color: var(--gold); }
.live-table th.rank-col { font: 600 0.72rem var(--font-body); font-stretch: normal; color: var(--muted); }
.live-table .score-col { text-align: right; white-space: nowrap; }
.live-table th.score-col { text-align: right; }
.live-table tr.is-ours td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.live-table tr.is-ours a { color: var(--gold); font-weight: 600; text-decoration: none; }
/* Boulder details on the live results page: tap a climber (or "Show details") for a box per boulder.
   Gold glow = a top that counts toward the score, outlined = a top that doesn't count, slash = tried
   but not topped, faint = not tried. The small number in a corner is the tries; a green dot = not confirmed yet. */
.live-table .details-link { display: block; margin: 4px 0 0 auto; padding: 4px 0 2px; border: 0; background: none; font: inherit; font-size: 0.78rem; color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.live-table .details-link:hover, .live-table .details-link:focus-visible { color: var(--text); }
.details-bar { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.results-toggles { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; justify-content: space-between; } /* its own line under the round: Planet Rock only at the left edge, Show details at the right */
.live-table tr.has-details { cursor: pointer; }
.live-table tr.has-details:hover td { background: var(--bg-hover); }
.live-table tr.is-open td { border-bottom-color: transparent; }
.live-table .details-row td { padding-top: 2px; }
.live-table .details-row.is-ours td { box-shadow: inset 3px 0 0 var(--gold); }
.boulder-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px 5px; max-width: 640px; }
@media (min-width: 700px) { .boulder-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.boulder { display: grid; justify-items: center; align-content: start; gap: 2px; }
.boulder b { position: relative; display: grid; place-content: center; width: 100%; aspect-ratio: 1.15; border-radius: 6px; border: 1px solid var(--line); background: rgba(237, 237, 243, 0.05); font: 600 0.62rem/1 var(--font-body); color: var(--text); font-variant-numeric: tabular-nums; }
.boulder i { font-style: normal; font-size: 0.68rem; line-height: 1; color: var(--muted); }
.boulder.is-top b { background: var(--bg-raised); border-color: rgba(var(--accent-rgb), 0.6); }
.boulder.is-counted b { background: var(--glow); border-color: transparent; color: var(--on-accent); }
.boulder.is-tried b { background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(237, 237, 243, 0.35) calc(50% - 1px), rgba(237, 237, 243, 0.35) calc(50% + 1px), transparent calc(50% + 1px)); color: var(--muted); }
.boulder sup { position: absolute; top: 2px; right: 3px; font-size: 0.55rem; line-height: 1; }
.boulder.is-unconfirmed::after, .boulder-dot { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #8de0b0; }
.boulder-sum { margin: 10px 0 2px; font-size: 0.82rem; color: var(--muted); }
.boulder-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 10px; font-size: 0.78rem; color: var(--muted); }
.boulder-key .boulder { width: 18px; }
.boulder-key .boulder b { aspect-ratio: 1; }
.boulder-key .key-item { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; white-space: nowrap; }
@media (max-width: 640px) { .live-table th, .live-table td { padding: 9px 10px; } .live-table .rank-col { width: 3rem; } }

/* The "Live" button label on an event card while the event is on. */
.event-body .event-results.is-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #b3200a; box-shadow: 0 0 6px #b3200a; vertical-align: 1px; }

/* The "Live now" banner at the top of the home page while an event is on. */
.live-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 20px 0 0; padding: 12px 18px; border: 1px solid rgba(var(--ember-rgb), 0.6); border-radius: var(--radius); background: linear-gradient(90deg, rgba(var(--ember-rgb), 0.2), rgba(var(--magenta-rgb), 0.15)); color: var(--text); text-decoration: none; box-shadow: 0 0 24px rgba(var(--ember-rgb), 0.25); }
.live-banner[hidden] { display: none; }
.live-banner span:last-child { margin-left: auto; color: var(--gold); font-weight: 600; }
.live-banner:hover { border-color: var(--gold); }

/* Finding a climber: the Planet Rock strip, the search box, and our climbers' rows. */
.pr-tag { display: inline-block; white-space: nowrap; flex: none; padding: 1px 9px; border-radius: 999px; background: var(--glow); color: var(--on-accent); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.our-strip { margin: 22px 0 6px; padding: 14px; border: 1px solid rgba(var(--accent-rgb), 0.45); border-radius: var(--radius); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.14), rgba(var(--magenta-rgb), 0.1)); }
.our-strip-title { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; }
.our-strip-title b { margin-left: auto; color: var(--gold); }
.our-strip .jump-list { margin-top: 8px; }
.jump-list { display: grid; }
.jump-head { margin: 14px 0 2px; padding: 0 2px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.jump-head small { margin-left: 6px; font-weight: 500; color: var(--muted); letter-spacing: 0.06em; }
.jump-head:first-child { margin-top: 4px; }
.jump-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 46px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.jump-row:last-child { border-bottom: 0; }
.jump-name { font-weight: 600; }
.jump-row.is-ours .jump-name { color: var(--gold); }
.jump-place { flex: none; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.jump-row:hover .jump-name, .jump-row:focus-visible .jump-name { text-decoration: underline; }
.results-find { display: block; width: 100%; margin: 16px 0 4px; }
.who { display: flex; align-items: center; gap: 10px; }
.who .athlete-initials-sm { flex: none; }
.who-name { display: block; font-weight: 700; color: var(--gold); text-decoration: none; }
.live-table tr.is-ours { background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-rgb), 0.07)); } /* one gradient across the whole row, not one per cell */
.live-table tr.is-ours .rank-col { color: var(--text); }
.live-table tr[data-athlete] { scroll-margin-top: 120px; }
.live-table tr.is-flash td { animation: row-flash 2.5s ease-out; }
@keyframes row-flash { 0%, 40% { background: rgba(var(--accent-rgb), 0.6); } }
@media (prefers-reduced-motion: reduce) { .live-table tr.is-flash td { animation: none; background: rgba(var(--accent-rgb), 0.4); } }

/* Phones are where this page is used: bigger tap targets, nothing wider than the screen. */
@media (max-width: 640px) {
  .results-picker .filter-bar button, .results-controls .filter-bar button { min-height: 40px; padding: 8px 14px; }
  .results-ours { min-height: 40px; }
  .live-table td { padding: 10px 8px; }
  .live-table .who { gap: 8px; }
  .live-table .score-col strong { font-size: 1.05rem; }
  .results-group-name { flex-basis: 100%; }
}

/* Move out dialog and the Former members list (admin, Athletes tab). */
.moveout-body { display: grid; gap: 14px; }
.moveout-reasons { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.moveout-reasons legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.moveout-reasons label, .moveout-body .admin-check { display: flex; align-items: center; gap: 8px; }
.moveout-field { display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.moveout-field[hidden] { display: none; }
.moveout-body p { margin: 0; font-size: 0.85rem; }
#athletes .admin-former { margin-top: 28px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.5); }
#athletes .admin-former h3 { margin: 0 0 4px; font-size: 1.05rem; }
#athletes .admin-former-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
#athletes .admin-former-row > span { flex: 1 1 240px; display: grid; gap: 2px; }
#athletes .admin-former-row form { margin: 0; }
#athletes .admin-former-date { display: flex; align-items: center; gap: 6px; }
.alumni-season { display: block; margin-top: 2px; font: 500 0.78rem var(--font-body); font-stretch: normal; letter-spacing: 0; text-transform: none; color: var(--muted); }
#athletes .admin-former-row .admin-photo-pick { width: 52px; height: 52px; }
#athletes .admin-former-row .admin-photo-badge { width: 20px; height: 20px; font-size: 0.8rem; }
#athletes .admin-former-photo { margin: 0; }

/* Alumni tab (admin) */
#alumni .admin-alumni-list { display: grid; gap: 12px; margin-top: 16px; }
#alumni .admin-alumnus { display: grid; grid-template-columns: 60px 1fr auto; gap: 8px 16px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
#alumni .admin-alumnus form { margin: 0; }
#alumni .admin-alumnus .admin-photo-pick { width: 60px; height: 60px; }
#alumni .admin-alumnus .athlete-initials { width: 60px; height: 60px; font-size: 1.1rem; }
#alumni .admin-alumnus-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 8px; }
#alumni .admin-alumnus-fields { display: flex; flex-wrap: wrap; gap: 10px 16px; }
#alumni .admin-alumnus-fields label { display: grid; gap: 4px; font-size: 0.8rem; color: var(--muted); }
#alumni .admin-alumnus-fields label[hidden] { display: none; }
#alumni .admin-alumnus-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
#athletes .admin-alumni-note { margin-top: 24px; }
@media (max-width: 720px) { #alumni .admin-alumnus { grid-template-columns: 60px 1fr; } #alumni .admin-alumnus-back { grid-column: 1 / -1; } }
#alumni .admin-alumnus-actions .admin-check { white-space: nowrap; }

.winners { margin: 22px 0 6px; padding: 14px; border: 1px solid rgba(var(--accent-rgb), 0.45); border-radius: var(--radius); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--magenta-rgb), 0.08)); }
.winners h2 { margin: 0 0 6px; font-size: 1.2rem; }
.winners-ours { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.winners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 10px; }
.winner-card { padding: 10px 12px 0; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.04); overflow: hidden; }
.winner-card h3 { margin: 0 0 6px; font-size: 0.85rem; color: var(--gold); letter-spacing: 0.04em; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; margin: 0 -12px; padding: 0 8px; }
.podium-col { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.podium-faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding-bottom: 6px; }
.podium .athlete-initials.athlete-initials-xs { width: 30px; height: 30px; font-size: 0.62rem; }
.podium .face.is-ours .athlete-initials { box-shadow: 0 0 0 2px var(--gold); }
.podium-step { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 8px; text-align: center; color: var(--on-accent); border-top: 3px solid rgba(255, 255, 255, 0.55); }
.podium-medal { font-size: 1.5rem; line-height: 1.1; }
.podium-step > b { font-size: 1.4rem; line-height: 1.1; }
.podium-person { display: flex; flex-direction: column; align-items: center; flex: 1; width: 100%; min-width: 0; gap: 1px; padding: 4px 0 0; border: 0; background: none; color: inherit; font: inherit; text-align: center; cursor: pointer; }
.podium-person:hover .pp-name, .podium-person:focus-visible .pp-name { text-decoration: underline; }
.pp-name { font-size: 0.78rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pp-team { display: block; max-width: 100%; font-size: 0.68rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.85; }
.pp-pts { margin-top: auto; padding-top: 6px; font-size: 0.78rem; font-weight: 700; }
.wp-1 .podium-step { min-height: 190px; background: linear-gradient(180deg, #ffd45a, #e8962a); border-radius: 6px 6px 0 0; }
.wp-2 .podium-step { min-height: 152px; background: linear-gradient(180deg, #e6e8f2, #9aa0b8); border-radius: 6px 0 0 0; }
.wp-3 .podium-step { min-height: 124px; background: linear-gradient(180deg, #e0a070, #a8622f); border-radius: 0 6px 0 0; }
.podium .athlete-initials { background: #3a2766; color: #fff; border: 2px solid #6b57a8; }
.podium .face.is-ours .athlete-initials { background: #4a2f6d; color: var(--gold); border-color: var(--gold); box-shadow: none; }
.podium-step.is-tie .pp-team { display: none; }
.podium-step.is-tie .podium-person { flex: none; padding-top: 6px; }
.podium-step.is-tie .pp-name { font-size: 0.72rem; }
.podium-step.is-tie .pp-pts { margin-top: 0; padding-top: 0; font-size: 0.72rem; }
.event-reg { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 10px 0 4px; }
.reg-line { font-size: 0.875rem; font-weight: 600; color: #fff; text-decoration: none; }
.reg-line b { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.reg-opens b { color: #5ff0c4; }
.reg-closes b { color: #ffb347; }
a.reg-line:hover, a.reg-line:focus-visible { text-decoration: underline; }
.event-title:has(+ p > .gym-waiver) { margin-bottom: 0; }
.event-body p:has(> .gym-waiver) { margin: 0 0 14px; line-height: 1.2; }
.reg-hotel b { color: #d2b8ff; }
.reg-hotel a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.event-reg + .event-reg { margin-top: 0; }
.admin-hotel { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; align-items: end; margin-top: 8px; }
.admin-hotel label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted, rgba(255, 255, 255, 0.7)); }
.admin-hotel input { width: 100%; box-sizing: border-box; }
/* The day panel beside the calendar is narrow: drop the date badge (the heading already says the day) and stack each card. */
.day-panel .event-card { padding: 14px; }
.day-panel .event-date { display: none; }
.day-panel .event-tags .event-countdown { margin-left: 0; flex-basis: 100%; }
.day-panel .event-reg { flex-direction: column; gap: 8px; margin: 12px 0 8px; }
.day-panel .reg-line b { display: block; margin-bottom: 1px; }
/* The format from the info sheet, as plain small text after the discipline tag, the same size as the date line. */
.event-tags span.event-format { padding: 0; border: 0; background: none; border-radius: 0; text-transform: none; letter-spacing: 0; font-size: 0.85rem; font-weight: 400; color: var(--muted); align-self: center; }
/* One climber fading out and the next fading in, in the same circle (home page hero). */
.orbs .has-photo a { transition: opacity 1s ease-in-out; }
.orbs .has-photo a.is-arriving { opacity: 0; z-index: 1; }
.orbs .has-photo a.is-arriving.is-in { opacity: 1; }
.orbs .has-photo a.is-leaving { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .orbs .has-photo a { transition: none; } }
/* The bubble cloud around the five circles (home page hero): smaller photo circles scattered wherever they fit. */
.orbs-wrap { position: relative; padding: 112px 0; }
.orbs-wrap .orbs { position: relative; z-index: 2; } /* the five big circles sit in front of the bubbles */
@media (max-width: 800px) { .orbs-wrap { padding: 72px 0 60px; } }
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble { position: absolute; border-radius: 50%; overflow: hidden; pointer-events: auto; background: #2a1f4a; opacity: 0.94; box-shadow: 0 0 0 2px rgba(237, 237, 243, 0.14), 0 6px 18px rgba(0, 0, 0, 0.4);
  animation: bubble-in 0.8s var(--in, 0s) backwards ease-out, bubble-drift var(--dur, 7s) var(--delay, 0s) infinite ease-in-out, bubble-size calc(var(--dur, 7s) * 1.3) calc(var(--delay, 0s) * 1.7) infinite ease-in-out; transition: transform 0.3s, box-shadow 0.3s; }
.bubble:hover { transform: scale(1.18); z-index: 4; box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.7), 0 8px 24px rgba(0, 0, 0, 0.5); animation-play-state: running, paused, paused; }
.bubble a { position: absolute; inset: 0; display: block; transition: opacity 1s ease-in-out; }
.bubble a.is-arriving { opacity: 0; z-index: 1; }
.bubble a.is-arriving.is-in { opacity: 1; }
.bubble a.is-leaving { opacity: 0; }
.bubble img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s; }
/* A hosted team's home page: no photos yet, so its climbers' initials fill the circles (js/home.js). */
.orb-initials { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--glow); color: var(--on-accent); font: 800 clamp(1.1rem, 3.2vw, 2rem) var(--font-display); font-stretch: 125%; }
.bubble .orb-initials { font-size: .8rem; }
.orbs a:has(.orb-initials), .bubble a:has(.orb-initials) { text-decoration: none; }
.orbs span:nth-child(even) .orb-initials, .bubble:nth-child(even) .orb-initials { background: var(--bg-raised); color: var(--gold); box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb), .55); }
.bubble img.is-loaded { opacity: 1; }
@keyframes bubble-in { from { opacity: 0; transform: scale(0.4); } }
@keyframes bubble-drift { 0%, 100% { translate: 0 0; } 50% { translate: var(--dx, 0px) var(--dy, -5px); } }
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } .bubble a { transition: none; } }
.bubble::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 2; background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.3), transparent 38%); } /* a soap-bubble glint */
.hero-actions { position: relative; z-index: 3; } /* the buttons stay in front of the bubble cloud, so they are always clickable */
/* The bubbles swell and shrink a little as they drift, each at its own pace, so the cloud is always gently changing. */
@keyframes bubble-size { 0%, 100% { scale: 0.84; } 50% { scale: 1.16; } }
.podium-col.is-empty { visibility: hidden; } /* nobody finished here (a tie above it): keep the room, so the winner stays in the middle, but show no empty step */

/* Event schedule: when climbing starts for each session, with the categories that climb then */
.event-schedule { margin: 0 0 12px; }
.sch-head { margin: 0 0 6px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold, #ffc24a); }
.sch-head span { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
.sch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sch-list { gap: 8px; }
.sch-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.3; }
.sch-cats { padding-top: 1px; }
.sch-times { flex: 0 0 auto; display: grid; gap: 1px; min-width: 8.4em; color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.sch-times i { display: inline-block; min-width: 4.1em; font-style: normal; font-weight: 500; font-size: 0.78rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.sch-times .sch-start { color: var(--gold, #ffc24a); }
.sch-times .sch-start i { color: var(--gold, #ffc24a); opacity: 0.8; }
.sch-cats { color: var(--text, #e9e6ff); font-size: 0.92rem; }
.sch-full.fold { margin: 8px 0 4px; }
.sch-session { margin-top: 8px; }
.sch-session h4 { margin: 0 0 4px; font-size: 0.85rem; color: #fff; }
.sch-session dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: 0.85rem; }
.sch-session dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.sch-session dd { margin: 0; }

/* "Other" drop-down in the top menu */
.nav-other { position: relative; }
.nav-other-button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.nav-other-button:hover, .nav-other-button[aria-expanded="true"] { color: var(--text); }
.nav-other-button[aria-current="page"] { color: var(--text); font-weight: 600; background: rgba(var(--accent-rgb), 0.14); box-shadow: inset 0 0 0 1.5px var(--gold); }
.nav-other-button svg { transition: transform 0.2s; }
.nav-other-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-other-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; min-width: 210px; max-width: calc(100vw - 16px); padding: 6px; display: grid; gap: 2px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); }
.nav-other-menu[hidden] { display: none; }
.nav-other-menu a { display: block; padding: 9px 12px; border-radius: 10px; white-space: nowrap; overflow-wrap: anywhere; }
@media (max-width: 420px) { .nav-other-menu a { white-space: normal; } }
.nav-other-menu a:hover { background: var(--bg-hover); }
.nav-other-menu a[aria-current="page"] { font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--gold); }
.sch-cat { white-space: nowrap; }

/* Up and down buttons on each gallery in the admin */
.admin-gallery-order { display: flex; gap: 6px; }
.admin-gallery-order form { margin: 0; }
.admin-gallery-order .button { line-height: 1; }
.admin-gallery-order .button:disabled { opacity: 0.3; cursor: default; }

/* File an appeal: a name box, then the matching climbers as links to USA Climbing's form */
.appeal-search { display: grid; gap: 6px; max-width: 460px; margin-top: 8px; font-weight: 500; }
.appeal-list { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; gap: 8px; max-width: 460px; }
.appeal-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--card-rgb), 0.7); color: var(--text); text-decoration: none; }
.appeal-list a:hover, .appeal-list a:focus-visible { border-color: var(--gold); background: rgba(var(--accent-rgb), 0.12); }
.appeal-list a span { color: var(--gold); font-size: 0.85rem; white-space: nowrap; }

/* Climbers in a round who have no score yet ("Pending"): listed at the bottom, a little dimmer */
.live-table tr.is-pending td { opacity: 0.6; }
.live-table tr.is-pending.is-ours td { opacity: 0.8; }

/* Lead and top rope details: one box per route (result, place on that route in brackets, route name) */
.route-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 6px; }
.route-box { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; line-height: 1.25; }
.route-box b { font-size: 1.05rem; }
.route-box em { font-style: normal; font-size: .85rem; opacity: .8; }
.route-box i { font-style: normal; font-size: .75rem; opacity: .65; }
.route-box.is-top { border-color: var(--gold, #f5b942); }

/* Lead / top rope: the score with its route boxes beside it, all on the right (like USA Climbing's page) */
.live-table .score-routes { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.live-table .score-routes .route-grid { padding: 0; justify-content: flex-end; flex-wrap: nowrap; }
.live-table .score-routes strong { order: 2; }
.live-table .score-routes .route-grid { order: 1; }
@media (max-width: 640px) {
  /* Phone, lead / top rope: like USA Climbing's page, one line per climber: rank, name, then the score and the
     routes (result, place, route) packed on the right with no boxes */
  .live-table.has-route-rows th.score-col { white-space: nowrap; }
  .live-table.has-route-rows td { padding-left: 6px; padding-right: 6px; }
  .live-table.has-route-rows td.score-col { padding-right: 8px; }
  .live-table.has-route-rows .score-routes { flex-wrap: nowrap; flex-direction: row; gap: 9px; }
  .live-table.has-route-rows .score-routes strong { order: 0; font-size: .95rem; }
  .live-table.has-route-rows .score-routes .route-grid { order: 1; gap: 0; padding: 0; flex-wrap: nowrap; }
  .live-table.has-route-rows .route-box { min-width: 2.1rem; padding: 0 1px; border: 0; border-radius: 0; }
  .live-table.has-route-rows .route-box b { font-size: .78rem; }
  .live-table.has-route-rows .route-box em, .live-table.has-route-rows .route-box i { font-size: .68rem; }
  .live-table.has-route-rows tbody td:nth-child(2) small { display: none; } /* the team name would squeeze the row; it is on the desktop view */
  .live-table.has-route-rows .who > a { display: none; } /* the little photo */
  .live-table.has-route-rows td { padding-left: 4px; padding-right: 4px; }
  .live-table.has-route-rows .rank-col { width: 1.2rem; padding-left: 12px; }
  .live-table.has-route-rows td:nth-child(2) { width: 100%; }
  .live-table.has-route-rows .who-name, .live-table.has-route-rows td:nth-child(2) { font-size: .9rem; overflow-wrap: anywhere; }
  .live-table.has-route-rows .route-box { min-width: 1.7rem; margin: 0 1px; padding: 0; }
}

/* Lead / top rope: a TOP is gold, like the Planet Rock colour */
.route-box.is-top b { color: var(--gold); }
@media (max-width: 640px) {
  /* a faint line between the routes (the boxes have no borders on phones) */
  .live-table.has-route-rows .route-box + .route-box { border-left: 1px solid var(--line); }
}

/* ---- Event card (v2): date chip with the Results button under it, the climbing times as the big numbers ----
   Quiet by design: white for what matters, grey for the rest, gold only for the times, the countdown and Results. */
.event-card.card-v2 { display: block; padding: 16px; }
.card-v2 .event-body { display: block; }
.card-v2 .ec-head { display: flex; gap: 14px; align-items: flex-start; }
.card-v2 .ec-lead { flex: none; width: 62px; display: flex; flex-direction: column; gap: 10px; }
.card-v2 .event-date { width: 62px; height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; line-height: 1; }
.card-v2 .event-date span { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; }
.card-v2 .event-date strong { margin-top: 2px; font: 700 1.6rem/1 var(--font-display); }
.card-v2 .event-date em { margin-top: 3px; font-style: normal; font-size: 0.66rem; font-weight: 500; white-space: nowrap; }
.day-panel .card-v2 .event-date { display: flex; }
.card-v2 .event-body .event-results { display: block; width: 62px; box-sizing: border-box; padding: 13px 0; border-radius: 12px; text-align: center; background: linear-gradient(135deg, #ffc24a 0%, var(--gold) 50%, var(--ember) 100%); color: var(--on-accent); font-size: 0.85rem; font-weight: 700; letter-spacing: 0; box-shadow: none; white-space: nowrap; }
.card-v2 .event-body .event-results::after { display: none; }
.card-v2 .event-body .event-results:hover, .card-v2 .event-body .event-results:focus-visible { transform: none; box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.45); }
.card-v2 .ec-main { flex: 1; min-width: 0; }
.card-v2 .event-tags { align-items: center; margin-bottom: 6px; }
.card-v2 .event-tags span:not(:first-child) { padding: 0; border: 0; border-radius: 0; background: none; font-size: 0.8rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.card-v2 .event-tags .event-countdown, .day-panel .card-v2 .event-tags .event-countdown { flex-basis: auto; margin-left: 0; gap: 4px; font-size: 0.8rem; font-weight: 500; color: var(--gold); }
.card-v2 .event-countdown b { font-size: 0.95rem; }
.card-v2 .event-body h3 { font-size: 1.25rem; line-height: 1.2; }
.card-v2 .event-body .event-meta { margin: 3px 0 0; font-size: 0.85rem; color: var(--muted); }

/* sessions: the climbing time big on the left; name, check-in and categories beside it */
.card-v2 .event-schedule { margin-top: 16px; }
.card-v2 .sch-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); column-gap: 28px; border-bottom: 1px solid var(--line); }
.card-v2 .sch-row { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.card-v2 .sch-time { flex: none; width: 92px; }
.card-v2 .sch-time b { display: block; font: 600 1.5rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--gold); }
.card-v2 .sch-time span { font-size: 0.75rem; color: var(--muted); }
.card-v2 .sch-info strong { display: block; font-weight: 500; color: var(--text); }
.card-v2 .sch-info > span { display: block; font-size: 0.82rem; color: var(--muted); }
.card-v2 .sch-info .sch-cats { margin-top: 4px; }
.card-v2 .sch-note { margin: 8px 0 0; font-size: 0.75rem; color: var(--muted); }

/* one quiet row of registration state and links; the team hotel and who's going below it */
.card-v2 .event-body .event-links { margin-top: 12px; gap: 4px 14px; font-size: 0.85rem; color: var(--muted); }
.card-v2 .event-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.card-v2 .event-links a:hover, .card-v2 .event-links a:focus-visible { color: var(--text); }
.card-v2 .event-reg { margin: 8px 0 0; }
.card-v2 .reg-line { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.card-v2 .reg-line b, .card-v2 .reg-hotel b { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.07em; color: var(--muted); }
.card-v2 .reg-hotel a { color: var(--text); }

/* Admin > Teams: one team's roster per page, with a row of team links above */
.team-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.team-nav a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; }
.team-nav a:hover { color: var(--text); background: var(--bg-hover); }
.team-nav a.is-active { color: var(--text); border-color: var(--gold); background: rgba(var(--accent-rgb), 0.12); }
.team-page[hidden], .team-table tbody tr[hidden] { display: none; }
.team-page h3 { margin: 22px 0 4px; }
.team-events { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 14px; padding: 0; list-style: none; font-size: 0.9rem; }
.team-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.team-table th { padding: 8px 12px; text-align: left; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.team-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.team-events li.is-last-season { opacity: 0.65; }
/* Admin > Teams: season tags, one line each with a dot (Last season orange, Both grey, New green). */
.season-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); background: rgba(237, 237, 243, .06); }
.season-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.season-tag.is-last { color: var(--gold); background: rgba(var(--accent-rgb), .12); }
.season-tag.is-new { color: #5fd3a0; background: rgba(95, 211, 160, .12); }
/* Admin > Teams on a phone: each climber is a small card, not a table row */
.team-events-wrap { margin-top: 10px; }
.team-ev-cell .ev-more { display: none; }
@media (max-width: 640px) {
  .team-table, .team-table tbody, .team-table tr, .team-table td { display: block; }
  .team-table thead { display: none; }
  .team-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .team-table tr[hidden] { display: none; }
  .team-table td { padding: 2px 0; border: 0; }
  .team-table td:nth-child(1) { font-size: 1.05rem; }
  .team-table td:nth-child(2), .team-table td:nth-child(3) { display: inline-block; margin-right: 10px; vertical-align: middle; }
  .team-table td:nth-child(5) { display: none; }
  .team-ev-cell .ev-full { display: none; }
  .team-ev-cell .ev-more { display: block; margin-top: 4px; font-size: 0.88rem; }
  .team-ev-cell .ev-more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .45); color: #ffd29b; transition: background-color .15s, border-color .15s; }
  .team-ev-cell .ev-more summary::-webkit-details-marker { display: none; }
  .team-ev-cell .ev-more summary::after { content: "▸"; color: var(--gold); font-size: .75rem; transition: transform .3s cubic-bezier(.34, 1.8, .64, 1); }
  .team-ev-cell .ev-more[open] summary::after { transform: rotate(90deg); }
  .team-ev-cell .ev-more summary:hover { background: rgba(var(--accent-rgb), .18); border-color: var(--gold); }
  .team-ev-cell .ev-more[open] summary { margin-bottom: 4px; }
}

/* Who's registered page */
#registered .results-meta { margin: 6px 0 0; }
.reg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 18px 0 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.reg-stats div { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px; background: var(--bg-raised); }
.reg-stats b { font: 800 1.6rem/1 var(--font-display); font-stretch: 125%; }
.reg-stats .is-ours b { color: var(--gold); }
.reg-stats span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
#registered .results-picker { margin: 4px 0 20px; }
.reg-grid { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.reg-grid .reg-wide { grid-column: 1 / -1; }
.reg-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); overflow: hidden; }
.reg-card.has-ours { border-color: rgba(var(--accent-rgb), 0.45); }
.reg-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.reg-card h2 { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: 1.15rem; }
.reg-card h2 small { font: 600 0.7rem var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.reg-count { display: inline-flex; align-items: center; gap: 6px; font: 700 0.85rem var(--font-body); color: var(--muted); }
.reg-count b { padding: 1px 8px; border-radius: 999px; background: var(--glow); color: var(--on-accent); font-size: 0.72rem; }
.reg-list { list-style: none; margin: 0; padding: 0; }
.reg-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.93rem; }
.reg-list li:last-child { border-bottom: 0; }
.reg-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.reg-team { flex: 0 1 38%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 0.78rem; color: var(--muted); }
.reg-list li.is-ours { background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.05)); box-shadow: inset 3px 0 0 var(--gold); }
.reg-list li.is-ours .reg-name, .reg-list li.is-ours .reg-name a { color: var(--gold); font-weight: 600; text-decoration: none; }
.reg-list li.is-ours .reg-team { flex: none; color: var(--gold); font-weight: 700; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 640px) { .reg-grid { grid-template-columns: 1fr; } .reg-stats div { flex-direction: column; gap: 4px; padding: 10px 12px; } }
.reg-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.reg-card.is-collapsible header { padding: 0; }
.reg-card.is-collapsible .reg-toggle { padding: 12px 16px; min-height: 48px; }
.reg-card.is-collapsible .reg-toggle:hover { background: var(--bg-hover); }
.reg-card.is-closed header { border-bottom: 0; }
.reg-count i { font-style: normal; margin-left: 4px; color: var(--gold); }
.reg-expand { display: flex; justify-content: flex-start; gap: 14px; margin: 6px 0 0 2px; }
.reg-expand button { padding: 6px 2px; border: 0; background: none; color: var(--gold); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.reg-expand button:hover, .reg-expand button:focus-visible { color: var(--text); }
/* smaller age-group chips so the whole row shows */
#registered .results-picker .filter-bar { gap: 5px; }
#registered .results-picker .filter-bar button { padding: 3px 10px; font-size: 0.8rem; min-height: 0; }
#registered .results-picker .filter-bar button small { font-size: 0.7rem; }
#registered .results-group { gap: 4px 8px; }
#registered .results-group-name { min-width: 0; }
@media (max-width: 640px) { #registered .results-picker .filter-bar button { min-height: 0; padding: 4px 9px; } }
.reg-expand[hidden] { display: none; }
/* age-group headers stand out from the names below */
.reg-card header { background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.2), rgba(var(--magenta-rgb), 0.14) 55%, rgba(255, 255, 255, 0.04)); border-bottom-color: rgba(var(--accent-rgb), 0.35); position: relative; }
.reg-card h2 { font-size: 1.35rem; }
.reg-card h2 small { color: var(--text); opacity: 0.7; }
.reg-count { font-size: 1rem; color: var(--text); }
.reg-count i { font-size: 1.05rem; margin-left: 6px; }
.reg-card.is-collapsible .reg-toggle:hover { background: rgba(255, 255, 255, 0.05); }
/* "Who's registered", under the event name on every event card */
.event-body .event-reg-link { margin: 3px 0 0; font-size: 0.85rem; line-height: 1.3; }
.event-body .event-reg-link a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.event-body .event-reg-link a:hover, .event-body .event-reg-link a:focus-visible { color: var(--text); }

/* The Results button when the event is close or on: a soft pulsing glow, and a pulsing dot in the corner */
.card-v2 .event-body .event-results.is-live { position: relative; overflow: visible; animation: results-glow 2s ease-in-out infinite; }
.card-v2 .event-body .event-results.is-live::before { content: ""; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; margin: 0; border-radius: 50%; background: #ff3b1f; border: 2px solid var(--on-accent); box-shadow: 0 0 8px #ff3b1f; vertical-align: baseline; animation: results-dot 1.4s ease-in-out infinite; }
@keyframes results-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55), 0 0 10px rgba(var(--accent-rgb), 0.35); } 50% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0), 0 0 22px rgba(var(--accent-rgb), 0.75); } }
@keyframes results-dot { 50% { transform: scale(0.65); opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .card-v2 .event-body .event-results.is-live, .card-v2 .event-body .event-results.is-live::before { animation: none; } }
.live-table .start-order { display: block; opacity: 0.85; }
.move { display: inline-block; margin-right: 6px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.move.is-up { color: #4ade80; }
.move.is-down { color: #f87171; }
.live-table .rank-col .move { display: block; margin: 2px 0 0; font-size: 0.7rem; }
/* live results: "Show all" cards reuse the registrations cards */
.results-cards { display: grid; gap: 12px; margin-top: 10px; }
.results-card .live-wrap { border: 0; border-radius: 0; background: none; }
.reg-count em { font-style: normal; font-weight: 600; font-size: 0.78rem; color: var(--muted); }
.results-controls .reg-expand { margin: 0; }

.region-filter { margin: 0 0 12px; gap: 4px; }
.region-filter button { padding: 3px 11px; font-size: 0.82rem; color: var(--muted); background: none; cursor: pointer; }
.region-filter button:hover { color: var(--text); }
.region-filter button[aria-pressed="true"] { color: var(--text); font-weight: 600; background: rgba(var(--accent-rgb), 0.14); border-color: var(--gold); }
.upcoming-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 18px; margin: 0 0 8px; }
.upcoming-head h2 { margin: 0; }
.upcoming-head .region-filter { margin: 0; }

/* Account page (hidden while we test) */
.account-box { max-width: 460px; padding: 22px; display: grid; gap: 14px; }
.account-box p { margin: 0; }
.account-field { display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.account-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.account-check input { margin-top: 3px; }
.account-note { min-height: 1.3em; font-size: 0.9rem; color: var(--gold); }
.event-body .event-reg-link .save-event { margin-left: 14px; }
.event-body .event-reg-link [hidden] { display: none; }
.my-events-gone { padding-left: 18px; }
.my-events-gone li { margin: 6px 0; }
.my-events-gone a { margin-left: 10px; color: var(--gold); }

/* Small confirmation message ("Saved to My Events") */
#site-toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--gold); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 0.95rem; transition: opacity 0.2s, transform 0.2s; max-width: calc(100vw - 32px); }
#site-toast.is-showing { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#site-toast a { margin-left: 8px; color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Team roster rows: name, a form badge on the right, and a line of stats underneath. */
.reg-list li.team-row { flex-wrap: wrap; row-gap: 3px; padding: 10px 16px; }
.team-form { flex: none; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted, #b8b3d4); }
.team-form-rising { color: #6fe3a0; }
.team-form-cooling { color: #ff9f7a; }
.team-stats { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 0.8rem; color: var(--muted, #b8b3d4); }
.team-stats small { opacity: 0.8; font-size: inherit; }
.team-stats .place-1, .team-stats .place-2, .team-stats .place-3 { padding: 0 7px; }

/* "What's New" tab on the home page: it hangs from the header's bottom border line, flat on top, rounded below. */
.whats-new { position: sticky; top: var(--header-h, 56px); z-index: 9; display: flex; align-items: flex-start; justify-content: flex-end; width: var(--page); margin: 0 auto; height: 0; } /* sticky: stays hung from the header line while the page scrolls; z-index 9 keeps it under the header (10) */
.whats-new-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 18px 9px; margin-right: 4px; border: 1px solid rgba(var(--accent-rgb), 0.5); border-top: 0; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.22), rgba(var(--card-rgb), 0.96) 70%); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; box-shadow: 0 8px 22px rgba(var(--ember-rgb), 0.18); transition: box-shadow 0.2s, border-color 0.2s, padding 0.2s; }
.whats-new-pill:hover, .whats-new-pill:focus-visible, .whats-new.is-open .whats-new-pill { border-color: var(--gold); box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.38); padding-bottom: 12px; }
.whats-new-spark { color: var(--gold); }
.whats-new-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px var(--ember); animation: whats-new-pulse 1.8s ease-in-out infinite; }
@keyframes whats-new-pulse { 50% { transform: scale(1.35); opacity: 0.75; } }
.whats-new-panel { position: absolute; top: 38px; right: 0; width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow: auto; padding: 18px 18px 8px; border-radius: 18px; border: 1px solid rgba(var(--accent-rgb), 0.45); background: linear-gradient(160deg, rgba(40, 28, 70, 0.97), rgba(15, 12, 38, 0.98)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(var(--ember-rgb), 0.18); transform-origin: top right; animation: whats-new-open 0.22s ease-out; }
.whats-new-panel[hidden] { display: none; }
@keyframes whats-new-open { from { opacity: 0; transform: translateY(-8px) scale(0.97); } }
.whats-new-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.whats-new-head h2 { margin: 0; font-size: 1.15rem; }
.whats-new-close { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.07); color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.whats-new-close:hover { background: rgba(255, 255, 255, 0.14); }
.whats-new-list { list-style: none; margin: 0; padding: 0; }
.whats-new-list li { display: grid; gap: 3px; padding: 12px 0 14px 16px; position: relative; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 0.9rem; color: var(--muted); }
.whats-new-list li::before { content: ""; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--glow); }
.whats-new-list strong { color: var(--text); font-size: 1rem; }
/* An update with a picture: a small thumbnail on the left, the words beside it. */
.whats-new-list li.has-image { grid-template-columns: 72px 1fr; column-gap: 12px; align-items: start; }
.whats-new-list li.has-image > :not(.whats-new-thumb) { grid-column: 2; }
.whats-new-thumb { grid-column: 1; grid-row: 1 / span 4; width: 72px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.12); }
.whats-new-date { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.whats-new-list a { color: var(--gold); font-weight: 600; text-decoration: none; justify-self: start; }
.whats-new-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .whats-new-dot, .whats-new-panel { animation: none; } }

/* Team roster cards slide open and shut: the height eases between 0 and its natural size, and the names fade in one after another. */
.reg-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reg-card.is-closed .reg-body { grid-template-rows: 0fr; }
.reg-body-inner { overflow: hidden; min-height: 0; }
.reg-body .reg-list li { transition: opacity 0.3s ease, transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reg-card.is-closed .reg-body .reg-list li { opacity: 0; transform: translateY(-8px); transition-duration: 0.15s; }
.reg-body .reg-list li:nth-child(2) { transition-delay: 0.03s; } .reg-body .reg-list li:nth-child(3) { transition-delay: 0.06s; }
.reg-body .reg-list li:nth-child(4) { transition-delay: 0.09s; } .reg-body .reg-list li:nth-child(5) { transition-delay: 0.12s; }
.reg-body .reg-list li:nth-child(n+6) { transition-delay: 0.15s; }
.reg-card.is-closed .reg-body .reg-list li { transition-delay: 0s; }
.reg-chevron { display: inline-block; margin-left: 8px; font-style: normal; transition: transform 0.3s ease; }
.reg-card.is-closed .reg-chevron { transform: rotate(-90deg); }
.reg-card header { transition: border-color 0.3s; }
@media (prefers-reduced-motion: reduce) { .reg-body, .reg-body .reg-list li, .reg-chevron { transition: none; } }

/* On the Who's registered page, a climber's name and team link to the team's page. */
.reg-list li:not(.is-ours) .reg-name a, .reg-list li .reg-team a { color: inherit; text-decoration: none; }
.reg-list li:not(.is-ours) .reg-name a:hover, .reg-list li .reg-team a:hover, .reg-list li .reg-name a:focus-visible, .reg-list li .reg-team a:focus-visible { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* "Head Coach: Name" line under a team page title. */
.head-coach { margin: calc(-0.42 * clamp(2.2rem, 6vw, 4rem)) 0 10px; /* pulls it up into the heading's own bottom margin, so it sits right under the title */ font-size: 1.02rem; font-weight: 600; color: var(--text); }
.head-coach span { margin-right: 4px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }

/* Planet Rock Athletes page: the intro sentence stays on one line, and the search box sits close under it. */
#athletes .lede { max-width: none; margin-bottom: 0; }
#athletes + section { margin-top: 18px; }
#athletes + section .athlete-filter { margin-top: 0; }

/* Planet Rock Athletes roster: a row is a link with the photo flush left (curved corner, as on the old cards), the name and stats, and the career badge count. */
.reg-list li.ath-item { padding: 0; display: block; }
.ath-row { display: flex; align-items: stretch; gap: 14px; min-height: 76px; padding-right: 14px; color: inherit; text-decoration: none; }
.ath-row:hover { background: var(--bg-hover); }
.ath-photo { width: 76px; flex: none; align-self: stretch; margin: 3px 0; border-top-right-radius: 6px; font-size: 1.25rem; } /* the small margin keeps photos from touching each other and the group header */
.ath-who { flex: 1; min-width: 0; display: grid; gap: 3px; align-content: center; padding: 8px 0; }
.ath-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ath-name b { font-weight: 600; }
.ath-row:hover .ath-name b { color: var(--gold); }
.ath-row .team-stats { flex-basis: auto; }
.badge-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border: 1px solid rgba(var(--accent-rgb), 0.45); border-radius: 999px; font-size: 0.72rem; font-weight: 600; color: var(--gold); white-space: nowrap; }
@media (max-width: 640px) { .ath-photo { width: 64px; } .ath-row { gap: 12px; min-height: 70px; } }

/* QE rank chip and "Next: event" line on the roster rows. */
.qe-cell { display: grid; gap: 1px; line-height: 1.3; }
.qe-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qe-line { white-space: nowrap; color: var(--muted); }
.qe-line b { font-weight: 600; color: var(--text); }
.ath-next { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ath-next b { margin-right: 4px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }

/* The stats fill the width of the row in five columns: Latest, Best, Podiums, QE rank, Badges. An empty cell stays in place so the columns line up; phones wrap them two to a line. */
.ath-stats { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.5fr) 92px; gap: 2px 16px; align-items: center; font-size: 0.8rem; color: var(--muted); }
.ath-stats > span { min-width: 0; }
.ath-stats .ath-none { grid-column: 1 / 3; }
.ath-c-best > .ath-pod { display: block; margin-top: 1px; }
.ath-stats small { color: var(--muted); font-size: inherit; }
.ath-stats > span:last-child { justify-self: end; }
/* Phones: every row has the same fixed structure, so the same thing is always in the same place:
   line 1 Latest, Best and podiums; line 2 QE rank on the left and the badge chip on the right. */
.ath-c-main { display: contents; }
@media (max-width: 760px) {
  .ath-stats { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: start; }
  .ath-c-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; grid-column: 1 / -1; }
  .ath-c-main > span:empty { display: none; }
  .ath-c-best { display: contents; }          /* Best and the podium count flow along the same line */
  .ath-c-best > .ath-pod { display: inline; margin: 0; }
  .ath-stats .ath-none { grid-column: 1 / -1; }
  .ath-c-qe { grid-column: 1; }
  .ath-c-badges { grid-column: 2; justify-self: end; align-self: start; }
  .ath-stats > span:empty { display: none; }
  .team-form { font-size: 0.7rem; }
}
/* On phones the What's New tab scrolls away with the page: stuck under a tall two-line header it covered the rows. */
@media (max-width: 760px) {
  .whats-new { position: relative; top: auto; height: auto; margin: 10px auto 0; }
  .whats-new-pill { margin-right: 0; border-top: 1px solid rgba(var(--accent-rgb), 0.5); border-radius: 999px; padding: 6px 16px; background: rgba(var(--card-rgb), 0.9); }
  .whats-new-panel { top: calc(100% + 6px); }
}

/* The gold bar on a group header is its own element, held back from the card's rounded corners, so it never tapers to a point. */
.reg-card header::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--gold); z-index: 1; pointer-events: none; }
.reg-card.is-closed header::before { bottom: 10px; }

/* Admin: the Instagram handle box on an athlete's card. */
.admin-insta { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; flex-wrap: wrap; }
.admin-insta label { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); }
.admin-insta input { width: 15ch; }

/* Instagram handle under a climber's name on the Team page. */
.ath-ig { justify-self: start; font-size: 0.8rem; font-weight: 500; color: var(--gold); cursor: pointer; }
.ath-ig:hover, .ath-ig:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* Admin Athletes: filter pills (same look as the Teams pills) and a heading per age group. */
.admin-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 14px; }
.admin-pills button { padding: 6px 14px; font: inherit; font-weight: 500; font-size: 0.9rem; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.admin-pills button:hover { color: var(--text); background: var(--bg-hover); }
.admin-pills button[aria-pressed="true"] { color: var(--text); border-color: var(--gold); background: rgba(var(--accent-rgb), 0.12); }
.admin-pills-sep { width: 1px; height: 22px; margin: 0 4px; background: var(--line); }
.admin-group { margin: 0 0 22px; }
.admin-group-head { margin: 0 0 10px; font-size: 1.05rem; }
.admin-group-head .muted { font-size: 0.85rem; font-weight: 400; }

/* Admin: Instagram CSV box. */
.admin-insta-csv { margin: 14px 0; }
.admin-insta-csv textarea, .admin-insta-paste textarea { display: block; width: 100%; box-sizing: border-box; margin: 0 0 10px; }
.admin-insta-csv-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 10px 0; }
.admin-insta-csv-row form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-insta-paste { margin-top: 8px; } .admin-insta-paste textarea { display: block; width: 100%; max-width: 640px; margin: 8px 0; }
/* On the Alumni cards the handle sits inside the name heading: use the body font, on its own line. */
.athlete-card h2 .ath-ig { display: block; margin-top: 2px; font-family: var(--font-body); font-stretch: normal; letter-spacing: 0; text-transform: none; }

.team-form-onfire { color: var(--gold); }

.admin-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* A form label per discipline: the discipline in small type after the label. */
.team-form small { margin-left: 3px; font-size: 0.85em; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: 0.8; }
.ath-name { gap: 2px 12px; }

/* Admin: the Site theme card. */
.admin-themes { display: grid; gap: 12px; }
.admin-theme-group { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.admin-theme-group legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.admin-theme-option { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.admin-theme-option:has(input:checked) { border-color: var(--gold); background: rgba(var(--accent-rgb), 0.08); }
.admin-theme-swatch { display: inline-flex; border-radius: 6px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.admin-theme-swatch i { width: 22px; height: 22px; display: block; }
.admin-theme-scope { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- Mock comps (comp.html, comp-manage.html, comp-new.html): colors come only from the theme variables ---- */
.comp-page { max-width: 640px; }
.comp-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 18px; display: grid; gap: 12px; }
.comp-form label, .comp-field { display: grid; gap: 4px; font-weight: 500; align-content: start; } /* start: a field next to a taller one (e.g. one with a hint) keeps its label and box together */
.comp-form input[type="text"], .comp-form input[type="number"], .comp-form input[type="datetime-local"], .comp-form select, .comp-form textarea,
.comp-card input[type="text"], .comp-field input, .comp-field select { width: 100%; }
.comp-check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; }
.comp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comp-row[hidden] { display: none; }
.comp-msg { margin: 0; min-height: 1.2em; color: var(--muted); font-size: 0.92rem; }
.comp-note { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
.comp-pill { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; border: 1px solid var(--line); }
.comp-pill-live { background: var(--glow); color: var(--on-accent); border-color: transparent; }
.comp-pill-ended { color: var(--muted); }
.comp-me { margin: 0 0 10px; }
.comp-tabs, .comp-chips, .comp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.comp-tab, .comp-chip { font: inherit; font-size: 0.92rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.comp-tab.is-on, .comp-chip.is-on { background: var(--glow); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; margin: 0 0 18px; }
.comp-tile { display: grid; place-content: center; text-align: center; min-height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text); font: inherit; line-height: 1.1; }
button.comp-tile { cursor: pointer; }
.comp-tile b { font-size: 1.15rem; }
.comp-tile small { font-size: 0.78rem; color: var(--muted); min-height: 1em; }
.comp-tile-top { background: var(--glow); color: var(--on-accent); border-color: transparent; }
.comp-tile-top small { color: inherit; }
.comp-tile-zone { background: rgba(var(--accent-rgb), 0.28); border-color: var(--gold); }
.comp-standings { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.comp-standings li, .comp-person { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; }
.comp-standings li.is-me { border-color: var(--gold); }
.comp-rank { flex: 0 0 2em; font-weight: 700; color: var(--gold); }
.comp-who { flex: 1 1 8em; min-width: 0; overflow-wrap: anywhere; }
.comp-detail { color: var(--muted); font-size: 0.88rem; }
.comp-people { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.comp-edit { flex: 1 0 100%; }
.comp-sheet { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); color: var(--text); padding: 20px; width: min(360px, calc(100% - 32px)); }
.comp-sheet::backdrop { background: rgba(var(--shade-rgb), 0.7); }
.comp-sheet h3 { margin: 0 0 4px; }
.comp-stepper { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 14px 0; }
.comp-count { font-size: 2.4rem; font-weight: 700; min-width: 2ch; text-align: center; }
.comp-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.comp-cancel { margin-left: auto; }
@media (max-width: 480px) { .comp-row { grid-template-columns: 1fr; } }
.comp-inline { display: flex; gap: 10px; }
.comp-inline .button { white-space: nowrap; }
.comp-inline input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; letter-spacing: 0.12em; }
.comp-join h2 { margin: 0; font-size: 1.1rem; }
/* Coaches Corner (coaches.html) and roster join on comp.html */
.coach-group { padding: 0; gap: 0; }
.coach-all { padding: 12px 18px 0; font-weight: 600 !important; }
.coach-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; padding: 12px 18px 16px; }
.comp-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.comp-name { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; text-align: left; }
.comp-name:disabled { opacity: 0.45; cursor: default; text-decoration: line-through; }
.comp-qr { margin: 0; display: grid; justify-items: center; gap: 6px; }
.comp-qr svg { width: min(220px, 70vw); height: auto; background: #fff; border-radius: 10px; }
.comp-qr figcaption { font-size: 0.85rem; text-align: center; }
/* Tally board (comp-board.html): laptop grid, and the projector view */
.comp-board { max-width: none; }
.board-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.board-table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 0.92rem; }
.board-table th, .board-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.board-table thead th { position: sticky; top: 0; background: var(--bg-raised); font-weight: 600; }
.board-table .board-name { position: sticky; left: 0; background: var(--bg-raised); text-align: left; z-index: 1; }
.board-rank { color: var(--gold); font-weight: 700; }
.board-p { padding: 3px !important; }
.board-cell { font: inherit; width: 3.2em; height: 2.2em; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.board-cell.is-top { background: var(--glow); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.board-cell.is-zone { background: rgba(var(--accent-rgb), 0.28); border-color: var(--gold); color: var(--text); }
.board-screen-mode #site-header, .board-screen-mode #site-footer, .board-screen-mode .whats-new { display: none; }
.board-screen { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start; min-height: 90vh; padding: 3vh 2vw; }
.board-screen h1 { font-size: clamp(2.5rem, 6vw, 5rem); margin: 0 0 2vh; }
.board-screen-list { list-style: none; margin: 0 0 3vh; padding: 0; display: grid; gap: 1vh; font-size: clamp(1.2rem, 2.6vw, 2.2rem); }
.board-screen-list li { display: flex; gap: 0.8em; align-items: baseline; padding: 0.4em 0.7em; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; }
.board-screen-join .comp-qr svg { width: clamp(160px, 22vw, 340px); }
@media (max-width: 700px) { .board-screen { grid-template-columns: 1fr; } }
/* Per-try pop-up on comp.html */
.comp-tries { font-size: 1.25rem; font-weight: 700; margin: 6px 0 2px; }
.comp-try-actions { display: grid; gap: 10px; margin: 12px 0 14px; }
.comp-try-big { font-size: 1.1rem; padding: 14px 18px; }
.comp-tile-tried { border-color: var(--gold); }
/* Climber cards (comp-cards.html): white "paper" on screen and in print, cut lines between cards */
.cards-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0; background: #fff; color: #111; border-radius: 6px; }
.climber-card { padding: 18px 16px; border: 1px dashed #999; text-align: center; break-inside: avoid; page-break-inside: avoid; }
.climber-card p { margin: 0; color: #111; }
.climber-card-comp { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: #555 !important; }
.climber-card-name { font-size: 1.35rem; font-weight: 700; margin-top: 4px !important; }
.climber-card-cat { font-size: 0.95rem; margin-bottom: 8px !important; }
.climber-card .comp-qr svg { width: 150px; }
.climber-card-code { font-size: 0.95rem; margin-top: 6px !important; }
.climber-card-code b { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.12em; }
.climber-card-help { font-size: 0.72rem; color: #444 !important; margin-top: 6px !important; line-height: 1.3; }
@media print {
  body { background: #fff !important; }
  #site-header, #site-footer, .whats-new, .no-print { display: none !important; }
  main, .comp-board { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .cards-sheet { grid-template-columns: repeat(3, 1fr); border-radius: 0; }
}
/* Zones per problem and points pickers (comp setup, organizer page) */
.comp-zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 10px; }
.comp-zone-cell { display: flex !important; align-items: center; gap: 6px; font-weight: 400 !important; }
.comp-zone-cell select { padding: 6px 8px !important; }
.comp-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; align-items: end; }
.board-z { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 400; min-height: 1em; }
/* Problems for each category (organizer page) */
.comp-catprob { padding: 10px 0; border-top: 1px solid var(--line); }
.comp-catprob-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.comp-pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.comp-pchip { font: inherit; min-width: 2.4em; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.comp-pchip[aria-pressed="true"] { background: var(--glow); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.comp-mini { font: inherit; font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.comp-field[hidden] { display: none !important; }
/* Scorecards (comp-cards.html, default style): one page per climber, black on white */
.scorecards { display: grid; gap: 24px; }
.scorecard { background: #fff; color: #111; padding: 22px 24px; border-radius: 6px; break-after: page; page-break-after: always; }
.scorecard:last-child { break-after: auto; page-break-after: auto; }
.scorecard p { margin: 0; color: #111; }
.sc-head { display: flex; justify-content: space-between; gap: 18px; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 12px; }
.sc-comp { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: #555 !important; }
.sc-name { font-size: 1.7rem; font-weight: 800; line-height: 1.15; margin: 2px 0 4px !important; }
.sc-meta { font-size: 0.95rem; white-space: pre-wrap; }
.sc-howto { font-size: 0.78rem; color: #444 !important; margin-top: 8px !important; max-width: 46ch; }
.sc-qr { text-align: center; flex: 0 0 auto; }
.sc-qr .comp-qr svg { width: 112px; }
.sc-qr p { font-size: 0.78rem; }
.sc-qr b { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.1em; }
.sc-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; color: #111; }
.sc-table th, .sc-table td { border-bottom: 1px solid #bbb; padding: 9px 6px; text-align: left; vertical-align: middle; }
.sc-table thead th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 2px solid #111; vertical-align: bottom; }
.sc-table thead { display: table-header-group; } /* repeats on each printed page */
.sc-table tr { break-inside: avoid; page-break-inside: avoid; }
.sc-num { font-size: 1.15rem; font-weight: 800; width: 3.2em; }
.sc-tally { display: inline-grid; grid-template-columns: repeat(5, 16px); gap: 4px; }
.sc-tally i { display: block; width: 16px; height: 16px; border: 1.5px solid #111; border-radius: 2px; }
.sc-yn { white-space: nowrap; }
.sc-blank { display: inline-block; width: 3.2em; border-bottom: 1.5px solid #111; height: 1.1em; vertical-align: bottom; }
.sc-wide { width: 5.5em; }
.sc-sign { width: 12em; }
.sc-two div { white-space: nowrap; }
.sc-two div + div { margin-top: 6px; }
.sc-two small { display: inline-block; width: 2.6em; color: #444; }
.sc-na { color: #888; text-align: center !important; }
.sc-foot { margin-top: 14px; display: grid; gap: 14px; font-size: 0.9rem; }
.sc-foot p { white-space: pre-wrap; }
@media print {
  .scorecards { gap: 0; }
  .scorecard { border-radius: 0; padding: 0; }
  @page { margin: 12mm; }
}
.judge-name { font-size: 1.6rem; margin: 0 0 6px; }
/* Attempt grid scorecard (comp-cards.html > Attempt grid) */
.gc-head { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 14px; }
.gc-head .sc-name { font-size: 2rem; }
.gc-cat { font-size: 1.3rem; font-weight: 700; }
.gc-table { width: 100%; border-collapse: collapse; color: #111; table-layout: fixed; }
.gc-table th, .gc-table td { border: 1.5px solid #6b7fa8; }
.gc-table thead th { padding: 8px; font-size: 1rem; text-align: center; }
.gc-legend { font-size: 0.82rem; font-weight: 600; margin-top: 2px; white-space: pre-wrap; }
.gc-route { width: 4.2em; font-size: 1.2rem; font-weight: 800; text-align: center; }
.gc-route small { display: block; font-size: 0.62rem; font-weight: 600; color: #555; }
.gc-box { height: 46px; vertical-align: top; padding: 2px 4px; }
.gc-box small { font-size: 0.62rem; color: #333; }
.gc-table tr { break-inside: avoid; page-break-inside: avoid; }
.gc-table thead { display: table-header-group; }
/* Card format panel and extras (comp-cards.html) */
.cards-opt-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: end; }
.cards-opt-row .comp-field { min-width: 200px; flex: 1 1 200px; }
.cards-options .comp-chips { margin-bottom: 0; }
.sc-bib { font-weight: 800; color: #111; }
.sc-name-big { font-size: 2rem !important; }
.gc-init { width: 4.2em; font-size: 0.72rem !important; }
.gc-help { margin-top: 8px !important; }
/* Organizer page > Climber cards: pills + fold-up age groups (Team page look) with slim rows */
.cc-groups { display: grid; gap: 10px; margin-top: 10px; }
.cc-groups .reg-card h2 { font-size: 1.05rem; }
.cc-list { list-style: none; margin: 0; padding: 4px 0; }
.cc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; padding: 6px 14px; border-top: 1px solid var(--line); font-size: 0.92rem; }
.cc-row:first-child { border-top: 0; }
.cc-name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.cc-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 0.7rem; }
.cc-row.is-joined .cc-dot { background: var(--glow); color: var(--on-accent); border-color: transparent; }
.cc-code { font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--muted); white-space: nowrap; }
.cc-code b { color: var(--gold); font-family: inherit; }
.cc-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.cc-actions .comp-mini { text-decoration: none; }
.comp-mini[aria-pressed="true"] { background: var(--glow); color: var(--on-accent); border-color: transparent; }
.cc-qr { grid-column: 1 / -1; padding: 8px 0 4px; }
.cc-qr .comp-qr svg { width: 150px; }
@media (max-width: 560px) { .cc-row { grid-template-columns: minmax(0, 1fr) auto; } .cc-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.comp-actions .comp-mini { align-self: center; }
/* Live results board (comp-live.html) */
.live-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); margin: 0 0 14px; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--line); color: var(--text); }
.live-badge.is-live { background: rgba(70, 190, 120, 0.18); border-color: rgba(70, 190, 120, 0.6); color: #8fe3b0; }
.live-badge.is-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5fdc95; animation: whats-new-pulse 1.8s ease-in-out infinite; }
.live-badge.is-final { background: var(--glow); color: var(--on-accent); border-color: transparent; }
.live-tabs { margin: 0 0 14px; }
.live-panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); overflow: hidden; }
.live-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.live-panel-head h2 { margin: 0; font-size: 1.2rem; }
.live-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.8rem; color: var(--muted); margin-left: auto; }
.live-legend i { display: inline-grid; place-items: center; min-width: 1.9em; height: 1.5em; border-radius: 5px; font-style: normal; font-size: 0.72rem; font-weight: 700; }
.live-wrap { overflow-x: auto; }
.live-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 0.9rem; }
.live-table th, .live-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: center; }
.live-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; background: var(--bg-raised); position: sticky; top: 0; z-index: 1; }
.live-table .lv-name { position: sticky; left: 0; z-index: 2; text-align: left; background: var(--bg-raised); min-width: 150px; max-width: 220px; white-space: normal; font-weight: 600; }
.live-table .lv-name small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); }
.live-table thead .lv-name { z-index: 3; }
.live-table tr.is-lead td, .live-table tr.is-lead th { background: rgba(var(--accent-rgb), 0.12); }
.lv-rank { width: 2.6em; }
.lv-place { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.lv-place-1 { background: linear-gradient(135deg, #ffe28a, #d4a21a); color: #3a2500; }
.lv-place-2 { background: linear-gradient(135deg, #f1f1f1, #a9adb5); color: #222; }
.lv-place-3 { background: linear-gradient(135deg, #f0b98a, #b06a35); color: #2a1300; }
.lv-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-total { color: var(--text); font-weight: 800; font-size: 1.05rem; }
.lv-b { min-width: 2.6em; }
.lv-cell { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
td.lv-cell, i.lv-cell { border-left: 1px solid rgba(255, 255, 255, 0.04); }
.lv-cell.is-top { background: rgba(70, 190, 120, 0.26); color: #9ff0c0; }
.lv-cell.is-hz { background: rgba(var(--accent-rgb), 0.34); color: var(--gold); }
.lv-cell.is-z { background: rgba(214, 150, 40, 0.2); color: #f0c46a; }
.lv-cell.is-tried { color: var(--muted); font-weight: 500; opacity: 0.8; }
.live-empty { padding: 16px; margin: 0; }
.live-foot { font-size: 0.82rem; margin-top: 10px; }
.live-table tbody th { text-transform: none; letter-spacing: normal; font-size: 0.92rem; color: var(--text); }
/* Live board: place + name stay put when scrolling sideways, on solid backgrounds (the leader's tint too) */
.live-table .lv-rank { position: sticky; left: 0; z-index: 2; background: var(--bg-raised); width: 40px; min-width: 40px; max-width: 40px; padding-left: 4px; padding-right: 4px; }
.live-table .lv-name { left: 40px; }
.live-table thead .lv-rank { z-index: 3; }
.live-table tr.is-lead .lv-rank, .live-table tr.is-lead .lv-name { background: linear-gradient(rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.12)), var(--bg-raised); }
.live-table .lv-name { box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.6); }
@media (max-width: 560px) { .live-table .lv-name { min-width: 120px; max-width: 150px; } }
/* Enter scorecards (comp-entry.html): a tight spreadsheet */
.en-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 10px; }
.en-bar > b { font-size: 1.1rem; }
.en-go { flex: 1 1 320px; max-width: 460px; }
.en-help { margin: 0 0 10px; font-size: 0.9rem; }
.en-help p { margin: 6px 0; }
.en-pills { margin: 0 0 10px; align-items: center; }
.en-order { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.en-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: var(--radius); }
.en-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 0.92rem; }
.en-table th, .en-table td { border-bottom: 1px solid var(--line); border-right: 1px solid rgba(255, 255, 255, 0.05); padding: 0; white-space: nowrap; }
.en-table thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-raised); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 6px 4px; text-align: center; }
.en-table thead th small { display: block; font-size: 0.62rem; text-transform: none; min-height: 1em; }
.en-table .en-name { position: sticky; left: 0; z-index: 1; background: var(--bg-raised); text-align: left; padding: 4px 10px; min-width: 160px; font-weight: 600; text-transform: none; letter-spacing: normal; color: var(--text); }
.en-table thead .en-name { z-index: 3; }
.en-st, .en-bib, .en-cat { padding: 4px 6px !important; text-align: center; color: var(--muted); font-size: 0.8rem; }
.en-status { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 0.72rem; }
tr.is-entered .en-status { background: var(--glow); color: var(--on-accent); }
tr.is-error .en-status { background: #c0392b; color: #fff; }
tr.is-error .en-name { color: #ff9b8f; }
.en-cell input { width: 3.6em; padding: 7px 4px; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 700; text-align: center; outline: none; }
.en-cell input:focus { background: rgba(var(--accent-rgb), 0.22); box-shadow: inset 0 0 0 2px var(--gold); }
.en-cell input:disabled { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.04) 4px 8px); cursor: not-allowed; }
.en-cell input.is-top { color: #9ff0c0; }
.en-cell input.is-zone { color: #f0c46a; }
.en-cell input.is-bad { background: rgba(192, 57, 43, 0.35); }
.en-missing-box { margin-top: 14px; }
.en-missing { display: block; margin: 4px 0; }
.en-go input { text-transform: none !important; letter-spacing: normal !important; }
/* Confirmation pop-up (comp pages) */
.comp-confirm { width: min(420px, calc(100% - 32px)); }
.comp-confirm p { margin: 6px 0 14px; }
.comp-danger { background: #b4372b; color: #fff; border-color: transparent; }
.comp-danger:hover { background: #cf4335; }
/* Coaches Corner > Your comps: slim rows */
.yc-list { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(var(--card-rgb), 0.7); }
.yc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.yc-row:first-child { border-top: 0; }
.yc-name { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.yc-name small { font-size: 0.8rem; }
.yc-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; }
.yc-actions .comp-mini { text-decoration: none; }
.yc-open { padding: 5px 14px; font-size: 0.85rem; }
.comp-mini-stop { border-color: rgba(180, 55, 43, 0.7); color: #ff9b8f; }
@media (max-width: 640px) { .yc-row { grid-template-columns: minmax(0, 1fr) auto; } .yc-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.yc-row { grid-template-columns: minmax(0, 1fr) auto; }
.yc-name { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.yc-name b { font-size: 1.02rem; }
.yc-actions { grid-column: 1 / -1; justify-content: flex-start; }
.yc-open { margin-left: auto; }
/* Start pop-up summary */
.start-summary { width: min(520px, calc(100% - 32px)); max-height: 86vh; overflow: auto; }
.ss-issues { background: rgba(180, 55, 43, 0.18); border: 1px solid rgba(180, 55, 43, 0.6); border-radius: 10px; padding: 10px 14px; margin: 8px 0 12px; color: #ffb3a9; }
.ss-issues ul { margin: 6px 0 0; padding-left: 18px; }
.ss-facts { display: grid; gap: 6px; margin: 10px 0; }
.ss-fact { display: grid; grid-template-columns: 7em 1fr; gap: 10px; }
.ss-fact dt { color: var(--muted); font-size: 0.85rem; }
.ss-fact dd { margin: 0; }
.ss-groups ul { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 4px; font-size: 0.92rem; }
.ss-groups li.is-bad { color: #ff9b8f; }
.comp-confirm p { white-space: pre-line; }
.comp-confirm .button:disabled { opacity: 0.38; filter: grayscale(0.7); box-shadow: none; cursor: not-allowed; }
/* Organizer top card: smaller buttons, share links with Copy on the same line */
.comp-tight .comp-actions { margin-bottom: 0; }
.share-block { display: grid; gap: 6px; }
.share-label { margin: 0; font-size: 0.9rem; }
.share-note { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-inline input { text-transform: none !important; letter-spacing: normal !important; font-size: 0.9rem !important; }
/* Enter scorecards: sortable headings and the running total */
.en-sort button { all: unset; cursor: pointer; display: inline-block; padding: 2px 4px; border-radius: 6px; }
.en-sort button:hover { color: var(--text); background: var(--bg-hover); }
.en-sort.is-on button { color: var(--gold); }
.en-table thead .en-name.en-sort { text-align: left; }
.en-total, .en-total-h { padding: 4px 10px !important; text-align: center; white-space: nowrap; font-size: 0.82rem; font-variant-numeric: tabular-nums; color: var(--text); }
td.en-total { font-weight: 700; }
/* Scoring pad (climbers and judges) */
.pad { width: min(440px, calc(100% - 24px)); }
.pad-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pad-head h3 { margin: 0; font-size: 1.25rem; }
.pad-counts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin: 12px 0 6px; }
.pad-count { display: grid; gap: 2px; text-align: center; padding: 8px 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.pad-count small { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.pad-count b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.pad-count.is-on { border-color: var(--gold); }
.pad-note { margin: 4px 0 10px; font-size: 0.88rem; text-align: center; }
.pad-row { display: grid; gap: 8px; margin-bottom: 10px; }
.pad-row.pad-2 { grid-template-columns: 1fr 1fr 52px; }
.pad-row.pad-3 { grid-template-columns: 1fr 1fr 1fr 52px; }
.pad-row.pad-4 { grid-template-columns: 1fr 1fr 1fr 1fr 52px; }
.pad-btn { position: relative; min-height: 64px; border-radius: 14px; border: 1px solid var(--line); font: inherit; font-weight: 800; font-size: 1.02rem; color: var(--text); cursor: pointer; background: rgba(255, 255, 255, 0.07); }
.pad-btn:active:not(:disabled) { transform: scale(0.97); }
.pad-btn:disabled { cursor: default; opacity: 0.45; }
.pad-fall { background: rgba(255, 255, 255, 0.1); }
.pad-zone { background: rgba(214, 150, 40, 0.24); border-color: rgba(214, 150, 40, 0.6); color: #f6d38c; }
.pad-high { background: rgba(var(--accent-rgb), 0.3); border-color: var(--gold); color: var(--gold); }
.pad-top { background: rgba(70, 190, 120, 0.3); border-color: rgba(70, 190, 120, 0.7); color: #a9f2c7; }
.pad-undo { font-size: 1.4rem; background: transparent; }
.pad-btn.is-done { opacity: 0.6; }
.pad-tick { position: absolute; top: 4px; right: 7px; font-size: 0.75rem; }
/* Scoring pad: pick one, then save */
.pad-row.pad-c2 { grid-template-columns: 1fr 1fr; }
.pad-row.pad-c3 { grid-template-columns: 1fr 1fr 1fr; }
.pad-row.pad-c4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.pad-btn { opacity: 0.75; border-width: 2px; }
.pad-btn.is-picked { opacity: 1; transform: translateY(-2px); box-shadow: 0 0 0 3px var(--text), 0 6px 16px rgba(0, 0, 0, 0.45); }
.pad-btn:disabled { opacity: 0.22; }
.pad-save { width: 100%; min-height: 54px; font-size: 1.05rem; margin: 2px 0 10px; }
.pad-save:disabled { opacity: 0.45; filter: grayscale(0.6); box-shadow: none; cursor: default; }
.pad .comp-sheet-actions { justify-content: space-between; }
/* Scoring picker extras */
.scoring-extra { display: grid; gap: 12px; }
.scoring-note { margin: 0; font-size: 0.88rem; }
.scoring-extra [hidden] { display: none !important; }
/* Grade comps: setup table, send pad, send lists */
.grade-box { display: grid; gap: 12px; }
.grade-box[hidden] { display: none; }
.grade-rows { display: grid; gap: 6px; }
.grade-row { display: grid; grid-template-columns: minmax(0, 1fr) 7em auto; gap: 8px; align-items: center; }
.grade-row input { width: 100%; }
.grade-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; margin-bottom: 10px; }
.grade-chip { display: grid; gap: 1px; padding: 8px 4px; border-radius: 12px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--text); font: inherit; cursor: pointer; }
.grade-chip b { font-size: 1.1rem; }
.grade-chip small { font-size: 0.7rem; color: var(--muted); }
.grade-chip.is-picked { background: var(--glow); color: var(--on-accent); border-color: transparent; box-shadow: 0 0 0 3px var(--text); }
.grade-chip.is-picked small { color: inherit; }
.send-more { margin: 0 0 8px; font-size: 0.9rem; }
.send-att { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 10px; }
.send-att b { font-size: 1.6rem; min-width: 2ch; text-align: center; }
.send-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; max-height: 32vh; overflow: auto; }
.send-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.9rem; }
.send-list li.is-counted { border-color: var(--gold); }
.send-list li small { color: var(--gold); }
.send-list li .comp-mini { margin-left: auto; }
.comp-form [hidden], .comp-card[hidden], .scoring-extra[hidden] { display: none !important; }
/* Grade comp printed card */
.gr-table td { height: 34px; }
.gr-table th:nth-child(3) { width: 40%; }
.gr-table.is-route th:nth-child(3) { width: 12%; } /* Lead / TR: just room to circle one */
.gr-table.is-route th:nth-child(4) { width: 32%; } /* Attempts: room for tally marks */
.gr-top { border: 1.5px solid #111; margin-top: 14px; }
.gr-top-title { text-align: center; font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px; border-bottom: 1.5px solid #111; }
.gr-top-row { display: grid; }
.gr-top-row div { border-right: 1.5px solid #111; padding: 6px 8px 22px; }
.gr-top-row div:last-child { border-right: 0; }
.gr-top-row small { font-weight: 700; font-size: 0.75rem; }
.gr-points { font-size: 0.75rem; color: #444 !important; margin-top: 8px !important; text-align: center; }
.board-best { text-align: left !important; font-weight: 700; letter-spacing: 0.04em; }
.my-sends-counts { margin-bottom: 12px; }

/* Create Mock Comp: step list (1 Basics · 2 Format · ...) and the Review summary (js/coaches.js) */
.wiz-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; counter-reset: none; }
.wiz-steps li > * { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.85rem; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted, inherit); }
.wiz-steps li b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); font-size: 0.75rem; }
.wiz-steps li button { cursor: pointer; color: var(--text); }
.wiz-steps li.is-done b { background: rgba(var(--accent-rgb), 0.35); }
.wiz-steps li.is-on > * { border-color: var(--gold); color: var(--text); }
.wiz-steps li.is-on b { background: var(--gold); color: var(--on-accent); }
.wiz-review-row { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.wiz-review-row:last-child { border-bottom: 0; }
@media (max-width: 520px) { .wiz-review-row { grid-template-columns: 1fr auto; } .wiz-review-row > .muted { grid-column: 1 / -1; } }

/* Climber page: the comp's tagline and general info (set in the Basics step) */
.comp-tagline { margin: -4px 0 6px; font-size: 1.05rem; color: var(--text); opacity: 0.85; }
.comp-info.fold { margin: 0 0 14px; }
.comp-info-text { margin: 0; }

/* Required field marker (Create Mock Comp, Comp details) */
.comp-field .req { color: var(--gold); margin-left: 3px; font-weight: 700; }

/* General info with basic formatting: the editor (Create Mock Comp, Comp details) and how it reads on the climber page */
.rich-text h3 { font-size: 1.05rem; margin: 0.6em 0 0.3em; }
.rich-text p { margin: 0 0 0.5em; }
.rich-text ul, .rich-text ol { margin: 0 0 0.5em; padding-left: 1.4em; }
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-editor { display: grid; gap: 6px; }
.rich-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.rich-group { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.rich-btn { font: inherit; min-width: 36px; height: 34px; padding: 0 8px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.rich-group .rich-btn:last-child { border-right: 0; }
.rich-btn:hover { background: rgba(var(--accent-rgb), 0.12); }
.rich-btn[aria-pressed="true"] { background: rgba(var(--accent-rgb), 0.25); }
.rich-box { min-height: 7em; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised); color: var(--text); outline: none; overflow-wrap: anywhere; }
.rich-box:focus { border-color: var(--gold); }
.rich-box.is-empty::before { content: attr(data-placeholder); color: var(--text); opacity: 0.45; pointer-events: none; }

/* General info printed at the bottom of a scoring card (comp-cards.js); black on white like the rest of the card */
.sc-info { margin-top: 10px; padding-top: 6px; border-top: 1px solid #999; font-size: 0.78rem; color: #222 !important; break-inside: avoid; }
.sc-info * { color: #222 !important; }
.sc-info-title { font-weight: 700; margin: 0 0 3px !important; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem; }
.sc-info h3 { font-size: 0.85rem; margin: 4px 0 2px; }
.sc-info p, .sc-info ul, .sc-info ol { margin: 0 0 3px; }

/* Scoring (numbered boulders): method cards (Points / Attempts) and option rows, like ClimbLive's rules */
.scoring { display: grid; gap: 14px; }
.method-cards { display: grid; gap: 8px; }
.method-card { display: grid; gap: 4px; text-align: left; font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.method-card[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.method-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.method-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.method-card[aria-pressed="true"] .method-dot { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 0 40%, transparent 45%); }
.method-tag { margin-left: auto; font-size: 0.72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: rgba(var(--accent-rgb), 0.18); color: var(--gold); }
.method-text { font-size: 0.88rem; opacity: 0.8; font-weight: 400; }
.opt-row { display: flex !important; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 400 !important; }
.opt-row > input[type="checkbox"] { margin-top: 4px; flex: none; width: auto !important; padding: 0 !important; min-height: 0 !important; }
.opt-row > span { flex: 1; min-width: 0; }
.opt-row b { display: block; margin-bottom: 2px; }
.opt-row .opt-num { display: inline-block; width: 4.6em !important; padding: 4px 8px !important; min-height: 0 !important; margin: 0 4px; }

/* A fold-out section that looks clickable: a bordered bar with a chevron that turns when open (e.g. "Set zones problem by
   problem"). The browser's own small triangle is hidden. */
.comp-disclose { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.comp-disclose > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; font-weight: 500; }
.comp-disclose > summary::-webkit-details-marker { display: none; }
.comp-disclose > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform 0.15s; }
.comp-disclose[open] > summary::after { transform: rotate(-135deg); }
.comp-disclose > summary:hover { background: rgba(var(--accent-rgb), 0.08); border-radius: 10px; }
.comp-disclose > summary small { font-weight: 400; }
.comp-disclose[open] > summary { border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.comp-disclose > :not(summary) { padding: 12px 14px; }

/* Route scorecards: the Lead / TR column shows "L / TR" to circle */
.gr-style { text-align: center; color: #777 !important; font-size: 0.75rem; }
/* Mix comps: one row per age group with Bouldering / Lead-top rope chips */
.disc-list { display: grid; gap: 6px; }
.disc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.disc-row > b { min-width: 6em; }
.disc-row .comp-chips { margin: 0; }
.grade-boxes { display: grid; gap: 14px; }
.grade-boxes[hidden], .grade-box[hidden] { display: none; }

/* Create Mock Comp steps: Back / Next sit at the right edge */
.wiz-actions { justify-content: flex-end; }

/* Create Mock Comp, Climbers step: named people who aren't on the roster (name + group + Remove per row) */
.extra-box h3 { margin: 0; }
.extra-rows { display: grid; gap: 8px; }
.extra-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.extra-row input { width: 100%; box-sizing: border-box; }
@media (max-width: 520px) { .extra-row { grid-template-columns: 1fr auto; } .extra-row input:nth-child(2) { grid-column: 1; } .extra-row button { grid-row: 1 / span 2; grid-column: 2; } }

/* Climber cards page: the card format panel in tidy sections (style · boxes · header/location · what prints · order ·
   save), then the age-group filter and Print, each with breathing room. */
.cards-options { margin: 18px 0 20px; }
.cards-options > summary small { margin-left: 6px; }
.cards-body { display: grid; gap: 20px; }
.cards-sec { display: grid; gap: 8px; }
.cards-sec-title { margin: 0; font-weight: 600; }
.cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; align-items: start; }
@media (max-width: 600px) { .cards-grid { grid-template-columns: 1fr; } }
.cards-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 20px; }
.cards-check { align-items: flex-start !important; }
.cards-check input { margin-top: 3px; }
.cards-check small { display: block; font-size: 0.82rem; }
.cards-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.cards-filter { margin: 0 0 12px; }
.cards-actions { margin-bottom: 22px; }

/* Scorecard without a QR code: the personal code alone, boxed so it's easy to read out */
.sc-qr.no-qr p { font-size: 0.9rem; border: 1px solid #999; border-radius: 6px; padding: 6px 10px; margin: 0; }

/* Desk entry: the always-visible key of what to type */
.en-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised); font-size: 0.9rem; }
.en-key-title { font-weight: 600; margin-right: 4px; }
.en-key-item { white-space: nowrap; }
.en-key code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(var(--accent-rgb), 0.18); color: var(--gold); }
.en-key-hatch { display: inline-block; width: 18px; height: 14px; vertical-align: -2px; border: 1px solid var(--line); border-radius: 3px; background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.18) 4px 8px); }
.en-help.comp-disclose { margin: 0 0 12px; }

/* Desk entry: Here (check-in) and Team columns */
.en-table .en-here { text-align: center; width: 3.2em; }
.en-table .en-here input { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.en-table .en-team { white-space: nowrap; font-size: 0.88rem; opacity: 0.85; }

/* Live board: team scoreboard (team points per team, the leader lit) and team bits in the table */
.team-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0 0 16px; }
.team-score { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
.team-score.is-lead { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 18px rgba(var(--accent-rgb), 0.25); }
.team-score-name { font-weight: 600; }
.team-score-pts { font-size: 2rem; line-height: 1.1; color: var(--gold); }
.lv-name .lv-team { display: block; opacity: 0.7; font-size: 0.75rem; }
.lv-tp { color: var(--gold); font-weight: 700; }
/* Teams panel (setup step, organizer page) */
.teams { display: grid; gap: 16px; }
.team-names { display: grid; gap: 8px; }
.team-name { display: flex; gap: 8px; align-items: center; }
.team-name input { flex: 1; }
.team-line .opt-num { width: 4.8em !important; }
.team-cuts { display: grid; gap: 6px; }
.team-cut { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.team-cut > b { min-width: 6em; }
.team-cut-nums { display: flex; gap: 6px; margin-left: auto; }
.team-cut-nums .opt-num { width: 5.6em !important; padding: 6px 8px !important; }
.team-group { margin-top: 6px; }
.team-person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.team-person .comp-chips { margin: 0; }
.board-teams { font-size: 1.05rem; margin: 0 0 12px; color: var(--gold); }

/* Desk entry: quick name filter above the grid */
.en-filter { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.en-filter input { flex: 0 1 320px; }
.en-table tr[hidden] { display: none; }

/* Desk entry: scrollbars always visible (Mac hides them until you scroll), so it's clear the grid scrolls both ways */
.en-wrap { scrollbar-gutter: stable; }
.en-wrap::-webkit-scrollbar { width: 12px; height: 12px; }
.en-wrap::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); }
.en-wrap::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), 0.45); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.en-wrap::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.7); background-clip: padding-box; }
.en-wrap::-webkit-scrollbar-corner { background: transparent; }
.en-full-btn { margin-left: auto; }
/* Full screen: the sheet covers the page; the grid takes all the height left */
body.en-full { overflow: hidden; }
.en-sheet.is-full { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; padding: 12px 18px; background: var(--bg, #120509); overflow: hidden; }
.en-sheet.is-full .en-wrap { flex: 1 1 auto; max-height: none; min-height: 0; }
.en-sheet.is-full .en-help { display: none; }
.en-full-title { margin: 0 0 8px; font-weight: 700; color: var(--gold); }

/* Enter scorecards: "+ Add climber" sits at the right end of the filter row and opens into a one-line form. */
.en-filter { flex-wrap: wrap; }
.en-add { margin-left: auto; display: flex; }
.en-add-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.en-add-form[hidden] { display: none; }
.en-add-form input { width: 220px; }
.en-add-open { white-space: nowrap; }
.en-add-open[hidden] { display: none; }
.en-csv-btn { margin-left: auto; }
.en-csv-btn + .en-full-btn { margin-left: 0; }
.en-add-form input[hidden] { display: none; }
.en-add-form input[placeholder^="New group"] { width: 180px; }

/* Team point total: each age group's team points, like the first tab of a scoresheet (live results + score sheet). */
.team-point-total { margin: 0 0 16px; }
.team-point-total summary small { margin-left: 10px; }
.tpt-wrap { overflow-x: auto; }
.tpt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tpt th, .tpt td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tpt thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tpt .tpt-num { text-align: right; }
.tpt tfoot th, .tpt tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--line); }
.tpt tfoot .is-lead { color: var(--gold); }
.tpt-top td.is-lead { color: var(--gold); font-weight: 600; }
.tpt-top-n td { vertical-align: top; white-space: normal; }
.tpt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tpt-place { display: inline-block; min-width: 1.6em; color: var(--gold); font-weight: 600; }

/* Team charts above the team tables: labelled horizontal bars, one row per age group, colored by team. */
.tc { margin: 4px 0 14px; }
.tc-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 10px; font-size: .9rem; }
.tc-key { display: inline-flex; align-items: center; gap: 6px; }
.tc-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tc-rows { display: grid; gap: 10px; }
.tc-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.tc-name { display: grid; line-height: 1.2; }
.tc-name small { font-size: .75rem; }
.tc-bars { display: grid; gap: 4px; min-width: 0; }
.tc-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tc-bar { height: 14px; border: 0; padding: 0; border-radius: 0 4px 4px 0; cursor: help; flex: 0 0 auto; }
.tc-bar:hover, .tc-bar:focus-visible { filter: brightness(1.2); outline: 2px solid var(--text); outline-offset: 1px; }
.tc-val { font-size: .85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tc-split { display: grid; gap: 8px; }
.tc-split .tc + .tc .tc-legend { display: none; } /* one legend per chart group is enough */
@media (max-width: 600px) { .tc-row { grid-template-columns: 1fr; gap: 4px; } }
/* Compact charts (2026-11-23): thinner bars, tighter rows, a Chart | Table switch. */
.tc-rows { gap: 6px; }
.tc-row { grid-template-columns: 96px 1fr; gap: 10px; }
.tc-bars { gap: 2px; }
.tc-bar { height: 9px; border-radius: 0 3px 3px 0; }
.tc-val { font-size: .78rem; }
.tc-name b { font-size: .9rem; }
.tc-name small { font-size: .68rem; }
.tc-legend { margin: 0 0 6px; font-size: .82rem; }
.tc-cols { display: grid; gap: 14px; min-width: 0; }
.tc-switch { display: inline-flex; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.tc-switch button { border: 0; background: none; color: var(--muted); padding: 4px 14px; font: inherit; font-size: .82rem; cursor: pointer; }
.tc-switch button[aria-pressed="true"] { background: rgba(var(--accent-rgb), .18); color: var(--text); }
@media (max-width: 600px) { .tc-cols { grid-template-columns: 1fr !important; gap: 4px; } }
.tc-switch { margin: 2px 0 8px; }
.tc-switch button { padding: 2px 12px; line-height: 1.6; }
/* Dense team tables with a bar column (2026-11-23): spreadsheet-tight rows, the bars right beside the numbers. */
.team-point-total .tpt { font-size: .85rem; width: auto; min-width: 100%; }
.team-point-total .tpt th, .team-point-total .tpt td { padding: 3px 10px; line-height: 1.35; }
.team-point-total .tpt thead th { font-size: .7rem; padding-top: 6px; padding-bottom: 6px; }
.team-point-total .tpt tbody tr:nth-child(even) { background: rgba(237, 237, 243, .03); }
.tc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.tpt td.tpt-bars, .tpt th.tpt-bars { width: 32%; min-width: 120px; padding-left: 14px; }
.tpt td.tpt-bars { vertical-align: middle; }
.tc-mini { display: block; height: 5px; border-radius: 0 3px 3px 0; margin: 2px 0; cursor: help; }
.tc-mini:hover, .tc-mini:focus-visible { filter: brightness(1.25); outline: 1px solid var(--text); outline-offset: 1px; }
.tpt-top-n .tpt-group { border-top: 1px solid var(--line); }
.tpt-top-n tbody tr td, .tpt-top-n tbody tr th { border-bottom: 0; }
.tpt-top-n th[rowspan] { vertical-align: top; }
.tpt-top td { white-space: nowrap; }
.tpt-top thead th:not(.tpt-num):not(.tpt-bars), .tpt-top thead th.tpt-num:has(.tc-dot) { text-align: left; }
/* Team tables + a vertical column chart beside each (like the scoresheet's charts). Stacks on narrow screens. */
.tpt-split { display: grid; grid-template-columns: minmax(0, auto) minmax(300px, 1fr); gap: 18px; align-items: start; }
.tpt-split .tpt { min-width: 0; }
@media (max-width: 900px) { .tpt-split { grid-template-columns: 1fr; } }
.tch { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(var(--card-rgb), .5); }
.tch-legend { display: flex; justify-content: center; gap: 16px; font-size: .78rem; }
/* Column chart v2: laid out like the scoresheet's Google chart. */
.tch { padding: 12px 14px 10px; }
.tch-title { font-size: 1.05rem; font-weight: 500; color: var(--muted); margin: 0 0 10px; }
.tch-body { display: grid; grid-template-columns: 16px auto minmax(0, 1fr); gap: 6px; }
.tch-ytitle { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .72rem; color: var(--muted); text-align: center; height: 190px; }
.tch-axis { position: relative; height: 190px; min-width: 26px; }
.tch-axis span { position: absolute; right: 0; transform: translateY(50%); font-size: .68rem; color: var(--muted); line-height: 1; }
.tch-main { min-width: 0; }
.tch-field { position: relative; height: 190px; }
.tch-grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.tch-grid.is-base { border-top-color: rgba(237, 237, 243, .4); }
.tch-groups { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.tch-cols { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; padding: 0 6%; }
.tch-col { flex: 0 1 16px; min-width: 3px; border-radius: 2px 2px 0 0; cursor: help; }
.tch-xrow { display: flex; }
.tch-x { flex: 1 1 0; min-width: 0; font-size: .64rem; color: var(--text); text-align: center; padding-top: 5px; height: auto; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.15; overflow-wrap: anywhere; }
.tch-xtitle { text-align: center; font-size: .72rem; color: var(--muted); margin-top: 6px; }
.tch-legend { margin-top: 8px; }
.tpt-totals { margin-bottom: 12px; width: auto !important; min-width: 260px !important; }
.tpt-wrap > .tpt + .tpt { margin-top: 0; }
.tch-cols { padding: 0 4px; }
.tch-col { flex: 0 1 18px; }
/* Score sheet: the Analysis pill (team metrics in place of the grid). */
.en-analysis-pill { margin-left: 6px; }
.en-team-total[hidden], .en-filter[hidden], .en-wrap[hidden] { display: none !important; }
.en-sheet.is-full .en-team-total { overflow: auto; flex: 1 1 auto; min-height: 0; }
/* Always show the grid's horizontal scrollbar too: with only a little overflow Chrome scrolled the grid but drew no bar. */
.en-wrap { overflow-x: scroll; }

/* ---- Chart draw-in (2026-11-23): columns rise with a bounce and a glow, a light sweeps them, each division's winner gets
   a sparkle; gridlines draw across; title, axis and legend fade in. Plays once when the chart is first seen. ---- */
.tch-col { position: relative; transform-origin: bottom; background: linear-gradient(to top, var(--c), color-mix(in srgb, var(--c) 65%, #fff)) !important;
  box-shadow: 0 0 10px -2px color-mix(in srgb, var(--c) 70%, transparent); overflow: visible; transition: transform .15s ease, filter .15s ease; }
.tch-col::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%) no-repeat; background-size: 250% 100%; }
.tch-col .tch-val { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translate(-50%, 4px); font-size: .66rem; font-weight: 700; color: var(--text);
  background: rgba(var(--card-rgb), .92); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 2; }
.tch-col:hover, .tch-col:focus-visible { filter: brightness(1.2) saturate(1.1); transform: scaleY(1.02); outline: none; }
.tch-col:hover .tch-val, .tch-col:focus-visible .tch-val { opacity: 1; transform: translate(-50%, 0); }
.tch-col.is-top::before { content: "✦"; position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); font-size: .7rem; color: var(--gold);
  text-shadow: 0 0 8px rgba(var(--accent-rgb), .9); pointer-events: none; }
.tch-col.is-top:hover::before, .tch-col.is-top:focus-visible::before { opacity: 0; }
.tch-grid-sweep { position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, rgba(var(--accent-rgb), .0), rgba(var(--accent-rgb), .55), rgba(var(--accent-rgb), 0)); opacity: 0; pointer-events: none; }

/* Waiting to be seen: columns flat, the rest faint. */
.tch:not(.tch-play):not(.tch-static) .tch-col { transform: scaleY(0); }
.tch:not(.tch-play):not(.tch-static) .tch-col.is-top::before { opacity: 0; }
.tch:not(.tch-play):not(.tch-static) :is(.tch-title, .tch-axis, .tch-legend, .tch-x) { opacity: 0; }
/* Playing. */
.tch-play .tch-title { animation: tch-fade .6s ease both; background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tch-play .tch-axis, .tch-play .tch-x { animation: tch-fade .5s ease .15s both; }
.tch-play .tch-legend { animation: tch-pop .5s cubic-bezier(.2, 1.6, .4, 1) .5s both; }
.tch-play .tch-grid { animation: tch-draw .7s ease both; transform-origin: left; }
.tch-play .tch-grid-sweep { animation: tch-sweep 1.1s ease-out calc(var(--j) * 70ms + .1s) both; }
.tch-play .tch-col { animation: tch-rise .85s cubic-bezier(.18, 1.35, .42, 1) calc(var(--i) * 30ms + .2s) both; }
.tch-play .tch-col::after { animation: tch-shine .9s ease-out calc(var(--i) * 30ms + 1s) both; }
.tch-play .tch-col.is-top { animation: tch-rise .85s cubic-bezier(.18, 1.35, .42, 1) calc(var(--i) * 30ms + .2s) both, tch-glow 1.2s ease-in-out calc(var(--i) * 30ms + 1.1s) 1; }
.tch-play .tch-col.is-top::before { animation: tch-spark .6s cubic-bezier(.2, 1.8, .4, 1) calc(var(--i) * 30ms + 1s) both; }
@keyframes tch-rise { from { transform: scaleY(0); opacity: .2; } to { transform: scaleY(1); opacity: 1; } }
@keyframes tch-shine { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 0; background-position: -60% 0; } }
@keyframes tch-glow { 0%, 100% { box-shadow: 0 0 10px -2px color-mix(in srgb, var(--c) 70%, transparent); } 50% { box-shadow: 0 0 22px 2px color-mix(in srgb, var(--c) 90%, transparent), 0 0 34px rgba(var(--accent-rgb), .35); } }
@keyframes tch-spark { from { opacity: 0; transform: translate(-50%, 8px) scale(.2) rotate(-90deg); } to { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(0); } }
@keyframes tch-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tch-sweep { 0% { opacity: 0; clip-path: inset(0 100% 0 0); } 40% { opacity: 1; } 100% { opacity: 0; clip-path: inset(0 0 0 0); } }
@keyframes tch-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes tch-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tch *, .tch *::before, .tch *::after { animation: none !important; transition: none !important; }
  .tch:not(.tch-static) .tch-col { transform: none !important; }
  .tch .tch-title, .tch .tch-axis, .tch .tch-legend, .tch .tch-x, .tch .tch-col.is-top::before { opacity: 1 !important; }
}

/* Admin: People & roles (permissions) */
.perm-tree { display: grid; gap: 8px; margin: 12px 0 24px; }
.perm-place { margin-left: calc(var(--depth, 0) * 22px); border-left: 2px solid var(--line); padding: 6px 0 6px 12px; }
.perm-place-head { margin-bottom: 4px; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: rgba(var(--accent-rgb), .12); border: 1px solid rgba(var(--accent-rgb), .35); font-size: .85rem; }
.perm-chip.is-noemail { border-style: dashed; background: transparent; }
.perm-chip form { display: inline; margin: 0; }
.perm-chip-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 6px; }
.perm-chip-x:hover { color: var(--text); }
.perm-none { font-size: .85rem; }
.perm-comps { margin: 6px 0 0 22px; }
.perm-comps summary { cursor: pointer; }
.perm-comp { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.perm-add { display: grid; gap: 14px; max-width: 760px; }
.perm-new { display: grid; gap: 10px; }
.perm-new[hidden] { display: none; }
.perm-roles { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.perm-roles legend { margin-bottom: 6px; }
.perm-role-card { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.perm-role-card input { grid-row: span 2; margin-top: 3px; }
.perm-role-card .muted { font-size: .8rem; }
.perm-role-card:has(input:checked) { border-color: var(--gold); background: rgba(var(--accent-rgb), .08); }
.perm-people { display: grid; gap: 4px; margin-bottom: 20px; }
.perm-person summary { cursor: pointer; padding: 4px 0; }
.perm-person-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 8px 0 12px; }
.perm-audit { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .9rem; }

/* ---- Admin › People & roles, design A "Directory" (2026-11-24) ---- */
.pr { display: flex; flex-direction: column; gap: 18px; }
.pr-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.pr-head h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 2rem; letter-spacing: -0.01em; }
.pr-head p { margin: 0; }
.pr-add-btn { display: inline-flex; align-items: center; gap: 8px; }
.pr-trial { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(var(--accent-rgb), .07); border: 1px solid rgba(var(--accent-rgb), .22); font-size: .9rem; color: #e9d9c4; }
.pr-trial i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.pr-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pr-body { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.pr-nav { flex: 1 1 250px; max-width: 300px; background: rgba(var(--card-rgb), .85); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.pr-nav .pr-label { padding: 4px 10px 10px; }
.pr-place { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 42px; padding: 8px 10px 8px calc(10px + var(--depth, 0) * 18px); border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pr-place > span:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pr-place svg { color: var(--muted); flex: none; }
.pr-place:hover { background: rgba(255, 255, 255, .04); }
.pr-place[aria-current="true"] { background: rgba(var(--accent-rgb), .14); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .35); font-weight: 600; }
.pr-place[aria-current="true"] svg, .pr-place[aria-current="true"] .pr-count { color: var(--gold); }
.pr-place.is-minor { color: var(--muted); font-size: .92rem; }
.pr-count { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.pr-panels { flex: 999 1 560px; min-width: 0; }
.pr-panel { background: rgba(var(--card-rgb), .85); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 10px; display: flex; flex-direction: column; gap: 16px; }
.pr-panel[hidden] { display: none; }
.pr-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pr-panel-head h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.45rem; }
.pr-panel-head p { margin: 0; font-size: .9rem; }
.pr-table { display: flex; flex-direction: column; }
.pr-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) 44px; gap: 12px; align-items: center; padding: 12px 6px; border-bottom: 1px solid rgba(237, 237, 243, .07); }
.pr-row.is-comp { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr); }
.pr-row-head { padding-top: 0; padding-bottom: 8px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line); }
.pr-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pr-av { width: 40px; height: 40px; border-radius: 50%; background: #2a2552; color: var(--gold); display: grid; place-items: center; font-weight: 600; font-size: .9rem; flex: none; }
.pr-av.is-small { width: 26px; height: 26px; font-size: .7rem; }
.pr-av.is-placeholder { background: transparent; border: 1px dashed rgba(237, 237, 243, .3); color: var(--muted); }
.pr-name { display: flex; flex-direction: column; min-width: 0; }
.pr-name b { font-weight: 600; }
.pr-sign { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.pr-sign i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.pr-sign.is-ok { color: #5fd3a0; } .pr-sign.is-ok i { background: currentColor; }
.pr-sign.is-tbd { color: #ffd29b; }
.pr-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-pill { padding: 4px 10px; border-radius: 999px; background: rgba(var(--accent-rgb), .14); color: #ffd29b; font-size: .82rem; font-weight: 500; }
.pr-row.is-placeholder .pr-pill { background: transparent; border: 1px dashed rgba(var(--accent-rgb), .4); }
/* Hover or focus a role pill to read the role's definition. */
.pr-pill[data-tip] { position: relative; cursor: help; transition: background-color .15s; }
.pr-pill[data-tip]:hover, .pr-pill[data-tip]:focus-visible { background: rgba(var(--accent-rgb), .26); outline: none; }
.pr-pill[data-tip]::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30; width: max-content; max-width: 260px; padding: 8px 11px; border-radius: 10px; background: #221d45; border: 1px solid rgba(var(--accent-rgb), .45); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); color: var(--text); font-size: .8rem; font-weight: 400; line-height: 1.4; white-space: normal; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.pr-pill[data-tip]:hover::after, .pr-pill[data-tip]:focus-visible::after { opacity: 1; transform: none; }
.pr-pill[data-tip=""]::after { display: none; }
.pr-icon { width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.pr-icon:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.pr-empty { margin: 0; padding: 18px 6px; color: var(--muted); }
.pr-via { display: flex; flex-direction: column; gap: 10px; padding: 6px 6px 12px; }
.pr-via-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-via-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid rgba(237, 237, 243, .14); font-size: .84rem; }
.pr-via-chip.is-placeholder { border-style: dashed; border-color: rgba(237, 237, 243, .25); }
.pr-changes { font-size: .9rem; }
.pr-changes summary { cursor: pointer; }
.pr-changes ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
/* Side panels (Add someone, Manage) */
.pr-sheet { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(560px, 100vw); padding: 0; border: 0; border-left: 1px solid var(--line); background: #15122f; color: var(--text); box-shadow: -24px 0 60px rgba(0, 0, 0, .45); }
.pr-sheet::backdrop { background: rgba(5, 4, 15, .6); }
.pr-sheet[open] { animation: pr-in .22s ease-out; }
@keyframes pr-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.pr-sheet-inner { box-sizing: border-box; min-height: 100%; padding: 26px 30px; display: flex; flex-direction: column; gap: 20px; }
.pr-sheet-head { display: flex; justify-content: space-between; align-items: center; }
.pr-sheet-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; }
.pr-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; font-size: .82rem; }
.pr-steps li { flex: 1; padding-top: 8px; border-top: 3px solid rgba(237, 237, 243, .15); color: var(--muted); }
.pr-steps li.is-on { border-top-color: var(--gold); color: #ffd29b; }
.pr-step { display: flex; flex-direction: column; gap: 12px; }
.pr-step[hidden], .pr-new[hidden] { display: none; }
.pr-step p { margin: 0; }
.pr-new { display: flex; flex-direction: column; gap: 12px; }
.pr-field { display: flex; flex-direction: column; gap: 6px; }
.pr-field .muted { font-size: .8rem; }
.pr-group { border-top: 1px solid var(--line); padding-top: 10px; }
.pr-group summary .muted { font-size: .82rem; }
.pr-role { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.pr-role[hidden] { display: none; }
.pr-role input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex: none; }
.pr-role > span { display: flex; flex-direction: column; gap: 2px; }
.pr-role .muted { font-size: .84rem; }
.pr-role:has(input:checked) { border-color: var(--gold); background: rgba(var(--accent-rgb), .08); }
.pr-where { display: flex; flex-direction: column; max-height: 50vh; overflow: auto; }
.pr-sheet-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.pr-summary { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(95, 211, 160, .08); border: 1px solid rgba(95, 211, 160, .25); color: #cdeedd; }
.pr-error { margin: 0; color: #ff9b8a; }
.pr-summary[hidden], .pr-error[hidden], .pr-sheet-buttons [hidden] { display: none; }
.pr-sheet-buttons { display: flex; justify-content: space-between; gap: 10px; }
.pr-sheet-buttons [data-next], .pr-sheet-buttons [data-submit] { margin-left: auto; }
.pr-manage-form { display: flex; flex-direction: column; gap: 12px; }
.pr-manage-form .button { align-self: flex-start; }
.pr-manage-roles { display: flex; flex-direction: column; gap: 6px; }
.pr-manage-role { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(237, 237, 243, .07); }
.pr-manage-role form { margin: 0; }
.pr-remove { min-height: 36px; }
@media (max-width: 700px) { .pr-row { grid-template-columns: minmax(0, 1fr) 44px; } .pr-row .pr-pills { grid-column: 1 / -1; grid-row: 2; } .pr-row-head span:nth-child(2) { display: none; } }
.pr-field input, .pr-field select { box-sizing: border-box; width: 100%; }
.pr-field { font-weight: 500; }
.pr-panel-head .button:hover { border-color: var(--gold); color: #ffd29b; }
.pr-nav { flex: 0 1 280px; min-width: 250px; }
.pr-remove { background: transparent; border: 1px solid rgba(237, 237, 243, .2); color: var(--text); box-shadow: none; }
.pr-remove:hover { border-color: #ff9b8a; color: #ff9b8a; }
.pr-sheet-buttons [data-back] { background: transparent; border: 1px solid rgba(237, 237, 243, .2); color: var(--text); box-shadow: none; }
.pr-manage-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.pr-manage-head .button { gap: 6px; }
.pr-pill-add { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; border: 1px dashed rgba(var(--accent-rgb), .45); background: transparent; color: #ffd29b; font: 500 .82rem/1.4 inherit; font-family: inherit; cursor: pointer; opacity: .75; }
.pr-pill-add:hover, .pr-pill-add:focus-visible { opacity: 1; background: rgba(var(--accent-rgb), .1); outline: none; }
.pr-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) auto; }
.pr-actions { display: flex; align-items: center; gap: 4px; }
.pr-roles-group { display: flex; flex-direction: column; gap: 0; }
.pr-roles-group[hidden] { display: none; }
.pr-roles-group .pr-label { margin: 6px 0 8px; }
.pr-sheet-head p { margin: 4px 0 0; }
.pr-sheet-buttons [data-close] { background: transparent; border: 1px solid rgba(237, 237, 243, .2); color: var(--text); box-shadow: none; }
.pr-role-at { flex-direction: column; gap: 8px; align-items: stretch; }
.pr-role-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.pr-role-check > span { display: flex; flex-direction: column; gap: 2px; }
.pr-role-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex: none; }
.pr-at { display: flex; align-items: center; gap: 8px; margin-left: 30px; }
.pr-at[hidden] { display: none; }
.pr-at select { flex: 1; }
.pr-comp-roles { margin: 0; font-size: .88rem; }
.pr-comp-roles[hidden] { display: none; }

/* ---- Fold: the design system's collapsible section (named by Jerrold, 2026-11-24). Sizes: Fold · Tall, Normal, Small --
   A closed list of header rows in the Team page's group-header look: a gold bar on the left, a warm gradient, the title
   in the display font, an optional muted line of what's inside, an optional count, and a gold ▸ that springs down when
   the row opens. Rows are 40px (still thumb-sized). States: hover lights the row up (gold outline + glow, brighter
   gradient, glowing bar); pressed sinks it; open keeps a gold outline; keyboard focus gets a gold ring.
   Opening has a little sizzle: the bar flares, the arrow springs, the inside fades down, and the children of a
   .fold-stagger box cascade in one after another. Reduced-motion users get a plain open.
   Use <details class="fold"> (or the older .comp-disclose, which now looks the same). */
.fold, .comp-disclose { border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--card-rgb), .7); overflow: hidden; margin: 0 0 6px; transition: border-color .15s ease, box-shadow .15s ease; interpolate-size: allow-keywords; }
.fold[open], .comp-disclose[open] { border-color: rgba(var(--accent-rgb), .45); }
.fold:hover, .comp-disclose:hover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .22), 0 0 18px rgba(var(--accent-rgb), .25); }
.fold > summary, .comp-disclose > summary { position: relative; list-style: none; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 14px; cursor: pointer; font-weight: 600; border: 0; border-radius: 0;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .2), rgba(var(--magenta-rgb), .14) 55%, rgba(255, 255, 255, .04));
  transition: filter .15s ease, transform .08s ease, box-shadow .15s ease; }
.fold > summary::-webkit-details-marker, .comp-disclose > summary::-webkit-details-marker { display: none; }
.fold > summary::marker, .comp-disclose > summary::marker { content: ""; }
.fold > summary::before, .comp-disclose > summary::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0; background: var(--gold); pointer-events: none; transition: box-shadow .15s ease; }
.fold > summary:hover, .comp-disclose > summary:hover { filter: brightness(1.55) saturate(1.15); }
.fold > summary:hover::before, .comp-disclose > summary:hover::before { box-shadow: 0 0 14px rgba(var(--accent-rgb), .95); }
.fold > summary:hover .fold-count, .comp-disclose > summary:hover .fold-count { color: #fff; }
.fold > summary:active, .comp-disclose > summary:active { transform: scale(.995); filter: brightness(.9); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }
.fold > summary:focus-visible, .comp-disclose > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.fold > summary::after, .comp-disclose > summary::after { content: "▸"; flex: none; margin-left: auto; width: auto; height: auto; border: 0; background: none; -webkit-mask: none; mask: none; color: var(--gold); font-size: .85rem; line-height: 1; transition: transform .35s cubic-bezier(.34, 1.8, .64, 1); }
.fold > summary:has(.fold-count:not([hidden]))::after, .comp-disclose > summary:has(.fold-count:not([hidden]))::after { margin-left: 0; }
.fold[open] > summary::after, .comp-disclose[open] > summary::after { transform: rotate(90deg); }
.fold[open] > summary, .comp-disclose[open] > summary { border-bottom: 1px solid rgba(var(--accent-rgb), .35); }
.fold > :not(summary), .comp-disclose > :not(summary) { padding: 10px 14px; }
.fold::details-content, .comp-disclose::details-content { height: 0; overflow: hidden; transition: height .25s ease, content-visibility .25s allow-discrete; }
.fold[open]::details-content, .comp-disclose[open]::details-content { height: auto; }
.fold-title { flex: none; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.comp-disclose > summary { font-family: var(--font-display); }
.fold-sub { flex: 1 1 auto; min-width: 0; font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold-count { flex: none; margin-left: auto; color: var(--text); font-family: var(--font-body); font-size: .9rem; font-weight: 500; font-variant-numeric: tabular-nums; transition: color .15s ease; }
.fold-count[hidden] { display: none; }
.comp-card.fold { padding: 0; display: block; margin: 0 0 10px; }
.comp-card.fold > :not(summary) { padding: 12px 16px; }
/* Three sizes. Normal (40px, plain .fold) is the default.
   .fold-tall (52px): a big section of a page, with a big title (the athlete page's badge sections).
   .fold-small (30px): a fold-out inside a card (Full schedule, Color on the send pad, See the comps) and long lists of rows
   (the admin event lists). */
.fold.fold-tall > summary { min-height: 52px; padding: 10px 18px; }
.fold.fold-tall > summary::before { top: 10px; bottom: 10px; }
.fold.fold-tall .fold-title { font-size: 1.3rem; }
.fold.fold-tall .fold-count { font-size: .95rem; }
.fold.fold-small { margin: 0 0 4px; }
.fold.fold-small > summary { min-height: 30px; padding: 3px 12px; gap: 10px; }
.fold.fold-small > summary::before { top: 6px; bottom: 6px; }
.fold.fold-small .fold-title { font-size: .95rem; }
.fold.fold-small .fold-sub { font-size: .8rem; }
.fold.fold-small .fold-count { font-size: .82rem; }
/* The sizzle: only when someone clicks a row open (js/layout.js and the admin page add .fold-opening for a moment), so a
   page that redraws itself with a section already open doesn't replay it. */
.fold-opening[open] > summary::before { animation: fold-bar .6s ease-out; }
.fold-opening[open] > :not(summary) { animation: fold-item .32s cubic-bezier(.2, .9, .3, 1.2) both; }
/* Every fold cascades: the pieces inside drop in one after another (and a .fold-stagger box's items do the same inside it). */
.fold-opening[open] > :nth-child(2) { animation-delay: 40ms; } .fold-opening[open] > :nth-child(3) { animation-delay: 80ms; }
.fold-opening[open] > :nth-child(4) { animation-delay: 120ms; } .fold-opening[open] > :nth-child(5) { animation-delay: 160ms; }
.fold-opening[open] > :nth-child(6) { animation-delay: 200ms; } .fold-opening[open] > :nth-child(7) { animation-delay: 240ms; }
.fold-opening[open] > :nth-child(n+8) { animation-delay: 280ms; }
.fold-opening[open] .fold-stagger > * { animation: fold-item .32s cubic-bezier(.2, .9, .3, 1.2) both; }
.fold-stagger > :nth-child(1) { animation-delay: 60ms; } .fold-stagger > :nth-child(2) { animation-delay: 82ms; } .fold-stagger > :nth-child(3) { animation-delay: 104ms; }
.fold-stagger > :nth-child(4) { animation-delay: 126ms; } .fold-stagger > :nth-child(5) { animation-delay: 148ms; } .fold-stagger > :nth-child(6) { animation-delay: 170ms; }
.fold-stagger > :nth-child(7) { animation-delay: 192ms; } .fold-stagger > :nth-child(8) { animation-delay: 214ms; } .fold-stagger > :nth-child(9) { animation-delay: 236ms; }
.fold-stagger > :nth-child(10) { animation-delay: 258ms; } .fold-stagger > :nth-child(11) { animation-delay: 280ms; } .fold-stagger > :nth-child(12) { animation-delay: 302ms; }
.fold-stagger > :nth-child(13) { animation-delay: 324ms; } .fold-stagger > :nth-child(14) { animation-delay: 346ms; } .fold-stagger > :nth-child(n+15) { animation-delay: 368ms; }
@keyframes fold-bar { 0% { box-shadow: 0 0 0 rgba(var(--accent-rgb), 0); } 40% { box-shadow: 0 0 14px rgba(var(--accent-rgb), .95); transform: scaleY(1.25); } 100% { box-shadow: 0 0 0 rgba(var(--accent-rgb), 0); transform: none; } }
@keyframes fold-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes fold-item { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .fold::details-content, .comp-disclose::details-content, .fold > summary::after, .comp-disclose > summary::after { transition: none; }
  .fold-opening[open] > summary::before, .fold-opening[open] > :not(summary), .fold-opening[open] .fold-stagger > * { animation: none; }
}

/* Secondary buttons (helpers such as Pick everyone / Clear): gold outline, soft gold fill, hover glow, pressed sink.
   The solid gold .button-primary stays for the one main action on a screen. */
  transition: background-color .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s; }
.button-2:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.button-2:disabled { opacity: .5; cursor: default; transform: none; }
/* In the People & roles panels: stacked sections with a little space between. */
.pr-step .fold, #pr-roles-form .fold { margin-bottom: 10px; }
.pr-group { border-top: 0; padding-top: 0; }
.fold .pr-role { margin: 0 0 8px; }
.pr-changes.fold > summary { font-weight: 500; }
/* People & roles › Switches: one row per feature moving onto the roles, with an Off / Shadow / On choice. */
.pr-switches { margin: 0 0 14px; }
.pr-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 8px 0; }
.pr-switch-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.pr-seg { display: inline-flex; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.pr-seg label { cursor: pointer; }
.pr-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pr-seg span { display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted); transition: background-color .15s, color .15s; }
.pr-seg label:hover span { color: var(--text); }
.pr-seg input:checked + span { background: var(--gold); color: var(--on-accent); }
.pr-seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.pr-seg[disabled] label { cursor: default; }
.pr-trial.is-live i { background: #5fd3a0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Admin shell (2026-11-24): a floating sidebar is the whole admin navigation -------------------------------------
   Team switcher, a menu whose current item sits on a white pill that springs between items, sub-pages under the open
   area, folds to icons (names slide out on hover), and pages blur into each other. Prototype agreed with Jerrold:
   https://claude.ai/artifact/B5THLC33qdcPD83T4aTPzu */
.adm-body { --fold: cubic-bezier(.32,.72,0,1); --spring: cubic-bezier(.34,1.35,.64,1); --side-open: 252px; --side-folded: 70px;
  background: radial-gradient(1000px 520px at 78% -5%, rgba(var(--magenta-rgb), .14), transparent 60%), radial-gradient(900px 500px at 5% 105%, rgba(var(--accent-rgb), .08), transparent 60%), var(--bg); background-attachment: fixed; }
.adm { position: relative; min-height: 100vh; }
.adm-side { position: fixed; top: 16px; bottom: 16px; left: max(16px, env(safe-area-inset-left, 0px)); width: var(--side-open); box-sizing: border-box; z-index: 40;
  background: rgba(var(--card-rgb), .94); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 48px rgba(0,0,0,.45);
  padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow: hidden auto; scrollbar-width: none; transition: width .5s var(--fold); }
.adm.is-folded .adm-side { width: var(--side-folded); overflow: visible; }
.adm.is-folding .adm-side { overflow: hidden; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 2px 4px 8px; min-height: 34px; }
.adm-mark { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--glow); box-shadow: 0 0 14px rgba(var(--accent-rgb), .45); }
.adm-brand-name { font: 700 15px var(--font-display); font-stretch: 125%; white-space: nowrap; }
.adm-brand-name small { font: 500 11px var(--font-body); color: var(--muted); }
.adm-fold { margin-left: auto; width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid rgba(237,237,243,.16); background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: border-color .15s, background-color .15s, transform .5s var(--fold); }
.adm-fold:hover { border-color: var(--gold); background: rgba(var(--accent-rgb), .1); }
.adm.is-folded .adm-fold { position: absolute; right: -15px; top: 18px; background: var(--bg-raised); transform: rotate(180deg); }
.adm-label, .adm-lbl, .adm-count, .adm-team-text, .adm-brand-name { transition: opacity .3s var(--fold) .08s, transform .5s var(--fold); white-space: nowrap; }
.adm.is-folded .adm-label, .adm.is-folded .adm-lbl, .adm.is-folded .adm-count, .adm.is-folded .adm-team-text, .adm.is-folded .adm-brand-name { opacity: 0; transform: translateX(-14px); pointer-events: none; transition: opacity .22s ease, transform .45s var(--fold); }
.adm-lbl { padding: 12px 10px 4px; height: 15px; box-sizing: content-box; overflow: hidden; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: opacity .3s var(--fold) .08s, height .5s var(--fold), padding .5s var(--fold); }
.adm.is-folded .adm-lbl { height: 8px; padding-top: 0; padding-bottom: 0; }
.adm-team { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; color: var(--text); text-decoration: none; transition: background-color .15s; }
.adm-team:hover { background: rgba(255,255,255,.06); color: var(--text); }
.adm-team.is-current { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(237,237,243,.12); }
.adm-team i { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 800 12px var(--font-display); font-style: normal; color: var(--on-accent); }
.adm-team-text b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.adm-team-text small { display: block; font-size: 11px; color: var(--muted); }
.adm-menu { position: relative; display: flex; flex-direction: column; gap: 2px; }
.adm-pill { position: absolute; left: 0; right: 0; top: 0; height: 40px; border-radius: 12px; background: var(--text); box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: transform .55s var(--spring), opacity .2s; pointer-events: none; opacity: 0; }
.adm-nv { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; box-sizing: border-box; border: 0; border-radius: 12px; background: transparent; color: color-mix(in srgb, var(--text) 80%, transparent); font: 500 14px var(--font-body); text-decoration: none; cursor: pointer; transition: color .25s, background-color .15s; }
.adm-nv:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-nv[aria-current="page"] { color: var(--bg); font-weight: 600; background: transparent; }
.adm-nv[aria-current="page"] svg { color: var(--ember); }
.adm-nv svg { flex: none; color: var(--muted); transition: color .25s; }
.adm-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 11px; display: grid; place-items: center; color: color-mix(in srgb, var(--text) 80%, transparent); }
.adm-nv[aria-current="page"] .adm-count { background: var(--gold); color: var(--on-accent); }
.adm-nv:focus-visible, .adm-team:focus-visible, .adm-fold:focus-visible, .adm-sub:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.adm-subs { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--fold); }
.adm-subs > div { overflow: hidden; display: flex; flex-direction: column; }
.adm-subs.is-open { grid-template-rows: 1fr; }
.adm-subs.is-open > div { padding: 4px 0 6px; }
.adm.is-folded .adm-subs { grid-template-rows: 0fr; }
.adm-sub { display: block; padding: 6px 12px 6px 44px; border-radius: 10px; color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; transition: color .15s, background-color .15s; }
.adm-sub:hover { color: #fff; background: rgba(255,255,255,.05); }
.adm-sub.is-current { color: var(--gold); font-weight: 600; }
.adm-tip { position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-6px, -50%); padding: 6px 10px; border-radius: 9px; background: var(--bg-raised); border: 1px solid rgba(var(--accent-rgb), .4); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .2s var(--fold); box-shadow: 0 8px 20px rgba(0,0,0,.4); z-index: 50; }
.adm.is-folded .adm-nv:hover .adm-tip, .adm.is-folded .adm-nv:focus-visible .adm-tip, .adm.is-folded .adm-team:hover .adm-tip, .adm.is-folded .adm-team:focus-visible .adm-tip { opacity: 1; transform: translate(0, -50%); }
.adm:not(.is-folded) .adm-tip { display: none; }
.adm-foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.adm-foot form { margin: 0; }
.adm-me { display: flex; align-items: center; gap: 10px; padding: 10px 4px 2px; border-top: 1px solid var(--line); margin-top: 6px; }
.adm-av { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--bg-raised); display: grid; place-items: center; font-weight: 600; color: var(--gold); }
.adm-main { margin-left: calc(var(--side-open) + 16px + max(16px, env(safe-area-inset-left, 0px)) + 18px); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-top: 16px; will-change: transform; }
.adm.is-folded .adm-main { margin-left: calc(var(--side-folded) + 16px + max(16px, env(safe-area-inset-left, 0px)) + 18px); }
.adm-main > main { width: auto; max-width: 1200px; margin: 0; }
.adm-main > main > section { margin-top: 18px; }
.adm-top { display: flex; align-items: center; gap: 12px; min-height: 38px; }
.adm-crumb { font-size: 13px; color: var(--muted); }
.adm-crumb > span { padding: 0 6px; }
.adm-crumb b { color: var(--text); font-weight: 600; }
.adm-burger { display: none; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--card-rgb), .9); color: var(--text); place-items: center; cursor: pointer; }
.adm-scrim { display: none; }
.adm-h1 { margin: 0; font: 800 clamp(26px, 3.2vw, 34px) var(--font-display); font-stretch: 125%; letter-spacing: -.01em; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; }
.adm-tile { border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; background: rgba(var(--card-rgb), .8); border: 1px solid rgba(237,237,243,.08); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
.adm-tile:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .5); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.adm-tile small { font-size: 12px; color: var(--muted); }
.adm-tile b { font: 800 28px var(--font-display); font-stretch: 110%; font-variant-numeric: tabular-nums; }
.adm-tile span { font-size: 13px; color: color-mix(in srgb, var(--text) 80%, transparent); }
.adm-tile.is-hot { background: var(--glow); border: 0; color: var(--on-accent); }
.adm-tile.is-hot small, .adm-tile.is-hot span { color: #3a1a05; }
.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.adm-card { background: rgba(var(--card-rgb), .8); border: 1px solid rgba(237,237,243,.08); border-radius: 18px; padding: 16px 18px; min-width: 0; }
.adm-card h2 { margin: 0 0 6px; font: 700 16px var(--font-display); font-stretch: 110%; }
.adm-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(237,237,243,.07); }
.adm-settle > * { animation: adm-rise .5s var(--fold) both; }
.adm-settle > *:nth-child(2) { animation-delay: .05s } .adm-settle > *:nth-child(3) { animation-delay: .1s } .adm-settle > *:nth-child(4) { animation-delay: .15s }
@keyframes adm-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#adm-view { view-transition-name: adm-view; }
::view-transition-old(adm-view) { animation: adm-out .22s ease both; }
::view-transition-new(adm-view) { animation: adm-in .32s ease both; }
.adm-leaving { animation: adm-out .2s ease both; }
.adm-entering { animation: adm-in .34s ease both; }
@keyframes adm-out { to { opacity: 0; filter: blur(8px); transform: scale(.99); } }
@keyframes adm-in { from { opacity: 0; filter: blur(8px); } }
#perm-features .pr-switch-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.adm-grid-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(var(--card-rgb), .8); }
.adm-grid { border-collapse: collapse; width: 100%; min-width: 860px; font-variant-numeric: tabular-nums; }
.adm-grid th, .adm-grid td { padding: 8px 10px; border-bottom: 1px solid rgba(237,237,243,.07); text-align: center; }
.adm-grid thead th { font-size: 12px; vertical-align: bottom; }
.adm-grid tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
.adm-grid tbody tr:last-child th, .adm-grid tbody tr:last-child td { border-bottom: 0; }
.adm-grid .pr-pill[data-tip]::after { left: 50%; transform: translate(-50%, 4px); }
.adm-grid .pr-pill[data-tip]:hover::after, .adm-grid .pr-pill[data-tip]:focus-visible::after { transform: translate(-50%, 0); }
.adm-grid thead th:first-child .pr-pill[data-tip]::after, .adm-grid thead th:nth-child(2) .pr-pill[data-tip]::after { left: 0; transform: none; }
.adm-grid thead th { position: relative; }
.adm-grid-wrap { overflow-y: visible; }
.adm-lv { display: inline-block; min-width: 64px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.lv-none { background: rgba(255,255,255,.05); color: #6f6b8c; }
.lv-see { background: #16294a; color: #9cc3ff; }
.lv-own { background: #1d3a30; color: #8be0b8; }
.lv-add { background: #3a2a10; color: #ffcf87; }
.lv-manage { background: #4a1f12; color: #ffb38a; }
@media (max-width: 760px) {
  /* the site header's phone rule (nav { flex-wrap: wrap; margin }) also matches this <nav>: with many teams the menu wrapped into a second column */
  .adm-side { flex-wrap: nowrap; margin: 0; order: 0; background: rgb(var(--card-rgb)); top: 10px; bottom: 10px; left: max(10px, env(safe-area-inset-left, 0px)); width: 260px; transform: translateX(calc(-100% - 24px)); transition: transform .45s var(--fold); }
  .adm.is-folded .adm-side { width: 260px; overflow: hidden auto; }
  .adm.menu-open .adm-side { transform: none; }
  .adm.is-folded .adm-label, .adm.is-folded .adm-lbl, .adm.is-folded .adm-count, .adm.is-folded .adm-team-text, .adm.is-folded .adm-brand-name { opacity: 1; transform: none; pointer-events: auto; }
  .adm.is-folded .adm-lbl { height: 15px; padding: 12px 10px 4px; }
  .adm.is-folded .adm-subs.is-open { grid-template-rows: 1fr; }
  .adm-fold { display: none; }
  .adm-main, .adm.is-folded .adm-main { margin-left: 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); }
  .adm-burger { display: grid; }
  .adm-body .preview-bar { z-index: 30; } /* the open menu drawer (40) and its dimmer (35) cover the Preview banner on phones */
  .adm-scrim { display: block; position: fixed; inset: 0; background: rgba(5,4,15,.6); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 35; }
  .adm.menu-open .adm-scrim { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .adm-side, .adm-pill, .adm-subs, .adm-fold, .adm-label, .adm-lbl, .adm-count, .adm-team-text, .adm-brand-name { transition: none !important; }
  .adm-settle > *, ::view-transition-old(adm-view), ::view-transition-new(adm-view), .adm-leaving, .adm-entering { animation: none !important; }
}
.adm-foot .adm-nv[aria-current="page"] { background: var(--text); }

/* View as: the gold bar on every page while the owner sees the site as someone else, and Admin's "can't open" notice. */
.viewas-bar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--glow); color: var(--on-accent); font-size: .9rem; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.viewas-bar button { padding: 4px 14px; border-radius: 999px; border: 1px solid rgba(26,13,5,.5); background: rgba(255,255,255,.25); color: var(--on-accent); font: 600 .85rem var(--font-body); cursor: pointer; }
.viewas-bar button:hover { background: rgba(255,255,255,.45); }
.preview-bar { position: sticky; top: 0; z-index: 99; padding: 7px max(16px, env(safe-area-inset-left, 0px)); text-align: center; background: rgba(20, 96, 110, .5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); color: #eafcff; font-size: .85rem; box-shadow: 0 3px 12px rgba(0,0,0,.25); } /* see-through, so the page shows behind it (Jerrold, 2026-12-01) */
.preview-live { display: inline-block; margin-left: 10px; padding: 2px 12px; border-radius: 999px; border: 1px solid rgba(234,252,255,.6); background: rgba(255,255,255,.14); color: #eafcff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.preview-live:hover { background: rgba(255,255,255,.3); }
.preview-bar b { letter-spacing: .08em; text-transform: uppercase; }
.viewas-wall { max-width: 640px; margin: 12vh auto 0; padding: 0 max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 12px; }
.viewas-wall h1 { margin: 0; font: 800 clamp(28px, 4vw, 40px) var(--font-display); font-stretch: 125%; }
.viewas-wall form { margin: 0; }
.pr-viewas { margin: 0; display: contents; }
.adm-viewas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: linear-gradient(90deg, rgba(var(--accent-rgb), .22), rgba(var(--ember-rgb), .14)); border: 1px solid rgba(var(--accent-rgb), .5); font-size: .9rem; }
.adm-viewas span { flex: 1 1 320px; }
/* People & roles on a phone: name and the Roles/View as/⋯ buttons share the first line, role pills get their own line below. */
@media (max-width: 700px) {
  .pr-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; }
  .pr-row .pr-who { grid-column: 1; grid-row: 1; min-width: 0; }
  .pr-row .pr-actions { grid-column: 2; grid-row: 1; }
  .pr-row .pr-pills { grid-column: 1 / -1; grid-row: 2; }
  .pr-row .pr-name b { overflow-wrap: anywhere; }
  .pr-actions { gap: 0; }
  .pr-panel { padding-left: 12px; padding-right: 12px; }
  .pr-av { width: 32px; height: 32px; font-size: .78rem; }
  .pr-row .pr-sign { white-space: nowrap; }
  .pr-actions .pr-icon { width: 34px; height: 40px; }
  .pr-panel-head { flex-wrap: wrap; gap: 10px; }
}

/* Top bar: "Sign in", and once signed in your initial with a small menu (js/layout.js). */
.signin-slot { position: relative; display: flex; align-items: center; }
.signin-slot[hidden] { display: none; }
.signin-btn { display: inline-flex; align-items: center; padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .55); background: rgba(var(--accent-rgb), .12); color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.signin-btn:hover { color: var(--text); background: rgba(var(--accent-rgb), .24); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15); }
.signin-btn:focus-visible, .me-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.me-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(var(--accent-rgb), .55); background: var(--glow); color: var(--on-accent); font: 700 15px var(--font-display); cursor: pointer; transition: box-shadow .15s; }
.me-btn:hover { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .22); }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; padding: 8px; border-radius: 14px; background: var(--bg-raised); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.me-menu[hidden] { display: none; }
.me-who { margin: 4px 10px 8px; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.me-who b { color: var(--text); font-weight: 600; }
.me-menu a, .me-menu button { display: block; padding: 8px 10px; border-radius: 10px; border: 0; background: none; color: var(--text); text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.me-menu a:hover, .me-menu button:hover { background: var(--bg-hover); color: var(--text); }
.account-for { margin: -4px 0 0; }
@media (max-width: 640px) { .signin-btn { padding: 5px 12px; font-size: .9rem; } }
/* "SenderSpot home" in the admin sidebar: set apart, with a gold outline, so leaving Admin is obvious. */
.adm-nv.adm-home { border: 1px solid rgba(var(--accent-rgb), .45); margin-bottom: 4px; color: var(--text); }
.adm-nv.adm-home svg { color: var(--gold); }
.adm-nv.adm-home:hover { background: rgba(var(--accent-rgb), .14); border-color: var(--gold); }
.adm.is-folded .adm-nv.adm-home { border-color: transparent; }
/* The sign-in / account page: one centred column instead of a box hugging the left edge. */
.account-page > section { max-width: 520px; margin-left: auto; margin-right: auto; }
.account-page .page-intro { text-align: center; margin-top: 8vh; }
.account-page .page-intro h1 { margin-bottom: 0; }
.account-page #account { margin-top: 24px; }
.account-page .account-box { padding: 28px; max-width: none; }
.adm-row-link { color: var(--text); text-decoration: none; border-radius: 8px; transition: background-color .15s; }
.adm-row-link:hover { color: var(--text); background: rgba(var(--accent-rgb), .08); }
.adm-row-link:hover > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
/* One sign-in page and settings (js/account-page.js). */
.account-stack { display: grid; gap: 16px; }
.account-h2 { margin: 0; font-size: 1.15rem; }
.account-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.account-links .button { margin-left: auto; }
.linkish { justify-self: start; padding: 0; border: 0; background: none; color: var(--gold); font: inherit; font-size: .92rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--text); }
/* Medium widths: Search shrinks to its icon so the sign-in button / your initial stays on the top bar's first line. */
@media (max-width: 1060px) and (min-width: 641px) {
  .header-inner { gap: 12px; }
  nav a { white-space: nowrap; padding: 6px 9px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { padding: 8px 10px; }
}
/* Narrower: the links take their own row under the logo, Search and you (like on a phone). */
@media (max-width: 900px) and (min-width: 641px) {
  .header-inner { padding: 10px 0; }
  nav { order: 3; width: 100%; margin: 0 -12px; flex-wrap: wrap; }
  .search-trigger { margin-left: auto; }
}
@media (max-width: 640px) { .signin-slot { order: 2; } }

/* ---- Sign-in card (account.html), from the redesign prototype https://claude.ai/artifact/LueKsTXVZhsXPHZPTY8X29 ----------
   01 one loud button, the rest quiet links · 02 56px fields, 16 between, 32 before the button · 03 labels above, examples
   inside, Show on passwords · 04 one accent, a 2px focus ring that fades in · 05 hairline border, lit top edge, a shadow that
   falls down, 24/12 corners · 06 the button presses in, spins, ticks "Signed in"; a mistake shakes the card. Theme colours. */
.signin-card { position: relative; width: 100%; max-width: 420px; margin: 0 auto; box-sizing: border-box; padding: 32px 28px 26px; border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 240, 220, .07) 0%, rgba(255, 240, 220, 0) 28%), rgb(var(--card-rgb));
  box-shadow: inset 0 1px 0 rgba(255, 240, 220, .16), 0 24px 60px rgba(0, 0, 0, .55), 0 0 80px rgba(var(--accent-rgb), .08);
  animation: sf-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.signin-card + .signin-card { margin-top: 16px; animation-delay: .06s; }
.signin-card.is-shaking { animation: sf-shake .4s cubic-bezier(.36, .07, .19, .97); }
@keyframes sf-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes sf-shake { 15%, 55% { transform: translateX(-7px); } 35%, 75% { transform: translateX(7px); } 90% { transform: translateX(-2px); } }
.signin-card h2 { margin: 0; font: 800 28px var(--font-display); letter-spacing: -.01em; color: var(--text); background: none; -webkit-text-fill-color: currentColor; text-transform: none; line-height: 1.15; }
.signin-card .sf-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.signin-card form { display: flex; flex-direction: column; margin-top: 24px; }
.sf-field { display: flex; flex-direction: column; gap: 8px; }
.sf-field + .sf-field, .sf-check + .sf-field { margin-top: 16px; }
.sf-field > label { font-size: 13px; font-weight: 600; color: var(--muted); transition: color .15s; }
.sf-field > label .muted { font-weight: 400; }
.sf-field:focus-within > label { color: var(--text); }
.sf-box { position: relative; }
.sf-box input, .sf-box select { width: 100%; box-sizing: border-box; min-height: 48px; }
.sf-box.has-show input { padding-right: 76px; }
.sf-show { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 600 13px var(--font-body); cursor: pointer; }
.sf-show:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.sf-err { margin: 8px 0 0; font-size: 13px; color: #ff7a6b; }
.sf-err:empty { display: none; }
.sf-ok { margin: 12px 0 0; font-size: 14px; color: var(--gold); text-align: center; }
.sf-ok:empty { display: none; }
.sf-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; }
.sf-check { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 14px; cursor: pointer; }
.sf-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--gold); flex: none; }
.sf-link { border: 0; background: none; padding: 4px 0; color: var(--gold); font: 500 14px var(--font-body); cursor: pointer; text-decoration: none; }
.sf-link:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.sf-go { position: relative; margin-top: 32px; height: 56px; border-radius: 12px; border: 0; background: var(--glow); color: var(--on-accent); font: 700 16px var(--font-body); cursor: pointer;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), .25); transition: transform .12s ease, box-shadow .15s, filter .15s; display: grid; place-items: center; }
.sf-go:hover { filter: brightness(1.06); box-shadow: 0 10px 30px rgba(var(--accent-rgb), .35); }
.sf-go:active { transform: scale(.97); }
.sf-go:disabled { cursor: default; }
.sf-go:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.sf-go.is-quiet { background: rgba(var(--accent-rgb), .12); color: var(--text); border: 1px solid rgba(var(--accent-rgb), .55); box-shadow: none; }
.sf-go .sf-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(0, 0, 0, .25); border-top-color: currentColor; animation: sf-spin .7s linear infinite; }
@keyframes sf-spin { to { transform: rotate(360deg); } }
.sf-go .sf-done { display: inline-flex; align-items: center; gap: 8px; animation: sf-pop .3s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes sf-pop { from { opacity: 0; transform: scale(.7); } }
.sf-foot { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.sf-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.account-page.is-signin .page-intro { display: none; }
.account-page.is-signin #account { margin-top: 8vh; }
@media (max-width: 480px) { .signin-card { padding: 26px 18px 20px; border-radius: 20px; } }
@media (prefers-reduced-motion: reduce) { .signin-card, .signin-card.is-shaking, .sf-go .sf-done, .sf-go .sf-spin { animation: none !important; } .sf-box input, .sf-go { transition: none; } }

/* ---- Buttons (2026-11-24): two kinds, from the button prototype https://claude.ai/artifact/PDYT6b5zqv6mCneWHhDXbL ------------
   MAIN  .button.button-primary  one per screen: the gold fill (theme: --btn-main), a lit top edge, a rim, a groove around it,
                                 a shadow that falls down.
   SECONDARY  .button            everything else: dark satin (--btn-satin) with a thin gold rim that lights up on hover; a
                                 white label. .button-2 is the compact secondary (40px) for rows of small helpers.
   Both: a pill (radius = half the height), 46px tall, label + optional 18–20px icon 10px apart; press sinks 1px; focus ring.
   Older per-area rules that shrink buttons (admin cards, gallery arrows…) still apply on top, so dense spots stay compact. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; box-sizing: border-box; border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), .42); background: var(--btn-satin); color: var(--text); font: 600 15px var(--font-body); letter-spacing: -.005em; line-height: 1.2; text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .10), 0 8px 22px rgba(0, 0, 0, .32);
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, filter .2s ease, background-color .2s ease; }
.button svg { flex: none; }
.button:hover { color: var(--text); background: var(--btn-satin); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18), 0 0 18px rgba(var(--accent-rgb), .22), inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 22px rgba(0, 0, 0, .32); }
.button:active { transform: translateY(1px); box-shadow: 0 0 0 3px rgba(0, 0, 0, .22), inset 0 2px 4px rgba(0, 0, 0, .4); }
.button:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.button:disabled, .button[aria-disabled="true"] { opacity: .5; cursor: default; transform: none; filter: grayscale(.4); }
.button.button-primary { border-color: rgba(255, 235, 200, .55); background: var(--btn-main); color: var(--on-accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(0, 0, 0, .12), 0 8px 24px rgba(var(--accent-rgb), .28), 0 2px 4px rgba(0, 0, 0, .35); }
.button.button-primary:hover { color: var(--on-accent); background: var(--btn-main); filter: brightness(1.05); border-color: rgba(255, 235, 200, .7);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .22), inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -2px 0 rgba(0, 0, 0, .12), 0 10px 30px rgba(var(--accent-rgb), .4), 0 2px 4px rgba(0, 0, 0, .35); }
.button.button-primary:active { box-shadow: 0 0 0 3px rgba(0, 0, 0, .22), inset 0 2px 4px rgba(0, 0, 0, .25), 0 4px 12px rgba(var(--accent-rgb), .25); }
/* Compact secondary (rows of small helpers: Pick everyone, Clear, Save…). */
.button-2 { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; box-sizing: border-box; border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), .42); background: var(--btn-satin); color: var(--text); font: 600 14px var(--font-body); text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .10), 0 6px 16px rgba(0, 0, 0, .28);
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease; }
.button-2:hover { color: var(--text); background: var(--btn-satin); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .16), 0 0 16px rgba(var(--accent-rgb), .2), inset 0 1px 0 rgba(255, 255, 255, .14); }
.button-2:active { transform: translateY(1px); background: var(--btn-satin); box-shadow: 0 0 0 3px rgba(0, 0, 0, .22), inset 0 2px 4px rgba(0, 0, 0, .4); }
/* Compact (40px), the design system's small size: buttons in rows, cards and toolbars, and beside compact text boxes
   (36px). Same look as their full-size kind (gold main stays gold), just shorter. Add .button-compact anywhere else. */
.button-compact, .admin-athlete .button, .admin-match .button, .admin-gallery-order .button, .admin-insta .button, .admin-refresh .button,
.admin-hotel .button, .admin-alumnus-actions .button, .admin-row .button, .admin-search .button, .admin-card-actions .button, .comp-tight .button,
.pr-actions .button, .pr-manage-head .button, .org-state .button, .admin-logout .button, .yc-open, .admin-refresh-all .button, .card-more > summary.button { min-height: 40px; padding: 0 18px; gap: 8px; font-size: 14px; }
.comp-mini { min-height: 0; } /* the small chip-style links on comp cards are chips, not buttons */
@media (prefers-reduced-motion: reduce) { .button, .button-2 { transition: none; } .button:active, .button-2:active { transform: none; } }
/* Buttons that save (js/press.js): a spinner while working, then a tick. */
.press-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: press-spin .7s linear infinite; }
@keyframes press-spin { to { transform: rotate(360deg); } }
.press-done { display: inline-flex; align-items: center; gap: 8px; animation: press-pop .3s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes press-pop { from { opacity: 0; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .press-spin { animation-duration: 1.6s; } .press-done { animation: none; } }

/* ---- Checkboxes (2026-11-24), from the prototype https://claude.ai/artifact/9t73FWsXvpFsnUGDVr4dNW ----------------------------
   Every <input type="checkbox"> on the site: 22px, rounded, a gold-tinted edge; hover haloes; pressing squishes it and letting
   go springs it back; ticking grows the gold fill from the middle, then draws the tick left to right; "some, not all"
   (indeterminate) shows a dash. Still the real checkbox: keyboards, screen readers and forms are unchanged. Add the class
   .plain-check to keep the browser's own box somewhere. */
input[type="checkbox"]:not(.plain-check) {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; box-sizing: border-box; vertical-align: middle;
  width: 22px !important; height: 22px !important; min-height: 0 !important; padding: 0 !important; border-radius: 7px; cursor: pointer;
  border: 1.5px solid rgba(var(--accent-rgb), .55); background: var(--bg-raised); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
  transition: border-color .2s, box-shadow .2s, transform .35s cubic-bezier(.34, 1.8, .5, 1); }
input[type="checkbox"]:not(.plain-check):hover, label:hover > input[type="checkbox"]:not(.plain-check) {
  border-color: var(--gold); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .14), inset 0 1px 2px rgba(0, 0, 0, .35); }
input[type="checkbox"]:not(.plain-check):active { transform: scale(.82); transition-duration: .08s; }
input[type="checkbox"]:not(.plain-check):focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
input[type="checkbox"]:not(.plain-check)::before { content: ""; position: absolute; inset: -1.5px; border-radius: 7px; background: var(--btn-main); transform: scale(0); opacity: 0;
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), opacity .15s; }
input[type="checkbox"]:not(.plain-check):checked::before, input[type="checkbox"]:not(.plain-check):indeterminate::before { transform: scale(1); opacity: 1; }
input[type="checkbox"]:not(.plain-check):checked, input[type="checkbox"]:not(.plain-check):indeterminate { border-color: transparent; box-shadow: 0 2px 10px rgba(var(--accent-rgb), .35); }
input[type="checkbox"]:not(.plain-check)::after { content: ""; position: absolute; inset: 0; background: var(--on-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.2 4.2 8.8-9.4'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.2 4.2 8.8-9.4'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  clip-path: inset(0 100% 0 0); transition: clip-path .22s ease-in; }
input[type="checkbox"]:not(.plain-check):checked::after { clip-path: inset(0 0 0 0); transition: clip-path .3s cubic-bezier(.65, 0, .35, 1) .1s; }
input[type="checkbox"]:not(.plain-check):indeterminate::after { clip-path: inset(0 0 0 0);
  -webkit-mask: linear-gradient(#000 0 0) center / 10px 3px no-repeat; mask: linear-gradient(#000 0 0) center / 10px 3px no-repeat; }
input[type="checkbox"]:not(.plain-check):disabled { opacity: .45; cursor: default; transform: none; }
@media (prefers-reduced-motion: reduce) { input[type="checkbox"]:not(.plain-check), input[type="checkbox"]:not(.plain-check)::before, input[type="checkbox"]:not(.plain-check)::after { transition: none !important; } }

/* ---- Organizer page (comp-manage.html), 2026-11-24, from the prototype https://claude.ai/artifact/BCeibAaQn9RNVsGfDyZT9a --------
   A bar pinned under the site's top bar (name, state, the one big action) over four tabs: Run, Climbers, Setup, People. */
.comp-page.org-page { max-width: 1040px; margin-top: 18px; }
.org-bar { position: sticky; top: var(--org-top, 0px); z-index: 8; margin: 0 -4px 20px; padding: 12px 4px 0; display: grid; gap: 10px;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), .97) 75%, rgba(var(--bg-rgb), .9)); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.org-top { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.org-name { flex: 1 1 280px; min-width: 0; }
.org-name .eyebrow { margin: 0; font-size: 0.72rem; }
.org-bar h1 { margin: 2px 0 0; font-size: clamp(1.15rem, 2.6vw, 1.6rem); line-height: 1.1; text-wrap: balance; overflow-wrap: anywhere; }
.org-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.org-state .comp-pill { font-size: 0.8rem; padding: 2px 10px; }
.org-when { color: var(--muted); font-size: 0.88rem; }

.org-ico { display: inline-grid; place-items: center; flex: none; }
.org-ico svg { width: 18px; height: 18px; }
.org-state .button .org-ico svg { width: 14px; height: 14px; }
.org-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.org-tabs::-webkit-scrollbar { display: none; }
.org-tab { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px 12px; font-weight: 600; color: var(--muted); white-space: nowrap; border-radius: 10px 10px 0 0; transition: color .15s, background .15s; }
.org-tab:hover { color: var(--text); background: rgba(var(--accent-rgb), .07); }
.org-tab:active { background: rgba(var(--accent-rgb), .12); }
.org-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.org-tab[aria-selected="true"] { color: var(--text); }
.org-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--btn-main); box-shadow: 0 0 12px rgba(var(--accent-rgb), .6); }
.org-tab[aria-selected="true"] .org-ico { color: var(--gold); }
.org-count { font-size: 0.72rem; padding: 1px 7px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.org-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: org-pulse 1.6s infinite; }
@keyframes org-pulse { 50% { opacity: .35; } }
.org-panel { animation: org-in .22s ease-out; }
@keyframes org-in { from { opacity: .4; transform: translateY(6px); } }
.org-panel .comp-card h2 { margin: 0; font-size: 1.05rem; }
.org-panel .comp-card h2 small { font-family: var(--font-body); font-size: 0.82rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
.org-stack { display: grid; gap: 0; max-width: 760px; }

/* Run */
.org-run { display: grid; gap: 0 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .org-run { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.org-col { display: grid; min-width: 0; }
.org-standings { min-width: 0; }
.org-bigs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.button.org-big { flex-direction: column; gap: 3px; min-height: 88px; height: auto; border-radius: 18px; padding: 12px; white-space: normal; text-align: center; line-height: 1.2; }
.org-big .org-ico svg { width: 22px; height: 22px; }
.org-big small { font-weight: 400; font-size: 0.78rem; opacity: .8; }

/* Climbers */
.org-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.org-search { flex: 1 1 220px; position: relative; min-width: 0; display: block; }
.org-search .org-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.org-search input { width: 100%; padding-left: 42px; }
.org-stack > .filter-bar { margin-bottom: 10px; }
.org-hint { font-size: 0.88rem; margin: 0 0 10px; }
.org-list { list-style: none; margin: 0 0 18px; padding: 0; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); }
.org-group { display: flex; justify-content: space-between; gap: 10px; padding: 9px 16px; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); background: rgba(var(--accent-rgb), .07); border-top: 1px solid var(--line); }
.org-group:first-child { border-top: 0; border-radius: var(--radius) var(--radius) 0 0; }
.org-group small { font-family: var(--font-body); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 0.8rem; }
.org-row { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 40px; gap: 4px 10px; align-items: center; min-height: 50px; padding: 0 6px 0 16px; border-top: 1px solid var(--line); }
.org-group + .org-row { border-top: 0; }
.org-row:hover { background: rgba(var(--accent-rgb), .04); }
.org-row.has-menu { z-index: 6; }
.org-tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; border: 1.5px dashed var(--line); }
.org-row.is-joined .org-tick { border: 0; background: var(--gold); color: var(--on-accent); }
.org-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-row-meta { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.org-row:not(.is-joined) .org-row-meta { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; letter-spacing: .04em; }
.org-more { all: unset; box-sizing: border-box; cursor: pointer; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); }
.org-more .org-ico svg { width: 20px; height: 20px; }
.org-more:hover, .org-more[aria-expanded="true"] { background: var(--bg-hover, rgba(255,255,255,.06)); color: var(--text); }
.org-more:active { transform: scale(.92); }
.org-more:focus-visible { outline: 2px solid var(--gold); }
.org-menu { position: absolute; right: 6px; top: 44px; z-index: 9; min-width: 220px; display: grid; padding: 6px; border-radius: 14px; background: var(--bg-raised); border: 1px solid rgba(var(--accent-rgb), .4); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); animation: org-pop .16s ease-out; transform-origin: top right; }
@keyframes org-pop { from { opacity: 0; transform: scale(.94); } }
.org-menu [role="menuitem"] { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 10px; font-size: 0.92rem; color: var(--text); }
.org-menu [role="menuitem"]:hover, .org-menu [role="menuitem"]:focus-visible { background: rgba(var(--accent-rgb), .13); }
.org-menu [role="menuitem"] .org-ico { color: var(--gold); }
.org-menu .is-danger, .org-menu .is-danger .org-ico { color: #ff8a8a; }
.org-menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.org-row-extra { grid-column: 1 / -1; padding: 2px 0 14px 32px; display: grid; gap: 10px; min-width: 0; }
.org-row-extra .cc-qr { padding: 0; }
@media (prefers-reduced-motion: reduce) { .org-panel, .org-menu, .org-live-dot { animation: none; } }

/* Phones: a shorter bar; the four tabs share the width, icon over label. The site's top bar scrolls away on this page so
   only the organizer bar stays pinned. */
@media (max-width: 640px) {
  body.org-body #site-header { position: static; }
  .org-bar { top: 0; }
  .org-name .eyebrow { font-size: 0.66rem; margin: 0; }
  .comp-page.org-page { margin-top: 6px; }
  .org-bar { padding-top: 8px; gap: 6px; }
  .org-top { gap: 6px; }
  .org-name { flex-basis: 100%; }
  .org-state { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .org-when { font-size: 0.78rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .org-state .button { margin-left: auto; }
  .org-tabs { gap: 0; }
  .org-tab { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 2px 8px; font-size: 0.76rem; }
  .org-tab .org-ico svg { width: 20px; height: 20px; }
  .org-tab .org-count { position: absolute; top: 1px; left: calc(50% + 8px); font-size: 0.62rem; padding: 0 5px; }
  .org-tab .org-live-dot { position: absolute; top: 5px; left: calc(50% + 12px); }
  .org-row { padding-left: 12px; }
  .org-row-extra { padding-left: 0; }
}

/* ---- Climber cards page (comp-cards.html), 2026-11-25: format and preview side by side ------------------------------------
   Wide screens: the format panel on the left is pinned under the top bar and scrolls on its own; the cards fill the right,
   so every change shows without scrolling. Narrower: one column, with a floating "See preview / Back to format" button. */
.cards-layout { display: grid; gap: 18px; align-items: start; }
.cards-side { display: grid; gap: 12px; min-width: 0; scroll-margin-top: 80px; }
.cards-side .cards-options { margin: 0; }
.cards-preview { min-width: 0; display: grid; gap: 10px; scroll-margin-top: 80px; }
.cards-preview-title { margin: 0; color: var(--muted); font-size: 0.88rem; }
.cards-preview-title b { color: var(--gold); text-transform: uppercase; letter-spacing: .1em; font-size: 0.78rem; margin-right: 2px; }
.cards-jump { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 12; min-height: 44px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
@media (min-width: 1100px) {
  .cards-layout { grid-template-columns: minmax(360px, 420px) minmax(0, 1fr); gap: 28px; }
  .cards-side { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; }
  .cards-side .cards-grid { grid-template-columns: 1fr; }
  .cards-jump { display: none; }
}
@media print { .cards-layout { display: block; } .cards-preview { display: block; } }

/* Comp logo (2026-11-25): uploaded on the cards page, printed at the top of every card. */
.sc-who.has-logo { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
.sc-who.has-logo > :not(.sc-logo) { grid-column: 2; }
.sc-logo { grid-column: 1; grid-row: 1 / span 3; max-height: 72px; max-width: 150px; width: auto; height: auto; object-fit: contain; }
.climber-card-logo { display: block; max-height: 40px; max-width: 70%; margin: 0 auto 6px; object-fit: contain; }
.cards-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cards-logo-thumb { display: block; width: 64px; height: 64px; padding: 4px; background: #fff; border-radius: 8px; object-fit: contain; }
.cards-logo-empty { display: grid; place-items: center; width: 96px; height: 56px; border: 1.5px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 0.82rem; }
.cards-logo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* The picture dialog on pages outside Admin (js/crop-dialog.js): a square preview for logos, and a checkerboard behind the
   picture so a transparent background shows as transparent. */
.photo-preview-canvas.is-square { border-radius: 12px; }
.photo-stage-check, .photo-preview-canvas.is-square { background: repeating-conic-gradient(#ffffff 0 25%, #e6e6e6 0 50%) 0 0 / 16px 16px; }
.cards-logo-thumb-btn { all: unset; cursor: pointer; border-radius: 10px; }
.cards-logo-thumb-btn:hover .cards-logo-thumb, .cards-logo-thumb-btn:focus-visible .cards-logo-thumb { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .5); }
button.cards-logo-empty { cursor: pointer; background: transparent; font: inherit; font-size: 0.82rem; }
button.cards-logo-empty:hover { border-color: var(--gold); color: var(--text); }

/* Templates (2026-11-25): the Save as a template dialog (organizer page, Setup) and the Create Mock Comp chooser. */
.tpl-form { display: grid; gap: 14px; padding: 16px; }
.tpl-form textarea, .tpl-form input[type="text"] { width: 100%; box-sizing: border-box; }
.tpl-form textarea { min-height: 76px; resize: vertical; }
.tpl-parts-pick { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 4px; }
.tpl-parts-pick legend { padding: 0 6px; font-weight: 600; }
.tpl-part-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; cursor: pointer; }
.tpl-part-row input { margin-top: 2px; }
.tpl-part-row span { display: grid; gap: 2px; }
.tpl-part-row.is-off { cursor: default; opacity: .6; }
.tpl-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 12px; }
.tpl-card { display: flex; gap: 14px 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.tpl-card:hover { border-color: rgba(var(--accent-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .1); }
.tpl-blank { border-style: dashed; }
.tpl-main { flex: 1 1 280px; min-width: 0; display: grid; gap: 6px; }
.tpl-name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.tpl-desc { margin: 0; color: var(--muted); }
.tpl-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-part { font-size: 0.76rem; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .45); color: var(--gold); }
.tpl-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tpl-hint { font-size: 0.88rem; }

/* Which comp am I on? (2026-11-25): the code tag in each comp page's eyebrow, and the slim bar (name + code) that slides in
   under the top bar once the page title scrolls away (js/comp-common.js compEyebrow). */
.comp-code-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .55); color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: .08em; white-space: nowrap; }
.comp-stick { position: fixed; left: 0; right: 0; z-index: 9; display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 7px max(16px, env(safe-area-inset-right, 0px)) 7px max(16px, env(safe-area-inset-left, 0px));
  background: rgba(var(--bg-rgb), .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transform: translateY(-120%); opacity: 0; pointer-events: none; transition: transform .22s ease, opacity .22s ease; }
.comp-stick.is-on { transform: none; opacity: 1; }
.comp-stick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 0.95rem; }
.comp-stick .comp-code-tag { font-size: 0.75rem; }
.comp-stick small { margin-left: auto; color: var(--muted); white-space: nowrap; }
.board-screen-mode .comp-stick { display: none; }
@media (prefers-reduced-motion: reduce) { .comp-stick { transition: none; } }
@media print { .comp-stick { display: none !important; } }

/* Live results: stacked L / Z / T cells per boulder (2026-11-25, Jerrold's design). Blocks fill from the bottom; colour by
   how far they got: flash = amber, top = green, zone = teal. */
td.lv-cell-stack { padding: 4px 3px; vertical-align: middle; }
.lv-stack { position: relative; display: inline-flex; flex-direction: column; width: 38px; height: 60px; border-radius: 7px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); background: rgba(0, 0, 0, .35); vertical-align: middle; }
.lv-stack.is-none { border-style: dashed; border-color: rgba(255, 255, 255, .14); background: transparent; }
.lv-blk { display: grid; place-items: center; flex: 1 1 0; min-height: 0; font: 800 0.74rem/1 var(--font-display); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.lv-blk + .lv-blk { border-top: 1px solid rgba(0, 0, 0, .35); }
.lv-stack.is-top .lv-blk.is-on { background: #1f7a4a; color: #b8f5d0; }
.lv-stack.is-flash .lv-blk.is-on { background: #8a5a12; color: #ffd98a; }
.lv-stack.is-zone .lv-blk.is-on { background: #17616e; color: #a8ecf5; }
.lv-tries { position: absolute; inset: auto 0 2px; text-align: center; font-size: 0.68rem; color: var(--muted); opacity: .8; }
.lv-key { display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 4px; border-radius: 5px; font: 800 0.7rem/1 var(--font-display); font-style: normal; vertical-align: middle; border: 1px solid rgba(255, 255, 255, .14); color: var(--muted); }
.lv-key.is-flash { background: #8a5a12; color: #ffd98a; border-color: transparent; }
.lv-key.is-top { background: #1f7a4a; color: #b8f5d0; border-color: transparent; }
.lv-key.is-zone { background: #17616e; color: #a8ecf5; border-color: transparent; }
.lv-key.is-none { border-style: dashed; }
/* The same stacks on the tally board, projector and the climber's problem tiles. */
.board-cell.has-stack { width: auto; height: auto; padding: 2px; border-color: transparent; background: transparent; border-radius: 9px; }
.board-cell.has-stack:hover, .board-cell.has-stack:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.board-cell .lv-stack { width: 34px; height: 50px; }
.board-screen-list li { flex-wrap: wrap; }
.board-screen-stacks { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; align-self: center; }
.board-screen-stacks .lv-stack { width: 40px; height: 62px; }
.comp-tile.has-stack { gap: 4px; padding: 6px 4px 8px; background: var(--bg-raised); color: var(--text); border-color: var(--line); justify-items: center; }
.comp-tile.has-stack.comp-tile-top { border-color: rgba(var(--accent-rgb), .6); }
.comp-tile.has-stack .lv-stack { width: 34px; height: 48px; }

/* The comp's own menu on organizer pages (compNav): under the title, and inside the slim name + code bar while scrolling. */
.comp-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 18px; }
.comp-nav-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 500; white-space: nowrap; transition: border-color .15s, box-shadow .15s; }
.comp-nav-link:hover, .comp-nav-link:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15); }
.comp-nav-link.is-on { background: var(--btn-main); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.comp-stick.has-nav.is-on { pointer-events: auto; }
.comp-stick-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.comp-stick-links::-webkit-scrollbar { display: none; }
.comp-stick-link { padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; color: var(--muted); text-decoration: none; white-space: nowrap; border: 1px solid transparent; }
.comp-stick-link:hover, .comp-stick-link:focus-visible { color: var(--text); border-color: var(--line); }
.comp-stick-link.is-on { color: var(--gold); border-color: rgba(var(--accent-rgb), .5); }
@media (max-width: 640px) {
  .comp-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -4px; margin-right: -4px; padding: 0 4px; }
  .comp-nav::-webkit-scrollbar { display: none; }
  .comp-stick.has-nav { flex-wrap: wrap; row-gap: 4px; }
  .comp-stick.has-nav .comp-stick-links { margin-left: 0; flex-basis: 100%; }
}

/* Your account, signed in (2026-11-25 layout, js/account-page.js showSettings): short header, Go to tiles, then Profile and
   Start page side by side and Password underneath (its fields behind a button). */
.account-page.is-settings .page-intro { display: none; }
.account-page.is-settings > section#account { max-width: 940px; margin-top: 32px; }
.acc { display: grid; gap: 22px; }
.acc-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.acc-avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 28px var(--font-display); color: var(--on-accent); background: var(--btn-main); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .25), 0 8px 24px rgba(var(--accent-rgb), .25); }
.acc-who { flex: 1 1 220px; min-width: 0; }
.acc-who .eyebrow { margin: 0 0 2px; }
.acc-who h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.1; overflow-wrap: anywhere; }
.acc-who .muted { margin: 4px 0 0; font-size: 0.92rem; overflow-wrap: anywhere; }
.acc-note { margin: 0; padding: 12px 16px; border-radius: 12px; border-left: 3px solid var(--gold); background: rgba(var(--accent-rgb), .1); }
.acc-go { display: grid; width: 100%; max-width: none; justify-self: stretch; order: 0; margin: 0; padding: 0; flex-basis: auto; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.acc-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .12s; }
.acc-tile:hover, .acc-tile:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15), 0 10px 24px rgba(0, 0, 0, .3); }
.acc-tile:active { transform: translateY(1px); }
.acc-tile > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; flex: 1; }
.acc-tile small { color: var(--muted); font-size: 0.8rem; }
.acc-tile-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--gold); background: rgba(var(--accent-rgb), .12); }
.acc-tile-go { color: var(--gold); transition: transform .15s; }
.acc-tile:hover .acc-tile-go { transform: translateX(3px); }
.acc-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 760px) { .acc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .acc-wide { grid-column: 1 / -1; } }
.acc-card { position: relative; padding: 22px 22px 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-raised); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); min-width: 0; }
.acc-card h2 { margin: 0; font: 800 1.25rem var(--font-display); color: var(--text); background: none; -webkit-text-fill-color: currentColor; text-transform: none; }
.acc-card .sf-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.acc-card form { display: flex; flex-direction: column; margin-top: 18px; }
.acc-card form[hidden] { display: none; }
.acc-card .sf-go { margin-top: 20px; height: 48px; }
.acc-card.is-shaking { animation: sf-shake .4s cubic-bezier(.36, .07, .19, .97); }
.acc-card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.acc-card-row > div { min-width: 0; flex: 1 1 260px; }
.acc-pw-fields { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.acc-pw-fields .sf-field + .sf-field { margin-top: 0; }
.acc-pw-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.acc-pw-actions .sf-go { margin-top: 0; padding: 0 24px; }
.acc-card .sf-err:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .acc-card.is-shaking { animation: none; } .acc-tile, .acc-tile-go { transition: none; } }

/* Share cards (share-card.html, js/share-page.js): the card preview and the choices beside it. Phones first: one
   column; wider screens put the preview on the left. The card itself is drawn on the canvas by js/share-card.js. */
/* The card maker fills exactly one screen below the header: a short title row, the card (as big as fits), the controls. */
.shc-page .whats-new { display: none; }
.shc-page main { padding-bottom: 0; }
main > section.shc-app { margin-top: 0; height: calc(100dvh - var(--shc-top, 64px)); min-height: 520px; display: flex; flex-direction: column; padding: 10px 0 12px; box-sizing: border-box; }
.shc-top { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.shc-top h1 { font-size: 1.3rem; margin: 0; }
.shc-top #shc-sub { margin: 0; font-size: 0.9rem; }
#shc-body { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 10px; }
.shc-layout { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
/* The card is sized to whatever room is left: container units keep its shape at any size. */
.shc-preview { flex: 1; min-height: 0; container-type: size; display: flex; align-items: center; justify-content: center; }
.shc-preview canvas { display: block; width: min(100cqw, 100cqh * 9 / 16); height: auto; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); touch-action: none; cursor: grab; background: var(--bg-raised); }
.shc-preview canvas[data-shape="post"] { width: min(100cqw, 100cqh); }
.shc-preview canvas[data-shape="portrait"] { width: min(100cqw, 100cqh * 4 / 5); }
.shc-preview canvas:active { cursor: grabbing; }
.shc-controls { display: flex; flex-direction: column; gap: 10px; }
.shc-group { display: flex; flex-direction: column; gap: 8px; }
.shc-label { font-family: var(--font-body); font-stretch: normal; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.shc-controls .filter-bar button { min-height: 40px; padding: 6px 14px; }
.shc-detail { font-size: 0.9rem; }
/* Shape buttons: the name, and under it the size and what it's for. */
.shc-controls .filter-bar.shc-shapes { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
.shc-controls .filter-bar button.shc-chip-2 { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; border-radius: 14px; padding: 6px 4px; text-align: center; }
.shc-chip-note { font-size: 0.7rem; opacity: 0.75; white-space: nowrap; }
.shc-zoom { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.shc-zoom input { flex: 1; accent-color: var(--gold); }
.shc-note { font-size: 0.8rem; margin: 0; }
.shc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.shc-actions { position: relative; }
/* Short messages ("Up to 3 …") float just above the button, so they never push the layout off the screen. */
.shc-actions #shc-status { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); padding: 6px 10px; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--line); color: var(--text); z-index: 2; }
.shc-actions #shc-status:empty { display: none; }
.shc-hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.shc-tabs { display: flex; border-bottom: 1px solid var(--line); }
.shc-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-size: 0.9rem; font-weight: 500; padding: 8px 4px; min-height: 40px; cursor: pointer; }
.shc-tabs button[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }

/* Phones and tablets: one tab's choices at a time, each set on one swipeable row, Share always in view. */
@media (max-width: 899px) {
  .shc-top #shc-sub { display: none; }
  /* The back link says whose card it is; the title stays for screen readers only, to give the card more room. */
  .shc-top h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .shc-group { display: none; height: 112px; justify-content: center; } /* same height on every tab, so the card never jumps */
  .shc-layout[data-tab="style"] [data-group="style"], .shc-layout[data-tab="photo"] [data-group="photo"],
  .shc-layout[data-tab="highlight"] [data-group="highlight"], .shc-layout[data-tab="caption"] [data-group="caption"] { display: flex; }
  .shc-group .shc-label { display: none; }
  .shc-controls .filter-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; align-items: center; }
  .shc-controls .filter-bar > * { flex: none; }
  .shc-actions .button { flex: 1; }
}
/* Computers: card on the left, all the choices in a column on the right. */
@media (min-width: 900px) {
  .shc-layout { flex-direction: row; gap: 32px; }
  .shc-controls { width: 400px; flex: none; gap: 12px; overflow-y: auto; justify-content: center; padding: 4px 4px 16px; } /* room for the button's glow */
  .shc-controls .filter-bar button { min-height: 36px; padding: 4px 14px; }
  .shc-tabs { display: none; }
  .shc-actions { margin-top: 4px; }
}
/* Share link sits on its own line under the place, so it never widens the results table on a phone. */
.share-link { display: table; margin-top: 4px; padding: 4px 0; font-size: 0.85em; white-space: nowrap; }

/* Admin › Site features › Share cards: who can use them (four modes), chosen roles and people, extra captions and highlights. */
.shr-card { flex-direction: column; align-items: stretch; gap: 12px; }
.shr-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.shr-modes form { margin: 0; }
.shr-modes .button[disabled] { opacity: 1; cursor: default; }
.shr-section { border-top: 1px solid var(--line); padding-top: 10px; }
.shr-section > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.shr-section > summary .muted { font-weight: 400; font-size: 0.9rem; }
.shr-access { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.shr-roles { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.shr-roles legend { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 6px; }
.shr-emails { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.shr-emails textarea { width: 100%; max-width: 480px; }
.shr-note { font-size: 0.85rem; margin: 8px 0; }
.shr-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 480px; }
.shr-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.shr-list form { margin: 0; }
.shr-remove { min-height: 36px; padding: 4px 12px; font-size: 0.85rem; }
.shr-add { display: flex; align-items: center; gap: 8px; max-width: 480px; }
.shr-add input { flex: 1; min-width: 0; }

/* ===== TEXT FIELDS (Component Library 8 · "Text fields", Dec 2026) =================================================
   ONE look for every text box, dropdown and text area on the site and in Admin. No class needed (like the checkboxes).
   Colours come from the theme's --field-* variables (top of this file, and each css/theme-*.css).
   - Two sizes: regular 48px (default) and compact 36px (dense Admin rows and tables; the list below, or class .field-compact).
     Proportions: the box is 3x the text; corners about 1/5 of the height; on phones text is never under 16px (iPhones zoom).
   - Search boxes (type="search") are regular-size pills.
   - Focus: one stroke like the buttons: a 2px border in --field-ring plus the buttons' soft glow; the label takes the colour.
   - Errors: aria-invalid="true" or .is-bad turns the border --field-bad; js/fields.js sets it when you LEAVE a box.
   - Opt out with .plain-field. The scoresheet cells (.en-cell) and the header search keep their own borderless look.
   :where() makes these rules weigh nothing, so a page's own rule can still set width, flex or margins. */
:where(input:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=button], [type=reset], [type=range], [type=color], [type=image], .plain-field), textarea:not(.plain-field), select:not(.plain-field)) {
  box-sizing: border-box; min-height: 48px; margin: 0; padding: 0 14px;
  font: inherit; font-size: 1rem; line-height: 1.3; color: var(--text);
  background-color: var(--field-bg); border: 1px solid var(--field-line); border-radius: 10px;
  outline: 2px solid transparent; outline-offset: 2px; box-shadow: none;
  transition: border-color .15s, box-shadow .2s;
}
:where(input:is([type=text], [type=email], [type=password], [type=search], [type=url], [type=tel], [type=number], :not([type])):not(.plain-field)) { -webkit-appearance: none; appearance: none; }
:where(textarea:not(.plain-field)) { min-height: 96px; padding: 10px 14px; line-height: 1.45; resize: vertical; }
:where(select:not([multiple], .plain-field)) {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 50%, calc(100% - 16px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
:where(input, textarea)::placeholder { color: var(--muted); opacity: .85; }
/* Hover: exactly the buttons' hover: the rim lights up to full gold with a faint ring and soft glow around it */
:where(input:not([type=checkbox], [type=radio], [type=file], .plain-field), textarea:not(.plain-field), select:not(.plain-field)):hover { border-color: var(--field-line-hover);
  box-shadow: 0 0 0 3px rgba(var(--field-ring-rgb), .18), 0 0 18px rgba(var(--field-ring-rgb), .22); }
/* Focus: one stroke, like the buttons' gold rim: the border turns the accent and thickens to 2px (inside, so nothing moves),
   with the buttons' soft glow. The outline stays transparent (it shows only in Windows high-contrast mode). */
:where(input:not([type=checkbox], [type=radio], [type=file], .plain-field), textarea:not(.plain-field), select:not(.plain-field)):focus { border-color: var(--field-ring); outline-color: transparent;
  box-shadow: inset 0 0 0 1px var(--field-ring), 0 0 0 3px rgba(var(--field-ring-rgb), .18), 0 0 18px rgba(var(--field-ring-rgb), .22); }
:where(input:not([type=checkbox], [type=radio], .plain-field), textarea:not(.plain-field), select:not(.plain-field)):is([aria-invalid="true"], .is-bad) { border-color: var(--field-bad); }
:where(input:not([type=checkbox], [type=radio], .plain-field), textarea:not(.plain-field), select:not(.plain-field)):is([aria-invalid="true"], .is-bad):focus { border-color: var(--field-bad);
  box-shadow: inset 0 0 0 1px var(--field-bad), 0 0 0 3px rgba(var(--field-bad-rgb), .18), 0 0 18px rgba(var(--field-bad-rgb), .22); }
:where(input:not([type=checkbox], [type=radio], .plain-field), textarea:not(.plain-field), select:not(.plain-field)):disabled { opacity: .5; cursor: not-allowed; border-style: dashed; border-color: var(--field-line); box-shadow: none; }
label:focus-within:not(:has(input[type=checkbox], input[type=radio], button)) { color: var(--field-ring); transition: color .15s; }
.field-msg { display: flex; align-items: center; gap: 6px; flex-basis: 100%; margin-top: 6px; font-size: 0.8125rem; font-weight: 400; line-height: 1.35; color: var(--field-bad); }
.field-msg::before { content: "!"; display: inline-grid; place-items: center; width: 15px; height: 15px; flex: none; border: 1.6px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; line-height: 1; }

/* A box with its label text and its button on one line (.field-row): 8px apart, centred on each other, wraps on phones */
.field-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.field-row > label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Search: a regular-size pill */
:where(input[type=search]:not(.plain-field), .field-search) { border-radius: 999px; padding-left: 18px; padding-right: 18px; }

/* Compact: 36px, for tables and dense Admin rows. On phones the text stays 16px so iPhones don't zoom in. */
:where(td, .field-compact-row, .admin-search, .admin-filter, .admin-insta, .admin-team-row, .admin-history, .admin-former-date, .admin-alumnus-fields, .alumnus-moved, .admin-hotel, .admin-refresh, .admin-theme-scope, .moveout-field, .en-go, .grade-row, .en-filter, .en-add-form, .pr-at, .filter-select, .comp-zone-cell, .fun-forecast, .opt-row, .team-line, .team-cut-nums) :where(input:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=button], .plain-field), select:not(.plain-field)),
:where(.field-compact, .fun-snack, .fun-whatif, .fun-temp) { min-height: 36px; padding: 0 10px; font-size: 0.875rem; border-radius: 8px; }
:where(td, .field-compact-row, .admin-search, .admin-filter, .admin-insta, .admin-team-row, .admin-history, .admin-former-date, .admin-alumnus-fields, .alumnus-moved, .admin-hotel, .admin-refresh, .admin-theme-scope, .moveout-field, .en-go, .grade-row, .en-filter, .en-add-form, .pr-at, .filter-select, .comp-zone-cell, .fun-forecast, .opt-row, .team-line, .team-cut-nums) :where(select:not([multiple], .plain-field)),
:where(select.field-compact, .fun-snack, .fun-whatif) { padding-right: 30px; background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; }
/* search stays a pill at either size */
:where(input[type=search]:not(.plain-field), .field-search) { border-radius: 999px; padding-left: 16px; padding-right: 16px; }
@media (max-width: 600px) {
  :where(td, .field-compact-row, .admin-search, .admin-filter, .admin-insta, .admin-team-row, .admin-history, .admin-former-date, .admin-alumnus-fields, .alumnus-moved, .admin-hotel, .admin-refresh, .admin-theme-scope, .moveout-field, .en-go, .grade-row, .en-filter, .en-add-form, .pr-at, .filter-select, .comp-zone-cell, .fun-forecast, .opt-row, .team-line, .team-cut-nums) :where(input, select),
  :where(.field-compact, .fun-snack, .fun-whatif, .fun-temp) { font-size: 1rem; }
}

/* Not text boxes in the usual sense: keep their own borderless look */
.en-cell input, .search-form input { min-height: 0; border-radius: 0; -webkit-appearance: none; appearance: none; }
.search-form input:hover { border-color: transparent; }

@media (prefers-reduced-motion: reduce) { :where(input, textarea, select), label { transition: none !important; } }

/* ---- Admin › Site settings › Hosted teams (2026-12-01): one fold per team, so two dozen teams still fit a screen ----
   Row = name · status tag · theme · feature summary; open = status, theme, every feature as Off / Included / Paid
   (the Permissions › Features switch, .pr-seg), and that team's Save. js/hosted-teams.js does find / filter / set-all. */
.ht-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 18px 0 12px; }
.ht-find { flex: 0 1 320px; min-width: 200px; }
.ht-toolbar .admin-pills { margin: 0; }
.ht-add-toggle { margin-left: auto; }
.ht-add { margin: 4px 0 18px; }
.ht-add[hidden] { display: none; }
.ht-head, .ht-sum { display: grid; grid-template-columns: minmax(0, 2.2fr) 96px minmax(0, 1.4fr) minmax(0, 1.6fr); align-items: center; gap: 16px; }
.ht-head { padding: 0 44px 6px 18px; font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ht-list .fold { margin: 0 0 6px; }
.ht-list .fold[hidden] { display: none; }
.fold > summary.ht-sum { display: grid; min-height: 52px; padding-right: 44px; }
.fold > summary.ht-sum::after { position: absolute; right: 18px; top: calc(50% - .5em); } /* the Fold's ▸ stays at the right edge, outside the grid */
.ht-sum .fold-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-tag { justify-self: start; font-size: 0.6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.ht-tag-active { color: #7ddc9a; background: rgba(125, 220, 154, .12); }
.ht-tag-pilot { color: var(--gold); background: rgba(var(--accent-rgb), .13); }
.ht-tag-preview { color: var(--muted); background: rgba(237, 237, 243, .08); }
.ht-theme { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 400; font-size: 0.875rem; }
.ht-theme i { flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(237, 237, 243, .25); }
.ht-summary { font-weight: 400; font-size: 0.8125rem; }
.ht-body { display: grid; gap: 14px; padding: 10px 20px 20px 18px; border-top: 1px solid rgba(237, 237, 243, .08); }
.ht-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.ht-top > label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.875rem; }
.ht-setall { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; font-size: 0.8125rem; }
.ht-link { border: 0; background: none; color: var(--gold); font: inherit; font-weight: 500; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.ht-link:hover { background: rgba(var(--accent-rgb), .12); }
.ht-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.ht-frow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid rgba(237, 237, 243, .07); }
.ht-fname { display: grid; gap: 1px; min-width: 0; font-size: 0.875rem; }
.ht-fname .muted { font-size: 0.8125rem; }
.ht-seg { flex: none; }
.ht-seg input[value=paid]:checked + span { background: var(--btn-main); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .35); }
.ht-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ht-log { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font-size: 0.875rem; }
@media (max-width: 860px) {
  .ht-head { display: none; }
  .fold > summary.ht-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .ht-sum .fold-title { flex: 1 0 100%; white-space: normal; }
  .ht-sum .ht-theme { display: none; } /* phones: name, then status + feature summary */
  .ht-features { grid-template-columns: minmax(0, 1fr); }
  .ht-setall { margin-left: 0; }
  .ht-frow { flex-wrap: wrap; }
}
/* Team picker (Site settings › Add a team): a search box that is also a list. Magnifier on the left (search), ▾ on the right
   (it's a list; turns over while open). The list opens like the site's other pop-ups (account menu, photo menu, What's new):
   8px below, raised card, soft shadow, a small drop-in. Rows carry the site checkbox: tick several, add them at once.
   js/team-picker.js */
.team-picker { position: relative; flex: 1; min-width: 220px; }
.team-picker > .team-picker-input { width: 100%; padding-left: 42px; padding-right: 46px; }
.team-picker-input::-webkit-search-cancel-button { display: none; } /* the ▾ sits there */
.team-picker-icon { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); pointer-events: none; }
.team-picker-toggle { position: absolute; right: 6px; top: 50%; width: 36px; height: 36px; margin-top: -18px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.team-picker-toggle svg { width: 18px; height: 18px; transition: transform .2s ease; }
.team-picker-toggle:hover { color: var(--gold); background: var(--bg-hover); }
.team-picker.is-open .team-picker-toggle { color: var(--gold); }
.team-picker.is-open .team-picker-toggle svg { transform: rotate(180deg); }
.team-picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; max-height: 340px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); transform-origin: top center; animation: whats-new-open 0.18s ease-out; }
.team-picker-list[hidden] { display: none; }
.team-picker-list [role=option] { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 8px; cursor: pointer; color: var(--text); }
.team-picker-list [role=option] input { pointer-events: none; flex: none; width: 22px; min-width: 0; margin: 0; }
.team-picker-name { flex: 1; min-width: 0; }
.team-picker-list [role=option] .muted { font-size: 0.8125rem; flex: none; }
.team-picker-list [role=option]:hover, .team-picker-list [role=option].is-active { background: var(--bg-hover); }
.team-picker-list [role=option].is-active { box-shadow: inset 3px 0 0 var(--gold); }
.team-picker-more { padding: 10px 12px; font-size: 0.8125rem; }
.team-picker-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -6px; font-size: 0.875rem; }
.team-picker-chips:empty { display: none; }
.team-picker-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .55); background: rgba(var(--accent-rgb), .12); }
.team-picker-chip button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer; }
.team-picker-chip button:hover { color: var(--text); background: var(--bg-hover); }
@media (prefers-reduced-motion: reduce) { .team-picker-list { animation: none; } .team-picker-toggle svg { transition: none; } }

/* ---- Admin › Site settings › Themes: the theme maker (2026-12-01). Left: website colors, name, three colors, readability
   checks, Save. Right: a live preview made of real site parts; js/theme-maker.js sets the theme's variables on .tm-preview. */
.tm-made { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.tm-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(var(--card-rgb), .7); }
.tm-chip form { display: contents; }
.tm-sw { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(237, 237, 243, .25); flex: none; }
.tm-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 18px; }
.tm-left { display: grid; gap: 22px; }
.tm-site .field-row input { flex: 1; min-width: 0; }
.tm-site .ath-hint { margin: 6px 0 0; }
.tm-form { display: grid; gap: 10px; }
.tm-field { display: grid; gap: 8px; font-weight: 600; font-size: 0.8125rem; }
.tm-head { margin-top: 10px; font-weight: 600; font-size: 0.8125rem; } /* Colors, Accessibility: same as the Theme name label */
.tm-color { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--card-rgb), .7); cursor: pointer; }
.tm-color input[type=color] { flex: none; width: 48px; height: 40px; padding: 0; border: 1px solid rgba(237, 237, 243, .25); border-radius: 8px; background: none; cursor: pointer; }
.tm-color > span { display: grid; gap: 2px; flex: 1; min-width: 0; font-size: 0.875rem; }
.tm-lead { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--card-rgb), .7); cursor: pointer; }
.tm-lead > span { display: grid; gap: 2px; min-width: 0; font-size: 0.875rem; }
.tm-lead input { margin-top: 2px; flex: none; }
/* Hosted team fold: address + preview link (step 2) */
.ht-addr { display: grid; gap: 8px; padding: 12px 0 4px; }
.ht-addr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ht-addr-row .ht-prefix { color: var(--muted); font-size: .95rem; }
.ht-addr-row input[name=address] { width: 14em; max-width: 100%; }
.ht-link-out { flex: 1 1 18em; min-width: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(var(--card-rgb), .6); font: 500 .85rem ui-monospace, monospace; overflow-wrap: anywhere; }
.tm-color .muted { font-size: 0.8125rem; }
.tm-hex { font-size: 0.8125rem; color: var(--muted); }
.tm-checks { display: block; padding: 12px 16px; }
.tm-checks-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 6px; }
.tm-check-list { list-style: none; margin: 0; padding: 0; }
.tm-check-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(237, 237, 243, .07); font-size: 0.875rem; }
.tm-pf { flex: none; font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tm-pf.is-pass { color: #7ddc9a; background: rgba(125, 220, 154, .12); }
.tm-pf.is-fail { color: #ff7a6b; background: rgba(255, 122, 107, .14); }
.tm-tip { margin: 8px 0 0; font-size: 0.8125rem; }
.tm-foot { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.tm-save:disabled { opacity: .45; cursor: not-allowed; }
.tm-right { display: grid; gap: 8px; position: sticky; top: 16px; }
.tm-preview { position: relative; overflow: hidden; display: grid; gap: 18px; padding: 24px 26px 28px; border-radius: 20px; border: 1px solid var(--line); color: var(--text);
  background: radial-gradient(420px 420px at -10% 40%, rgba(var(--haze-left-rgb), .32), transparent 70%), radial-gradient(460px 460px at 110% 110%, rgba(var(--haze-bottom-rgb), .2), transparent 70%), var(--bg); }
.tm-pv-top { display: flex; align-items: center; gap: 10px; }
.tm-pv-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 18px rgba(var(--accent-rgb), .5); }
.tm-pv-brand { font-family: var(--font-display); }
.tm-pv-nav { display: flex; gap: 16px; margin-left: auto; font-size: 0.875rem; }
.tm-pv-nav a { color: var(--gold); font-weight: 600; }
.tm-pv-h { margin: 0; font-family: var(--font-display); font-size: 1.9rem; color: var(--text); }
.tm-pv-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; }
.tm-pv-card .admin-athlete-name { display: grid; gap: 2px; }
.tm-pv-pill { align-self: start; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: var(--on-accent); background: var(--glow); }
.tm-pv-bars { grid-column: 1 / -1; display: flex; gap: 6px; align-items: flex-end; height: 64px; }
.tm-pv-bars i { flex: 1; border-radius: 6px 6px 2px 2px; background: rgba(var(--accent-rgb), .35); }
.tm-pv-bars i.on { background: var(--btn-main); }
.tm-pv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tm-pv-row .button { pointer-events: none; }
.tm-pv-label { display: grid; gap: 8px; font-size: 0.8125rem; font-weight: 600; }
@media (max-width: 900px) { .tm-grid { grid-template-columns: minmax(0, 1fr); } .tm-right { position: static; } }

/* ---- A hosted team's page (team-home.php + js/team-preview.js), 2026-12-01 --------------------------------------------
   Wears the team's theme (theme.css.php?preview=<theme>). body.tpv-lead = the theme's "Lead with the accent color" is on: a
   band of the team color across the top and colored headings/numbers (Circle City's pink). Comp agreed with Jerrold:
   https://claude.ai/artifact/91bNfFdeCcNsNreAi7vYRw */
.tpv-body { margin: 0; min-height: 100vh; background: radial-gradient(800px 420px at 90% 30%, rgba(var(--accent-rgb), .12), transparent 60%), radial-gradient(700px 380px at 0% 100%, rgba(var(--magenta-rgb), .10), transparent 60%), var(--bg); background-attachment: fixed; color: var(--text); }
.tpv-lead { background: radial-gradient(800px 420px at 90% 30%, rgba(var(--accent-rgb), .16), transparent 60%), radial-gradient(700px 380px at 0% 100%, rgba(var(--accent-rgb), .12), transparent 60%), var(--bg); background-attachment: fixed; }
.tpv-ribbon { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 8px max(16px, env(safe-area-inset-left, 0px)); text-align: center; font-size: .8rem; color: var(--muted); background: rgba(var(--shade-rgb), .9); border-bottom: 1px solid rgba(var(--accent-rgb), .35); }
.tpv-ribbon b { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.tpv { width: auto; max-width: 1080px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right, 0px)) 32px max(20px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 26px; }
.tpv-jersey { width: auto; max-width: none; box-sizing: border-box; align-self: stretch; margin: 0 -20px; padding: 30px 20px 24px; border-radius: 0 0 22px 22px; background: rgba(var(--card-rgb), .85); border: 1px solid var(--line); border-top: 0; position: relative; overflow: hidden; }
.tpv-lead .tpv-jersey { background: var(--glow); border: 0; color: var(--on-accent); }
.tpv-lead .tpv-jersey::after { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 160%; background: repeating-linear-gradient(115deg, rgba(255,255,255,.10) 0 18px, transparent 18px 44px); pointer-events: none; }
.tpv-jersey > * { position: relative; z-index: 1; }
.tpv-hero { display: flex; gap: 16px; align-items: center; }
.tpv-mark { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; background: var(--glow); color: var(--on-accent); font: 800 22px var(--font-display); font-stretch: 125%; box-shadow: 0 0 26px rgba(var(--accent-rgb), .35); }
.tpv-lead .tpv-mark { background: var(--on-accent); color: var(--gold); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.tpv-hero h1 { margin: 0; font: 800 clamp(1.45rem, 4vw, 2rem)/1.1 var(--font-display); font-stretch: 125%; text-wrap: balance; color: var(--text); background: none; -webkit-text-fill-color: currentColor; } /* not the site's gold h1 */
.tpv-lead .tpv-hero h1 { color: var(--on-accent); }
.tpv-sub { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.tpv-lead .tpv-sub { color: color-mix(in srgb, var(--on-accent) 75%, transparent); font-weight: 500; }
.tpv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.tpv-stats:empty { display: none; }
.tpv-stat { background: rgba(var(--bg-rgb), .88); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; color: var(--text); }
.tpv-lead .tpv-stat { border-color: transparent; }
.tpv-stat b { display: block; font: 700 1.7rem var(--font-display); font-stretch: 125%; font-variant-numeric: tabular-nums; }
.tpv-lead .tpv-stat b { color: var(--gold); }
.tpv-stat span { font-size: .8rem; color: var(--muted); }
.tpv-stat.tpv-next b { font: 600 1rem/1.3 var(--font-body); margin-top: 4px; color: var(--text); }
.tpv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.tpv-two > section { min-width: 0; }
.tpv-h { margin: 0 0 10px; font: 700 1.15rem var(--font-display); font-stretch: 125%; }
.tpv-lead .tpv-h { color: var(--gold); display: flex; align-items: center; gap: 10px; }
.tpv-lead .tpv-h::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(var(--accent-rgb), .6), transparent); }
.tpv-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 16px; padding: 6px 16px; }
.tpv-lead .tpv-card { border-color: rgba(var(--accent-rgb), .28); }
.tpv-empty { margin: 12px 0; }
.tpv-going + .tpv-going { border-top: 1px solid var(--line); }
.tpv-going { padding: 12px 0; }
.tpv-going-ev { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; font-weight: 600; }
.tpv-going-ev small { color: var(--muted); font-weight: 500; white-space: nowrap; }
.tpv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tpv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; }
.tpv-lead .tpv-chip { border-color: rgba(var(--accent-rgb), .5); background: rgba(var(--accent-rgb), .12); }
.tpv-chip em { font-style: normal; color: var(--muted); font-size: .75rem; }
.tpv-pod { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.tpv-pod + .tpv-pod { border-top: 1px solid var(--line); }
.tpv-medal { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 .78rem var(--font-display); color: #14110a; }
.tpv-m1 { background: linear-gradient(180deg, #ffe08a, #e2b13c); } .tpv-m2 { background: linear-gradient(180deg, #eef1f6, #aeb5c2); } .tpv-m3 { background: linear-gradient(180deg, #f0b78a, #b87545); }
.tpv-pod div { min-width: 0; } .tpv-pod b { display: block; } .tpv-pod div span { font-size: .8rem; color: var(--muted); }
.tpv-ag { padding: 10px 0 4px; }
.tpv-ag + .tpv-ag { border-top: 1px solid var(--line); }
.tpv-ag-h { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 4px; font: 700 .8rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.tpv-ag-h small { letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--muted); }
.tpv-row { display: grid; grid-template-columns: minmax(130px, 1.1fr) 2.4fr auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid rgba(var(--accent-rgb), .08); font-size: .85rem; }
.tpv-ag-h + .tpv-row { border-top: 0; }
.tpv-nm { font-weight: 600; font-size: .92rem; }
.tpv-st { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); min-width: 0; }
.tpv-st b { color: var(--text); font-weight: 600; }
.tpv-st b.tpv-place-1 { color: #ffd76a; } .tpv-st b.tpv-place-2 { color: #dfe4ee; } .tpv-st b.tpv-place-3 { color: #f0a878; }
.tpv-form { padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; color: var(--on-accent); background: var(--gold); white-space: nowrap; }
.tpv-cta { padding: 18px 20px; border-radius: 16px; border: 1px solid rgba(var(--accent-rgb), .5); background: linear-gradient(135deg, rgba(var(--accent-rgb), .2), rgba(var(--accent-rgb), .05)); }
.tpv-cta p { margin: 0; max-width: 60ch; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.tpv-cta b { color: var(--text); }
.tpv-foot { text-align: center; font-size: .78rem; margin: 0; }
@media (max-width: 640px) {
  .tpv { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 22px; }
  .tpv-jersey { margin: 0 -16px; padding: 22px 16px 18px; border-radius: 0 0 18px 18px; }
  .tpv-mark { width: 52px; height: 52px; font-size: 18px; border-radius: 15px; }
  .tpv-stats { grid-template-columns: 1fr 1fr; }
  .tpv-two { grid-template-columns: 1fr; }
  .tpv-row { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .tpv-st { grid-column: 1 / -1; grid-row: 2; }
}

/* A hosted team's real pages (senderspot.com/circlecity/…: team-home.php serves Planet Rock's pages with the team's data).
   js/layout.js draws this small header instead of SenderSpot's menu. .tpv-lead = the theme leads with its color. */
.team-brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 9px; background: var(--glow); color: var(--on-accent); font: 800 12px var(--font-display); font-stretch: 125%; vertical-align: middle; }
.team-header-by { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.team-scope.tpv-lead #site-header { background: var(--glow); border-bottom-color: transparent; }
.team-scope.tpv-lead #site-header .brand, .team-scope.tpv-lead #site-header nav a { color: var(--on-accent); }
.team-scope.tpv-lead .team-brand-mark { background: var(--on-accent); color: var(--gold); }
.team-scope.tpv-lead .team-header-by { color: color-mix(in srgb, var(--on-accent) 72%, transparent); }
.team-scope.tpv-lead .eyebrow { color: var(--gold); }
.ht-build-note { flex: 1 1 14em; }

/* A hosted team's own Admin (admin/team.php): the coach's side, in the team's theme. */
.tad-body { margin: 0; min-height: 100vh; background: radial-gradient(800px 420px at 90% 20%, rgba(var(--accent-rgb), .12), transparent 60%), var(--bg); color: var(--text); }
.tad-top { position: sticky; top: 0; z-index: 20; background: rgba(var(--card-rgb), .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.tpv-lead .tad-top { background: var(--glow); color: var(--on-accent); border-bottom: 0; }
.tad-top-in, .tad-tabs { max-width: 920px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tad-top-in { display: flex; align-items: center; gap: 10px; padding-block: 12px 8px; }
.tad-brand { font: 700 1.05rem var(--font-display); font-stretch: 125%; }
.tad-brand b { font-weight: 800; }
.tad-site { margin-left: auto; font-size: .85rem; color: inherit; white-space: nowrap; }
.tad-tabs { display: flex; gap: 8px; padding-block: 0 10px; }
.tad-tabs a { text-decoration: none; }
.tpv-lead .tad-tabs a { color: var(--on-accent); border-color: color-mix(in srgb, var(--on-accent) 35%, transparent); }
.tpv-lead .tad-tabs a[aria-current="page"] { background: var(--on-accent); color: var(--gold); }
.tad { max-width: 920px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 60px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 22px; }
.tad section { scroll-margin-top: 120px; }
.tad-note { margin: 0; font-size: .85rem; }
.tad-h { margin: 0 0 6px; font-size: clamp(1.6rem, 5vw, 2.2rem); }
.tpv-lead .tad-h { color: var(--gold); background: none; -webkit-text-fill-color: currentColor; }
.tad-list { display: flex; flex-direction: column; }
.tad-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(9em, 13em); gap: 10px 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.tad-row:first-child { border-top: 0; }
.tad-row.is-hidden .tad-who b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(var(--accent-rgb), .6); }
.tad-who { display: grid; gap: 2px; min-width: 0; }
.tad-who span { font-size: .8rem; }
.tad-ig { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tad-ig input { width: 100%; min-width: 0; }
.tad-at { color: var(--muted); }
.tad-save { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, transparent, var(--bg) 40%); display: flex; justify-content: flex-end; }
.tad-people { display: grid; gap: 12px; }
.tad-person { display: flex; align-items: center; gap: 12px; }
.tad-person div { display: grid; gap: 2px; }
.tad-av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--glow); color: var(--on-accent); font: 800 1rem var(--font-display); }
@media (max-width: 640px) {
  .tad-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tad-ig { grid-column: 1 / -1; }
}

.tad .adm-h1 { background: none; -webkit-text-fill-color: currentColor; }
.tpv-lead .tad .adm-h1 { color: var(--text); }
.tad-tiles .tad-tile-name { font-size: 1.35rem; line-height: 1.2; }
/* The team Admin inside the shared sidebar shell: the sidebar sets the page's left edge. */
.adm-main .tad { max-width: 1100px; margin: 0; padding: 18px 0 60px; }
.adm-main .tad > section { margin-top: 0; }
/* Team settings (admin/team.php #settings) */
.tad-settings { display: grid; gap: 4px; margin-top: 14px; }
.tad-set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.tad-set-row:first-of-type, .tad-set-top { border-top: 0; }
.tad-set-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.tad-set-row .muted { font-size: .85rem; }
.tad-set-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; min-width: 0; }
.tad-set-ctl form { margin: 0; }
.tad-sw { width: 34px; height: 34px; border-radius: 10px; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.tad-set-foot { display: flex; justify-content: flex-end; padding-top: 6px; }
.tad-feat { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; }
.tad-feat li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.tad-lv { font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--muted); }
.tad-lv-included { background: rgba(95, 211, 160, .14); color: #8be0b8; }
.tad-lv-paid { background: rgba(var(--accent-rgb), .18); color: var(--gold); }
@media (max-width: 640px) { .tad-set-row { grid-template-columns: 1fr; } .tad-set-ctl { justify-content: flex-start; } }

.adm-row > .muted:last-child { white-space: nowrap; } /* dates and counts at the end of an Overview row stay on one line */
.tad-person { flex-wrap: wrap; }
.tad-person > div { flex: 1 1 14em; min-width: 0; }
.tad-person-x { margin: 0; }
.tad-grant { display: grid; gap: 12px; margin-top: 14px; }
.tad-grant-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tad-grant .tad-set-foot { align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
/* Team Admin: View as (Head Coach / Coach / Team Manager), SenderSpot admins only */
.tad-viewas-pick { margin: 0 0 0 auto; }
.tad-viewas-pick label { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.tad-viewas-pick select { height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--field-bg); color: var(--text); font: 500 .85rem var(--font-body); }
/* A hosted team's header: Sign in sits at the right; the "on SenderSpot" note moves beside it */
.team-header .team-header-by { margin-left: auto; }
.team-header .signin-slot { margin-left: 14px; }
.team-scope.tpv-lead #site-header .signin-btn { color: var(--on-accent); border-color: color-mix(in srgb, var(--on-accent) 45%, transparent); }
@media (max-width: 640px) { .team-header .team-header-by { display: none; } .team-header .signin-slot { margin-left: auto; } }
.tad-person-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tad-inline { display: flex; gap: 6px; align-items: center; margin: 0; }
.tad-inline input[type=email] { width: 14em; max-width: 100%; }
.tad-invite { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0 4px 52px; }
.tad-invite .muted { flex-basis: 100%; font-size: .8rem; }
/* Hosted teams › Set up everything: the checklist (js/hosted-teams.js) */
.ht-onboard { margin: 6px 0 4px; padding: 10px 14px 10px 34px; border-radius: 12px; background: rgba(var(--card-rgb), .6); border: 1px solid var(--line); display: grid; gap: 6px; font-size: .9rem; }
.ht-onboard li { color: var(--muted); }
.ht-onboard li b { font-weight: 600; }
.ht-onboard li span { overflow-wrap: anywhere; }
.ht-onboard li.is-doing b { color: var(--gold); }
.ht-onboard li.is-doing b::after { content: " …"; }
.ht-onboard li.is-done b { color: var(--text); }
.ht-onboard li.is-done::marker { content: "✓  "; color: #8be0b8; }
.ht-onboard li.is-failed b { color: #ff9b8a; }

/* SenderSpot settings › Add a team: the wizard (js/team-wizard.js). Comp: https://claude.ai/artifact/QnttshjBaBEWoiKWCFu728 */
.wz { display: grid; grid-template-columns: 240px minmax(0, 1fr); margin-top: 14px; background: rgba(var(--card-rgb), .82); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.wz-rail { padding: 18px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; background: rgba(var(--bg-rgb), .45); }
.wz .step-btn { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: 500 14px var(--font-body); text-align: left; cursor: pointer; }
.wz .step-btn:disabled { cursor: default; opacity: .6; }
.wz .step-btn:not(:disabled):hover { background: rgba(255,255,255,.05); color: var(--text); }
.wz .step-btn .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font: 700 12px var(--font-display); }
.wz .step-btn small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.wz .step-btn[aria-current="step"] { background: var(--text); color: var(--bg); opacity: 1; }
.wz .step-btn[aria-current="step"] small { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.wz .step-btn[aria-current="step"] .n { background: var(--btn-main); border-color: transparent; color: var(--on-accent); }
.wz .step-btn.is-done .n { background: rgba(139,224,184,.16); border-color: rgba(139,224,184,.5); color: #8be0b8; }
.wz-rail-foot { margin-top: auto; padding: 12px 8px 0; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.wz-main { padding: 22px 26px 0; display: flex; flex-direction: column; min-width: 0; min-height: 560px; }
.wz-screen { display: none; flex-direction: column; gap: 16px; flex: 1; }
.wz-screen.is-on { display: flex; animation: whats-new-open .3s ease; }
@media (prefers-reduced-motion: reduce) { .wz-screen.is-on { animation: none; } }
.wz-k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.wz-h { margin: 2px 0 4px; font: 800 24px/1.15 var(--font-display); font-stretch: 125%; }
.wz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.wz-col { display: grid; gap: 10px; min-width: 0; align-content: start; }
.wz-list { border: 1px solid var(--line); border-radius: 14px; max-height: 340px; overflow: auto; }
.wz-row { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.wz-row:first-child { border-top: 0; }
.wz-row:hover, .wz-row:focus-visible { background: rgba(255,255,255,.04); outline: none; }
.wz-row.is-picked { background: rgba(var(--accent-rgb), .1); }
.wz-row b { font-weight: 600; } .wz-row small { display: block; color: var(--muted); font-size: 12.5px; }
.wz-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(237,237,243,.35); display: grid; place-items: center; }
.wz-row.is-picked .wz-radio { border-color: var(--gold); }
.wz-row.is-picked .wz-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.wz-empty { padding: 12px 14px; margin: 0; }
.wz-found-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.wz-found-rows div:first-child { border-top: 0; }
.wz-ok-t { color: #8be0b8; text-align: right; } .wz-miss { color: #ffcf87; text-align: right; }
.wz-prefix { display: flex; } .wz-prefix span { display: grid; place-items: center; padding: 0 10px 0 14px; border: 1px solid var(--field-line); border-right: 0; border-radius: 10px 0 0 10px; color: var(--muted); background: var(--field-bg); font-size: 14px; white-space: nowrap; }
.wz-prefix .field { border-radius: 0 10px 10px 0; min-width: 0; }
.wz .field { width: 100%; }
.wz-palette { display: flex; gap: 10px; }
.wz-sw { flex: 1; min-width: 0; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.wz-sw i { display: block; height: 52px; } .wz-sw span { display: block; padding: 6px 10px; font: 500 12px ui-monospace, monospace; color: var(--muted); }
.wz-mini { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); align-self: start; }
.wz-mini-band { padding: 12px 16px; display: flex; align-items: center; gap: 10px; font: 700 15px var(--font-display); font-stretch: 125%; }
.wz-mini-band i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font: 800 11px var(--font-display); font-style: normal; }
.wz-mini-band small { margin-left: auto; font: 500 12px var(--font-body); opacity: .75; }
.wz-mini-body { padding: 16px; display: grid; gap: 8px; color: #ededf3; }
.wz-mini-body b { font: 800 19px var(--font-display); font-stretch: 125%; } .wz-mini-body span { font-size: 13px; opacity: .8; }
.wz-mini-btns { display: flex; gap: 8px; opacity: 1 !important; } .wz-mini-btns i { font-style: normal; font: 600 12.5px var(--font-body); padding: 6px 14px; border-radius: 999px; }
.wz-mini-body em { display: block; height: 8px; border-radius: 4px; width: 75%; } .wz-mini-body em + em { width: 50%; }
.wz-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.wz-pack { text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text); cursor: pointer; display: grid; gap: 6px; font: inherit; }
.wz-pack b { font: 700 16px var(--font-display); font-stretch: 125%; } .wz-pack > span { color: var(--muted); font-size: 13px; }
.wz-pack[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 24px rgba(var(--accent-rgb), .15); }
.wz-rec { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.wz-build { display: grid; gap: 12px; } .wz-build-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.wz-prog { height: 10px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; }
.wz-prog i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--glow); transition: width .4s ease; }
.wz-ok { display: flex; gap: 14px; align-items: center; }
.wz-ok > i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(139,224,184,.16); color: #8be0b8; font-style: normal; font-size: 22px; flex: none; }
.wz-next { margin: 0; padding-left: 18px; color: var(--muted); } .wz-next li { padding: 4px 0; }
.wz-foot { margin-top: auto; position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 14px 0 18px; background: linear-gradient(180deg, transparent, rgba(var(--card-rgb), .96) 30%); }
.wz-foot #wz-msg { flex: 1; font-size: 13px; }
@media (max-width: 760px) {
  .wz { grid-template-columns: 1fr; }
  .wz-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .wz-rail-foot { display: none; } .wz .step-btn { grid-template-columns: 28px; width: auto; flex: none; padding: 6px; } .wz .step-btn > span:last-child { display: none; }
  .wz-main { padding: 16px 14px 0; }
}

/* Add a team: the confirmation before the build */
.wz-confirm { width: min(520px, 100% - 32px); padding: 22px 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-raised); color: var(--text); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.wz-confirm::backdrop { background: rgba(var(--shade-rgb), .7); backdrop-filter: blur(4px); }
.wz-confirm h3 { margin: 0 0 12px; font: 800 22px var(--font-display); font-stretch: 125%; }
.wz-c-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; font-size: 14px; }
.wz-c-list dt { color: var(--muted); } .wz-c-list dd { margin: 0; overflow-wrap: anywhere; }
.wz-confirm > p { font-size: 13.5px; margin: 0 0 16px; }
.wz-c-foot { display: flex; justify-content: flex-end; gap: 10px; }

.wz-c-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 0 0 14px; }
.wz-c-band { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.wz-c-band i { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font: 800 14px var(--font-display); font-stretch: 125%; font-style: normal; }
.wz-c-band b { display: block; font: 700 16px var(--font-display); font-stretch: 125%; } .wz-c-band small { font-size: 12.5px; opacity: .8; }
.wz-c-band em { margin-left: auto; font: 600 11.5px var(--font-body); font-style: normal; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.22); white-space: nowrap; }
.wz-c-body { padding: 12px 16px 14px; display: grid; gap: 8px; background: rgba(var(--bg-rgb), .5); }
.wz-c-sub { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wz-c-build { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 6px; }
.wz-c-build li { display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; font-size: 14px; }
.wz-c-build li::before { content: "✓"; color: #8be0b8; font-weight: 700; grid-row: span 2; }
.wz-c-build li span { color: var(--muted); font-size: 12.5px; }
.wz-confirm .wz-c-list { margin: 0; }
.wz-sub-pills { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; padding: 8px 0 0 14px; margin-top: 2px; border-left: 2px solid rgba(var(--accent-rgb), .45); } /* the chosen division's regions */
/* Add a team list: a team already on SenderSpot (ticked, not pickable) */
.wz-row.is-hosted { cursor: default; background: rgba(139,224,184,.05); }
.wz-row.is-hosted .wz-radio { border-color: #8be0b8; background: rgba(139,224,184,.16); }
.wz-row.is-hosted .wz-radio::after { content: "✓"; width: auto; height: auto; background: none; color: #8be0b8; font: 700 11px var(--font-body); }
.wz-exists { color: #8be0b8; }

/* ---- Admin sidebar team list: Pinned, then All teams › Division › Region › Team (admin/team-nav.php, js/team-nav.js) ----
   The unfold follows Jerrold's reference video: the branch's height eases open and its rows arrive one after another. */
.tn { display: flex; flex-direction: column; gap: 2px; }
.tn-find { position: relative; margin: 2px 2px 4px; }
.tn-find input { width: 100%; height: 34px; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--field-line); background: var(--field-bg); color: var(--text); padding: 0 10px 0 30px; font: 400 13px var(--font-body); }
.tn-find input:focus { outline: none; border-color: var(--field-ring); box-shadow: 0 0 0 3px rgba(var(--field-ring-rgb), .18); }
.tn-find svg { position: absolute; left: 10px; top: 10px; color: var(--muted); pointer-events: none; }
.tn-row { position: relative; display: flex; align-items: center; }
.tn-row > .adm-team { flex: 1; min-width: 0; padding-right: 34px; }
.tn-pin { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s, color .15s, transform .3s var(--spring, ease); }
.tn-row:hover .tn-pin, .tn-pin:focus-visible, .tn-pin.is-on { opacity: 1; }
.tn-pin.is-on { color: var(--gold); }
.tn-pin:hover { color: var(--gold); transform: scale(1.15); }
.tn-pin:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.tn-none { margin: 2px 10px 6px; font-size: 12.5px; }
.tn-node { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; box-sizing: border-box; border: 0; border-radius: 12px; background: transparent; color: color-mix(in srgb, var(--text) 82%, transparent); font: 500 13.5px var(--font-body); cursor: pointer; text-align: left; transition: background-color .15s, color .2s; }
.tn-node:hover { background: rgba(255,255,255,.05); color: var(--text); }
.tn-node:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tn-ico { width: 18px; height: 18px; flex: none; display: grid; place-items: center; color: var(--muted); transition: color .2s; }
.tn-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-ct { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; box-sizing: border-box; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 11px; display: grid; place-items: center; color: var(--muted); }
.tn-chev { width: 14px; height: 14px; flex: none; color: var(--muted); transition: transform .45s var(--fold, ease); }
.tn-node[aria-expanded="true"] { color: var(--text); background: rgba(var(--accent-rgb), .08); }
.tn-node[aria-expanded="true"] .tn-ico { color: var(--gold); }
.tn-node[aria-expanded="true"] .tn-chev { transform: rotate(180deg); }
.tn-node.tn-lvl2 { height: 34px; font-size: 13px; }
.tn-kids { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--fold, ease); }
.tn-kids > div { overflow: hidden; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.tn-kids.is-open { grid-template-rows: 1fr; }
.tn-kids.tn-lvl1 > div, .tn-kids.tn-lvl2 > div { margin-left: 16px; padding-left: 4px; border-left: 1px solid rgba(var(--accent-rgb), .24); }
.tn-kids > div > * { opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .45s var(--fold, ease); }
.tn-kids.is-open > div > * { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 40ms + 110ms); }
.tn-kids.is-open > div > .tn-node, .tn-kids.is-open > div > .tn-kids { transition-delay: 110ms; }
.tn-instant, .tn-instant > div > * { transition: none !important; }
.tn-row.tn-arrive { opacity: 0; transform: translateX(-8px); }
.tn-row { transition: opacity .25s ease, transform .35s var(--fold, ease); }
.tn-row.tn-leave { opacity: 0; transform: translateX(-8px); }
.tn-searching .tn-kids > div > * { transition: none; }
/* folded to icons: pinned teams only */
.adm.is-folded .tn-find, .adm.is-folded .tn-node, .adm.is-folded .tn-kids, .adm.is-folded .tn-pin, .adm.is-folded .tn-none { display: none; }
.adm.is-folded .tn-row > .adm-team { padding-right: 8px; }
@media (max-width: 760px) { .adm.is-folded .tn-find, .adm.is-folded .tn-node, .adm.is-folded .tn-kids { display: revert; } .tn-pin { opacity: 1; } .tn-pin:not(.is-on) { color: color-mix(in srgb, var(--muted) 60%, transparent); } }
@media (prefers-reduced-motion: reduce) { .tn-kids, .tn-kids > div > *, .tn-chev, .tn-row, .tn-pin { transition: none !important; } }


/* Another team's Admin, for SenderSpot admins: a touch of the team's colors (its badge in the top line, its Next event tile) */
.adm-crumb-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 7px; font: 800 9.5px var(--font-display); font-stretch: 125%; font-style: normal; vertical-align: -5px; }
.adm-tile.is-hot.is-team small, .adm-tile.is-hot.is-team span { color: inherit; opacity: .8; }

/* ===== "GOT AN IDEA?" DRAWER (home page, 2026-12-02; index.html + js/idea-drawer.js) =====================================
   A tab hangs from the bottom of the menu bar; pressing it pulls a sheet down over the page with a form for feature ideas.
   .idea-drawer takes no room (height 0). .idea-clip is a page-tall window that cuts off anything above the menu's bottom
   edge, so the closed sheet waits there unseen; it lets clicks through (pointer-events) except on the sheet and tab.
   .idea-mover holds the sheet with the tab hanging under it, and slides down as one piece. */
/* The motion (Jerrold: "MUCH cooler"):
   1. The page behind dims and blurs (.idea-dim).
   2. The sheet DROPS with weight: it overshoots, bounces twice and settles (idea-drop). A strip above it in the sheet's
      color (.idea-mover::before) fills the gap the overshoot opens under the menu.
   3. The tab swings on its hinge as the sheet lands (idea-swing), and its bulb lights up.
   4. A spark of light runs along the sheet's bottom edge (idea-sweep).
   5. The form's rows rise into place one after another (idea-rise; js/idea-drawer.js numbers them as --i).
   Closing is the reverse in a hurry: one quick pull back up. While closed, a glint crosses the tab now and then. */
.idea-drawer { position: relative; z-index: 9; height: 0; }
.idea-dim { position: fixed; inset: 0; background: rgba(var(--shade-rgb), .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.idea-drawer.is-open .idea-dim { opacity: 1; pointer-events: auto; }
.idea-clip { position: absolute; top: 0; left: -16px; right: -16px; height: 100dvh; overflow: hidden; pointer-events: none; }
.idea-mover { position: absolute; top: 0; left: 50%; width: min(600px, 100% - 32px); transform: translate(-50%, -100%);
  transition: transform .32s cubic-bezier(.55, 0, .8, .2); pointer-events: auto; }
.idea-mover::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 60px; background: var(--bg-raised);
  border: 1px solid rgba(var(--accent-rgb), .35); border-block: 0; }
.idea-drawer.is-open .idea-mover { transform: translate(-50%, 0); animation: idea-drop .85s cubic-bezier(.3, .7, .4, 1) both; }
@keyframes idea-drop {
  0%   { transform: translate(-50%, -100%); }
  45%  { transform: translate(-50%, 0); animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  58%  { transform: translate(-50%, 34px); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  74%  { transform: translate(-50%, -6px); }
  87%  { transform: translate(-50%, 5px); }
  100% { transform: translate(-50%, 0); }
}
.idea-mover::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, #fff 50%, var(--gold) 70%, transparent) no-repeat;
  background-size: 40% 100%; background-position: -60% 0; opacity: 0; filter: drop-shadow(0 0 6px var(--gold)); }
.idea-drawer.is-open .idea-mover::after { animation: idea-sweep 1s .42s ease-out both; }
@keyframes idea-sweep { 0% { opacity: 0; background-position: -60% 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; background-position: 160% 0; } }
.idea-sheet { position: relative; padding: 18px 22px 20px; /* no scrolling: the form is sized to fit (see the max-height rules below) */
  background: radial-gradient(120% 80% at 50% 0%, rgba(var(--accent-rgb), .10), transparent 60%), var(--bg-raised);
  border: 1px solid rgba(var(--accent-rgb), .35); border-top: 0; border-radius: 0 0 20px 20px; transition: box-shadow .5s; }
.idea-drawer.is-open .idea-sheet { box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 0 50px rgba(var(--accent-rgb), .16); }
.idea-tab { position: absolute; top: calc(100% - 1px); left: 50%; transform: translateX(-50%); transform-origin: 50% 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px 9px; white-space: nowrap; cursor: pointer; font: 600 .875rem var(--font-body); color: var(--text);
  background: var(--btn-satin); border: 1px solid rgba(var(--accent-rgb), .45); border-top: 0; border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3); transition: color .15s, border-color .25s, box-shadow .3s; }
.idea-tab svg:first-child { color: var(--gold); transition: filter .3s, transform .3s; }
.idea-tab:hover { border-color: var(--gold); box-shadow: 0 8px 20px rgba(0, 0, 0, .3), 0 0 18px rgba(var(--accent-rgb), .25); }
.idea-tab:hover svg:first-child { transform: scale(1.15) rotate(-8deg); }
.idea-tab:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.idea-drawer.is-open .idea-tab { border-color: var(--gold); box-shadow: 0 10px 24px rgba(0, 0, 0, .35), 0 0 22px rgba(var(--accent-rgb), .35); animation: idea-swing .9s .34s both; }
.idea-drawer.is-open .idea-tab svg:first-child { filter: drop-shadow(0 0 5px var(--gold)) drop-shadow(0 0 10px var(--gold)); }
@keyframes idea-swing { 0% { rotate: 0deg; } 22% { rotate: 7deg; } 44% { rotate: -5deg; } 64% { rotate: 3deg; } 82% { rotate: -1.2deg; } 100% { rotate: 0deg; } }
.idea-chev { transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.idea-drawer.is-open .idea-chev { transform: rotate(180deg); }
.idea-drawer.is-open :is(.idea-form, .idea-thanks:not([hidden])) > * { animation: idea-rise .55s calc(.2s + var(--i, 0) * 60ms) cubic-bezier(.2, .8, .3, 1) both; }
@keyframes idea-rise { from { opacity: 0; transform: translateY(16px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }

.idea-form { display: grid; gap: 12px; }
.idea-form[hidden], .idea-thanks[hidden] { display: none; } /* their display: grid would beat the hidden attribute */
.idea-head h2, .idea-thanks h2 { margin: 0 0 2px; font-size: 1.2rem; text-wrap: balance; }
.idea-head p { font-size: .9rem; line-height: 1.4; }
.idea-form textarea { min-height: 78px; }
.idea-head p, .idea-thanks p { margin: 0; }
.idea-field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
.idea-field .muted, .idea-pills legend .muted { font-weight: 400; }
.idea-field :is(input, textarea) { width: 100%; font-weight: 400; }
.idea-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.idea-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.idea-pills legend { padding: 0; margin-bottom: 6px; font-size: .9rem; font-weight: 600; }
.idea-pills label { position: relative; }
.idea-pills input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.idea-pills label > span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; font-size: .9rem;
  background: var(--field-bg); border: 1px solid var(--field-line); transition: background .15s, border-color .15s, color .15s; }
.idea-pills-small label > span { min-height: 32px; padding: 0 13px; font-size: .85rem; }
.idea-pills label:hover > span { border-color: var(--field-line-hover); }
.idea-pills input:checked + span { background: var(--btn-main); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.idea-pills input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.idea-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.idea-msg { margin: 0; font-size: .875rem; color: var(--field-bad); }
.idea-msg:empty { display: none; }
.idea-foot { display: flex; flex-wrap: wrap; gap: 10px; }
.idea-thanks { display: grid; justify-items: center; gap: 6px; padding: 10px 0 4px; text-align: center; }
.idea-thanks .idea-foot { justify-content: center; margin-top: 12px; }
.idea-tick { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; border-radius: 50%; background: var(--btn-main); color: var(--on-accent);
  box-shadow: 0 0 28px rgba(var(--accent-rgb), .35); }
.idea-tick svg { width: 28px; height: 28px; stroke-dasharray: 24; stroke-dashoffset: 24; }
.idea-thanks:not([hidden]) .idea-tick svg { animation: idea-tick .45s .15s ease-out forwards; }
.idea-thanks:not([hidden]) .idea-tick { animation: idea-pop .6s cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes idea-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes idea-tick { to { stroke-dashoffset: 0; } }
@media (max-width: 560px) {
  .idea-sheet { padding: 14px 14px 16px; }
  .idea-head p { display: none; }       /* phones: the title says it; the room goes to the form */
  .idea-pills label > span { min-height: 32px; padding: 0 12px; font-size: .84rem; }
  .idea-field { font-size: .84rem; }
  .idea-row .idea-field .muted { display: block; font-size: .78rem; }
  .idea-mover { width: calc(100% - 16px); }
  .idea-tab { left: 8px; transform: none; } /* left, out of the way of What's New, which hangs on the right */
}
@media (prefers-reduced-motion: reduce) {
  .idea-mover, .idea-chev, .idea-sheet, .idea-dim { transition: none; }
  .idea-drawer.is-open :is(.idea-mover, .idea-tab, .idea-mover::after), .idea-drawer.is-open :is(.idea-form, .idea-thanks) > *, .idea-thanks .idea-tick { animation: none !important; }
  .idea-thanks:not([hidden]) .idea-tick svg { animation: none; stroke-dashoffset: 0; }
}
/* Admin › SenderSpot settings › Ideas */
.idea-list { display: grid; gap: 12px; margin-top: 16px; }
.idea-item { display: grid; gap: 10px; }
.idea-item.is-done { opacity: .6; }
.idea-item-top, .idea-item-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .85rem; }
.idea-item-foot { justify-content: space-between; }
.idea-text { margin: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.idea-kind { padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: .78rem; background: rgba(var(--accent-rgb), .16); color: var(--gold); }
.idea-kind-broken { background: rgba(var(--field-bad-rgb), .16); color: var(--field-bad); }
.idea-kind-better { background: rgba(var(--haze-right-rgb), .25); color: var(--text); }
.idea-done-tag { margin-left: auto; font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.idea-email { user-select: all; color: var(--text); }
.idea-actions { display: inline-flex; gap: 8px; }
.idea-actions form { margin: 0; }

/* Idea drawer: everything fits without scrolling. Shorter windows give up the intro line, then some height in the idea box. */
@media (max-height: 760px) { .idea-head p { display: none; } }
@media (max-height: 640px) { .idea-form textarea { min-height: 56px; } .idea-form { gap: 9px; } }

/* ===== Idea drawer: the electric edge (Jerrold's reference video, 2026-12-02) =====================================
   .idea-zap is a border with no box behind it, run through an SVG filter (index.html: #idea-crackle) that shifts its line
   about with noise and changes the noise eight times a second, so the edge crackles like current. A second copy, blurred,
   is the glow around it. One on the sheet (sides and bottom, the top meets the menu) and a finer one on the tab.
   Its color is --zap, which follows the form: gold while you write, ember red when something needs fixing, green when sent. */
.idea-drawer { --zap: var(--gold); --zap-rgb: var(--accent-rgb); }
.idea-drawer.zap-bad { --zap: var(--field-bad); --zap-rgb: var(--field-bad-rgb); }
.idea-drawer.zap-good { --zap: #4be3a0; --zap-rgb: 75, 227, 160; }
.idea-zap { position: absolute; inset: 0; pointer-events: none; border: 2px solid var(--zap); border-top: 0; border-radius: 0 0 20px 20px;
  filter: url(#idea-crackle); opacity: 0; transition: opacity .3s, border-color .35s; }
.idea-zap-glow { border-width: 3px; filter: url(#idea-crackle) blur(5px); }
.idea-drawer.is-open .idea-mover > .idea-zap { opacity: 1; animation: idea-zap-on .9s .3s both; }
.idea-drawer.is-open .idea-mover > .idea-zap-glow { opacity: .9; }
@keyframes idea-zap-on { 0% { opacity: 0; } 20% { opacity: 1; } 30% { opacity: .2; } 45% { opacity: 1; } 55% { opacity: .5; } 100% { opacity: 1; } }
.idea-drawer.is-open .idea-sheet { border-color: rgba(var(--zap-rgb), .4); box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 0 46px rgba(var(--zap-rgb), .22); transition: box-shadow .4s, border-color .4s; }
.idea-drawer.zap-good.is-open .idea-sheet { animation: idea-surge 1.1s ease-out; }
@keyframes idea-surge { 0% { box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 0 0 rgba(var(--zap-rgb), 0); } 25% { box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 0 90px rgba(var(--zap-rgb), .65); } }
/* The tab: always a faint crackle, to invite a tap; full strength while the drawer is open. */
.idea-tab .idea-zap { inset: -1px; border-width: 1.5px; border-radius: 0 0 14px 14px; filter: url(#idea-crackle-sm); opacity: .55; }
.idea-tab:hover .idea-zap, .idea-drawer.is-open .idea-tab .idea-zap { opacity: 1; }
.idea-drawer.is-open .idea-tab { border-color: var(--zap); box-shadow: 0 10px 24px rgba(0, 0, 0, .35), 0 0 22px rgba(var(--zap-rgb), .45); }
.idea-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .idea-zap { filter: none; } .idea-zap-glow { filter: blur(5px); }
  .idea-drawer.is-open .idea-mover > .idea-zap, .idea-drawer.zap-good.is-open .idea-sheet { animation: none; }
}
