/* Batters Boxx — the badge, in CSS.
   Palette sampled straight from the logo artwork: navy #002047, red #D31322,
   cream #FEF5E4. Red only reaches 2.98:1 on navy, so accent text/borders are
   surface-aware (see the --accent block below) and red is reserved for solid
   fills, which always carry cream text. */

:root {
  --navy-deep: #001730;   /* nav bar, dark bands */
  --navy:      #002047;   /* logo navy */
  --navy-line: #14355C;   /* hairlines on navy */
  --cream:     #FEF5E4;   /* logo cream — page background */
  --cream-2:   #EFE1C7;   /* secondary text on navy */
  --red:       #D31322;   /* logo red — solid fills only */
  --red-deep:  #AC0D1F;   /* hover / small red text on cream */
  --net:       #5E6C7E;   /* meta text on light surfaces */
  --net-dark:  #9FB0C4;   /* same role on dark surfaces */
  --ink:       #0E1D2E;

  --display: 'Archivo', 'Arial Black', 'Helvetica Neue', sans-serif;
  --body:    'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:    'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gut: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1180px;
  --radius: 3px;
}

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

/* .field and .panel both set display, which beats the UA sheet's [hidden] rule --
   so a conditionally-hidden field (team name, the new-account form) rendered
   anyway. Everything that hides itself relies on this. */
[hidden] { display: none !important; }

/* Surfaces declare their own meta-text and accent colours rather than each rule
   guessing. Red fails contrast on navy, so dark surfaces accent with cream. */
:root { --accent: var(--red-deep); }
.band--dark, .band--navy, .foot, .nav, .cage { --net: var(--net-dark); --accent: var(--cream); }
.tablewrap { --net: #5E6C7E; --accent: var(--red-deep); }   /* white card, even inside a dark band */

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-synthesis-weight: none;
}

img, svg { max-width: 100%; }

a { color: inherit; }

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

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--red); color: var(--cream); padding: .75rem 1rem; font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------- type ---------- */

.display {
  font-family: var(--display);
  font-variation-settings: 'wdth' 118, 'wght' 800;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: -.012em;
  margin: 0;
}

h1.display { font-size: clamp(2.6rem, 7.6vw, 5.3rem); }
.hero h1.display { font-size: clamp(1.6rem, 8.2vw, 4.4rem); }  /* "DEVELOPMENT" is one long word: keep it inside the column */
h2.display { font-size: clamp(2rem, 5vw, 3.4rem); }
h3.display { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-variation-settings: 'wdth' 112, 'wght' 700; }

.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--net);
  margin: 0 0 1.1rem;
}
.eyebrow--accent { color: var(--accent); }

.lede { font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 54ch; color: #24382C; }
.band--dark .lede, .band--navy .lede { color: var(--cream-2); }

.mono { font-family: var(--mono); font-size: .82rem; letter-spacing: .02em; }

/* ---------- bands ---------- */

.band { padding-block: clamp(3.5rem, 9vw, 7rem); position: relative; }
.band--dark  { background: var(--navy-deep); color: var(--cream); }
.band--navy  { background: var(--navy); color: var(--cream); }
.band--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* Netting: a slack diagonal grid, kept near-invisible so it reads as texture. */
.band--dark::before, .band--navy::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg,  rgba(254,245,228,.045) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-45deg, rgba(254,245,228,.045) 0 1px, transparent 1px 22px);
}
.band > .wrap { position: relative; z-index: 1; }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(0,23,48,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--navy-line);
  color: var(--cream);
}
.nav__in { display: flex; align-items: center; gap: 1.5rem; height: 66px; }
.nav__logo {
  font-family: var(--display); font-variation-settings: 'wdth' 118, 'wght' 800;
  text-transform: uppercase; font-size: 1.15rem; letter-spacing: -.01em;
  text-decoration: none; display: flex; align-items: center; gap: .55rem; white-space: nowrap;
}
.nav__badge { width: 38px; height: 40px; display: block; flex: 0 0 auto; }
/* The badge art is a hair taller than it is wide; height-driven sizing keeps
   the disc from squashing when the nav bar height changes. */
.nav__links { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.nav__links a {
  text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--cream-2);
  padding: .3rem 0; border-bottom: 2px solid transparent;
}
.nav__links a:hover, .nav__links a[aria-current='page'] { color: var(--accent); border-bottom-color: var(--accent); }
.nav__toggle {
  margin-left: auto; display: none; background: none; border: 1px solid var(--navy-line);
  color: var(--cream); font-family: var(--mono); font-size: .75rem; padding: .45rem .7rem; cursor: pointer;
}

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-deep); border-bottom: 1px solid var(--navy-line); padding: .5rem var(--gut) 1.25rem;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .8rem 0; border-bottom: 1px solid var(--navy-line); }
}

