/* ============================================================
   SHARK TANK 26 — Get Strong / Higher State Fitness
   Core stylesheet — "Abyssal Dive Computer"
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* depth ramp */
  --abyss:      #03060b;
  --trench:     #060c15;
  --deep:       #0a1420;
  --shelf:      #101e2c;
  --surface:    #17293a;
  --steel:      #2b4053;

  /* shark hide */
  --hide:       #a7b4bf;
  --hide-dim:   #7c8a96;
  --belly:      #edf2f5;
  --bone:       #f7f9fb;

  /* signals */
  --chum:       #2f7ab0;   /* primary accent — deep ocean blue */
  --chum-deep:  #1d5680;
  --sonar:      #4ff0e0;   /* cold cyan ping */
  --sonar-dim:  #1d8f88;
  --azure:      #3d7ea6;   /* apex division — deep ocean blue */

  /* typography */
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body:    "Archivo", "Helvetica Neue", sans-serif;
  --mono:    "JetBrains Mono", "Courier New", monospace;

  /* metrics */
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --rule: 1px solid rgba(138, 153, 166, 0.16);
  --rule-hot: 1px solid rgba(47, 122, 176, 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.65, 0, 0.35, 1);

  --nav-h: 74px;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--abyss);
  color: var(--hide);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

::selection { background: var(--chum); color: var(--bone); }

/* ---------- 3. ATMOSPHERE ---------- */
/* grain + caustics, fixed over everything, non-interactive.
   `translateZ(0)` forces each layer onto its own GPU compositor layer —
   without it, iOS Safari can visibly detach a `position: fixed` element
   that has a running animation during momentum scrolling: the overlay
   lags behind for a moment (the bottom of the screen briefly shows with
   no vignette at all) before snapping back into place once the scroll
   settles. This is that fix. */
.atmos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  transform: translateZ(0);
  will-change: transform;
}

.atmos::before {
  /* film grain */
  content: "";
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.09;
  animation: grain 6s steps(6) infinite;
}

/* The deep vignette that used to sit over everything has been removed —
   it washed the whole site in a dark gradient. The grain above and the
   caustics below are the remaining atmosphere; delete those too for a
   completely flat background. */

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -5%); }
  60%  { transform: translate(-6%, -2%); }
  80%  { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

/* light shafts filtering down from the surface.
   `inset: 0` instead of a `90vh` height: on iOS Safari, `vh` is measured
   against a viewport that changes size as the address bar hides and
   shows during a scroll — a fixed element sized off it can visibly
   snap to a new size mid-scroll. `inset: 0` isn't affected by that.
   `translateZ(0)` + `will-change` are the same fixed-position-during-
   scroll fix as `.atmos`, above. */
.caustics {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  transform: translateZ(0);
  will-change: transform;
  background:
    linear-gradient(172deg, rgba(79, 240, 224, 0.09) 0%, transparent 42%),
    linear-gradient(196deg, rgba(79, 240, 224, 0.06) 0%, transparent 38%),
    linear-gradient(184deg, rgba(120, 190, 220, 0.05) 0%, transparent 50%);
  mask-image: repeating-linear-gradient(97deg, #000 0 60px, transparent 60px 190px);
  -webkit-mask-image: repeating-linear-gradient(97deg, #000 0 60px, transparent 60px 190px);
  animation: sway 14s ease-in-out infinite alternate;
}

@keyframes sway {
  from { transform: translateX(-3%) skewX(0deg); }
  to   { transform: translateX(3%) skewX(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 4. TYPE SYSTEM ---------- */
.display,
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.015em;
  color: var(--bone);
  text-transform: uppercase;
}

h1 { font-size: clamp(3.2rem, 12vw, 11rem); font-weight: 900; }
h2 { font-size: clamp(2.4rem, 6.5vw, 5.5rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2.4rem); }
h4 { font-size: clamp(1.1rem, 1.6vw, 1.4rem); letter-spacing: 0.01em; }

p { max-width: 62ch; }
p + p { margin-top: 1em; }

strong { color: var(--belly); font-weight: 600; }

/* readout — the dive-computer label */
.readout {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sonar);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
@media (max-width: 560px) {
  .readout {
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    display: block;
    white-space: normal;
    overflow: visible;
    line-height: 1.7;
  }
  .readout::before {
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: middle;
  }
  .readout--line::after { display: none; }
}
.readout::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--sonar);
  flex: none;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: ping 2.4s var(--ease) infinite;
}
.readout--chum { color: var(--chum); }
.readout--chum::before { background: var(--chum); }
.readout--line::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  min-width: 20px;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: 0.4;
}

@keyframes ping {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.25; transform: scale(0.6); }
}

.lede {
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  line-height: 1.6;
  color: var(--belly);
  max-width: 54ch;
}

.mono { font-family: var(--mono); }

/* stroked outline numerals — hollow, cold */
.ghost-num {
  font-family: var(--display);
  font-weight: 900;
  -webkit-text-stroke: 1.5px rgba(138, 153, 166, 0.32);
  color: transparent;
  line-height: 0.75;
  user-select: none;
}

/* ---------- 5. LAYOUT ---------- */
.shell {
  width: min(1440px, 100% - var(--gut) * 2);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}
.shell--tight { width: min(920px, 100% - var(--gut) * 2); }

section { position: relative; }
.band { padding: clamp(5rem, 11vw, 10rem) 0; }
.band--hair { border-top: var(--rule); }

/* ---------- 6. NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 800;
  display: flex;
  align-items: center;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease), backdrop-filter 0.45s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(3, 6, 11, 0.82);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: rgba(138, 153, 166, 0.14);
}

.nav__inner {
  width: min(1440px, 100% - var(--gut) * 2);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}
.brand__fin {
  width: 36px;
  height: 36px;
  flex: none;
  object-fit: cover;
  object-position: 34% 26%;
  clip-path: circle(48% at 50% 50%);
  filter: contrast(1.25) brightness(1.05) drop-shadow(0 0 6px rgba(47,122,176,0.45));
  transition: filter 0.3s;
}
.brand:hover .brand__fin { filter: contrast(1.3) brightness(1.15) drop-shadow(0 0 10px rgba(47,122,176,0.7)); }
.brand__txt {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bone);
  line-height: 1;
}
.brand__txt span { color: var(--chum); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.1rem);
  list-style: none;
}
/* the auth slot holds several links in one <li>, so lay them out itself */
#navAuth { display: flex; align-items: center; gap: 0.6rem; }
#navAuth, #navAuthLink, #navAuthCta {
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
#navAuth.is-ready, #navAuthLink.is-ready, #navAuthCta.is-ready {
  opacity: 1;
}
.nav__links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hide);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.28s;
  white-space: nowrap;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 0;
  background: var(--chum);
  transition: width 0.35s var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--bone); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { width: 100%; }

