/* ---- reset ---- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0}
img,svg{display:block;max-width:100%}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0}
h1,h2,h3,h4,p,ul,ol,li,figure{margin:0;padding:0}
ul,ol{list-style:none}
title{display:none}

/* Mono is now reserved for identifiers — a raw phase value, an event id, a code sample, a pasted
   email body. It used to carry addresses, timestamps, URLs and counts as well, which reads slower,
   wraps mid-word on a phone and gives the whole interface a terminal flavour the brand does not
   have. Tabular figures come from font-variant-numeric, not from the face. */

/* ---- tokens: CGM brand ----
   navy #0a2b6d · blue #077fdb · green #95df78
   navy carries type and primary actions (13:1 on white), blue carries links,
   focus and motion, green carries completion. Neutrals are pulled toward navy. */
:root{
  --navy:#0a2b6d; --blue:#077fdb; --green:#95df78;

  --ground:#F3F6FB; --surface:#FFFFFF; --surface-2:#F8FAFD; --sunk:#E9EFF8;
  --line:#D7E1EF; --line-soft:#E6ECF6;
  /* --ink-3 was #73809B: 3.97:1 on white, which fails WCAG AA for body text (4.5). It carries
     timestamps, meta lines and the "how many boards" counts — small text that is exactly what
     people with low vision need most. #5B6880 is 5.62 on white and 5.37 on the tinted surface. */
  --ink:#0D1B33; --ink-2:#40506C; --ink-3:#5B6880;

  --accent:#0a2b6d; --accent-ink:#FFFFFF; --accent-soft:#E8F0FA; --accent-line:#B7D5F1;
  /* The brand blue (--blue, #077fdb) is 4.14:1 on white — a hair under AA, and it is what every
     link, focus ring and inline action is painted with. Darkened just enough to clear it (5.12)
     while staying recognisably the same blue; --blue itself is untouched as the brand swatch. */
  --accent-2:#0670C2;

  --done:#2C7A17; --done-soft:#EAF8E2;
  --wait:#8E5E06; --wait-soft:#FBF1DD;
  --ask:#0A5FA8; --ask-soft:#E4F1FC;
  --nge:#5B45A8; --nge-soft:#ECE8F9; --nge-line:#CFC6EE;

  --shadow:0 1px 2px rgba(10,43,109,.06),0 8px 24px -12px rgba(10,43,109,.20);
  --shadow-lift:0 2px 4px rgba(10,43,109,.08),0 18px 40px -18px rgba(10,43,109,.32);
  --r:10px; --r-lg:16px;
  --display:"Archivo","Helvetica Neue",Arial,sans-serif;
  --body:"IBM Plex Sans","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --ground:#080F1D; --surface:#111A2C; --surface-2:#152036; --sunk:#0C1425;
    --line:#243149; --line-soft:#1C2740;
    /* 4.48:1 on the dark surface, which also misses AA. */
    --ink:#E7EDF7; --ink-2:#A4B2CB; --ink-3:#8B98B2;

    --accent:#2E8FE0; --accent-ink:#041225; --accent-soft:#122942; --accent-line:#2A4C74;
    --accent-2:#5FAFEC;

    --done:#95df78; --done-soft:#15291A;
    --wait:#DDA85C; --wait-soft:#2A2013;
    --ask:#6FB6F0; --ask-soft:#0F2740;
    --nge:#AC9BF0; --nge-soft:#1F1B34; --nge-line:#372E58;

    --shadow:0 1px 2px rgba(0,0,0,.45),0 8px 24px -12px rgba(0,0,0,.65);
    --shadow-lift:0 2px 4px rgba(0,0,0,.55),0 18px 40px -18px rgba(0,0,0,.75);
  }
}
:root[data-theme="dark"]{
  --ground:#080F1D; --surface:#111A2C; --surface-2:#152036; --sunk:#0C1425;
  --line:#243149; --line-soft:#1C2740;
  --ink:#E7EDF7; --ink-2:#A4B2CB; --ink-3:#8B98B2;
  --accent:#2E8FE0; --accent-ink:#041225; --accent-soft:#122942; --accent-line:#2A4C74;
  --accent-2:#5FAFEC;
  --done:#95df78; --done-soft:#15291A;
  --wait:#DDA85C; --wait-soft:#2A2013;
  --ask:#6FB6F0; --ask-soft:#0F2740;
  --nge:#AC9BF0; --nge-soft:#1F1B34; --nge-line:#372E58;
  --shadow:0 1px 2px rgba(0,0,0,.45),0 8px 24px -12px rgba(0,0,0,.65);
  --shadow-lift:0 2px 4px rgba(0,0,0,.55),0 18px 40px -18px rgba(0,0,0,.75);
}

body{
  background:var(--ground); color:var(--ink);
  /* 16px. The edits a gym writes and the sentences CGM writes back are the substance of this
     app and were set a notch below comfortable reading size; the leading goes up with it. */
  font-family:var(--body); font-size:16px; line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
:focus-visible{outline:2px solid var(--accent-2); outline-offset:2px; border-radius:4px}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---- shell ---- */
.masthead{
  border-bottom:1px solid var(--line); background:var(--surface);
  position:sticky; top:0; z-index:30;
}
.masthead-in{
  max-width:1240px; margin:0 auto; padding:12px 24px;
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
}
.brand{display:flex; align-items:baseline; gap:9px; margin-right:auto}
.brand-mark{
  font-family:var(--display); font-weight:700; font-size:13px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--navy);
}
.brand-sub{font-family:var(--body); font-size:11.5px; color:var(--ink-3); letter-spacing:.02em}
.whoami{display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-2)}
.avatar{
  width:26px; height:26px; border-radius:50%; display:grid; place-items:center;
  font-family:var(--display); font-weight:700; font-size:11px; letter-spacing:.02em;
  background:var(--accent-soft); color:var(--accent); border:1px solid var(--accent-line);
}
.avatar.staff{background:var(--ask-soft); color:var(--ask); border-color:transparent}
.linkish{color:var(--ink-3); text-decoration:underline; text-underline-offset:2px; font-size:12.5px}
.linkish:hover{color:var(--ink)}
.savechip{
  font-family:var(--body); font-size:11px; color:var(--ink-3);
  padding:3px 8px; border-radius:99px; background:var(--sunk); white-space:nowrap;
}
.savechip[data-s="saving"]{color:var(--wait)}
.savechip[data-s="saved"]{color:var(--done)}
.savechip[data-s="error"]{color:var(--accent)}

.wrap{max-width:1240px; margin:0 auto; padding:24px; display:grid; gap:24px; grid-template-columns:300px minmax(0,1fr); align-items:start}
/* Main comes first in the DOM — the order a screen reader reads, the tab key follows and a phone
   stacks. The rail is put back on the left here by explicit placement rather than by `order`,
   which had no effect on this grid at all. Explicit is also honest: the sidebar is a sidebar on a
   wide screen and a footer of extras on a narrow one, and saying so in two lines beats relying on
   auto-placement to infer it. */
.wrap > main{grid-column:2; grid-row:1; min-width:0}
.wrap > .rail{grid-column:1; grid-row:1}
@media (max-width:940px){
  .wrap{grid-template-columns:minmax(0,1fr); padding:16px; gap:16px}
  /* Stacked, and the board comes first. It used to put a disabled staff button, the access list
     and the launch form above the gym's own name — three cards of somebody else's admin before
     anything that says where the build has got to. */
  .wrap > main,
  .wrap > .rail{grid-column:1; grid-row:auto}
}

/* ---- rail ---- */
.rail{display:flex; flex-direction:column; gap:14px; position:sticky; top:66px}
@media (max-width:940px){.rail{position:static}}
.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow)}
.card-pad{padding:16px}
/* Was 10.5px uppercase at .13em tracking — below the 12px floor this project sets for anything
   carrying a sentence, and wide tracking makes short labels harder to read rather than easier.
   Still a label, still quieter than a heading, now legible: 12px, sentence case at the call site,
   and tracking dialled back to a hint of separation. */
.eyebrow{
  font-family:var(--display); font-size:12px; font-weight:650; letter-spacing:.02em;
  text-transform:none; color:var(--ink-2);
}
.gym-name{font-family:var(--display); font-weight:700; font-size:20px; line-height:1.18; letter-spacing:-.01em; text-wrap:balance; margin-top:6px}
.gym-meta{margin-top:10px; display:flex; flex-direction:column; gap:5px}
.gym-meta a,.gym-meta span{font-family:var(--body); font-size:12px; color:var(--ink-2); word-break:break-all; text-decoration:none}
.gym-meta a:hover{color:var(--accent); text-decoration:underline}
/* The staff control under the gym's details. `.linkish` already carries its own mouse baseline and
   its 40px bump in the touch block, so this only has to place it. */
.gym-site{margin-top:7px}

.prog{margin-top:14px; padding-top:14px; border-top:1px solid var(--line-soft)}
.prog-top{display:flex; align-items:baseline; justify-content:space-between; gap:8px}
.prog-num{font-family:var(--display); font-weight:700; font-size:26px; letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.prog-num small{font-family:var(--body); font-weight:400; font-size:12px; color:var(--ink-3); letter-spacing:0}
.bar{height:7px; border-radius:99px; background:var(--sunk); margin-top:9px; overflow:hidden; display:flex}
.bar i{display:block; height:100%; background:var(--green)}
.bar i.pending{background:var(--wait); opacity:.55}
.legend{display:flex; gap:12px; margin-top:9px; flex-wrap:wrap}
.legend span{display:flex; align-items:center; gap:5px; font-size:11.5px; color:var(--ink-3); font-family:var(--body)}
.dot{width:7px; height:7px; border-radius:2px; background:var(--green)}
.dot.w{background:var(--wait); opacity:.7}
.dot.o{background:var(--sunk); border:1px solid var(--line)}

.filters{display:flex; flex-direction:column; gap:2px}
.filt{
  display:flex; align-items:center; gap:8px; padding:7px 10px; border-radius:8px;
  font-size:13.5px; color:var(--ink-2); text-align:left; width:100%;
}
.filt:hover{background:var(--surface-2); color:var(--ink)}
.filt[aria-pressed="true"]{background:var(--accent-soft); color:var(--accent); font-weight:600}
.filt b{margin-left:auto; font-family:var(--body); font-size:11.5px; font-weight:500; font-variant-numeric:tabular-nums}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px; border-radius:9px; font-family:var(--display); font-weight:600;
  font-size:14px; border:1px solid var(--line); background:var(--surface); color:var(--ink);
  transition:background .12s ease,border-color .12s ease,transform .06s ease;
}
.btn:hover{background:var(--surface-2)}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--accent); color:var(--accent-ink); border-color:transparent; width:100%}
.btn-primary:hover{background:var(--accent-2)}
.btn-primary:disabled{background:var(--sunk); color:var(--ink-3); cursor:not-allowed; filter:none}
.btn-sm{padding:6px 10px; font-size:12.5px; border-radius:7px}
.btn-ghost{border-color:transparent; color:var(--ink-3)}
.btn-ghost:hover{color:var(--ink); background:var(--surface-2)}
.pill-count{font-family:var(--body); font-size:11px; padding:1px 6px; border-radius:99px; background:rgba(255,255,255,.22)}
.submit-note{font-size:12.5px; color:var(--ink-3); margin-top:9px; line-height:1.45}