/* the name in the menu: a dropdown with account, profile and log out */
.usermenu { position: relative; }
.usermenu__btn {
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--cream-2);
  padding: .3rem 0; display: inline-flex; align-items: center; gap: .35rem;
}
.usermenu__btn::after {
  content: ''; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.usermenu__btn[aria-expanded='true']::after { transform: translateY(1px) rotate(-135deg); }
.usermenu__btn:hover, .usermenu__btn.is-current { color: var(--accent); border-bottom-color: var(--accent); }
.usermenu__list {
  position: absolute; right: 0; top: calc(100% + .7rem); min-width: 12.5rem; z-index: 50;
  background: var(--navy-deep); border: 1px solid var(--navy-line); box-shadow: 0 12px 28px rgba(0,0,0,.35);
  display: flex; flex-direction: column; padding: .35rem 0;
}
.usermenu__list[hidden] { display: none; }
.usermenu__who { margin: 0; padding: .6rem 1rem .5rem; border-bottom: 1px solid var(--navy-line); display: grid; gap: .15rem; font-size: .85rem; white-space: nowrap; }
.usermenu__who span { opacity: .7; font-size: .78rem; }
.rolebadge { display: inline-flex; align-items: center; gap: .5rem; margin: .4rem 0 0; padding: .25rem .7rem; border: 1px solid currentColor; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.rolebadge__k { text-transform: uppercase; font-size: .68rem; opacity: .6; letter-spacing: .08em; }
.nav__links .usermenu__list a { padding: .6rem 1rem; border-bottom: 0; white-space: nowrap; }
.nav__links .usermenu__list a:hover, .nav__links .usermenu__list a[aria-current='page'] { background: rgba(255,255,255,.06); }
@media (max-width: 860px) {
  .usermenu__btn { width: 100%; justify-content: space-between; padding: .8rem 0; border-bottom: 1px solid var(--navy-line); }
  .usermenu__list { position: static; box-shadow: none; border: 0; padding: 0 0 0 1rem; min-width: 0; }
  .nav__links .usermenu__list a { padding: .7rem 0; border-bottom: 1px solid var(--navy-line); }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--body); font-weight: 700; font-size: .92rem;
  padding: .82rem 1.5rem; border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .12s ease, background .15s ease, color .15s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-red  { background: var(--red); color: var(--cream); }
.btn-red:hover { background: var(--red-deep); }
.btn-redsolid  { background: var(--red-deep); color: var(--cream); }
.btn-outline { background: transparent; color: var(--cream); border-color: rgba(254,245,228,.45); }
.btn-outline:hover { border-color: var(--cream); background: rgba(254,245,228,.10); }
/* outline buttons are for dark bands; on a light band they fall back to ink so
   they never end up near-white on white */
.band:not(.band--dark):not(.band--navy) .btn-outline { color: var(--ink); border-color: rgba(0,32,71,.30); }
.band:not(.band--dark):not(.band--navy) .btn-outline:hover { border-color: var(--ink); background: rgba(0,32,71,.06); }
.btn-ink   { background: transparent; color: var(--ink); border-color: rgba(0,32,71,.30); }
.btn-ink:hover { border-color: var(--ink); background: rgba(0,32,71,.06); }
.band--dark .btn-ink, .band--navy .btn-ink { color: var(--cream); border-color: rgba(254,245,228,.35); }
.band--dark .btn-ink:hover, .band--navy .btn-ink:hover { border-color: var(--cream); background: rgba(254,245,228,.10); }
.btn-block { width: 100%; }
.btn-sm { padding: .55rem 1rem; font-size: .82rem; }

.btnrow { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

/* ---------- the batter's box outline (signature) ---------- */

.chalkbox { position: relative; display: inline-block; width: fit-content;
  padding: clamp(1.1rem, 3vw, 2.1rem) clamp(1.3rem, 4vw, 2.8rem); }
.chalkbox > h1 { width: fit-content; }
.chalkbox__line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chalkbox__line rect {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-opacity: .65; stroke-linecap: square;
}
/* The dash length is set in JS from the rendered perimeter: with
   non-scaling-stroke the browser measures dashes in screen space, not the
   viewBox's user units, so a hard-coded value leaves gaps in the box. */

/* ---------- hero ---------- */

.hero { padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.hero__mark { color: var(--accent); display: block; }
.hero .lede { margin-top: 1.9rem; }

/* ---------- openings rail ---------- */

.rail { margin-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--navy-line); padding-top: 1.5rem; }
.rail__head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.rail__head .eyebrow { margin: 0; }
.rail__day { font-family: var(--mono); font-size: .78rem; color: var(--cream-2); }
.rail__list { display: flex; gap: .7rem; overflow-x: auto; padding-bottom: .6rem; scrollbar-width: thin; }
.rail__slot {
  flex: 0 0 auto; min-width: 118px; text-align: left; text-decoration: none;
  border: 1px dashed rgba(254,245,228,.35); border-radius: var(--radius);
  padding: .8rem .9rem; color: var(--cream); background: transparent;
  font-family: inherit; cursor: pointer; transition: border-color .15s, background .15s;
}
.rail__slot:hover { border-color: var(--accent); border-style: solid; background: rgba(254,245,228,.10); }
.rail__slot b { display: block; font-family: var(--mono); font-size: 1.05rem; font-weight: 500; color: var(--accent); }
.rail__slot span { display: block; font-size: .74rem; color: var(--cream-2); margin-top: .2rem; letter-spacing: .04em; }
.rail__empty { font-family: var(--mono); font-size: .82rem; color: var(--net); }

/* ---------- cages ---------- */

.cages { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); margin-top: 2.75rem; }
.cage {
  background: var(--navy-deep); color: var(--cream); border-radius: var(--radius);
  padding: 1.5rem 1.4rem; border-top: 3px solid var(--accent);
}
.cage__no { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; color: var(--accent); }
.cage__name { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: 1.35rem; margin: .35rem 0 1.1rem; line-height: 1; }
.spec { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--mono); font-size: .76rem;
  padding: .42rem 0; border-top: 1px solid var(--navy-line); }
.spec dt { color: var(--net); }
.spec dd { margin: 0; text-align: right; color: var(--cream); }
.cage dl { margin: 0; }

/* ---------- plans ---------- */

.plans { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); margin-top: 2.75rem; }
.plan {
  border: 1px solid rgba(0,32,71,.16); border-radius: var(--radius);
  padding: 1.7rem 1.5rem; display: flex; flex-direction: column; background: #FFF;
}
/* A plan card is white by default. Inside a dark band it inherits cream text,
   so it MUST also take a dark background or it renders cream-on-white. Each
   band picks the neighbouring shade so the card still separates from it. */