.nav__burger {
  display: none;
  width: 42px; height: 42px;
  border: var(--rule);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex: none;
}
.nav__burger i {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--bone);
  transition: transform 0.35s var(--ease), opacity 0.2s;
}
.nav.is-open .nav__burger i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav__burger i:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6, 12, 21, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--rule-hot);
    padding: 0.5rem 0 1.25rem;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.5s var(--ease);
  }
  .nav.is-open .nav__links { clip-path: inset(0 0 0 0); }
  .nav__links li { border-top: var(--rule); }
  .nav__links a {
    display: block;
    padding: 1rem var(--gut);
    font-size: 0.8rem;
  }
  .nav__links .btn { margin: 1rem var(--gut) 0; text-align: center; }
  /* the auth slot is a flex row on desktop; in the drawer it has to stack
     so Log In and Create Account are the same full-width blocks as the
     rest of the menu rather than two mismatched items on one line */
  #navAuth { display: block; }
  #navAuth .btn { display: block; }
}

/* ---------- 7. BUTTONS ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--bone);
  --btn-bd: rgba(232, 238, 242, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.05rem 2.1rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.32s var(--ease), border-color 0.32s var(--ease), transform 0.32s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn::before {
  /* blood bloom */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--chum);
  transform: translateY(101%);
  transition: transform 0.42s var(--ease-snap);
  z-index: -1;
}
.btn:hover, .btn:focus-visible {
  color: var(--bone);
  border-color: var(--chum);
  outline: none;
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:active { transform: translateY(1px); }

.btn--chum {
  --btn-bg: var(--chum);
  --btn-fg: var(--bone);
  --btn-bd: var(--chum);
}
.btn--chum::before { background: var(--bone); }
.btn--chum:hover, .btn--chum:focus-visible { color: var(--abyss); }

.btn--ghost { --btn-bd: rgba(138, 153, 166, 0.22); color: var(--hide); }
.btn--sm { padding: 0.72rem 1.35rem; font-size: 0.64rem; }

/* nav CTA — solid blue by default, cools to steel grey on hover */
.btn--navcta {
  --btn-bg: var(--chum);
  --btn-fg: var(--bone);
  --btn-bd: var(--chum);
  padding-left: 1.9rem;
  padding-right: 1.9rem;
}
.btn--navcta::before { background: var(--steel); }
.btn--navcta:hover, .btn--navcta:focus-visible { color: var(--bone); border-color: var(--steel); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ---------- 8. HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 72% 32%, rgba(79, 240, 224, 0.14), transparent 46%),
    radial-gradient(circle at 18% 78%, rgba(47, 122, 176, 0.16), transparent 50%),
    linear-gradient(180deg, var(--trench) 0%, var(--abyss) 100%);
}

/* the shark, cruising */
.cruiser {
  position: absolute;
  z-index: 0;
  top: 4%;
  right: -10%;
  width: clamp(460px, 56vw, 900px);
  max-width: none;
  opacity: 0.34;
  mix-blend-mode: screen;
  filter: grayscale(0.55) brightness(0.85) contrast(1.2) saturate(0.7) drop-shadow(0 20px 60px rgba(0,0,0,0.5));
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 62% 42%, #000 55%, transparent 88%);
  mask-image: radial-gradient(ellipse 75% 80% at 62% 42%, #000 55%, transparent 88%);
  animation: patrol 26s ease-in-out infinite;
  pointer-events: none;
}
@keyframes patrol {
  0%   { transform: translate(-3%, 0) rotate(-0.6deg) scale(1); }
  50%  { transform: translate(2%, -2.5%) rotate(0.6deg) scale(1.03); }
  100% { transform: translate(-3%, 0) rotate(-0.6deg) scale(1); }
}
@media (max-width: 780px) {
  .cruiser { opacity: 0.2; right: -20%; }
}

.hero__inner { position: relative; z-index: 2; }

.hero__title {
  font-size: clamp(4rem, 17.5vw, 17rem);
  line-height: 0.78;
  letter-spacing: -0.03em;
  font-weight: 900;
  margin: 1.5rem 0 0;
}
.hero__title em {
  font-style: normal;
  display: block;
  color: transparent;
  -webkit-text-stroke: clamp(1px, 0.18vw, 2.5px) var(--chum);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem clamp(1.5rem, 4vw, 4rem);
  align-items: flex-end;
  justify-content: space-between;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  padding-top: 1.6rem;
  border-top: var(--rule);
}
.hero__meta p { max-width: 40ch; font-size: 0.95rem; }

.hero__cta { display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* countdown */
.count {
  display: flex;
  gap: clamp(0.9rem, 2vw, 2rem);
}
.count__cell { text-align: left; }
.count__n {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.8;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  display: block;
}
.count__l {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hide-dim);
  margin-top: 0.55rem;
  display: block;
}

/* scroll hint */
.dive {
  position: absolute;
  bottom: 1.5rem; right: var(--gut);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--hide-dim);
  writing-mode: vertical-rl;
}
.dive::after {
  content: "";
  width: 1px; height: 60px;
  background: linear-gradient(180deg, var(--sonar), transparent);
  animation: descend 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes descend {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50%      { transform: scaleY(1); opacity: 1; }
}
@media (max-width: 780px) { .dive { display: none; } }

/* ---------- 9. MARQUEE ---------- */
.tape {
  border-block: var(--rule);
  background: linear-gradient(90deg, rgba(47,122,176,0.06), transparent 50%, rgba(47,122,176,0.06));
  overflow: hidden;
  padding: 0.9rem 0;
  position: relative;
  z-index: 1;
}
.tape__track {
  display: flex;
  width: max-content;
  animation: roll 38s linear infinite;
}
.tape:hover .tape__track { animation-play-state: paused; }
.tape span {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--hide-dim);
  padding-inline: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  white-space: nowrap;
}
.tape span::after {
  content: "";
  width: 9px; height: 9px;
  background: var(--chum);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  flex: none;
}
.tape span:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px var(--hide-dim);
}
@keyframes roll { to { transform: translateX(-50%); } }

/* ---------- 10. SECTION HEAD ---------- */
.head {
  display: grid;
  gap: 1.4rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.head--split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: end;
  gap: 2rem clamp(2rem, 6vw, 6rem);
}
@media (max-width: 900px) { .head--split { grid-template-columns: 1fr; } }

/* ---------- 11. CARDS / GRID ---------- */
.grid { display: grid; gap: 1px; background: rgba(138,153,166,0.14); border: var(--rule); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.cell {
  background: var(--abyss);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  position: relative;
  overflow: hidden;
  transition: background 0.4s var(--ease);
}
.cell:hover { background: var(--trench); }
.cell__n {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: var(--chum);
  display: block;
  margin-bottom: 1.4rem;
}
.cell h3 { margin-bottom: 0.85rem; }
.cell p { font-size: 0.92rem; }
.cell__ghost {
  position: absolute;
  right: -0.5rem; bottom: -2.2rem;
  font-size: 8rem;
  opacity: 0.35;
  transition: transform 0.6s var(--ease), opacity 0.6s;
  pointer-events: none;
}
.cell:hover .cell__ghost { transform: translateY(-6px); opacity: 0.6; }

/* division cards */
.divisions { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 860px) { .divisions { grid-template-columns: 1fr; } }

.div-card {
  position: relative;
  padding: clamp(1.8rem, 3.5vw, 3rem);
  border: var(--rule);
  background: linear-gradient(160deg, var(--trench), var(--abyss));
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease), border-color 0.5s;
}
.div-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s;
  background: radial-gradient(circle at 85% 0%, var(--tint, var(--chum)), transparent 62%);
}
.div-card:hover { transform: translateY(-5px); border-color: var(--tint, var(--chum)); }
.div-card:hover::before { opacity: 0.16; }
.div-card--apex { --tint: var(--azure); }
.div-card--bite { --tint: var(--sonar); }