/* The submitted rounds, folded away. Ten of them is a wall between the Submit button and
   everything under it, and it is reference rather than something read on arrival. <details> keeps
   it keyboard-reachable and announced without any state to manage. */
.batchfold{margin-top:12px}
.batchfold > summary{cursor:pointer; list-style:none; font-size:13.5px; font-weight:600;
  color:var(--accent-2); padding:7px 0; min-height:40px; display:flex; align-items:center; gap:7px}
.batchfold > summary::-webkit-details-marker{display:none}
.batchfold > summary::before{content:"\25B8"; font-size:11px; transition:transform .15s ease}
.batchfold[open] > summary::before{transform:rotate(90deg)}
.batchfold > summary:hover{color:var(--accent)}
.batchfold .batchlog{margin-top:2px}
.batchlog{display:flex; flex-direction:column; gap:8px; margin-top:10px}
.batchrow{display:flex; gap:9px; align-items:flex-start; font-size:12.5px; color:var(--ink-2)}
.batchrow b{font-family:var(--body); font-size:11px; color:var(--accent); background:var(--accent-soft); border:1px solid var(--accent-line); padding:1px 6px; border-radius:5px; white-space:nowrap}
.batchrow time{display:block; font-family:var(--body); font-size:11px; color:var(--ink-3)}

/* ---- main ---- */
.intro{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:20px 22px; box-shadow:var(--shadow)}
.intro h1{font-family:var(--display); font-weight:700; font-size:clamp(21px,2.4vw,27px); letter-spacing:-.02em; text-wrap:balance}
.intro p{margin-top:8px; color:var(--ink-2); font-size:15.5px; max-width:62ch}

/* ---- the walkthrough video ----------------------------------------------
   Same card furniture as .intro, because it sits directly above it and the two are one thought.
   The frame is wrapped in a ratio box rather than given a height: Loom reports nothing to the
   parent and there is no resize script here on purpose (lib/board/walkthrough.ts), so the shape
   has to come from CSS and hold at every width. 70% is the embed's own ratio. */
.walkthru{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:18px 20px 16px; box-shadow:var(--shadow); margin-bottom:14px}
.walkthru-head{display:flex; align-items:baseline; justify-content:space-between; gap:14px}
.walkthru-head h2{font-family:var(--display); font-weight:700; font-size:clamp(17px,1.8vw,20px);
  letter-spacing:-.015em; text-wrap:balance}
.walkthru-frame{position:relative; padding-bottom:70%; height:0; margin-top:13px;
  border-radius:var(--r); overflow:hidden; background:var(--sunk)}
.walkthru-frame iframe{position:absolute; top:0; left:0; width:100%; height:100%; border:0}
.walkthru-note{font-size:13px; color:var(--ink-3); margin:9px 0 0; line-height:1.45}
.walkthru-note .linkish{color:var(--accent-2); font-weight:600; font-size:inherit}
/* Collapsed: one line, and the link has to stay a comfortable target rather than shrinking to the
   height of 13px text. */
.walkthru-shut{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; padding:12px 20px}
.walkthru-shut .linkish{color:var(--accent-2); font-weight:700; font-size:14.5px; min-height:24px}
.walkthru-shut .walkthru-note{margin:0}
@media (max-width:640px){
  .walkthru-head{flex-direction:column; gap:4px}
  .walkthru-head .linkish{align-self:flex-start}
}

/* The question the launch modal asks before it shows a single Thursday. Body copy, not a label:
   it is two sentences somebody has to actually read, so it keeps the 15px body size rather than
   the 13px the modal uses for asides. */
.confirmq{font-size:15px; color:var(--ink-2); line-height:1.5; margin-bottom:10px; max-width:54ch}
.confirmq:last-child{margin-bottom:0}
.confirmq b{color:var(--ink); font-weight:700}

.steps{margin-top:14px; display:grid; gap:8px}
.step{display:flex; gap:10px; font-size:13.5px; color:var(--ink-2); align-items:flex-start}
.step i{
  flex:0 0 auto; width:19px; height:19px; border-radius:50%; background:var(--sunk); color:var(--ink-3);
  font-family:var(--body); font-size:11px; font-style:normal; display:grid; place-items:center; margin-top:1px;
}
.banner{
  display:flex; gap:10px; align-items:flex-start; padding:11px 14px; border-radius:var(--r);
  font-size:13px; border:1px solid var(--line); background:var(--surface-2); color:var(--ink-2);
}
.banner.warn{background:var(--wait-soft); border-color:transparent; color:var(--wait)}
.banner strong{color:inherit}

.pages{display:flex; flex-direction:column; gap:14px; margin-top:16px}
.page{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow); overflow:hidden}
.page-head{display:flex; align-items:flex-start; gap:12px; padding:14px 18px; border-bottom:1px solid var(--line-soft); background:var(--surface-2)}
.page-title{font-family:var(--display); font-weight:700; font-size:15.5px; letter-spacing:-.005em}
.page-url{font-family:var(--body); font-size:11.5px; color:var(--ink-3); word-break:break-all; text-decoration:none; display:inline-block; margin-top:3px}
.page-url:hover{color:var(--accent); text-decoration:underline}
.page-stat{margin-left:auto; font-family:var(--body); font-size:11.5px; color:var(--ink-3); white-space:nowrap; font-variant-numeric:tabular-nums; padding-top:2px}

.items{padding:4px 0}
.item{display:grid; grid-template-columns:34px minmax(0,1fr); padding:9px 18px 9px 12px; border-bottom:1px solid var(--line-soft); position:relative}
.item:last-child{border-bottom:0}
.item.child{padding-left:44px; background:var(--sunk)}
.item.child::before{content:""; position:absolute; left:30px; top:0; bottom:0; width:1px; background:var(--line)}
.item.unsent{box-shadow:inset 3px 0 0 var(--navy)}
.tick{
  width:19px; height:19px; margin-top:2px; border-radius:5px; border:1.5px solid var(--line);
  background:var(--surface); display:grid; place-items:center; transition:background .12s,border-color .12s;
}
.tick:hover:not(:disabled){border-color:var(--done)}
.tick svg{width:12px; height:12px; opacity:0}
.tick:hover:not(:disabled){border-color:var(--green)}
.tick[aria-checked="true"]{background:var(--green); border-color:var(--green)}
.tick[aria-checked="true"] svg{opacity:1; stroke:var(--navy)}
.tick:disabled{cursor:not-allowed; opacity:.55}
.item-body{min-width:0}
.item-text{font-size:15.5px; line-height:1.55; overflow-wrap:break-word}
.item.done .item-text{color:var(--ink-3)}
.item-foot .btn-ghost{opacity:0; transition:opacity .12s ease}
.item:hover .item-foot .btn-ghost,.item:focus-within .item-foot .btn-ghost{opacity:1}
.item-foot .btn-ghost[data-has="1"]{opacity:1}
@media (hover:none){.item-foot .btn-ghost{opacity:1}}
.item-text a{color:var(--ask); font-family:var(--body); font-size:12.5px; word-break:break-all}
.item-foot{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:6px}
.chip{
  display:inline-flex; align-items:center; gap:5px; font-family:var(--body); font-size:12px;
  padding:2px 7px; border-radius:99px; background:var(--sunk); color:var(--ink-3); white-space:nowrap;
}
.chip.done{background:var(--done-soft); color:var(--done)}
.chip.ask{background:var(--ask-soft); color:var(--ask)}
.chip.wait{background:var(--wait-soft); color:var(--wait)}
.chip.unsent{background:var(--accent-soft); color:var(--accent)}
.chip.batch{background:transparent; border:1px solid var(--line); color:var(--ink-3)}
/* A failed GHL event in the admin feed. --alert is the submit bar's red, already in the palette;
   it is declared further down the file, which custom properties do not mind. */
.chip.alert{background:var(--alert-soft); color:var(--alert)}

.thread{margin-top:10px; border-left:2px solid var(--line); padding-left:12px; display:flex; flex-direction:column; gap:10px}
.msg{display:grid; grid-template-columns:24px minmax(0,1fr); gap:9px}
.msg .avatar{width:24px; height:24px; font-size:10px}
.msg-head{display:flex; align-items:baseline; gap:8px; flex-wrap:wrap}
.msg-who{font-family:var(--display); font-weight:600; font-size:12.5px}
.msg-role{font-family:var(--body); font-size:12px; font-weight:600; color:var(--ink-2); letter-spacing:.01em}
.msg-time{font-family:var(--body); font-size:10.5px; color:var(--ink-3); margin-left:auto}
.msg-text{font-size:15px; color:var(--ink-2); margin-top:2px; overflow-wrap:break-word}
.msg-text a{color:var(--ask); font-family:var(--body); font-size:12px; word-break:break-all}