.band--dark .plan { background: var(--navy); border-color: var(--navy-line); }
.band--navy .plan { background: var(--navy-deep); border-color: var(--navy-line); }
.plan--pick { border-color: var(--accent); border-width: 2px; box-shadow: 0 0 0 4px rgba(211,19,34,.16); }
.plan__tag { font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--red-deep); margin-bottom: .5rem; min-height: 1rem; }
.band--dark .plan__tag, .band--navy .plan__tag { color: var(--accent); }
.plan__name { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: 1.5rem; margin: 0; line-height: 1; }
.plan__price { font-family: var(--mono); font-size: 1.85rem; margin: .9rem 0 .2rem; font-weight: 500; }
.plan__per { font-family: var(--mono); font-size: .74rem; color: var(--net); }
.plan__photo { width: calc(100% + 3rem); max-width: none; margin: -1.7rem -1.5rem 1.2rem; aspect-ratio: 4 / 3;
  object-fit: cover; object-position: center 20%; border-radius: var(--radius) var(--radius) 0 0; display: block; }
.plan__blurb { font-size: .93rem; margin: 1rem 0 1.2rem; }
.plan__perks { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .55rem; font-size: .88rem; }
.plan__perks li { display: grid; grid-template-columns: 13px 1fr; gap: .65rem; align-items: start; }
.plan__perks li::before {
  content: ''; width: 11px; height: 11px; margin-top: .42rem; background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
.plan__cta { margin-top: auto; }

/* ---------- split / prose ---------- */

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: start; }
.split > * { min-width: 0; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr .95fr; } }

.facts { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0; }
.facts li { display: flex; justify-content: space-between; gap: 1.5rem; padding: .85rem 0;
  border-bottom: 1px solid rgba(254,245,228,.16); font-family: var(--mono); font-size: .82rem; }
.facts li span:first-child { color: var(--net); }
.band--navy .facts li { border-bottom-color: rgba(254,245,228,.16); }
.band--cream .facts li { border-bottom-color: rgba(0,32,71,.14); }

/* ---------- forms ---------- */

.formcard {
  max-width: 470px; margin: clamp(2.5rem, 6vw, 4.5rem) auto; background: #FFF;
  border: 1px solid rgba(0,32,71,.16); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.5rem);
}
.field { display: block; margin-bottom: 1.15rem; }
.field > span { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--net); margin-bottom: .45rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .78rem .9rem; font-family: var(--body); font-size: 1rem;
  border: 1px solid rgba(0,32,71,.25); border-radius: var(--radius); background: #FFFDF8; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline-offset: 1px; }
.field textarea { min-height: 84px; resize: vertical; }
.hint { font-size: .8rem; color: var(--net); margin: -.7rem 0 1.15rem; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1.4rem; }
.choice label {
  border: 1px solid rgba(0,32,71,.25); border-radius: var(--radius); padding: .9rem 1rem; cursor: pointer;
  display: block; transition: border-color .15s, background .15s;
}
.choice label:hover { border-color: var(--ink); }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice input:focus-visible + b { outline: 3px solid var(--accent); outline-offset: 3px; }
.choice label:has(input:checked) { border-color: var(--accent); border-width: 2px; background: rgba(211,19,34,.10); padding: calc(.9rem - 1px) calc(1rem - 1px); }
.choice b { display: block; font-size: .95rem; }
.choice small { color: var(--net); font-size: .78rem; }