.div-card__tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--tint, var(--chum));
  border: 1px solid currentColor;
  padding: 0.35rem 0.75rem;
  display: inline-block;
  margin-bottom: 1.6rem;
}
.div-card h3 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 1rem; }
.div-card ul { list-style: none; margin-top: 1.6rem; display: grid; gap: 0.6rem; }
.div-card li {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--hide);
  padding-left: 1.4rem;
  position: relative;
}
.div-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 8px; height: 8px;
  background: var(--tint, var(--chum));
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* ---------- 12. TABLES / LEADERBOARD ---------- */
.tbl-wrap {
  overflow-x: auto;
  border: var(--rule);
  background: var(--trench);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; min-width: 640px; }

thead th {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hide-dim);
  text-align: left;
  padding: 1rem 1.15rem;
  border-bottom: var(--rule);
  background: var(--deep);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
tbody td {
  padding: 1.05rem 1.15rem;
  border-bottom: 1px solid rgba(138, 153, 166, 0.08);
  font-size: 0.9rem;
  vertical-align: middle;
}
table.tbl--tight tbody td { white-space: nowrap; }
table.tbl--tight tbody td:nth-child(2) { white-space: normal; }
tbody tr { transition: background 0.25s; }
tbody tr:hover { background: rgba(79, 240, 224, 0.04); }
tbody tr:last-child td { border-bottom: 0; }

.rank {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.7rem;
  color: var(--hide-dim);
  line-height: 1;
  width: 4.5rem;
  font-variant-numeric: tabular-nums;
}
tr[data-rank="1"] .rank { color: var(--azure); }
tr[data-rank="2"] .rank { color: var(--belly); }
tr[data-rank="3"] .rank { color: var(--chum); }
tr[data-rank="1"] { background: linear-gradient(90deg, rgba(255,176,58,0.09), transparent 55%); }

.team-name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.team-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--hide-dim);
  text-transform: uppercase;
  margin-top: 0.25rem;
  display: block;
}
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--belly); font-size: 0.85rem; }
.pts { font-family: var(--mono); font-weight: 700; color: var(--sonar); font-variant-numeric: tabular-nums; }

/* ---------- leaderboard: mobile card view ----------
   The standings table needs ~1000px to breathe. Rather than make phones
   scroll sideways, below that width the same rows render as cards. Only
   one of the two is ever in the layout. */
.lb-cards { display: none; }

@media (max-width: 1023px) {
  .lb-table { display: none; }
  /* break out of the shell's gutters so the list runs edge to edge —
     on a phone every pixel of width is worth having */
  .lb-cards {
    display: grid;
    gap: 0.55rem;
    margin-inline: calc(var(--gut) * -1);
  }
  .lbc { border-left: 0; border-right: 0; }
}

.lbc {
  border: var(--rule);
  background: var(--trench);
  padding: 1rem 1rem 0.85rem;
}
.lbc[data-rank="1"] {
  border-color: rgba(255, 176, 58, 0.4);
  background: linear-gradient(160deg, rgba(255, 176, 58, 0.08), var(--trench) 60%);
}

.lbc__hd {
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr) auto 1rem;
  gap: 0.75rem;
  align-items: start;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.lbc__hd .team-name,
.lbc__hd .team-sub { display: block; }

/* +/- affordance, matching the workout accordions */
.lbc__x { width: 1rem; height: 1rem; position: relative; align-self: center; }
.lbc__x::before, .lbc__x::after {
  content: "";
  position: absolute;
  background: var(--hide);
  left: 50%; top: 50%;
  transition: transform 0.4s var(--ease), background 0.3s;
}
.lbc__x::before { width: 11px; height: 1.5px; transform: translate(-50%, -50%); }
.lbc__x::after  { width: 1.5px; height: 11px; transform: translate(-50%, -50%); }
.lbc.is-open .lbc__x::after { transform: translate(-50%, -50%) rotate(90deg); }
.lbc.is-open .lbc__x::before,
.lbc.is-open .lbc__x::after { background: var(--chum); }

/* collapsed until tapped */
.lbc__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.lbc.is-open .lbc__body { grid-template-rows: 1fr; }
.lbc__body > div { overflow: hidden; }
.lbc__rank {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 0.9;
  color: var(--hide-dim);
  font-variant-numeric: tabular-nums;
}
.lbc[data-rank="1"] .lbc__rank { color: var(--azure); }
.lbc[data-rank="2"] .lbc__rank { color: var(--belly); }
.lbc[data-rank="3"] .lbc__rank { color: var(--chum); }

.lbc__id { min-width: 0; }
.lbc__id .team-name { font-size: 1.15rem; }
.lbc__id .team-sub { letter-spacing: 0.1em; }
.lbc__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
.lbc__cat {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hide-dim);
}

.lbc__pts { text-align: right; line-height: 1; white-space: nowrap; }
.lbc__pts b {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--sonar);
  font-variant-numeric: tabular-nums;
}
.lbc__pts small {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hide-dim);
}

.lbc__evs {
  margin-top: 0.9rem;
  border-top: 1px solid rgba(138, 153, 166, 0.14);
}
.lbc__ev {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(138, 153, 166, 0.08);
  align-items: baseline;
}
.lbc__ev:last-child { border-bottom: 0; }
.lbc__evn {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hide);
  min-width: 0;
}
.lbc__evn b { color: var(--chum); font-weight: 700; }
.lbc__evv {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  color: var(--belly);
  text-align: right;
}
.lbc__evp {
  grid-column: 2;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hide-dim);
  text-align: right;
}
.lbc__ev.is-empty .lbc__evv { color: var(--hide-dim); }

/* the breakdown behind the score: each athlete's split, each lift, caps */
.lbc__evd {
  grid-column: 1 / -1;
  margin-top: 0.3rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.65;
  letter-spacing: 0.08em;
  color: var(--hide);
  text-transform: none;
}

.lbc__ft {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hide-dim);
}

@media (max-width: 380px) {
  .lbc { padding: 0.85rem 0.8rem; }
  .lbc__hd { grid-template-columns: 2rem minmax(0, 1fr) auto 0.9rem; gap: 0.55rem; }
  .lbc__rank { font-size: 1.6rem; }
  .lbc__id .team-name { font-size: 1.02rem; }
}

/* pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.32rem 0.66rem;
  border: 1px solid currentColor;
  color: var(--hide-dim);
  white-space: nowrap;
}
.pill--apex  { color: var(--azure); }
.pill--bite  { color: var(--sonar); }
.pill--live  { color: var(--chum); }
.pill--live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.15; } }

/* filter bar */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}
.chip {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.62rem 1.05rem;
  border: var(--rule);
  color: var(--hide-dim);
  transition: all 0.28s var(--ease);
  cursor: pointer;
}
.chip:hover { color: var(--bone); border-color: rgba(232,238,242,0.35); }
.chip.is-on {
  background: var(--chum);
  border-color: var(--chum);
  color: var(--bone);
}