.composer{display:flex; gap:8px; margin-top:4px}
.composer textarea{
  flex:1; min-height:38px; max-height:180px; resize:vertical; padding:8px 10px;
  border:1px solid var(--line); border-radius:8px; background:var(--surface); font-size:13.5px; font-family:var(--body);
}
.composer textarea::placeholder{color:var(--ink-3)}
.addrow{padding:10px 18px 14px 46px}
.addrow.top{padding:12px 18px 12px 46px; border-top:1px solid var(--line-soft)}
.addform{display:flex; gap:8px; align-items:flex-start}
.addform textarea{
  flex:1; min-height:40px; padding:9px 11px; border:1px dashed var(--line); border-radius:8px;
  background:var(--surface-2); font-size:13.5px; font-family:var(--body); resize:vertical;
}
.addform textarea:focus{border-style:solid; background:var(--surface)}

/* ---- screenshots on an edit ----
   Above the @media (pointer: coarse) block, deliberately: equal specificity means later wins, and
   appending these to the end of the file would undo the touch sizes set there. */
.shots{display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; list-style:none; padding:0}
.shot{position:relative; width:104px}
.shot a{display:block; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:var(--surface-2)}
.shot a:focus-visible{outline:2px solid var(--accent-2); outline-offset:2px}
/* A fixed box rather than the image's own shape: a column of thumbnails at wildly different
   heights makes the list underneath it impossible to scan. object-fit keeps them undistorted. */
.shot img{display:block; width:100%; height:78px; object-fit:cover; background:var(--surface-2)}
.shotx{
  position:absolute; top:-7px; right:-7px; width:24px; height:24px; border-radius:50%;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-2);
  font-size:15px; line-height:1; cursor:pointer; box-shadow:var(--shadow-lift);
}
/* The same red as .danger, which is a literal in this file rather than a token. */
.shotx:hover{color:#B4232E; border-color:#B4232E}
:root[data-theme="dark"] .shotx:hover,:root:not([data-theme="light"]) .shotx:hover{color:#F58A93; border-color:#F58A93}
.shotx:focus-visible{outline:2px solid var(--accent-2); outline-offset:2px}
.addshots{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.addshots-n{font-size:12.5px; color:var(--ink-2)}

/* ---- the rating card ----
   Above the @media (pointer: coarse) block, deliberately: equal specificity means later wins. */
.npscard{margin-top:14px}
.npsq{font-family:var(--display); font-weight:700; font-size:17px; letter-spacing:-.015em; margin-top:4px}
.npsscale{display:flex; gap:6px; flex-wrap:wrap; margin-top:14px}
.npsnum{
  flex:1 1 auto; min-width:38px; padding:10px 0; border:1px solid var(--line); border-radius:8px;
  background:var(--surface); font-family:var(--display); font-weight:650; font-size:15px;
  color:var(--ink-2); font-variant-numeric:tabular-nums;
}
.npsnum:hover{border-color:var(--accent-2); color:var(--ink)}
.npsnum[aria-pressed="true"]{background:var(--accent); border-color:transparent; color:var(--accent-ink)}
.npsnum:focus-visible{outline:2px solid var(--accent-2); outline-offset:2px}
/* The anchors are what make 0-10 mean anything; without them it is eleven unlabelled buttons. */
.npsends{display:flex; justify-content:space-between; margin-top:6px; font-size:12px; color:var(--ink-3)}
.npsnote{
  width:100%; margin-top:12px; padding:9px 11px; border:1px solid var(--line); border-radius:8px;
  background:var(--surface); font-family:var(--body); font-size:13.5px; color:var(--ink); resize:vertical;
}
.npsnote::placeholder{color:var(--ink-3)}
.npsact{display:flex; align-items:center; gap:9px; margin-top:12px}
.npsact .btn-primary{width:auto}
.npsdone{font-size:14.5px; margin-top:4px}
.npscomment{margin-top:8px; font-size:13.5px; color:var(--ink-2); font-style:italic}
/* The board survey's statements. It reuses the NPS scale above, including its coarse-pointer size. */
.svq{display:block; margin-top:16px; font-size:14px; font-weight:600; color:var(--ink)}
.svq:first-child{margin-top:0}
.svchips{display:flex; gap:4px}

/* ---- modal ---- */
.scrim{position:fixed; inset:0; background:rgba(12,16,22,.55); backdrop-filter:blur(3px); z-index:100; display:grid; place-items:center; padding:20px; overflow:auto}
.modal{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow-lift); width:100%; max-width:620px; overflow:hidden}
.modal.narrow{max-width:440px}
.modal-head{padding:18px 22px 14px; border-bottom:1px solid var(--line-soft)}
.modal-head h2{font-family:var(--display); font-weight:700; font-size:19px; letter-spacing:-.015em}
.modal-head p{margin-top:6px; font-size:13.5px; color:var(--ink-2)}
.modal-body{padding:18px 22px; display:flex; flex-direction:column; gap:14px}
.modal-foot{padding:14px 22px 18px; display:flex; gap:9px; justify-content:flex-end; flex-wrap:wrap; border-top:1px solid var(--line-soft)}
.field{display:flex; flex-direction:column; gap:6px}
.field label{font-family:var(--display); font-size:13px; font-weight:650; letter-spacing:.01em; text-transform:none; color:var(--ink-2)}
.field input{padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:var(--surface); font-size:14px}
/* The first <select> in the app. Without this it rendered at the browser default 23px — under the
   24px mouse floor and nowhere near the 40px touch one — which the responsive audit caught. */
.field select{padding:10px 12px; border:1px solid var(--line); border-radius:9px;
  background:var(--surface); font-size:14px; width:100%; 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 1.5L6 6.5L11 1.5' stroke='%235B6880' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center; background-size:12px 8px;
  padding-right:34px}
.seg{display:flex; gap:8px}
.seg button{flex:1; padding:12px; border:1px solid var(--line); border-radius:10px; text-align:left; background:var(--surface)}
.seg button[aria-pressed="true"]{border-color:var(--accent); background:var(--accent-soft)}
.seg b{display:block; font-family:var(--display); font-size:13.5px; font-weight:700}
.seg span{display:block; font-size:12px; color:var(--ink-3); margin-top:2px}
.chips{display:flex; gap:6px; flex-wrap:wrap}
.chips button{padding:4px 10px; border:1px solid var(--line); border-radius:99px; font-size:12.5px; color:var(--ink-2)}
.chips button:hover{border-color:var(--accent); color:var(--accent)}
.mailbox{background:var(--sunk); border:1px solid var(--line); border-radius:var(--r); padding:14px; max-height:44vh; overflow:auto}
.mailbox pre{margin:0; font-family:var(--mono); font-size:11.5px; line-height:1.6; white-space:pre-wrap; word-break:break-word; color:var(--ink-2)}
.kv{display:grid; grid-template-columns:auto minmax(0,1fr); gap:4px 12px; font-size:13px}
.kv dt{font-family:var(--display); font-size:12.5px; font-weight:650; letter-spacing:.01em; text-transform:none; color:var(--ink-2); padding-top:3px}
.kv dd{font-family:var(--body); font-size:12.5px; color:var(--ink); word-break:break-all}
.toaststack{
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:120;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  max-width:min(92vw,520px); pointer-events:none;
}
.toast{
  background:var(--ink); color:var(--ground); padding:10px 16px; border-radius:99px;
  font-size:13px; box-shadow:var(--shadow-lift); text-align:center;
}
@media (max-width:640px){.toaststack{bottom:calc(16px + env(safe-area-inset-bottom, 0px))}}
.empty{padding:34px 18px; text-align:center; color:var(--ink-3); font-size:13.5px}
.foot{max-width:1240px; margin:0 auto; padding:8px 24px 40px; color:var(--ink-3); font-size:12px}

/* ---- v2: tokens ---- */
:root{ --nge:#6B4FBB; --nge-soft:#EFEAFB; --nge-line:#D6CCF3; }
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--nge:#B49CF5; --nge-soft:#241C3A; --nge-line:#3B3060}}
:root[data-theme="dark"]{--nge:#B49CF5; --nge-soft:#241C3A; --nge-line:#3B3060}

.avatar.coach{background:var(--nge-soft); color:var(--nge); border-color:var(--nge-line)}
.chip.cat{border:1px solid var(--line); background:transparent; color:var(--ink-3); cursor:pointer}
.chip.cat:hover{border-color:var(--ink-3); color:var(--ink-2)}
.chip.cat.nge{background:var(--nge-soft); color:var(--nge); border-color:var(--nge-line)}
.wrap-single{grid-template-columns:minmax(0,1fr); max-width:860px}

/* ---- sign in ---- */
.signin{min-height:100vh; display:grid; place-items:center; padding:28px 20px}
.signin-card{width:100%; max-width:440px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); box-shadow:var(--shadow-lift); padding:28px}
.signin-card .brand-mark{display:block}
.signin-card h1{font-family:var(--display); font-weight:700; font-size:25px; letter-spacing:-.02em; margin-top:10px}
.signin-sub{margin-top:8px; color:var(--ink-2); font-size:13.5px}
.signin-form{display:flex; flex-direction:column; gap:12px; margin-top:20px}
.demo{margin-top:22px; border-top:1px solid var(--line-soft); padding-top:14px}
.demo summary{font-family:var(--display); font-size:11px; font-weight:700; letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-3); cursor:pointer}
.demo summary:hover{color:var(--ink)}
.demo p{font-size:12px; color:var(--ink-3); margin-top:10px; line-height:1.5}
.demotable{width:100%; border-collapse:collapse; margin-top:10px; font-size:12px}
.demotable th{text-align:left; font-family:var(--display); font-size:10px; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-3); padding:5px 8px 5px 0; font-weight:700}
.demotable td{padding:5px 8px 5px 0; border-top:1px solid var(--line-soft); vertical-align:middle}
.demotable code{font-family:var(--mono); font-size:11px; color:var(--ink-2)}

/* ---- overview ---- */
.gymlist{display:flex; flex-direction:column; gap:10px; margin-top:16px}
.gymrow{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 16px; align-items:center;
  width:100%; text-align:left; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); box-shadow:var(--shadow); padding:15px 18px;
  transition:border-color .12s ease, transform .06s ease}