.flash { padding: .85rem 1rem; border-radius: var(--radius); font-size: .9rem; margin-bottom: 1.25rem; }
.flash--bad  { background: #FBE7E4; color: #8A1520; border-left: 3px solid var(--red); }
.flash--good { background: #E4F0E6; color: #17492A; border-left: 3px solid #2F7D47; }
.flash[hidden] { display: none; }

.alt { text-align: center; font-size: .9rem; margin: 1.5rem 0 0; color: var(--net); }
.alt a { color: var(--ink); font-weight: 700; }

/* ---------- booking ---------- */

.booklayout { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
/* grid items default to min-width:auto, which lets the non-wrapping date strip
   push the whole column wider than the viewport */
.booklayout > * { min-width: 0; }
@media (min-width: 980px) { .booklayout { grid-template-columns: 1fr 340px; gap: 2.5rem; } }

.step { border-top: 1px solid rgba(0,32,71,.15); padding-top: 1.5rem; margin-top: 1.9rem; }
.step:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.step__no { font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; color: var(--red-deep); }
.step__title { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: 1.2rem; margin: .3rem 0 1.1rem; line-height: 1; }

.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .5rem; }
.chip {
  flex: 0 0 auto; border: 1px solid rgba(0,32,71,.25); background: #FFF; color: var(--ink);
  border-radius: var(--radius); padding: .6rem .85rem; cursor: pointer; font-family: var(--body);
  font-size: .85rem; line-height: 1.25; text-align: center; transition: border-color .12s, background .12s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.chip small { display: block; font-family: var(--mono); font-size: .68rem; opacity: .7; }
.chip--day { min-width: 4.6rem; }
.chip .chip__open { opacity: 1; font-weight: 500; color: var(--red-deep); }
.chip.is-on .chip__open { color: var(--cream); }
.chip--day.is-none { opacity: .55; }
.chip--day.is-none .chip__open { color: inherit; font-weight: 400; }

.cagerow, .coachrow { border: 1px solid rgba(0,32,71,.15); border-radius: var(--radius); padding: 1.1rem; margin-bottom: .8rem; }
/* a coach row is a cage row with a name instead of a number */
.coachrow .cagerow__name { font-size: 1.05rem; }
.cagerow__head { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; margin-bottom: .85rem; }
.cagerow__name { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: 1rem; }
.cagerow__meta { font-family: var(--mono); font-size: .72rem; color: var(--net); }
.cagerow__rate { margin-left: auto; font-family: var(--mono); font-size: .8rem; }
.slots { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.slot {
  border: 1px dashed rgba(0,32,71,.30); background: #FFF; border-radius: var(--radius);
  padding: .55rem .3rem; font-family: var(--mono); font-size: .82rem; cursor: pointer; color: var(--ink);
  transition: border-color .12s, background .12s;
}
.slot:hover { border-style: solid; border-color: var(--ink); background: #FBF6EC; }
.slot.is-on { background: var(--red); border-color: var(--red); color: var(--cream); border-style: solid; font-weight: 500; }
.slot--none { font-family: var(--mono); font-size: .8rem; color: var(--net); }

.summary {
  border: 1px solid rgba(0,32,71,.18); border-radius: var(--radius); padding: 1.5rem; background: #FFF;
}
@media (min-width: 980px) { .summary { position: sticky; top: 90px; } }
.summary__title { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: 1.1rem; margin: 0 0 1.1rem; }
.sumline { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0;
  font-family: var(--mono); font-size: .82rem; border-bottom: 1px solid rgba(0,32,71,.1); }
.sumline--total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: .4rem; padding-top: .8rem;
  font-size: 1.05rem; font-weight: 500; }
.sumline--free { color: #17492A; }
.sumnote { font-size: .78rem; color: var(--net); margin: 1rem 0 0; }


/* ---------- rental / lesson switch ---------- */

.modeswitch { display: inline-flex; gap: .25rem; margin: 1.5rem 0 .5rem; padding: .25rem;
  border: 1px solid rgba(0,32,71,.2); border-radius: var(--radius); background: #FFF; }
.modeswitch a { text-decoration: none; font-size: .85rem; font-weight: 700; color: var(--net);
  padding: .5rem 1.1rem; border-radius: 2px; }
.modeswitch a:hover { color: var(--ink); }
.modeswitch a[aria-current='page'] { background: var(--ink); color: var(--cream); }

/* ---------- account / tables ---------- */

.acct { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 2.5rem; }
.stat { border: 1px solid rgba(0,32,71,.16); border-radius: var(--radius); padding: 1.3rem; background: #FFF; }
.stat__k { font-family: var(--mono); font-size: .68rem; letter-spacing: .17em; text-transform: uppercase; color: var(--net); }
.stat__v { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: 1.7rem; margin-top: .4rem; line-height: 1.05; }
.stat__sub { font-family: var(--mono); font-size: .74rem; color: var(--net); margin-top: .35rem; overflow-wrap: anywhere; }

.res { border: 1px solid rgba(0,32,71,.16); border-radius: var(--radius); padding: 1.25rem;
  margin-bottom: .8rem; background: #FFF; display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.res--past { opacity: .58; }
.res__when { min-width: 172px; }
.res__day { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: 1.05rem; line-height: 1.1; }
.res__time { font-family: var(--mono); font-size: .82rem; color: var(--net); }
.res__what { font-size: .9rem; }
.res__act { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.tag { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .28rem .5rem; border-radius: 2px; background: rgba(0,32,71,.09); color: #24384C; }
.tag--red { background: rgba(211,19,34,.14); color: var(--red-deep); }
.tag--off  { background: rgba(0,32,71,.09); color: #3B4A5C; }

.empty { border: 1px dashed rgba(0,32,71,.30); border-radius: var(--radius);
  padding: 2.25rem 1.5rem; text-align: center; }
.empty p { margin: 0 0 1.25rem; color: var(--net); }

.tablewrap { overflow-x: auto; border: 1px solid rgba(0,32,71,.16); border-radius: var(--radius); background: #FFF; }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; color: var(--ink); }
.tbl th, .tbl td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid rgba(0,32,71,.1); white-space: nowrap; }
.tbl th { font-family: var(--mono); font-size: .68rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--net); background: #FBF6EC; }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* ---------- footer / 404 ---------- */

.foot { background: var(--navy-deep); color: var(--cream-2); padding-block: 3.5rem 2.5rem; font-size: .88rem; }
.foot__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.foot h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--net); margin: 0 0 .9rem; font-weight: 400; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot a { color: var(--cream-2); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot__base { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(254,245,228,.16);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: .72rem; color: var(--net); }

.miss { max-width: 560px; margin: 6rem auto; padding-inline: var(--gut); text-align: center; }

.note {
  font-family: var(--mono); font-size: .74rem; line-height: 1.65; color: var(--net);
  border: 1px dashed rgba(0,32,71,.25); border-radius: var(--radius); padding: 1rem 1.1rem; margin-top: 2rem;
}
.band--dark .note { color: var(--cream-2); border-color: rgba(254,245,228,.25); }

.center { text-align: center; }
.mt0 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .btn:hover { transform: none; }
}

/* ---------- hero crest ---------- */

.hero__grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero__copy { min-width: 0; }
.hero__crest { width: min(268px, 54vw); height: auto; justify-self: center; order: -1; }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) clamp(210px, 26vw, 300px); }
  .hero__crest { order: 0; width: 100%; justify-self: end; }
}
.foot__badge { width: 64px; height: 67px; display: block; margin-bottom: .9rem; }
.u-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- staff: accounts + coach schedule ---------- */

/* white cards, like .tablewrap, so meta text and accents stay readable */
.panel, .userbar { --net: #5E6C7E; --accent: var(--red-deep); }

.userbar {
  display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.userbar .field { margin-bottom: 0; }
.userbar__search { flex: 1 1 260px; }
.userbar .btn { margin-left: auto; }

.panel {
  border: 1px solid rgba(0,32,71,.16); border-radius: var(--radius); background: #FFF;
  padding: clamp(1.25rem, 3vw, 1.75rem); margin-bottom: 1.5rem;
}
.panel__title { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: 1.1rem; margin: 0 0 1.1rem; }

.grid2, .grid3 { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
}

/* the manage column packs several small controls into one cell */
.rowacts { display: flex; gap: .75rem; align-items: center; flex-wrap: nowrap; }
.rowacts select { font-family: var(--body); font-size: .8rem; padding: .3rem .4rem;
  border: 1px solid rgba(0,32,71,.25); border-radius: var(--radius); background: #FFFDF8; color: var(--ink); }
.linkbtn {
  background: none; border: 0; padding: .2rem 0; font: inherit; font-size: .8rem;
  color: var(--red-deep); text-decoration: underline; cursor: pointer;
}
.linkbtn:hover { color: var(--ink); }
.linkbtn[disabled] { color: var(--net); text-decoration: none; cursor: not-allowed; }

/* a schedule line: when, who, what -- lighter than .res, and no money on it */
.line {
  border: 1px solid rgba(0,32,71,.16); border-radius: var(--radius); background: #FFF;
  padding: .9rem 1.1rem; margin-bottom: .6rem;
  display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap;
}
.line--today { border-left: 3px solid var(--red); }
.line__when { min-width: 150px; }
.line__day { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: .95rem; line-height: 1.15; }
.line__time { font-family: var(--mono); font-size: .78rem; color: var(--net); }
.line__who { font-size: .9rem; }
.line__meta { font-family: var(--mono); font-size: .74rem; color: var(--net); }
.line__act { margin-left: auto; }

/* Portal role plus the extra jobs someone also holds. Stacked in one cell so
   the accounts table keeps its column count and stays readable on a laptop. */
.rolecell { display: grid; gap: .35rem; min-width: 11rem; }
.rolechecks { display: flex; flex-wrap: wrap; gap: .05rem .55rem; }
.rolecheck { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; white-space: nowrap; }
.rolecheck input { accent-color: var(--red); margin: 0; }
.rolecheck input:disabled + span { opacity: .4; }

/* lessons page: a single lesson plus three packs reads as one row on desktop */
.plans--four { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- "view as" (admin testing) ---------- */
.viewas { font: 600 .85rem/1.2 var(--body); display: flex; align-items: center; gap: .6rem; z-index: 1000; }
.viewas select { font: inherit; padding: .3rem .4rem; border-radius: var(--radius); border: 1px solid var(--navy-line); max-width: 16rem; }
.viewas--on { position: fixed; left: 0; right: 0; bottom: 0; flex-wrap: wrap; justify-content: center; padding: .5rem var(--gut);
  background: var(--red); color: #fff; }
.viewas--on strong { font-weight: 800; }
.viewas--on button { font: inherit; padding: .3rem .7rem; border: 0; border-radius: var(--radius);
  background: #fff; color: var(--red-deep); cursor: pointer; }
.viewas--pin { position: fixed; right: 1rem; bottom: 1rem; padding: .35rem; border-radius: var(--radius);
  background: var(--navy-deep); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.viewas--pin select { width: 8.5rem; }
body.has-viewas { padding-bottom: 3.5rem; }
@media print { .viewas { display: none; } }

/* ---------- building calendar (public/js/calendar.js) ---------- */
.cal { margin: 0; }
.cal + h2 { margin-top: 2.75rem; }
.cal__bar { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.cal__nav { display: flex; gap: .5rem; flex-wrap: wrap; }
.cal__legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .78rem; color: var(--net); }
.cal__legend span { display: inline-flex; align-items: center; gap: .35rem; }
.cal__sw { display: inline-block; width: .9rem; height: .9rem; border-radius: 2px; border: 1px solid rgba(0,32,71,.18); }
.cal__sw--open { background: #FFF; }
.cal__sw--some { background: #E9D6B0; }
.cal__sw--full { background: var(--navy); }
.cal__sw--mine { background: #FFF; box-shadow: inset 0 0 0 2px var(--red); }
.cal__scroll { overflow-x: auto; border: 1px solid rgba(0,32,71,.16); border-radius: var(--radius); background: #FFF; }
.cal__grid { --cal-time: 3.6rem; display: grid; font-size: .74rem; }
@media (max-width: 560px) { .cal__grid { --cal-time: 2.7rem; } .cal__time { padding: 0 .25rem; font-size: .6rem; } .cal__day small { font-size: .6rem; } }
.cal__corner, .cal__day { position: sticky; top: 0; background: #FFF; border-bottom: 1px solid rgba(0,32,71,.16); }
.cal__day { text-align: center; padding: .45rem .15rem; line-height: 1.15; }
.cal__day b { display: block; font-family: var(--display); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.cal__day small { color: var(--net); font-family: var(--mono); font-size: .66rem; }
.cal__day.is-today b { color: var(--red-deep); }
.cal__time { position: sticky; left: 0; z-index: 1; background: #FFF; font-family: var(--mono); font-size: .66rem;
  color: var(--net); padding: 0 .4rem; text-align: right; transform: translateY(-.45em); }
.cal__cell { height: 1.55rem; border: 0; border-left: 1px solid rgba(0,32,71,.08); border-top: 1px solid rgba(0,32,71,.06);
  background: #FFF; color: var(--ink); font: 600 .68rem/1 var(--mono); cursor: pointer; padding: 0; }
.cal__cell--some { background: #E9D6B0; }
.cal__cell--full { background: var(--navy); color: var(--cream-2); }
.cal__cell--past { background: repeating-linear-gradient(135deg, #F4F1EA 0 4px, #FFF 4px 8px); cursor: default; }
.cal__cell--closed { background: #F4F1EA; border-left: 1px solid rgba(0,32,71,.08); }
.cal__cell.has-ev { box-shadow: inset 0 0 0 2px var(--red); }
.cal__cell.is-picked { outline: 3px solid var(--ink); outline-offset: -3px; position: relative; z-index: 2; }
.cal__cell:focus-visible { outline: 3px solid var(--red-deep); outline-offset: -3px; }
.cal__detail { margin-top: .9rem; min-height: 2.5rem; }
.cal__dtitle { font-family: var(--display); font-size: 1rem; margin: 0 0 .2rem; }
.cal__dline { margin: 0 0 .5rem; color: var(--net); font-size: .86rem; }
.cal__evs { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .45rem; }
.cal__ev { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: baseline;
  background: #FFF; border: 1px solid rgba(0,32,71,.14); border-radius: var(--radius); padding: .55rem .75rem; font-size: .86rem; }
.cal__ev small { grid-column: 2; color: var(--net); overflow-wrap: anywhere; }
.cal__ev .tag { grid-row: span 2; align-self: start; }

/* trainer page: the coach's open times as families see them */
.famview { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.famday { border: 1px solid rgba(0,32,71,.15); border-radius: var(--radius); padding: .7rem .8rem; background: #FFF; min-width: 0; }
.famday--none { opacity: .55; background: transparent; }
.famday__day { margin: 0; font-weight: 600; font-size: .9rem; }
.famday__count { margin: .1rem 0 0; font-family: var(--mono); font-size: .75rem; color: var(--red-deep); }
.famday--none .famday__count { color: inherit; }
.famday__times { margin: .35rem 0 0; font-size: .78rem; line-height: 1.35; overflow-wrap: anywhere; }

/* ---------- account dashboard ---------- */

.dash__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.6rem; }
.dash__head .btnrow { margin-top: 0; gap: .5rem; }
.dash { margin-bottom: 2.25rem; }
.dash .stat { display: flex; flex-direction: column; }
.dash .stat .btn { align-self: flex-start; }
.dash__sec { margin-top: 2.5rem; }
h2.dash__h, summary.dash__h { font-size: 1.6rem; margin: 0 0 1.1rem; }
.dash__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.dash__row .modeswitch { margin: 0 0 1.1rem; }
.dash__sec > .hint { margin: -.4rem 0 1rem; }
details.dash__sec > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .6rem; }
details.dash__sec > summary::-webkit-details-marker { display: none; }
details.dash__sec > summary::after { content: '+'; font-family: var(--mono); font-size: 1.1rem; color: var(--net); }
details.dash__sec[open] > summary::after { content: '–'; }
details.dash__sec:not([open]) > summary { margin-bottom: 0; }

.meter { margin-top: .75rem; }
.meter__bar { height: 8px; border-radius: 4px; background: rgba(0,32,71,.10); overflow: hidden; }
.meter__bar span { display: block; height: 100%; background: var(--red); border-radius: 4px; }
.meter__txt { font-family: var(--mono); font-size: .74rem; color: var(--ink); margin-top: .4rem; }
.stat__sub.check { display: flex; gap: .4rem; align-items: center; margin-top: .6rem; }

.ledger { border: 1px solid rgba(0,32,71,.16); border-radius: var(--radius); background: #FFF; }
.ledger__row { display: grid; grid-template-columns: 1fr auto auto; gap: .4rem 1.1rem; align-items: center;
  padding: .85rem 1.1rem; border-top: 1px solid rgba(0,32,71,.09); }
.ledger__row:first-child { border-top: 0; }
.ledger__what { font-size: .9rem; min-width: 0; overflow-wrap: anywhere; }
.ledger__when { font-family: var(--mono); font-size: .72rem; color: var(--net); margin-top: .15rem; }
.ledger__amt { font-family: var(--mono); font-size: .9rem; font-weight: 500; text-align: right; }
.ledger__act { display: flex; justify-content: flex-end; }
@media (max-width: 520px) {
  .ledger__row { grid-template-columns: 1fr auto; }
  .ledger__act { grid-column: 1 / -1; justify-content: flex-start; }
}
.dash__sec .res { padding: .95rem 1.25rem; }
.res__kind { font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--net); }

/* ---------- short-notice lesson requests ---------- */
.steplead { margin: -.35rem 0 .9rem; font-size: .85rem; color: var(--net); }
.shortrow { margin-bottom: .7rem; padding: .6rem .65rem .7rem; border: 1px dashed rgba(172,13,31,.35);
  border-radius: var(--radius); background: rgba(211,19,34,.04); }
.shortrow__label { margin: 0 0 .5rem; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red-deep); }
.slot--short { border-color: rgba(172,13,31,.45); background: #FFF8F4; display: flex; flex-direction: column;
  align-items: center; gap: .1rem; line-height: 1.15; }
.slot--short small { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--red-deep); }
.slot--short.is-on small { color: var(--cream); }
.shortwarn { margin: 1rem 0; padding: .9rem 1rem; border-left: 3px solid var(--red); background: rgba(211,19,34,.06);
  border-radius: 0 var(--radius) var(--radius) 0; font-size: .88rem; }
.shortwarn p { margin: 0 0 .6rem; }
.shortwarn__title { font-weight: 700; color: var(--red-deep); }
.checkline { display: flex; gap: .55rem; align-items: flex-start; font-size: .85rem; cursor: pointer; }
.checkline input { margin-top: .2rem; flex: none; width: 1.05rem; height: 1.05rem; accent-color: var(--red); }
.tag--wait { background: rgba(214,150,20,.18); color: #6B4A00; }
.reqpanel { margin-bottom: 2.5rem; border-left: 3px solid var(--red); }
.reqrow { flex-wrap: wrap; }
.reqrow .res__act { flex-wrap: wrap; }
.reqrow .res__what .hint, .reqrow .res__what .muted { margin: .2rem 0 0; }

/* ---------- portal dashboards (account, trainer, office) ----------
   A working screen, not a poster: a compact title bar, a row of numbers,
   then cards in a grid. Marketing type sizes stay on the marketing pages. */

.portal .band--tight { padding-block: 1.5rem 3rem; }
.portal .foot { padding-block: 0 1.25rem; }
.portal .foot__grid { display: none; }
.portal .foot__base { margin-top: 0; padding-top: 1.1rem; border-top: 0; }

.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem 1.5rem;
  padding-bottom: 1.1rem; margin-bottom: 1.25rem; border-bottom: 1px solid rgba(0,32,71,.14); }
.ph__id { min-width: 0; }
.ph__top { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; margin-bottom: .35rem; }
.ph__top .eyebrow { margin: 0; }
.ph__top .rolebadge { margin: 0; padding: .12rem .55rem; font-size: .72rem; }
.ph__top .rolebadge__k { font-size: .6rem; }
h1.ph__title { font-size: clamp(1.6rem, 3.4vw, 2.15rem); margin: 0; line-height: 1.05; overflow-wrap: anywhere; }
.ph__side { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.ph__side .btnrow { margin: 0; gap: .5rem; }
.ph__side .field { margin: 0; min-width: 220px; }
.ph .modeswitch { margin: 0; }

/* the number row */
.kpis { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1.25rem; }
.kpis:empty { display: none; }
.kpis .stat { padding: .85rem 1rem .9rem; border-radius: 6px; display: flex; flex-direction: column; min-width: 0; }
.kpis .stat__k { font-size: .6rem; }
.kpis .stat__v { font-size: 1.45rem; margin-top: .3rem; overflow-wrap: anywhere; }
.kpis .stat__sub { font-size: .7rem; margin-top: .25rem; }
.kpis .stat--wide { grid-column: span 2; }
.kpis .stat--alert { border-color: rgba(211,19,34,.45); box-shadow: inset 3px 0 0 var(--red); }
.kpis .stat .btn { align-self: flex-start; margin-top: .6rem; }
.kpis .meter { margin-top: .55rem; }
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .kpis .stat { padding: .7rem .8rem; }
  .kpis .stat__v { font-size: 1.2rem; }
}

/* cards in a grid */
.dgrid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); align-items: start; margin-bottom: 1.25rem; }
.dgrid > * { min-width: 0; display: grid; gap: 1.25rem; align-content: start; }
@media (min-width: 980px) {
  .dgrid--half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dgrid--side { grid-template-columns: minmax(0, 1fr) 370px; }
}

.card { --net: #5E6C7E; --accent: var(--red-deep);
  background: #FFF; border: 1px solid rgba(0,32,71,.14); border-radius: 6px; min-width: 0; }
.card[hidden] { display: none !important; }
.card__h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .9rem;
  padding: .8rem 1rem; border-bottom: 1px solid rgba(0,32,71,.09); }
h2.card__t, summary.card__t, .card__t { font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  text-transform: uppercase; font-size: .92rem; letter-spacing: .02em; margin: 0; line-height: 1.2; }
.card__meta { font-family: var(--mono); font-size: .7rem; color: var(--net); }
.card__meta a { color: var(--ink); }
.card__b { padding: .9rem 1rem; }
.card__b > .hint:first-child { margin: 0 0 .8rem; }
.card__b--flush { padding: 0; }
.card__note { padding: .55rem 1rem; margin: 0; font-size: .76rem; color: var(--net); border-bottom: 1px solid rgba(0,32,71,.07); }
.card__note:empty { display: none; }
.card .modeswitch { margin: 0; padding: .15rem; }
.card .modeswitch a, .card .modeswitch button { padding: .3rem .7rem; font-size: .76rem; }
.card--alert { border-color: rgba(211,19,34,.4); box-shadow: inset 3px 0 0 var(--red); }

/* lists inside a card: rows with hairlines, not a stack of boxes */
.card .res, .card .line { border: 0; border-radius: 0; margin: 0; padding: .7rem 1rem; gap: .35rem 1rem;
  border-top: 1px solid rgba(0,32,71,.08); background: transparent; flex-wrap: nowrap; }
.card .res:first-child, .card .line:first-child { border-top: 0; }
.card .res__when, .card .line__when { min-width: 108px; flex: none; }
.card .res__day, .card .line__day { font-size: .82rem; }
.card .res__time, .card .line__time { font-size: .72rem; }
.card .res__what { font-size: .84rem; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.card .res__act { flex: none; }
.card .res--past { opacity: .62; }
.card .line--today { box-shadow: inset 3px 0 0 var(--red); }
.card .empty { border: 0; padding: 1.4rem 1rem; }
.card .empty p { margin-bottom: .8rem; font-size: .88rem; }
.card .empty p:last-child { margin-bottom: 0; }
.card .ledger { border: 0; border-radius: 0; }
.card .ledger__row { padding: .7rem 1rem; }
.card .tablewrap { border: 0; border-radius: 0 0 6px 6px; }
.card .panel { border: 0; border-top: 1px solid rgba(0,32,71,.08); border-radius: 0; margin: 0; padding: .9rem 1rem; background: #FBF8F2; }
.card .field { margin-bottom: .7rem; }
.card .field input, .card .field select, .card .field textarea { padding: .5rem .6rem; font-size: .9rem; }
.card .field > span { font-size: .62rem; margin-bottom: .3rem; }
@media (max-width: 620px) {
  .card .res, .card .line { flex-wrap: wrap; }
  .card .res__act { margin-left: 0; width: 100%; justify-content: flex-start; }
}

/* a card that folds (the building calendar) */
details.card > summary { list-style: none; cursor: pointer; border-bottom: 0; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: '+'; font-family: var(--mono); font-size: 1rem; color: var(--net); }
details.card[open] > summary { border-bottom: 1px solid rgba(0,32,71,.09); }
details.card[open] > summary::after { content: '–'; }

/* page sections behind tabs (the office) */
.panes { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 1.1rem; padding: .25rem;
  border: 1px solid rgba(0,32,71,.16); border-radius: 6px; background: #FFF; width: max-content; max-width: 100%; }
.panes button { font: 700 .82rem/1 var(--body); color: var(--net); background: none; border: 0; border-radius: 4px;
  padding: .55rem .9rem; cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.panes button:hover { color: var(--ink); }
.panes button[aria-selected='true'] { background: var(--ink); color: var(--cream); }
.panes button[hidden] { display: none; }
.panes__n { font-family: var(--mono); font-size: .66rem; padding: .1rem .35rem; border-radius: 999px; background: var(--red); color: #fff; }
.pane.is-off { display: none !important; }

/* trainer: the two-week family view as a tight strip */
.card .famview { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .45rem; }
.card .famday { padding: .5rem .6rem; }
.card .famday__day { font-size: .8rem; }
.card .famday__count { font-size: .7rem; }
.card .famday__times { font-size: .7rem; }

/* trainer: availability pane switcher inside its card */
.subtabs { display: flex; gap: .2rem; padding: .5rem 1rem 0; border-bottom: 1px solid rgba(0,32,71,.09); }
.subtabs button { font: 700 .78rem/1 var(--body); color: var(--net); background: none; border: 0; border-bottom: 2px solid transparent;
  padding: .45rem .55rem .6rem; cursor: pointer; }
.subtabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--red); }
.subtabs__n { font-family: var(--mono); font-weight: 500; opacity: .7; }
.kpis .stat p, .card .res p, .card .line p, .card .famday p { margin-top: 0; margin-bottom: 0; }
.kpis .stat .stat__v { margin-top: .3rem; }
.kpis .stat .stat__sub { margin-top: .3rem; }
.card .res__time, .card .line__time { margin-top: .1rem !important; }
@media (max-width: 560px) {
  .kpis > .stat--wide:first-child ~ .stat:last-child:nth-child(even) { grid-column: span 2; }
}
@media (max-width: 560px) {
  .kpis:not(:has(> .stat--wide)) > .stat:last-child:nth-child(odd) { grid-column: span 2; }
}
.card .famview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 760px) { .card .famview { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.card .famday--none { padding: .4rem .5rem; border-style: dashed; }
.card .famday--none .famday__day { font-weight: 500; }
@media (max-width: 620px) {
  .panes { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .panes button { flex: none; }
}

/* ---- side-card pieces shared by every portal (trainer layout) ---- */
.planbox .stat__k { margin: 0; }
.planbox .stat__v { font-size: 1.35rem; margin: .25rem 0 0; }
.planbox .stat__sub { margin: .35rem 0 0; }
.planbox .btn { margin-top: .7rem; }
.planbox__more { margin: .9rem 0 0; padding-top: .8rem; border-top: 1px solid rgba(0,32,71,.08); }
.planbox__more .btn { margin-top: 0; }
.mini { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: .2rem .7rem; align-items: start;
  padding: .7rem 1rem; border-top: 1px solid rgba(0,32,71,.07); }
.mini:first-child { border-top: 0; }
.mini p { margin: 0; }
.mini__when p:first-child { font-weight: 700; font-size: .82rem; }
.mini__time { font-family: var(--mono); font-size: .68rem; color: var(--net); }
.mini__what { font-size: .82rem; min-width: 0; overflow-wrap: anywhere; }
.mini__tag .tag { font-size: .58rem; white-space: nowrap; }
.ledger--side { border: 0; border-radius: 0; }
.ledger--side .ledger__row { grid-template-columns: minmax(0, 1fr) auto; padding: .7rem 1rem; }
.ledger--side .ledger__act { grid-column: 1 / -1; justify-content: flex-start; }
a.famday--link { color: inherit; text-decoration: none; }
a.famday--link:hover, a.famday--link:focus-visible { border-color: var(--red); }
.formstack { display: grid; gap: .1rem; }
.formstack .field:last-of-type { margin-bottom: .4rem; }
.res__sub { font-family: var(--mono); font-size: .7rem; color: var(--net); margin-top: .15rem; }
.mini--two { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 620px) {
  [data-open] > :nth-child(n+8), [data-week] > :nth-child(n+8) { display: none; }
}