/* Each chip carries a long and a short label. Below 720px the short one
   takes over so a filter row fits on a single line as even columns,
   instead of wrapping raggedly onto two. */
.chip__sm { display: none; }

@media (max-width: 720px) {
  .filters { display: grid; gap: 0.4rem; margin-bottom: 0.9rem; }
  .filters--3 { grid-template-columns: repeat(3, 1fr); }
  .filters--4 { grid-template-columns: repeat(4, 1fr); }
  .chip {
    padding: 0.9rem 0.3rem;
    text-align: center;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }
  .chip__lg { display: none; }
  .chip__sm { display: inline; }

  /* masthead centres up and the title scales with the viewport so it
     actually fills the screen instead of sitting small and left —
     shared by any single-line page title (leaderboard, schedule) */
  .lb-mast, .sch-mast { flex-direction: column; align-items: center; gap: 0.7rem; text-align: center; }
  .lb-mast .readout--line::after, .sch-mast .readout--line::after { display: none; }
  /* two classes, so this beats `.mast h1`'s own font-size */
  .mast .lb-title, .mast .sch-title {
    text-align: center;
    line-height: 0.84;
  }
  /* "Leaderboard" wraps to two ~6-7 letter lines via a <br> in the
     markup, so 33vw fits it. "Schedule" is one unbroken 8-letter word —
     sharing that value ran it off the edge of the screen, so it gets
     its own smaller scale to stay on one line instead. */
  .mast .lb-title { font-size: clamp(3.4rem, 33vw, 10rem); }
  .mast .sch-title { font-size: clamp(2.6rem, 24vw, 7.5rem); }
}

/* ---------- 13. FORMS ---------- */
.form { display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.55rem; }
.field > label {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sonar);
}
.field input,
.field select,
.field textarea {
  background: var(--trench);
  border: var(--rule);
  padding: 0.95rem 1.05rem;
  color: var(--bone);
  font-family: var(--body);
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a99a6' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.6rem;
  cursor: pointer;
}
.field select option { background: var(--deep); color: var(--bone); }
.field input::placeholder, .field textarea::placeholder { color: var(--hide-dim); opacity: 0.7; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--chum);
  background: var(--deep);
  box-shadow: 0 0 0 3px rgba(47, 122, 176, 0.1);
}
.field small { font-family: var(--mono); font-size: 0.62rem; color: var(--hide-dim); letter-spacing: 0.06em; }
.field.is-bad input, .field.is-bad select { border-color: var(--chum); }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

fieldset { border: 0; }
.legend {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--bone);
  padding-bottom: 0.9rem;
  margin-bottom: 1.6rem;
  border-bottom: var(--rule);
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}
.legend span {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--chum);
}

/* radio cards */
.opts { display: grid; gap: 0.75rem; }
.opts--2 { grid-template-columns: 1fr 1fr; }
.opts--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .opts--2, .opts--3 { grid-template-columns: 1fr; } }

.opt { position: relative; cursor: pointer; display: block; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__box {
  display: block;
  border: var(--rule);
  background: var(--trench);
  padding: 1.05rem 1.15rem;
  transition: all 0.3s var(--ease);
  height: 100%;
}
.opt__t {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  color: var(--belly);
  line-height: 1.1;
  display: block;
}
.opt__d {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hide-dim);
  margin-top: 0.4rem;
  display: block;
}
.opt:hover .opt__box { border-color: rgba(232,238,242,0.3); }
.opt input:checked + .opt__box {
  border-color: var(--chum);
  background: linear-gradient(150deg, rgba(47,122,176,0.14), transparent 70%), var(--deep);
}
.opt input:checked + .opt__box .opt__t { color: var(--bone); }
.opt input:focus-visible + .opt__box { box-shadow: 0 0 0 3px rgba(79,240,224,0.25); }

/* waiver text panel */
.waiver-box {
  background: var(--trench);
  border: var(--rule);
  padding: 1.4rem 1.5rem;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 1.1rem;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--hide);
}
.waiver-box p { max-width: none; }
.waiver-box p + p { margin-top: 0.9rem; }
.waiver-box strong { color: var(--sonar); font-weight: 600; }
.waiver-box:focus-visible { outline: 2px solid var(--sonar); outline-offset: 2px; }

/* checkbox line */
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  font-size: 0.86rem;
  line-height: 1.5;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__mark {
  width: 20px; height: 20px;
  border: 1px solid rgba(138,153,166,0.4);
  flex: none;
  position: relative;
  margin-top: 2px;
  transition: all 0.25s;
}
.check__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--chum);
  transform: scale(0);
  transition: transform 0.22s var(--ease-snap);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.check input:checked + .check__mark { border-color: var(--chum); }
.check input:checked + .check__mark::after { transform: scale(1); }

/* auth panel */
.auth {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: var(--nav-h);
}
@media (max-width: 940px) { .auth { grid-template-columns: 1fr; } .auth__art { display: none; } }

.auth__art {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(47,122,176,0.2), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(79,240,224,0.14), transparent 55%),
    linear-gradient(200deg, var(--deep), var(--abyss));
  border-right: var(--rule);
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 5vw, 4rem);
}
.auth__art img {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 130%;
  max-width: none;
  opacity: 0.16;
  mix-blend-mode: screen;
  filter: grayscale(0.5) brightness(0.9) contrast(1.15) saturate(0.6);
  animation: hover-drift 12s ease-in-out infinite alternate;
}
@keyframes hover-drift {
  from { transform: translate(-52%, -50%) rotate(-2deg); }
  to   { transform: translate(-48%, -47%) rotate(2deg); }
}
.auth__art blockquote {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--bone);
  max-width: 16ch;
}
.auth__art cite {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  color: var(--chum);
  font-style: normal;
  margin-top: 1.2rem;
}

.auth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gut);
}
.auth__panel > div { width: min(460px, 100%); }

/* alert */
.alert {
  border: 1px solid;
  padding: 0.9rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  display: none;
}
.alert.is-shown { display: block; animation: jolt 0.4s var(--ease-snap); }
.alert--bad  { border-color: var(--chum); color: #6fb3e0; background: rgba(47,122,176,0.08); }
.alert--good { border-color: var(--sonar-dim); color: var(--sonar); background: rgba(79,240,224,0.07); }
@keyframes jolt {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

/* ---------- 14. WORKOUT BLOCKS ---------- */
.wod {
  border: var(--rule);
  background: var(--trench);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: border-color 0.4s;
}
.wod:hover { border-color: rgba(47,122,176,0.3); }

.wod__bar {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(1.2rem, 2.4vw, 1.9rem) clamp(1.2rem, 2.4vw, 2rem);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.3s;
}
.wod__bar:hover { background: rgba(79,240,224,0.03); }
.wod__idx {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--chum);
  flex: none;
  font-variant-numeric: tabular-nums;
}
.wod__hd { flex: 1 1 auto; min-width: 0; }
.wod__hd h3 { margin-bottom: 0.35rem; }
.wod__tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hide-dim);
}
.wod__x {
  flex: none;
  width: 30px; height: 30px;
  position: relative;
}
.wod__x::before, .wod__x::after {
  content: "";
  position: absolute;
  background: var(--hide);
  left: 50%; top: 50%;
  transition: transform 0.4s var(--ease), background 0.3s;
}
.wod__x::before { width: 15px; height: 1.5px; transform: translate(-50%, -50%); }
.wod__x::after  { width: 1.5px; height: 15px; transform: translate(-50%, -50%); }
.wod.is-open .wod__x::after { transform: translate(-50%, -50%) rotate(90deg); }
.wod.is-open .wod__x::before, .wod.is-open .wod__x::after { background: var(--chum); }