.gymrow:hover{border-color:var(--accent-line)}
.gymrow:active{transform:translateY(1px)}
.gymrow-main{min-width:0; display:flex; flex-direction:column; gap:3px}
.gymrow-name{font-family:var(--display); font-weight:700; font-size:15.5px; letter-spacing:-.005em}
.gymrow-url{font-family:var(--body); font-size:12px; color:var(--ink-3); word-break:break-all}
.gymrow-stats{display:flex; align-items:center; gap:9px; flex-wrap:wrap; justify-content:flex-end}
.gymrow-pct{font-family:var(--body); font-size:12px; color:var(--ink-2); font-variant-numeric:tabular-nums}
.minibar{width:64px; height:6px; border-radius:99px; background:var(--sunk); overflow:hidden; display:block}
.minibar i{display:block; height:100%; background:var(--green)}
.gymrow-launch{grid-column:1/-1; justify-self:start}
@media (max-width:620px){.gymrow{grid-template-columns:minmax(0,1fr)}
  .gymrow-stats{justify-content:flex-start}}

/* ---- launch ---- */
/* "· by Hallie Newton" inside a board chip in admin. Same size as the chip so it reads as one
   thing, dimmer so the board name still leads. */
.chip-by{color:var(--ink-3); font-weight:400}

/* The phase selector on an admin website row. .field select carries the look and the hit areas. */
.phasepick{display:flex; flex-direction:column; gap:3px}
.phasepick-label{font-family:var(--display); font-size:12px; font-weight:650; letter-spacing:.01em;
  color:var(--ink-2)}
.phasepick select{padding:7px 30px 7px 11px; border:1px solid var(--line); border-radius:8px;
  background:var(--surface); font-size:14px; min-height:40px; 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 1.5L6 6.5L11 1.5' stroke='%235B6880' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 9px center; background-size:10px 7px}

/* Renaming the phases, in admin. */
.phaserow{align-items:flex-start}
.phase-code{font-family:var(--mono); font-size:11px; color:var(--ink-3); background:var(--sunk);
  padding:1px 6px; border-radius:4px; margin-left:8px; font-weight:400}
.phase-warn{margin-top:6px; font-size:12.5px; color:var(--ink-3)}

/* The build phase, now the first thing in the main column rather than a line in the sidebar.
   Only the "your turn" state is tinted: eight phases all shouting would tell a gym owner nothing,
   and this is the one that is a request rather than a status. */
.phasepanel{display:flex; gap:16px; align-items:flex-start; justify-content:space-between;
  flex-wrap:wrap; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); box-shadow:var(--shadow); padding:18px 20px; margin-bottom:16px}
.phasepanel.waiting{background:var(--accent-soft); border-color:var(--accent-line);
  box-shadow:none}
.phasepanel-main{min-width:0; flex:1 1 320px}
.phasepanel-side{flex:0 0 auto}
.phase-label{font-family:var(--display); font-weight:700; font-size:20px; letter-spacing:-.015em;
  line-height:1.25; display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.phase-flag{font-family:var(--display); font-size:11.5px; font-weight:650; letter-spacing:.01em;
  text-transform:none; color:var(--accent-ink); background:var(--accent);
  border-radius:99px; padding:3px 10px; white-space:nowrap}
.phase-blurb{font-size:15px; color:var(--ink-2); margin-top:7px; line-height:1.55; max-width:62ch}
/* The action the panel exists for. Full width on a phone so it cannot be missed or mis-tapped. */
.phase-cta{margin-top:14px; display:inline-flex; text-decoration:none}
.phase-how{font-size:13.5px; color:var(--ink-2); margin-top:9px; line-height:1.5; max-width:62ch}
.phase-how a{color:var(--accent-2); overflow-wrap:anywhere}
@media (max-width:620px){
  .phasepanel{padding:16px}
  .phase-label{font-size:18px}
  .phase-cta{width:100%; justify-content:center}
}

/* A board with no website edits on it. The bar and the three-way legend are a readout of a list
   that does not exist yet, and "0% done" reads as stalled rather than not-yet-started. */
.prog-none{display:flex; gap:12px; align-items:flex-start; justify-content:space-between;
  margin-top:14px; padding-top:14px; border-top:1px solid var(--line-soft)}
.prog-none p{font-size:13.5px; color:var(--ink-2); line-height:1.5; min-width:0}

/* Who can see this board. Lives in the ~200px rail, so everything wraps and nothing is a grid. */
.boardpeople{display:flex; flex-direction:column; gap:10px; margin-top:10px}
.boardperson{display:flex; align-items:flex-start; gap:8px; justify-content:space-between}
.boardperson-who{display:flex; align-items:flex-start; gap:8px; min-width:0}
.boardperson-who > div{display:flex; flex-direction:column; min-width:0}
.boardperson-name{font-size:13px; color:var(--ink); font-weight:600}
/* 12px, not the 11.5px used by .brand-sub and .acctcreds. Those are labels; these two carry a
   whole address and a whole sentence, and CLAUDE.md puts the floor for that at 12px. The audit
   caught it on all 8 sizes. */
.boardperson-mail{font-family:var(--body); font-size:12px; color:var(--ink-2); overflow-wrap:anywhere}
.boardperson-meta{font-size:12px; color:var(--ink-3); margin-top:2px; line-height:1.4}
.boardperson .btn{flex:0 0 auto}

/* Launch details. The rail is ~200px, and .kv is a two-column grid built for the wider panels —
   in here it squeezed the value column until "heroathletics.com" broke mid-word, and the
   "isn't sure" chip ran straight out of the card over the page beside it. Stacked instead. */
.launchdet dt{font-family:var(--display); font-size:10.5px; font-weight:700; letter-spacing:.09em;
  text-transform:uppercase; color:var(--ink-3); margin-top:9px}
.launchdet dt:first-child{margin-top:0}
.launchdet dd{font-family:var(--body); font-size:12.5px; color:var(--ink); margin-top:2px;
  overflow-wrap:anywhere}
/* A chip is normally one short word; this one is a sentence, so it has to be allowed to wrap. */
.launchdet .chip{display:inline-block; max-width:100%; white-space:normal; text-align:left;
  line-height:1.4; height:auto; padding:3px 8px}
.launchcard{border-color:var(--wait-soft)}
.launchcard.scheduled{border-color:var(--done-soft)}
.launchdate{font-family:var(--display); font-weight:700; font-size:17px; letter-spacing:-.01em; margin-top:7px}
.daylist{display:flex; flex-direction:column; gap:6px}
.day{display:flex; align-items:baseline; gap:9px; padding:11px 13px; border:1px solid var(--line);
  border-radius:9px; background:var(--surface); text-align:left; width:100%}
.day:hover{background:var(--surface-2)}
.day[aria-pressed="true"]{border-color:var(--accent); background:var(--accent-soft)}
.day b{font-family:var(--display); font-size:14px; font-weight:600}
.day span{font-family:var(--body); font-size:10.5px; color:var(--ink-3); margin-left:auto}
.day[aria-pressed="true"] b{color:var(--accent)}

/* ---- page extras ---- */
.donetoggle{padding:8px 18px 10px 46px; border-top:1px solid var(--line-soft); background:var(--surface-2)}
.donetoggle .btn-ghost{opacity:1}
.pagebar{margin-top:14px; display:flex; gap:8px; flex-wrap:wrap}
.pages{margin-top:14px}
.bottomsubmit{margin-top:16px; max-width:420px}
.mailbox code{font-family:var(--mono); font-size:11px}
.banner code{font-family:var(--mono); font-size:11px; background:var(--sunk); padding:1px 4px; border-radius:4px}

/* ---- v3: hidden pages, page head layout ---- */
.page-head{align-items:flex-start}
.page-headmain{min-width:0; flex:1}
.page-headside{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.page-stat{margin-left:0}
.page-note{font-size:12px; color:var(--ink-3); margin-top:4px; font-style:italic}
.pagehide{opacity:0}
.page:hover .pagehide,.page:focus-within .pagehide{opacity:1}
@media (hover:none){.pagehide{opacity:1}}
.page.hiddenpage{border-color:var(--nge-line)}
.page.hiddenpage .page-head{background:var(--nge-soft)}
.page.hiddenpage .page-title::after{
  content:"unlinked"; font-family:var(--body); font-size:9.5px; letter-spacing:.06em;
  text-transform:uppercase; color:var(--nge); background:var(--surface);
  border:1px solid var(--nge-line); border-radius:99px; padding:1px 6px; margin-left:8px;
  vertical-align:2px; font-weight:400;
}
.pagegroup{margin-top:26px; padding-top:18px; border-top:1px solid var(--line)}
.pagegroup h2{font-family:var(--display); font-weight:700; font-size:17px; letter-spacing:-.015em; text-wrap:balance}
.pagegroup p{margin-top:6px; color:var(--ink-2); font-size:13.5px; max-width:62ch}
.pagegroup + .pages{margin-top:12px}
.field .opt{font-family:var(--body); font-size:9.5px; color:var(--ink-3); letter-spacing:.04em; text-transform:none}
@media (max-width:620px){.page-head{flex-wrap:wrap}.page-headside{width:100%; justify-content:flex-start}}

/* ---- v4: team-test affordances ---- */
.testbanner{display:flex; gap:14px; align-items:flex-start; background:var(--ask-soft);
  border:1px solid transparent; border-radius:var(--r-lg); padding:14px 16px; margin-bottom:14px;
  font-size:13px; color:var(--ask); line-height:1.5}
.testbanner strong{color:inherit}
.testbanner em{font-style:normal; font-family:var(--body); font-size:11.5px;
  background:var(--surface); padding:1px 5px; border-radius:5px}
.testbanner .btn-ghost{opacity:1; color:var(--ask); flex:0 0 auto; white-space:nowrap}
.testbanner .btn-ghost:hover{background:var(--surface)}
.acctlist{display:flex; flex-direction:column; gap:6px}
.acctrow{display:flex; align-items:center; gap:11px; width:100%; text-align:left;
  padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface)}
.acctrow:hover{border-color:var(--accent-line); background:var(--surface-2)}
.acctrow.current{border-color:var(--accent); background:var(--accent-soft)}
.acctmain{display:flex; flex-direction:column; min-width:0}
.acctmain b{font-family:var(--display); font-size:14px; font-weight:600}
.acctmain span{font-family:var(--body); font-size:11px; color:var(--ink-3)}
.acctrow .chip{margin-left:auto}
@media (max-width:620px){.testbanner{flex-direction:column}}

/* ================= v5: small screens ================= */

/* tablet and below: rail cards become siblings so they can be reordered
   around the board itself, instead of burying it under a column of cards */
@media (max-width:940px){
  .wrap{grid-template-columns:minmax(0,1fr)}
  .rail{display:contents}

  /* Every rail card needs a number here, and the reason is a bug that shipped: a card with no
     `order` defaults to 0, which sorts *before* everything numbered — so three cards added after
     this block was written (the completed-edits button, the access list, the launch-details form)
     floated above the gym's own name on every phone. A gym owner opened their board and the first
     thing on it was a disabled staff control.
     The board itself is now second, straight after the card that says whose board it is, because
     the phase panel at the top of it is the answer to the only question most people arrive with. */
  .card-gym{order:1}
  main{order:2; min-width:0}
  .card-submit-rail{order:3}
  .card-filters{order:4}
  .card-launch{order:5}
  .card-launchdet{order:6}
  .card-people{order:7}
  .card-done{order:8}

  /* the gym card goes wide and low: name beside the progress figure */
  .card-gym{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 18px; align-items:start}
  .card-gym .eyebrow{grid-column:1}
  .card-gym .gym-name{grid-column:1; font-size:18px}
  .card-gym .gym-meta{grid-column:1}
  .card-gym .prog{grid-column:2; grid-row:1/4; margin-top:0; padding-top:0; border-top:0;
    min-width:190px; text-align:right}
  .card-gym .prog-top{justify-content:flex-end; gap:10px}
  .card-gym .legend{justify-content:flex-end}

  /* filters become a swipeable row */
  .card-filters{padding:12px 0 12px 16px}
  .card-filters .eyebrow{display:none}
  .filters{flex-direction:row; overflow-x:auto; gap:6px; margin-top:0!important;
    padding-right:16px; scrollbar-width:none; -webkit-overflow-scrolling:touch}
  .filters::-webkit-scrollbar{display:none}
  .filt{width:auto; flex:0 0 auto; white-space:nowrap; border:1px solid var(--line);
    border-radius:99px; padding:6px 12px; font-size:13px}
  .filt[aria-pressed="true"]{border-color:var(--accent-line)}
  .filt b{margin-left:6px; color:var(--ink-3)}
  .filt[aria-pressed="true"] b{color:var(--accent)}

  .bottomsubmit{max-width:none}
  .card-submit-bottom{display:none}
}

/* phones */
@media (max-width:640px){
  .wrap{padding:12px; gap:12px}
  .masthead-in{padding:10px 12px; gap:10px}
  .brand{gap:7px}
  .brand-mark{font-size:11.5px; letter-spacing:.1em}
  .brand-sub{display:none}
  .whoami > span:not(.avatar){display:none}
  .whoami{gap:10px}
  .linkish{font-size:13px; padding:4px 0}

  .card-gym{grid-template-columns:minmax(0,1fr)}
  .card-gym .prog{grid-column:1; grid-row:auto; margin-top:12px; padding-top:12px;
    border-top:1px solid var(--line-soft); text-align:left; min-width:0}
  .card-gym .prog-top{justify-content:space-between}
  .card-gym .legend{justify-content:flex-start}

  .intro{padding:16px 16px}
  .intro p{font-size:15px}
  .page-head{padding:12px 14px}
  .item{grid-template-columns:32px minmax(0,1fr); padding:10px 14px 10px 8px}
  .item.child{padding-left:30px}
  .item.child::before{left:20px}
  .tick{--box:22px}
  .tick svg{width:13px; height:13px}
  .item-text{font-size:15.5px}
  .addrow,.addrow.top{padding-left:14px; padding-right:14px}
  .donetoggle{padding-left:14px; padding-right:14px}
  .addform{flex-wrap:wrap}
  .addform textarea{flex:1 1 100%}
  .composer{flex-wrap:wrap}
  .composer textarea{flex:1 1 100%}
  .thread{padding-left:10px}

  /* modals become sheets pinned to the bottom edge */
  .scrim{padding:0; place-items:end stretch}
  .modal,.modal.narrow{max-width:none; border-radius:var(--r-lg) var(--r-lg) 0 0;
    max-height:92vh; display:flex; flex-direction:column}
  .modal-head{padding:16px 16px 12px}
  .modal-head h2{font-size:17px}
  .modal-body{padding:14px 16px; overflow-y:auto; flex:1}
  .modal-foot{padding:12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    flex-direction:column-reverse; align-items:stretch}
  .modal-foot .btn{width:100%}
  .mailbox{max-height:38vh}
  .mailbox pre{font-size:11px}
  .kv{grid-template-columns:minmax(0,1fr)}
  .kv dd{margin-bottom:6px}
  .seg{flex-direction:column}
  .foot{padding:8px 14px 32px}
  .signin-card{padding:22px 18px}
  .signin{padding:16px 12px}
}
.acctcreds{font-family:var(--mono); font-size:12px; color:var(--ink-3); margin-top:2px; word-break:break-all}
.acctrow .chip{margin-left:auto; flex:0 0 auto}

@media (max-width:940px){
  .card-filters{position:relative}
  .card-filters::after{content:""; position:absolute; right:0; top:0; bottom:0; width:28px;
    pointer-events:none; background:linear-gradient(to right, transparent, var(--surface))}
}
@media (max-width:640px){
  .intro details > summary{cursor:pointer; list-style:none; font-family:var(--display);
    font-size:12.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
    color:var(--accent); margin-top:10px; display:flex; align-items:center; gap:6px}
  .intro details > summary::-webkit-details-marker{display:none}
  .intro details > summary::after{content:"+"; font-family:var(--body); font-weight:400; font-size:14px}
  .intro details[open] > summary::after{content:"\2013"}
}
.intro details > summary{list-style:none; cursor:pointer; font-family:var(--display);
  font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-3); margin-top:14px; display:none}