.wod__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}
.wod.is-open .wod__body { grid-template-rows: 1fr; }
.wod__body > div { overflow: hidden; }
.wod__inner {
  padding: 0 clamp(1.2rem, 2.4vw, 2rem) clamp(1.5rem, 3vw, 2.4rem);
  border-top: var(--rule);
  margin-top: 0.4rem;
  padding-top: clamp(1.5rem, 3vw, 2.2rem);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
@media (max-width: 820px) { .wod__inner { grid-template-columns: 1fr; } }

.script {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--belly);
}
.script b { color: var(--chum); font-weight: 700; }
.script hr { border: 0; border-top: var(--rule); margin: 1.2rem 0; }
.wod__list {
  list-style: none;
  counter-reset: wodstep;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.wod__list li {
  counter-increment: wodstep;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  color: var(--bone);
}
.wod__list li::before {
  content: counter(wodstep);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--chum);
  border: 1px solid rgba(47, 122, 176, 0.4);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wod__divsplit {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin: 0.9rem 0;
}
.wod__divsplit .pill { margin-bottom: 0.6rem; }
@media (max-width: 640px) {
  .wod__divsplit { grid-template-columns: 1fr; }
}

.spec { display: grid; gap: 0; align-content: start; border-top: var(--rule); }
.spec div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(138,153,166,0.09);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.spec dt, .spec span:first-child { color: var(--hide-dim); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.62rem; }
.spec span:last-child { color: var(--belly); text-align: right; }

/* ---------- 15. TIMELINE ---------- */
.rail { display: grid; gap: 0; border-top: var(--rule); }
.rail__row {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.4rem 0;
  border-bottom: var(--rule);
  align-items: baseline;
  transition: padding-left 0.4s var(--ease), background 0.4s;
}
.rail__row:hover { padding-left: 0.9rem; background: rgba(79,240,224,0.03); }
.rail__t {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--sonar);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}
.rail__d { font-family: var(--display); font-size: 1.4rem; font-weight: 800; text-transform: uppercase; color: var(--bone); line-height: 1.1; }
.rail__d small { display: block; font-family: var(--body); font-size: 0.82rem; font-weight: 400; text-transform: none; color: var(--hide); letter-spacing: 0; margin-top: 0.3rem; }

/* schedule page: a searched-for team stands out from the rest of its heat */
.sch-hit { color: var(--sonar); font-weight: 700; }
.rail__x { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.18em; color: var(--hide-dim); text-transform: uppercase; }
@media (max-width: 720px) {
  .rail__row { grid-template-columns: 1fr; gap: 0.5rem; }
  .rail__x { justify-self: start; }
}

/* ---------- 16. RULES ---------- */
.rules { display: grid; gap: 0; counter-reset: r; }
.rule-item {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.2rem) 0;
  border-bottom: var(--rule);
  counter-increment: r;
}
.rule-item:first-child { border-top: var(--rule); }
.rule-item::before {
  content: counter(r, decimal-leading-zero);
  font-family: var(--display);
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(138,153,166,0.4);
}
.rule-item h4 { margin-bottom: 0.6rem; color: var(--bone); }
.rule-item p { font-size: 0.92rem; }
@media (max-width: 640px) { .rule-item { grid-template-columns: 1fr; gap: 0.9rem; } }

/* ---------- 17. STATS STRIP ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: var(--rule); }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1rem, 2vw, 1.8rem);
  border-right: var(--rule);
}
.stat:last-child { border-right: 0; }
@media (max-width: 780px) {
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: var(--rule); }
}
.stat b {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 0.82;
  color: var(--bone);
  display: block;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hide-dim);
  margin-top: 0.9rem;
  display: block;
}

/* ---------- 18. CTA SLAB ---------- */
.slab {
  position: relative;
  padding: clamp(4rem, 9vw, 8rem) var(--gut);
  text-align: center;
  overflow: hidden;
  border-top: var(--rule);
  background: linear-gradient(180deg, var(--abyss), #12060a 70%, var(--abyss));
}
.slab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 50% 100%, rgba(47,122,176,0.28), transparent 65%);
  pointer-events: none;
}
.slab > * { position: relative; z-index: 1; }
.slab h2 { margin-bottom: 1.4rem; }
.slab p { margin-inline: auto; margin-bottom: 2.4rem; }

/* ---------- 19. FOOTER ---------- */
.foot {
  border-top: var(--rule);
  padding: clamp(3rem, 6vw, 5rem) 0 2.5rem;
  background: var(--abyss);
  position: relative;
  z-index: 1;
}
.foot__top {
  display: grid;
  grid-template-columns: 1.5fr repeat(2, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: var(--rule);
}
@media (max-width: 900px) { .foot__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot__top { grid-template-columns: 1fr; } }
.foot h5 {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--chum);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.foot ul { list-style: none; display: grid; gap: 0.6rem; }
.foot ul a { font-size: 0.88rem; color: var(--hide); transition: color 0.25s, padding-left 0.3s var(--ease); display: inline-block; }
.foot ul a:hover { color: var(--bone); padding-left: 6px; }
.foot__btm {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  padding-top: 2rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hide-dim);
}

/* ---------- 20. PAGE HEADER (inner pages) ---------- */
.mast {
  padding: calc(var(--nav-h) + clamp(3.5rem, 8vw, 7rem)) 0 clamp(2.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
  border-bottom: var(--rule);
}
.mast::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 10%, rgba(79,240,224,0.11), transparent 48%),
    radial-gradient(circle at 8% 100%, rgba(47,122,176,0.13), transparent 52%);
  pointer-events: none;
}
.mast h1 { font-size: clamp(3rem, 9.5vw, 8.5rem); }
.mast .lede { margin-top: 1.6rem; }

/* ---------- 21. REVEAL ---------- */
[data-rise] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-rise].is-in { opacity: 1; transform: none; }
.no-js [data-rise] { opacity: 1; transform: none; }

/* ---------- 22. UTILITY ---------- */
.stack { display: grid; gap: 1.25rem; }
.stack--lg { gap: 2.2rem; }
.flex { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }

/* ---------- team dashboard ----------
   Declared after .flex so these win: both elements carry .flex too. */

/* The division badge shares a line with the strapline and the team name
   sits directly under it — long names run high and tight, so the row
   needs real clearance beneath it (and a row-gap for when it wraps). */
.team-mast.flex { margin-bottom: 1.15rem; row-gap: 0.55rem; }

@media (max-width: 560px) {
  /* one full-width button per row, instead of a ragged left-aligned stack */
  .team-actions.flex { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
  .team-actions .btn { width: 100%; padding-inline: 1rem; }
}
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.tc { text-align: center; }
.dim { color: var(--hide-dim); }
.hot { color: var(--chum); }
.cold { color: var(--sonar); }

/* text-styled button that still meets the accessible tap-target size,
   for form controls like "Forgot password?" that shouldn't look like a
   full .btn but do need to be comfortably tappable */
.auth-textlink {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .1em;
  font-weight: 600;
  text-align: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.hide { display: none !important; }
.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.mw-60 { max-width: 60ch; }

:focus-visible { outline: 2px solid var(--sonar); outline-offset: 3px; }

/* scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--abyss); }
::-webkit-scrollbar-thumb { background: var(--steel); border: 3px solid var(--abyss); }
::-webkit-scrollbar-thumb:hover { background: var(--chum); }

/* ---------- 23. ADMIN CONSOLE ---------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: var(--rule);
  margin-bottom: 2rem;
  overflow-x: auto;
}
.tab {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 1.5rem;
  color: var(--hide-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.tab:hover { color: var(--belly); }
.tab.is-on { color: var(--bone); border-bottom-color: var(--chum); }

.panel { display: none; }
.panel.is-on { display: block; animation: fadein 0.4s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* compact inputs inside tables */
.mini {
  background: var(--deep);
  border: 1px solid rgba(138, 153, 166, 0.2);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.45rem 0.6rem;
  width: 100%;
  min-width: 4.5rem;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.mini:focus { outline: none; border-color: var(--sonar); background: var(--shelf); }
/* number spinner arrows render inconsistently across events depending on
   browser/OS — stripped everywhere so every score box looks the same */
.mini::-webkit-outer-spin-button,
.mini::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mini[type="number"] { -moz-appearance: textfield; }
.mini--w { min-width: 7rem; }
.mini.is-saved { border-color: var(--sonar-dim); animation: saveflash 0.9s var(--ease); }
@keyframes saveflash {
  0% { background: rgba(79, 240, 224, 0.22); }
  100% { background: var(--deep); }
}

/* finish-time / cap+reps scoring widget */
.timecap { display: flex; flex-direction: column; gap: 0.55rem; min-width: 9rem; }
.timecap__row { display: flex; gap: 0.4rem; align-items: center; }
.timecap__row .mini {
  min-width: 4.4rem;
  font-size: 0.95rem;
  padding: 0.75rem 0.6rem;
  text-align: center;
}
.timecap__cap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hide-dim);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(138, 153, 166, 0.22);
  background: var(--deep);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.timecap__cap input[type="checkbox"] {
  width: 22px; height: 22px;
  accent-color: var(--chum);
  cursor: pointer;
  flex: none;
}
.timecap__cap:hover { color: var(--belly); border-color: rgba(232, 238, 242, 0.35); }
.timecap__cap.is-on {
  color: var(--bone);
  border-color: var(--chum);
  background: rgba(47, 122, 176, 0.12);
}
.timecap .mini[data-tc-reps], .mini--tall { padding: 0.75rem 0.7rem; font-size: 0.95rem; text-align: center; }
.timecap [data-tc-row] { display: flex; flex-direction: column; gap: 0.9rem; }
.timecap__leg { display: flex; flex-direction: column; gap: 0.5rem; }
.timecap__cap--leg { font-size: 0.6rem; padding: 0.6rem 0.8rem; }
.timecap__cap--leg input[type="checkbox"] { width: 20px; height: 20px; }

/* "couldn't run a leg" penalty checkboxes — sits under a timecap widget */
.runskip { margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; }
.runskip__note {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--hide-dim);
  margin-bottom: 0.2rem;
}
.runskip__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(138, 153, 166, 0.18);
  background: var(--deep);
}
.runskip__rl {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chum);
  flex: none;
  min-width: 3.6rem;
}
.runskip__who {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--belly);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  padding: 0.5rem 0.3rem;
  min-height: 44px;
}
.runskip__who input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--chum);
  cursor: pointer;
  flex: none;
}
@media (max-width: 640px) {
  .runskip__row { padding: 0.75rem 0.8rem; row-gap: 0; }
  /* the label and first athlete used to share a line, shoving the
     second athlete onto its own orphaned row with a big empty gap —
     put the label on its own full-width line, then both athletes
     share the row evenly underneath it */
  .runskip__rl { flex: 1 1 100%; min-width: 0; margin-bottom: 0.5rem; }
  .runskip__who { flex: 1 1 calc(50% - 0.3rem); padding: 0.3rem; min-height: 40px; }
  .runskip__who input[type="checkbox"] { width: 22px; height: 22px; }
}

/* score entry: team picker + selected-team header */
.picker {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  padding: 1.1rem 0 1.4rem;
}
.picker__l {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--chum);
  flex: none;
}
.picker__sel {
  flex: 1 1 18rem;
  min-width: 0;
  background: var(--trench);
  border: var(--rule);
  color: var(--bone);
  font-family: var(--mono);
  /* 16px min — anything smaller makes iOS Safari zoom in on focus */
  font-size: 1rem;
  padding: 0.9rem 2.6rem 0.9rem 1rem;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a99a6' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}
.picker__sel:focus { outline: none; border-color: var(--sonar); }
.picker__sel option { background: var(--deep); color: var(--bone); }
.picker__nav { display: flex; gap: 0.5rem; flex: none; }
.picker__nav .btn { min-width: 3.4rem; min-height: 46px; padding: 0.75rem 0.9rem; }
.picker__nav .btn:disabled { opacity: 0.35; cursor: not-allowed; }

.scorehd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 0 1.2rem;
}

.timecap__cap--dna { margin-bottom: 0.6rem; border-color: rgba(224, 90, 90, 0.3); }
.timecap__cap--dna.is-on { color: var(--bone); border-color: #e05a5a; background: rgba(224, 90, 90, 0.14); }
.dna-body.hide { display: none; }
.timecap__legl {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hide-dim);
  margin-bottom: 0.3rem;
}

/* per-athlete boxes that add up to one team score (e.g. the four lifts) */
.segs { display: flex; flex-direction: column; gap: 0.5rem; min-width: 9rem; }
.segs__row { display: flex; flex-direction: column; gap: 0.3rem; cursor: pointer; }
.segs__l {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hide-dim);
}
.segs .mini { font-size: 0.95rem; padding: 0.75rem 0.7rem; width: 100%; text-align: center; }
.segs__tot {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hide-dim);
  padding-top: 0.4rem;
  border-top: 1px solid rgba(138, 153, 166, 0.18);
}
.segs__tot b { color: var(--bone); font-weight: 600; }

/* Death Roll's rounds-completed + reps-into-next-round entry pair */
.rounds { display: flex; flex-direction: column; gap: 0.5rem; }
.rounds__row { display: flex; gap: 0.5rem; }
.rounds__l {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  cursor: pointer;
}
.rounds__l span {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hide-dim);
}
.rounds .mini { font-size: 0.95rem; padding: 0.75rem 0.7rem; width: 100%; text-align: center; }
.rounds__tot {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hide-dim);
  padding-top: 0.4rem;
  border-top: 1px solid rgba(138, 153, 166, 0.18);
}
.rounds__tot b { color: var(--bone); font-weight: 600; }