.intro details[open] .steps{margin-top:10px}

/* ---- v5 fix: the "How this works" summary must beat the desktop rule that
   hides it, so it has to come after that rule in source order ---- */
@media (max-width:640px){
  .intro details > summary{display:flex}
  .item-foot{gap:6px}
  .item-foot .btn-ghost{padding:4px 6px; font-size:12px}
  .chip{font-size:10px}
}

/* ================= v6: brand lockup ================= */
/* The real CGM artwork, embedded as a data URI (published artifacts cannot load
   external images). It sits on a white plate because the wordmark is navy and
   would disappear against the dark theme's ground. */
.lockup{display:inline-flex; align-items:center; background:#fff; border-radius:8px;
  padding:5px 9px; box-shadow:0 0 0 1px rgba(10,43,109,.10)}
.lockup img{display:block; height:24px; width:auto}
.lockup-lg{padding:14px 20px; border-radius:14px; box-shadow:0 0 0 1px rgba(10,43,109,.08)}
.lockup-lg img{height:auto; width:210px}
.brand{align-items:center}
@media (max-width:640px){
  .lockup{padding:4px 8px}
  .lockup img{height:21px}
  .lockup-lg{padding:12px 16px}
  .lockup-lg img{width:172px; height:auto}
}

/* ================= v6: admin ================= */
.adminnav{display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap}
.adminnav button{padding:7px 14px; border:1px solid var(--line); border-radius:99px;
  font-family:var(--display); font-weight:600; font-size:13px; color:var(--ink-2); background:var(--surface)}
.adminnav button[aria-pressed="true"]{background:var(--accent); border-color:transparent; color:var(--accent-ink)}
/* ---- filter + search above a long admin list ----
   Above the @media (pointer: coarse) block, deliberately: equal specificity means later wins. */

/* A label that only a screen reader reads. The search boxes have a placeholder, which is not a
   label — it disappears the moment somebody types and was never announced as one. */
.vh{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.adminfilter{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px;
  padding-bottom:12px; border-bottom:1px solid var(--line-soft);
}
.adminfilter-chips{display:flex; gap:6px; flex-wrap:wrap}
.filtchip{
  display:inline-flex; align-items:center; gap:6px; padding:6px 11px; border-radius:99px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-2);
  font-family:var(--display); font-weight:600; font-size:13px;
}
.filtchip:hover{background:var(--surface-2); color:var(--ink)}
.filtchip[aria-pressed="true"]{background:var(--accent-soft); border-color:var(--accent); color:var(--accent)}
.filtchip b{font-weight:500; font-size:11.5px; font-variant-numeric:tabular-nums; opacity:.8}
.adminsearch{display:flex; align-items:center; gap:6px; margin-left:auto; min-width:0}
.adminsearch input{
  width:260px; max-width:100%; padding:8px 11px; border:1px solid var(--line); border-radius:8px;
  background:var(--surface); font-family:var(--body); font-size:13.5px; color:var(--ink);
}
.adminsearch input::placeholder{color:var(--ink-3)}
.adminsearch input:focus{border-color:var(--accent-2); outline:none; box-shadow:0 0 0 3px var(--accent-soft)}
/* "12 of 57" — the answer to "is this everything?", which a filtered list otherwise never gives. */
.adminfilter-n{font-size:12.5px; color:var(--ink-3); font-variant-numeric:tabular-nums; flex-basis:100%}

.adminhead{display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; margin-bottom:12px}
.adminhead h2{font-family:var(--display); font-weight:700; font-size:19px; letter-spacing:-.015em}
.adminhead p{font-size:13px; color:var(--ink-2); margin-top:4px; max-width:60ch}
.adminhead .btn{margin-left:auto}
.rows{display:flex; flex-direction:column; gap:8px}
.row{display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  box-shadow:var(--shadow); padding:13px 16px}
.rowmain{min-width:0; display:flex; flex-direction:column; gap:3px}
.rowname{font-family:var(--display); font-weight:700; font-size:14.5px; display:flex;
  align-items:center; gap:8px; flex-wrap:wrap}
.rowmeta{font-family:var(--body); font-size:12px; color:var(--ink-3); word-break:break-all}
.rowtags{display:flex; gap:5px; flex-wrap:wrap; margin-top:3px}
.rowact{display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end}
.chip.role{background:var(--accent-soft); color:var(--accent); border:1px solid var(--accent-line)}
.chip.role.client{background:var(--done-soft); color:var(--done); border-color:transparent}
.chip.role.coach{background:var(--nge-soft); color:var(--nge); border-color:var(--nge-line)}
.chip.status{background:var(--sunk); color:var(--ink-3)}
/* The package, beside a gym's name on the admin list. Neutral on purpose — the coloured chips on
   that row are people, and a package reading like one of them would invite the wrong scan. */