@media (max-width: 640px) {
  .timecap { gap: 0.6rem; }
  .timecap__row { gap: 0.5rem; }
  .timecap__row .mini { min-width: 0; flex: 1 1 0; font-size: 1rem; padding: 0.85rem 0.6rem; }
  .timecap__cap { font-size: 0.7rem; padding: 0.85rem 1rem; }
  .timecap__cap input[type="checkbox"] { width: 24px; height: 24px; }
  .timecap .mini[data-tc-reps], .mini--tall { padding: 0.85rem 0.8rem; font-size: 1rem; }
  .timecap__cap--leg { font-size: 0.64rem; padding: 0.7rem 0.9rem; }
  .timecap__cap--leg input[type="checkbox"] { width: 22px; height: 22px; }
  .segs { gap: 0.65rem; }
  .segs .mini { font-size: 1rem; padding: 0.85rem 0.8rem; }
  .segs__l, .timecap__legl { font-size: 0.68rem; }
  .rounds__row { flex-direction: column; gap: 0.65rem; }
  .rounds .mini { font-size: 1rem; padding: 0.85rem 0.8rem; }
  .rounds__l span { font-size: 0.68rem; }
}

.toggle {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(138, 153, 166, 0.25);
  color: var(--hide-dim);
  transition: all 0.25s;
  white-space: nowrap;
}
.toggle:hover { border-color: var(--belly); color: var(--belly); }
.toggle.is-on { background: var(--sonar-dim); border-color: var(--sonar-dim); color: var(--abyss); }
.toggle--danger:hover { border-color: var(--chum); color: var(--chum); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border: var(--rule);
  border-bottom: 0;
  background: var(--deep);
}
.toolbar__group { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

.search {
  background: var(--trench);
  border: var(--rule);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.6rem 0.9rem;
  min-width: 200px;
  border-radius: 0;
}
.search:focus { outline: none; border-color: var(--sonar); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(138,153,166,.14); border: var(--rule); margin-bottom: 2rem; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--abyss); padding: 1.3rem 1.4rem; }
.kpi b { font-family: var(--display); font-weight: 900; font-size: 2.6rem; line-height: .8; color: var(--bone); display: block; font-variant-numeric: tabular-nums; }
.kpi span { font-family: var(--mono); font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--hide-dim); margin-top: .7rem; display: block; }

.tbl--roster { min-width: 820px; }

/* ============================================================
   ORGANISER CONSOLE — MOBILE
   Declared last so these beat the generic .toolbar / .tabs /
   table rules above. Organisers run this from a phone on the
   day, so nothing here may require sideways scrolling.
   ============================================================ */
@media (max-width: 860px) {

  /* ---- tabs: all five visible at once, no scrolling strip ---- */
  .tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    overflow-x: visible;
    background: rgba(138, 153, 166, 0.14);
    border: var(--rule);
    margin-bottom: 1.5rem;
  }
  .tab {
    background: var(--abyss);
    padding: 0.95rem 0.5rem;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-align: center;
    border-bottom: 0;
    margin-bottom: 0;
    white-space: normal;
  }
  /* odd one out spans the full row rather than leaving a gap */
  .tabs .tab:last-child { grid-column: 1 / -1; }
  .tab.is-on { background: var(--chum); color: var(--bone); }

  /* ---- toolbars: stack, and let each group own a full row ---- */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.9rem 0.9rem;
  }
  .toolbar__group { width: 100%; }
  .toolbar__group--search .search { width: 100%; min-width: 0; padding: 0.85rem 0.9rem; }
  .toolbar .btn { width: 100%; }

  /* filter chips as even columns instead of a ragged wrap */
  .toolbar__group.chips--3,
  .toolbar__group.chips--4 { display: grid; gap: 0.4rem; }
  .toolbar__group.chips--3 { grid-template-columns: repeat(3, 1fr); }
  .toolbar__group.chips--4 { grid-template-columns: repeat(4, 1fr); }
  .toolbar__group .chip {
    padding: 0.85rem 0.25rem;
    text-align: center;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  /* ---- roster: table becomes one card per team ---- */
  .tbl-wrap--roster { overflow-x: visible; border: 0; background: none; }
  .tbl--roster { min-width: 0; }
  .tbl--roster thead { display: none; }
  .tbl--roster,
  .tbl--roster tbody { display: block; }
  .tbl--roster tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    padding: 0.95rem;
    margin-bottom: 0.55rem;
    border: var(--rule);
    background: var(--trench);
  }
  .tbl--roster tbody td { display: block; padding: 0; border: 0; }
  .tbl--roster tbody td:nth-child(1),
  .tbl--roster tbody td:nth-child(4),
  .tbl--roster tbody td:nth-child(5) { grid-column: 1 / -1; }
  .tbl--roster tbody td:nth-child(5) .toggle { width: 100%; padding: 0.88rem; }
  .tbl--roster .mini { min-width: 0; padding: 0.7rem 0.6rem; font-size: 0.8rem; }
  .tbl--roster tbody tr:hover { background: var(--trench); }

  /* ---- score entry: team picker gets the full width ---- */
  .picker { gap: 0.55rem; }
  .picker__l { width: 100%; }
  .picker__sel { flex: 1 1 100%; width: 100%; padding: 0.85rem 0.9rem; }
  .picker__nav { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .picker__nav .btn { width: 100%; }

  /* ---- heats: lane selects stack, controls go full width ---- */
  #heatsRoot .cell { padding: 0.9rem; }
  #heatsRoot [data-heat-start] { width: 100% !important; }
  /* every lane dropdown is a tap target on the day — give them real height */
  #heatsRoot .mini { padding: 0.7rem 0.6rem; font-size: 0.8rem; }
  #heatsRoot .btn { flex: 1 1 auto; }
}

@media (max-width: 380px) {
  .tab { font-size: 0.58rem; letter-spacing: 0.06em; padding: 0.9rem 0.35rem; }
  .toolbar__group .chip { font-size: 0.55rem; padding: 0.8rem 0.15rem; }
}

/* only the very narrowest phones lose the side-by-side selects — at 375px
   there is comfortably room for both */
@media (max-width: 340px) {
  .tbl--roster tbody tr { grid-template-columns: 1fr; }
}

/* ============================================================
   RUNNER — on-the-day full-screen display
   Kiosk-style: no footer, fills the viewport below the nav,
   auto-cycles between "now/next" and rolling standings. Built
   to be glanceable from across a room on a TV as well as from
   a phone propped on a table.
   ============================================================ */
.run {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: stretch;
}
.run__stage {
  position: relative;
  flex: 1 1 auto;
  padding: clamp(1.5rem, 4vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  cursor: pointer;
  outline: none;
}
.run__root { max-width: 1100px; margin: 0 auto; }
.run__slide { animation: fadein 0.5s var(--ease); }

.run__empty { text-align: center; padding: 4rem 0; }
.run__empty h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 0.6rem; }

/* ---- now/next ---- */
.run__clock {
  text-align: center;
  font-family: var(--mono);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  letter-spacing: 0.14em;
  color: var(--hide-dim);
  margin-bottom: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.run__status {
  text-align: center;
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  letter-spacing: 0.08em;
  color: var(--belly);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.run__status b {
  color: var(--sonar);
  font-size: 1.5em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.run__status--final { color: var(--chum); }

.run__heat { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.run__heat:last-child { margin-bottom: 0; }
.run__heatlabel {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--chum);
  margin-bottom: 0.5rem;
}
.run__heattitle {
  text-align: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.6rem, 4.2vw, 3rem);
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 0.3rem;
}
.run__heattime {
  text-align: center;
  font-family: var(--mono);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--sonar);
  font-variant-numeric: tabular-nums;
  margin-bottom: 1.4rem;
}

.run__occs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.7rem;
}
.run__occ {
  border: var(--rule);
  background: var(--trench);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.run__occlane {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hide-dim);
}
.run__occname {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  color: var(--bone);
  line-height: 1.15;
}
.run__occwho {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--hide);
}
.run__occ .pill { align-self: flex-start; margin-top: 0.2rem; }

/* ---- rolling standings ---- */
.run__boardlabel {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--chum);
  margin-bottom: 0.4rem;
}
.run__boardtitle {
  text-align: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 4rem);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.run__board { display: grid; gap: 0; border-top: var(--rule); }
.run__brow {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0.4rem;
  border-bottom: 1px solid rgba(138, 153, 166, 0.1);
}
.run__brow[data-rank="1"] { background: linear-gradient(90deg, rgba(255,176,58,0.09), transparent 60%); }
.run__brank {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--hide-dim);
  font-variant-numeric: tabular-nums;
}
.run__brow[data-rank="1"] .run__brank { color: var(--azure); }
.run__brow[data-rank="2"] .run__brank { color: var(--belly); }
.run__brow[data-rank="3"] .run__brank { color: var(--chum); }
.run__bname {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  text-transform: uppercase;
  color: var(--bone);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.run__bpts {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--sonar);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.run__bpts small { font-size: 0.6em; color: var(--hide-dim); margin-left: 0.3em; }

/* ---- slide progress dots ---- */
.run__dots {
  position: absolute;
  bottom: clamp(1rem, 3vw, 1.8rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}
.run__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(138, 153, 166, 0.3);
  transition: background 0.3s;
}
.run__dot.is-on { background: var(--chum); }

@media (max-width: 640px) {
  .run__occs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .run__brow { grid-template-columns: 2.4rem 1fr auto; gap: 0.6rem; }
}

/* ============================================================
   HYROX TRAINING — class timetable
   ============================================================ */
.cls-day { margin-bottom: 1.8rem; }
.cls-day__h { margin-bottom: 0.7rem; }

.cls {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(138, 153, 166, 0.16);
  border-left: 3px solid var(--steel);
  background: var(--deep);
  padding: 1rem 1.2rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.25s, background 0.25s;
}
.cls:hover { border-color: rgba(138, 153, 166, 0.3); }
.cls.is-mine { border-left-color: var(--chum); background: rgba(47, 122, 176, 0.08); }
.cls.is-off { opacity: 0.55; }
.cls.is-off .cls__t, .cls.is-off h3 { text-decoration: line-through; }

.cls__t {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--bone);
  white-space: nowrap;
}
.cls__b h3 { font-size: 1.15rem; margin: 0; line-height: 1.1; }
.cls__m {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hide-dim);
  margin: 0.3rem 0 0;
}
.cls__m b { color: var(--sonar); font-weight: 500; }
.cls__n { font-size: 0.78rem; color: var(--hide); margin: 0.4rem 0 0; }
.cls__a { white-space: nowrap; }

/* toast for book / cancel feedback */
.cls-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 140%);
  background: var(--shelf);
  border: 1px solid var(--chum);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.9rem 1.4rem;
  z-index: 200;
  transition: transform 0.35s var(--ease);
  max-width: calc(100vw - 2rem);
  text-align: center;
}
.cls-toast.is-shown { transform: translate(-50%, 0); }
.cls-toast.is-bad { border-color: #e05a5a; }

@media (max-width: 640px) {
  .cls {
    grid-template-columns: 1fr auto;
    grid-template-areas: "time action" "body body";
    gap: 0.6rem 1rem;
    padding: 0.9rem 1rem;
  }
  .cls__t { grid-area: time; font-size: 1.3rem; }
  .cls__a { grid-area: action; }
  .cls__b { grid-area: body; }
}

/* ---------- coach console ---------- */
.co {
  border: 1px solid rgba(138, 153, 166, 0.16);
  border-left: 3px solid var(--steel);
  background: var(--deep);
  margin-bottom: 0.5rem;
  padding: 0.9rem 1.1rem;
}
.co.is-off { opacity: 0.6; border-left-color: #e05a5a; }
.co__hd { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; }
.co__when b { display: block; font-family: var(--display); font-size: 1.15rem; color: var(--bone); line-height: 1.1; }
.co__when span { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--hide-dim); }
.co__fill { display: flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: 0.8rem; color: var(--hide); }
.co__cap { width: 4.2rem; text-align: center; }
.co__wl { color: var(--sonar); font-size: 0.66rem; letter-spacing: 0.08em; }
.co__act { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.co__note { font-size: 0.78rem; color: #e8a0a0; margin: 0.6rem 0 0; }
.co__roll { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(138, 153, 166, 0.14); }
.co__p { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(138, 153, 166, 0.08); }
.co__p span { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--belly); }
.co__p small { font-family: var(--mono); font-size: 0.6rem; color: var(--hide-dim); }
@media (max-width: 720px) {
  .co__hd { grid-template-columns: 1fr; gap: 0.6rem; }
  .co__act { justify-content: flex-start; }
  .co__roll { grid-template-columns: 1fr; gap: 1rem; }
}

/* weekly release — the next week is visible but not yet bookable */
.cls.is-locked { opacity: 0.6; border-left-color: rgba(138, 153, 166, 0.3); }
.cls-lock {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hide-dim);
  border: 1px dashed rgba(138, 153, 166, 0.35);
  padding: 0.55rem 0.8rem;
  display: inline-block;
  white-space: nowrap;
}
.cls-note {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--hide-dim);
  border-left: 2px solid var(--chum);
  padding: 0.7rem 0 0.7rem 1rem;
  margin-bottom: 1.4rem;
}
.cls-note b { color: var(--belly); }

/* ---------- Hyrox classes: masthead + gate ---------- */
/* "TRAINING" is the widest line, so this is tuned to fill the shell on
   that word rather than on the shorter "HYROX" above it. */
/* needs to out-rank `.mast h1`, which sets its own clamp */
.mast h1.cls-title {
  font-size: clamp(3.4rem, 25.8vw, 21rem);
  line-height: 0.86;
  margin-top: 1.8rem;
}

.cls-gate__btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.cls-gate__btns .btn {
  width: 100%;
  max-width: 20rem;
  text-align: center;
}
@media (min-width: 700px) {
  .cls-gate__btns { flex-direction: row; justify-content: center; }
  .cls-gate__btns .btn { width: 16rem; max-width: none; }
}

/* link back to the parent brand, Higher State Fitness */
.nav__links a.nav-hsf { display: inline-flex; align-items: center; gap: .45rem; }
.nav-hsf img { width: 22px; height: 22px; border-radius: 50%; flex: none; }