.chip.pkg{background:var(--sunk); color:var(--ink-2); border:1px solid var(--line);
  font-family:var(--body); font-weight:500}
/* The same fact on the board itself, first in the gym's details and weighted a little above the
   city and the staging link it sits with. */
.gym-meta .gym-pkg{font-weight:600; color:var(--ink)}
/* Above the @media (pointer: coarse) block at line ~933, deliberately: equal specificity means
   later wins, and a rule appended to the end of this file silently overrides the touch sizing. */
.picknote{font-size:12.5px; color:var(--ink-3); margin:0 0 8px; line-height:1.45}
.boardpick{display:flex; flex-direction:column; gap:6px; max-height:210px; overflow-y:auto;
  border:1px solid var(--line); border-radius:10px; padding:8px}
.boardpick label{display:flex; align-items:center; gap:9px; padding:6px 8px; border-radius:8px;
  font-size:13.5px; cursor:pointer}
.boardpick label:hover{background:var(--surface-2)}
.boardpick input{width:16px; height:16px; accent-color:var(--accent-2); flex:0 0 auto}
/* A single checkbox with a line of explanation under it — "Also an Academy coach" in the People
   modal. Above the @media (pointer: coarse) block deliberately: equal specificity means later
   wins, so the touch sizing further down has to come after this to survive. */
.checkline{display:flex; align-items:center; gap:10px; padding:4px 0; font-size:13.5px;
  cursor:pointer; font-weight:500}
.checkline input{width:16px; height:16px; accent-color:var(--accent-2); flex:0 0 auto}
.checkline small{display:block; color:var(--ink-3); font-size:12.5px; line-height:1.45;
  margin-top:2px; font-weight:400}
.inline-two{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.codefield{display:flex; gap:8px; align-items:flex-end}
.codefield .field{flex:1}
.danger{color:#B4232E}
:root[data-theme="dark"] .danger,:root:not([data-theme="light"]) .danger{color:#F58A93}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .danger{color:#B4232E}}
.modal-foot .danger{margin-right:auto}
@media (max-width:640px){
  .row{grid-template-columns:auto minmax(0,1fr)}
  .rowact{grid-column:1/-1; justify-content:flex-start}
  .inline-two{grid-template-columns:1fr}
  .modal-foot .danger{margin-right:0}
}

/* ================= v7: chart tokens (validated) =================
   light  #077fdb / #2C7A17 on #FFFFFF - all six checks pass
   dark   #2E8FE0 / #4FA83A on #111A2C - all six checks pass
   Every bar is direct-labelled and named, so identity never rests on hue alone. */
:root{ --chart-open:#077fdb; --chart-launched:#2C7A17; --chart-planned:#C9D8EA;
  /* The build leg. Neutral on purpose: blue and green already carry the meaning, and the point of
     this segment is how much calendar time went before either of them started. */
  --chart-build:#5B6880;
  /* The queue: warm, so a backlog reads differently from work at a glance. */
  --chart-queue:#9A6B1E; }
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --chart-open:#2E8FE0; --chart-launched:#4FA83A; --chart-planned:#28374F;
  --chart-build:#8B98B2; --chart-queue:#D8A54A; }}
:root[data-theme="dark"]{ --chart-open:#2E8FE0; --chart-launched:#4FA83A; --chart-planned:#28374F;
  --chart-build:#8B98B2; --chart-queue:#D8A54A; }

/* ---- explicit Website / NGE control ---- */
.catpick{display:inline-flex; border:1px solid var(--line); border-radius:99px; overflow:hidden}
.catbtn{font-family:var(--body); font-size:10.5px; padding:3px 9px; color:var(--ink-3);
  background:var(--surface); transition:background .12s ease,color .12s ease}
.catbtn + .catbtn{border-left:1px solid var(--line)}
.catbtn:hover{background:var(--surface-2); color:var(--ink-2)}
.catbtn[aria-pressed="true"]{background:var(--accent-soft); color:var(--accent); font-weight:500}
.catbtn[data-c="nge"][aria-pressed="true"]{background:var(--nge-soft); color:var(--nge)}

/* ---- edit lock ---- */
.lockbanner{display:flex; gap:14px; background:var(--surface); border:1px solid var(--wait);
  border-left-width:4px; border-radius:var(--r-lg); padding:16px 18px; box-shadow:var(--shadow)}
.lockbanner h3{font-family:var(--display); font-weight:700; font-size:15.5px; color:var(--wait)}
.lockbanner p{font-size:13.5px; color:var(--ink-2); margin-top:7px; max-width:64ch; line-height:1.55}
.lockbanner a{color:var(--accent-2)}

/* ---- launch confirmation ---- */
.videobox{background:var(--sunk); border:1px solid var(--line); border-radius:var(--r);
  aspect-ratio:16/9; display:grid; place-items:center; text-align:center}
.videoinner{display:flex; flex-direction:column; align-items:center; gap:7px}
.playmark{width:46px; height:46px; border-radius:50%; background:var(--accent); color:var(--accent-ink);
  display:grid; place-items:center}
.playmark svg{width:22px; height:22px; margin-left:2px}
.videoinner b{font-family:var(--display); font-size:15px; font-weight:700}
.videoinner span{font-family:var(--body); font-size:12px; color:var(--ink-3)}
.nextsteps{display:flex; flex-direction:column; gap:10px; counter-reset:ns}
.nextsteps li{display:flex; gap:11px; font-size:13.5px; color:var(--ink-2); line-height:1.5; align-items:flex-start}
.nextsteps li::before{counter-increment:ns; content:counter(ns); flex:0 0 auto; width:20px; height:20px;
  border-radius:50%; background:var(--accent-soft); color:var(--accent); font-family:var(--body);
  font-size:11px; display:grid; place-items:center; margin-top:1px}
.nextsteps b{color:var(--ink); font-weight:600}
.mailfold summary{font-family:var(--display); font-size:11px; font-weight:700; letter-spacing:.09em;
  text-transform:uppercase; color:var(--ink-3); cursor:pointer}
.mailfold summary:hover{color:var(--ink)}
.daynote{font-size:12px; color:var(--ink-3); margin-top:10px; line-height:1.5}

/* ---- review-to-launch tracker ---- */
.tiles{display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px}
.tile{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  box-shadow:var(--shadow); padding:14px 16px; display:flex; flex-direction:column; gap:3px}
.tilelabel{font-family:var(--display); font-size:10.5px; font-weight:700; letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-3)}
.tilenum{font-family:var(--display); font-weight:700; font-size:29px; letter-spacing:-.03em;
  font-variant-numeric:tabular-nums; line-height:1.1}
.tilenum small{font-family:var(--body); font-weight:400; font-size:12px; color:var(--ink-3);
  letter-spacing:0; margin-left:5px}
.tilesub{font-size:12px; color:var(--ink-3)}
.chartlegend{display:flex; gap:16px; flex-wrap:wrap; margin-bottom:14px}
.chartlegend span{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--ink-3)}
.sw{width:11px; height:11px; border-radius:3px; display:block}
.sw.queue{background:var(--chart-queue)}
.sw.build{background:var(--chart-build)}
.sw.open{background:var(--chart-open)}
.sw.launched{background:var(--chart-launched)}
.sw.planned{background:var(--chart-planned)}
.tbars{display:flex; flex-direction:column; gap:12px}
.tbar{display:grid; grid-template-columns:minmax(120px,1.1fr) minmax(0,3fr) auto;
  gap:6px 12px; align-items:center}
.tbar-name{font-family:var(--display); font-weight:600; font-size:13.5px; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tbar-track{position:relative; height:14px; background:var(--sunk); border-radius:4px; overflow:hidden}
/* Square: these stack three deep now, and a rounded cap on each one puts a notch at every
   join. The track is `overflow:hidden` with its own radius, so the outer ends still round. */
.tbar-fill{position:absolute; left:0; top:0; height:100%; border-radius:0;
  box-shadow:0 0 0 2px var(--surface)}
/* Square right edge: this leg is either finished and butted against the review leg, or
   still running, and a rounded cap on a bar that is still growing reads as done. */
.tbar-fill.queue{background:var(--chart-queue)}
.tbar-fill.build{background:var(--chart-build)}
.tbar-fill.open{background:var(--chart-open)}
.tbar-fill.launched{background:var(--chart-launched)}
.tbar-planned{position:absolute; left:0; top:0; height:100%; background:var(--chart-planned); border-radius:0 4px 4px 0}
.tbar-val{font-family:var(--body); font-size:13px; font-variant-numeric:tabular-nums; color:var(--ink)}
.tbar-val small{color:var(--ink-3); font-size:11px}
.tbar-note{grid-column:2/-1; font-family:var(--body); font-size:12px; color:var(--ink-3); margin-top:-2px}
.tnote{font-size:12px; color:var(--ink-3); margin-top:12px}
.card-done .btn-primary{background:var(--accent)}
@media (max-width:640px){
  .tbar{grid-template-columns:minmax(0,1fr) auto}
  .tbar-track{grid-column:1/-1; order:3}
  .tbar-note{grid-column:1/-1; order:4}
  .lockbanner{padding:14px}
}
.nextsteps li > span{min-width:0}

/* ================= v8: client setup checklist ================= */
.confetti{position:fixed; inset:0; z-index:140; pointer-events:none}

.todocard{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  box-shadow:var(--shadow); margin-top:14px; overflow:hidden;
  border-left:4px solid var(--green)}
.todocard.alldone{border-left-color:var(--done)}
.todohead{display:flex; gap:20px; align-items:flex-start; padding:18px 20px 14px}
.todohead h2{font-family:var(--display); font-weight:700; font-size:19px; letter-spacing:-.02em;
  margin-top:5px; text-wrap:balance}
.todosub{font-size:15px; color:var(--ink-2); margin-top:6px; max-width:62ch; line-height:1.55}
.todosub strong{color:var(--ink); font-weight:600}
.todoprog{margin-left:auto; display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex:0 0 auto}
.todoprog-num{font-family:var(--display); font-weight:700; font-size:26px; letter-spacing:-.03em;
  font-variant-numeric:tabular-nums; line-height:1}
.todoprog-num small{font-family:var(--body); font-weight:400; font-size:13px; color:var(--ink-3); letter-spacing:0}
.todoprog-bar{width:92px; height:7px; border-radius:99px; background:var(--sunk); overflow:hidden; display:block}
.todoprog-bar i{display:block; height:100%; background:var(--green); transition:width .35s ease}

/* ---- onboarding calls -------------------------------------------------------------------
   Above the @media (pointer: coarse) touch block, deliberately: equal specificity means later
   wins, so rules appended to the end of this file silently shrink every phone tap target
   (CLAUDE.md, CSS traps). .call reuses .tick, which that block already sizes to 44px. */
.callcard{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  border-left:3px solid var(--accent-2); margin-top:14px; overflow:hidden}
.calls{border-top:1px solid var(--line-soft)}
.call{display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:13px; align-items:center;
  padding:12px 16px; border-bottom:1px solid var(--line-soft)}
.call:last-child{border-bottom:0}
.call.done .call-title{color:var(--ink-3)}
.call-body{min-width:0; display:flex; flex-direction:column; gap:4px}
.call-title{font-size:15px; font-weight:500; line-height:1.4}
.call-meta{display:flex; gap:6px; flex-wrap:wrap}
/* Visually distinct from anything the gym wrote: this is CGM talking about them, and on a shared
   screen it needs to be obvious at a glance which lines the client can see. */
.call-note{font-size:12.5px; line-height:1.45; color:var(--ink-2); margin:2px 0 0;
  background:var(--surface-2); border:1px dashed var(--line); border-radius:8px; padding:6px 9px}
.call-note b{font-family:var(--body); font-size:10.5px; text-transform:uppercase;
  letter-spacing:.04em; color:var(--ink-3); margin-right:6px}
.call-act{display:flex; gap:4px; flex-wrap:wrap; justify-content:flex-end}
/* Above the touch block, like everything else here. The buttons inherit .btn-sm, which that block
   already grows to 44px, so these only need to sit together and stay narrow. */
/* Above the touch block, like everything else here (CLAUDE.md, CSS traps).
   Layer order matters: this sits at 30 alongside the masthead, deliberately below the nudge bar at
   70 and the modal scrim at 100, so it can never cover a modal's buttons on a short screen. */
.previewbar{position:sticky; top:0; z-index:30; display:flex; gap:12px; align-items:center;
  justify-content:center; flex-wrap:wrap; padding:9px 16px; font-size:13px; line-height:1.4;
  background:var(--accent-soft); border-bottom:1px solid var(--accent-line); color:var(--ink)}
.previewbar strong{font-weight:650}
/* While previewing, the bar is the sticky thing and the masthead is not. Two elements stuck to
   top:0 with the same z-index means the later one wins, and the later one is the masthead — so
   scrolling swallowed the only notice that this was a preview. */
body.previewing .masthead{position:static}
/* A labelled column, so the two options read as a pair of controls rather than loose words.
   The rail is narrow: side by side they wrapped mid-phrase, which is how the first version ended
   up looking like prose. */
.previewpick{margin-top:14px; padding-top:14px; border-top:1px solid var(--line-soft)}
.previewpick .btn{width:100%}
/* The role picker stacks: side by side in a narrow modal the second line wraps mid-phrase. */
.seg-stack{flex-direction:column}
.movearrows{display:inline-flex; gap:2px}
.movearrows .btn{min-width:30px; padding-left:8px; padding-right:8px; font-family:var(--body)}
.movearrows .btn[disabled]{opacity:.35; cursor:default}
.call-act .btn-ghost{opacity:1; color:var(--accent-2); font-weight:600}
.callcal{padding:14px 16px 16px; border-top:1px solid var(--line-soft)}
.callcal-shut{display:flex; flex-direction:column; align-items:flex-start; gap:2px}
.callcal-shut .btn{min-height:44px; padding-left:20px; padding-right:20px}
@media (max-width:620px){.callcal-shut .btn{width:100%; justify-content:center}}
/* A starting height, not the final one. GHL's form_embed.js sets an inline height once the widget
   reports its own, and an inline style beats a stylesheet — so this must not be !important or the
   resize silently does nothing. When the script is blocked (Safari, third-party cookies) these are
   what the client gets, so they have to be usable on their own: tall enough for a month view on a
   phone, and capped so it does not swallow a desktop screen. */
.callcal-frame{width:100%; height:78vh; min-height:560px; max-height:900px;
  border:1px solid var(--line); border-radius:var(--r);
  background:var(--surface-2); display:block}
/* Always rendered, never conditionally revealed. A blocked embed is an empty box with no load
   event to hook, so the link has to be there already. */
.callcal-fallback{font-size:13px; color:var(--ink-3); margin:9px 0 0; line-height:1.45}
.callcal-fallback a,.callcal-fallback .linkish{color:var(--accent-2); font-weight:600; font-size:inherit}
.todos{border-top:1px solid var(--line-soft)}
.todo{display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:13px; align-items:center;
  padding:13px 20px; border-bottom:1px solid var(--line-soft)}
.todo:last-child{border-bottom:0}
.todo.done{background:var(--surface-2)}
.tick-lg{width:24px; height:24px; border-radius:7px; border-width:2px; margin-top:0}
.tick-lg svg{width:15px; height:15px}
.todo-body{min-width:0; display:flex; flex-direction:column; gap:2px}
.todo-title{font-size:15px; font-weight:500; line-height:1.4}
.todo.done .todo-title{color:var(--ink-3); font-weight:400}
.todo-meta{font-family:var(--body); font-size:10.5px; color:var(--done)}
.todo-act{display:flex; gap:4px; flex-wrap:wrap; justify-content:flex-end}
.todo-act .btn-ghost{opacity:1; color:var(--accent-2); font-weight:600}
.todo-act .btn-ghost:hover{background:var(--accent-soft)}
.todo.done .todo-act .btn-ghost{color:var(--ink-3); font-weight:400}
.todofoot{display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding:12px 20px 16px; border-top:1px solid var(--line-soft); background:var(--surface-2)}
.todonote{font-size:12.5px; color:var(--ink-3)}

.modal-head .eyebrow{margin-bottom:4px}
.modal-head em{font-style:normal; font-family:var(--body); font-size:11.5px;
  background:var(--sunk); padding:1px 5px; border-radius:5px}
.helpbody{display:flex; flex-direction:column; gap:11px}
.helpbody p{font-size:14px; color:var(--ink-2); line-height:1.6}
.helpbody ul{display:flex; flex-direction:column; gap:7px; padding-left:2px}
.helpbody li{display:flex; gap:10px; font-size:14px; color:var(--ink-2); line-height:1.55}
.helpbody li::before{content:""; flex:0 0 auto; width:6px; height:6px; border-radius:50%;
  background:var(--green); margin-top:8px}
.field textarea{padding:10px 12px; border:1px solid var(--line); border-radius:9px;
  background:var(--surface); font-size:14px; font-family:var(--body); resize:vertical; line-height:1.55}

@media (max-width:640px){
  .todohead{flex-direction:column; gap:12px; padding:16px}
  .todoprog{margin-left:0; flex-direction:row; align-items:center; gap:10px}
  .todo{grid-template-columns:auto minmax(0,1fr); padding:13px 16px}
  .todo-act{grid-column:2; justify-content:flex-start; margin-top:2px}
  .todofoot{padding:12px 16px 16px}

  /* The calls panel needed the same treatment and never got it: with the staff controls holding a
     third column, the title column collapsed to about forty pixels and "Onboarding Call 1 - Tech
     Set up" came out one word per line, with the CGM note in a ribbon beside it. Actions drop to
     their own row under the title, exactly as the checklist does. */
  .call{grid-template-columns:auto minmax(0,1fr); padding:13px 16px}
  .call-act{grid-column:2; justify-content:flex-start; margin-top:4px}
  .callcard .todohead{padding:16px}
  .callcal{padding:14px 16px 16px}
}

/* ================= v10: don't let them forget to submit =================
   Three layers, because colour alone gets ignored: the button says what and how
   many, a bar follows them down the page, and leaving the board asks first. */
:root{ --alert:#C42B1C; --alert-ink:#fff; --alert-soft:#FDECEA; --alert-line:#F3B8B1; }
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --alert:#F4776A; --alert-ink:#2A0805; --alert-soft:#2E1512; --alert-line:#5A2620; }}
:root[data-theme="dark"]{
  --alert:#F4776A; --alert-ink:#2A0805; --alert-soft:#2E1512; --alert-line:#5A2620; }

.btn-alert{background:var(--alert); color:var(--alert-ink); border-color:transparent; width:100%}
.btn-alert:hover{background:var(--alert); filter:brightness(1.08)}
.btn-alert .pill-count{background:rgba(255,255,255,.26)}
:root[data-theme="dark"] .btn-alert .pill-count,
:root:not([data-theme="light"]) .btn-alert .pill-count{background:rgba(0,0,0,.18)}
.modal-foot .btn-alert{width:auto}
.card-submit.hot,.card-done.hot{border-color:var(--alert-line)}
.card-submit.hot .eyebrow,.card-done.hot .eyebrow{color:var(--alert)}

/* the bar */
.nudgebar{position:fixed; left:0; right:0; bottom:0; z-index:70;
  background:var(--surface); border-top:2px solid var(--alert);
  box-shadow:0 -8px 28px -14px rgba(10,43,109,.35)}
.nudgebar-in{max-width:1240px; margin:0 auto; padding:12px 24px;
  display:flex; align-items:center; gap:16px}
.nudgetext{display:flex; flex-direction:column; gap:2px; min-width:0}
.nudgetext b{font-family:var(--display); font-weight:700; font-size:14.5px; letter-spacing:-.005em}
.nudgetext span{font-size:12.5px; color:var(--ink-2)}
.nudgeacts{margin-left:auto; display:flex; align-items:center; gap:8px; flex:0 0 auto}
.nudgeacts .btn-alert{width:auto; white-space:nowrap}
.nudgeshrink{width:28px; height:28px; border-radius:7px; color:var(--ink-3);
  font-family:var(--body); font-size:16px; line-height:1; display:grid; place-items:center; flex:0 0 auto}
.nudgeshrink:hover{background:var(--sunk); color:var(--ink)}
.nudgedot{display:grid; place-items:center; flex:0 0 auto;
  min-width:20px; height:20px; padding:0 6px; border-radius:99px;
  background:var(--alert); color:var(--alert-ink);
  font-family:var(--body); font-size:11.5px; font-variant-numeric:tabular-nums}
.nudgedot.big{min-width:30px; height:30px; font-size:14px}
body.has-nudge{padding-bottom:88px}

/* shrunk to a pill - dismissable, but never gone */
.nudgepill{position:fixed; right:20px; bottom:20px; z-index:70}
.nudgepill button{display:flex; align-items:center; gap:9px;
  background:var(--alert); color:var(--alert-ink); border-radius:99px;
  padding:10px 18px 10px 12px; font-family:var(--display); font-weight:600; font-size:13.5px;
  box-shadow:var(--shadow-lift)}
.nudgepill .nudgedot{background:rgba(255,255,255,.26); color:var(--alert-ink)}
:root[data-theme="dark"] .nudgepill .nudgedot,
:root:not([data-theme="light"]) .nudgepill .nudgedot{background:rgba(0,0,0,.2)}
.nudgepill button:hover{filter:brightness(1.08)}
body.has-nudgepill{padding-bottom:76px}

/* one gentle pulse on arrival, never a loop */
@keyframes nudgein{
  from{transform:translateY(100%)}
  to{transform:translateY(0)}
}
@keyframes hotpulse{
  0%{box-shadow:0 0 0 0 var(--alert-line)}
  70%{box-shadow:0 0 0 9px rgba(196,43,28,0)}
  100%{box-shadow:0 0 0 0 rgba(196,43,28,0)}
}
.nudgebar{animation:nudgein .3s cubic-bezier(.2,.8,.2,1)}
.card-submit.hot .btn-alert,.card-done.hot .btn-alert{animation:hotpulse 2.2s ease-out 2}
@media (prefers-reduced-motion:reduce){
  .nudgebar,.card-submit.hot .btn-alert,.card-done.hot .btn-alert{animation:none}
}

@media (max-width:860px){
  .nudgebar-in{padding:11px 14px calc(11px + env(safe-area-inset-bottom, 0px)); gap:11px; flex-wrap:wrap}
  .nudgetext span{display:none}
  .nudgeacts{width:100%; margin-left:0}
  .nudgeacts .btn-alert{flex:1}
  .nudgeshrink{order:1; margin-left:0; flex:0 0 auto}
  body.has-nudge{padding-bottom:132px}
  .nudgepill{right:12px; bottom:12px}
}

/* ---- v11: toast actions + "what was sent" ---- */
.toast-acts{display:flex; align-items:center; gap:12px; text-align:left; padding:10px 12px 10px 16px}
.toastbtn{font-family:var(--display); font-weight:600; font-size:12.5px; color:var(--ground);
  background:rgba(255,255,255,.16); padding:5px 11px; border-radius:99px; white-space:nowrap;
  pointer-events:auto}
.toastbtn:hover{background:rgba(255,255,255,.28)}
:root[data-theme="dark"] .toastbtn,:root:not([data-theme="light"]) .toastbtn{background:rgba(0,0,0,.22)}
:root[data-theme="dark"] .toastbtn:hover,:root:not([data-theme="light"]) .toastbtn:hover{background:rgba(0,0,0,.34)}
.toaststack{pointer-events:none}
.toast-acts{pointer-events:auto}
.sentlink{font-family:var(--body); font-size:10.5px; color:var(--accent-2);
  text-decoration:underline; text-underline-offset:2px}
.sentlink:hover{color:var(--accent)}
@media (max-width:640px){
  .toast-acts{flex-wrap:wrap; border-radius:14px}
}

/* ================= v13: touch ergonomics and small-screen legibility =================
   Two separate concerns, so two separate queries:
   - pointer:coarse  → hit areas. Catches iPad landscape at 1024px, which a
     width query would miss, and leaves mouse-driven desktop alone.
   - max-width:900px → text that is legible on a desk but not in a gym lobby. */

/* mouse/desktop baselines — these must sit BEFORE the pointer:coarse block below,
   or source order lets them beat the touch hit areas (they did, once).
   24px is the WCAG 2.2 minimum for a pointer target. */
.acctrow .acctcreds{font-size:12px}
.linkish{min-height:26px; display:inline-flex; align-items:center}
.page-url,.gym-meta a,.sentlink{min-height:24px; display:inline-flex; align-items:center}
.catbtn{min-height:24px}
.btn-sm{min-height:26px}

.field select{min-height:24px}

/* The checkbox is a 26px button wrapped around a 19px visual box, so the target
   clears 24px without the box growing. Touch swaps both numbers below. */
.tick{
  --hit:26px; --box:19px;
  width:var(--hit); height:var(--hit); margin:-1.5px 0 -3.5px -3.5px; padding:0;
  border:0; background:transparent; border-radius:0; position:relative;
  display:grid; place-items:center;
}
.tick::before{
  content:""; width:var(--box); height:var(--box); border-radius:5px;
  border:1.5px solid var(--line); background:var(--surface);
  transition:background .12s,border-color .12s;
}
.tick[aria-checked="true"]{background:transparent; border-color:transparent}
.tick:hover:not(:disabled){border-color:transparent}
.tick:hover:not(:disabled)::before{border-color:var(--green)}
.tick[aria-checked="true"]::before{background:var(--green); border-color:var(--green)}
.tick svg{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%)}
.tick-lg{--hit:32px; --box:24px; margin:-4px 0 -4px -4px}
.tick-lg::before{border-radius:7px; border-width:2px}

@media (pointer: coarse){
  /* header nav: these are the primary navigation on a phone */
  .linkish{min-height:40px; display:inline-flex; align-items:center; padding:0 4px; font-size:14px}
  .masthead-in{gap:6px}

  /* 44px of real button, same visual box */
  .tick{--hit:44px; --box:22px; margin:-11px 0 -11px -11px}
  .tick-lg{--hit:48px; --box:26px; margin:-11px 0 -11px -11px}


  /* Eleven numbers on a phone: 44px tall, wrapping to two rows rather than shrinking to slivers. */
  .npsnum{min-height:44px; min-width:44px}

  /* Filter chips and the search box are primary controls on the admin screens. */
  .filtchip{min-height:40px; padding:8px 14px}
  .adminsearch input{min-height:44px; width:100%}
  .adminsearch{margin-left:0; width:100%}

  /* The × on a screenshot stays a 24px circle and grows an invisible 44px target around it.
     A transparent ::after rather than a bigger button, because the circle sits on the corner of
     the image and a button that size would cover it. Removing the wrong picture because the
     target was 24px on a phone is the bug this prevents. */
  .shotx::after{content:""; position:absolute; inset:-10px}

  /* links that open the staging site were 17px of tappable height */
  .page-url,.gym-meta a,.sentlink{display:inline-flex; align-items:center; min-height:40px}
  .rowmeta a{min-height:40px; display:inline-flex; align-items:center}

  /* small text buttons */
  .btn-sm{min-height:44px; padding-left:14px; padding-right:14px}
  .catbtn{min-height:40px; padding:0 13px; font-size:12px}
  .nudgeshrink{width:40px; height:40px}
  .toastbtn{min-height:44px; display:inline-flex; align-items:center; padding:0 12px}
  .adminnav button{min-height:40px}
  .filt{min-height:40px}
  .day{min-height:52px}

  /* real checkboxes in the board picker */
  .boardpick input{width:24px; height:24px}
  .boardpick label{min-height:44px}
  .checkline input{width:24px; height:24px}
  .checkline{min-height:44px}

  /* the row action buttons stop hiding on devices with no hover */
  .item-foot .btn-ghost,.pagehide{opacity:1}

  /* The comment box was 38px and the add-an-edit box exactly 40px — one under the touch floor and
     one on the knife edge of it. Found by the Phase 2 audit, which opens a comment thread and the
     add-an-edit composer; the prototype's audit never opened either, so this was never caught.
     Inside this block, so it stays below the mouse baselines and keeps beating them on touch. */
  .field select{min-height:44px}
  .phasepick select{min-height:44px}
  .field input{min-height:44px}
  .composer textarea{min-height:44px}
  .addform textarea{min-height:44px}
}

@media (max-width: 900px){
  /* meta lines that carry real content — emails, codes, URLs, dates */
  .rowmeta{font-size:12.5px}
  .acctcreds{font-size:12px}
  .gymrow-url{font-size:12.5px}
  .tbar-note{font-size:12px}
  .submit-note{font-size:13px}
  .todonote{font-size:13px}
  .daynote{font-size:12.5px}
  .tilesub{font-size:12.5px}
  .chip{font-size:12px}
  .gymrow-launch{font-size:12px}
  .field label{font-size:12px}
  .demo p{font-size:12.5px}
  .foot{font-size:12px}
  .msg-text{font-size:15px}
  .item-text{font-size:14.5px}
  .todo-meta{font-size:11.5px}
  .lockbanner p{font-size:14px}
  .nudgetext b{font-size:15px}
}

/* iPad portrait and up keeps the two-up form rows, but the seg controls
   need room to breathe once the labels wrap */
@media (min-width: 641px) and (max-width: 900px){
  .seg{flex-direction:row}
  .seg button{padding:11px 12px}
  .seg span{font-size:12px}
}

/* a toast must never land on the nudge bar's own submit button */
body.has-nudge .toaststack{bottom:calc(100px + env(safe-area-inset-bottom, 0px))}
body.has-nudgepill .toaststack{bottom:calc(88px + env(safe-area-inset-bottom, 0px))}
@media (max-width:860px){
  body.has-nudge .toaststack{bottom:calc(144px + env(safe-area-inset-bottom, 0px))}
}

/* v13b: prose line-height on touch */
/* inline links inside prose can't be inflated without wrecking the line, so give
   the line itself more room on touch instead */
@media (pointer: coarse){
  .item-text{line-height:1.7}
  .msg-text{line-height:1.7}
  .helpbody p{line-height:1.75}
}
