/* Basin Combat Club: front desk (a Fightplan Studio concept app, 2026-11-21, KD-58 portfolio).
   Basin's own look (basin.fightplanstudio.com, "Concrete & Volt"): charcoal, bone, one volt accent; Anton + Inter;
   square buttons, round chips, hairline rules. Every lead and number is invented; desk.js holds them.
   One layout model: the app fills the window (100dvh) and only its panels scroll.
     Wide (1000 px and up): the week's numbers, then the four stage columns with today's list on the right.
     Narrow: the week's numbers, then tabs (Today and the four stages), one panel at a time.
   html.embed (?embed=1): inside the case page's frame; the demo strip is left to the page around it.
   Reduced motion: desk.js skips every move, and the few CSS transitions below are switched off. */

:root{
  color-scheme:dark;
  --bg:#121314; --surf:#1b1d1f; --surf-2:#232628; --surf-3:#2c2f32;
  --fg:#f1f1ee; --fg-2:#c9cac6; --muted:#9a9c98;
  --line:rgba(255,255,255,.1); --line-2:rgba(255,255,255,.18);
  --volt:#d7ff3a; --on-volt:#111; --ok:#2ecc71;
  --disp:'Anton',Impact,'Arial Narrow',sans-serif; --body:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --ease:cubic-bezier(.2,0,0,1);
  --pad:clamp(14px,2.2vw,24px);
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--fg);font:400 15px/1.45 var(--body);-webkit-font-smoothing:antialiased;
  -webkit-text-size-adjust:100%;display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden}
button{font:inherit;color:inherit}
a{color:inherit}
:focus-visible{outline:2px solid var(--volt);outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip{position:absolute;left:-999px;top:8px;z-index:99;background:var(--volt);color:var(--on-volt);padding:10px 16px;font-weight:700;text-decoration:none}
.skip:focus{left:8px}

/* ---------- The demo strip (standalone only) ---------- */
.demo{flex:none;margin:0;padding:8px var(--pad);background:var(--volt);color:var(--on-volt);font:600 13px/1.35 var(--body);text-align:center}
.demo a{font-weight:700;text-underline-offset:2px}
.demo .short{display:none}
.embed .demo{display:none}

/* ---------- The app ---------- */
.app{flex:1;min-height:0;display:flex;flex-direction:column}
.js-off .app{display:none}

/* top bar: the gym's mark, where you are, the demo clock */
.bar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:8px var(--pad);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:14px;min-width:0}
.logo{font:400 23px/1 var(--disp);text-transform:uppercase;letter-spacing:.01em}
.logo small{display:block;margin-top:2px;font:600 9px/1.4 var(--body);letter-spacing:.26em;color:var(--muted)}
.where{padding-left:14px;border-left:1px solid var(--line-2);font-weight:600;font-size:15px;white-space:nowrap}
.bar-r{display:flex;align-items:center;gap:10px;min-width:0}
.clock{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--fg-2);white-space:nowrap}
.clock .dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--ok)}
.tag-demo{display:inline-block;padding:4px 9px;border:1px dashed var(--line-2);border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--fg-2);white-space:nowrap}

/* buttons: square, volt or ghost */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border:0;background:var(--volt);color:var(--on-volt);
  font:700 13px/1.1 var(--body);letter-spacing:.05em;text-transform:uppercase;text-align:center;cursor:pointer;
  transition:background 160ms var(--ease),border-color 160ms var(--ease),color 160ms var(--ease)}
.btn:hover{background:#e6ff7a}
.btn.ghost{background:transparent;color:var(--fg);border:1px solid var(--line-2)}
.btn.ghost:hover{border-color:var(--fg)}
.btn.sm{min-height:36px;padding:0 12px;font-size:12px}
.btn.xs{min-height:34px;padding:0 10px;font-size:11.5px;letter-spacing:.04em}

/* ---------- This week: four numbers ---------- */
.week{flex:none;display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));align-items:stretch;border-bottom:1px solid var(--line)}
.week-h{display:flex;flex-direction:column;justify-content:center;gap:3px;padding:10px var(--pad);border-right:1px solid var(--line)}
.week-h b{font:600 12px/1.3 var(--body);letter-spacing:.2em;text-transform:uppercase;color:var(--volt)}
.week-h span{font-size:13px;color:var(--muted);white-space:nowrap}
.stat{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;column-gap:12px;align-items:center;padding:10px var(--pad);min-width:0}
.stat + .stat{border-left:1px solid var(--line)}
.stat .num{grid-row:1 / 3;position:relative;display:block;overflow:hidden;height:46px;min-width:1ch;font:400 44px/46px var(--disp);font-variant-numeric:tabular-nums}
.stat .num span{display:block}
.stat .lbl{align-self:end;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;line-height:1.2}
.stat .sub{align-self:start;font-size:13px;line-height:1.3;color:var(--muted)}
/* the line under a number that has just moved */
.stat::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--volt);transform:scaleX(0);transform-origin:left;opacity:0}
.stat.moved::after{animation:moved 1600ms var(--ease) both}
@keyframes moved{0%{transform:scaleX(0);opacity:1}30%{transform:scaleX(1);opacity:1}100%{transform:scaleX(1);opacity:0}}

/* ---------- Tabs (narrow only) ---------- */
.tabs{display:none}

/* ---------- The desk: the board and today's list ---------- */
.desk{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,29%);grid-template-rows:minmax(0,1fr)}
.desk:focus{outline:none}
.board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:minmax(0,1fr);min-height:0}
.panel{display:flex;flex-direction:column;min-height:0;min-width:0}
.col + .col{border-left:1px solid var(--line)}
.panel-h{flex:none;display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:12px 14px 10px;border-bottom:1px solid var(--line)}
.panel-h h2{margin:0;font:700 12px/1.3 var(--body);letter-spacing:.16em;text-transform:uppercase;color:var(--fg)}
/* today's count is a to-do count, shown as a badge so it never reads as one of the week's numbers */
.panel-h .n{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--volt);color:var(--on-volt);
  font:700 12px/1 var(--body);font-variant-numeric:tabular-nums}
.panel-h .n:empty,.panel-h .n[data-zero]{display:none}
.panel-h{align-items:center}
.scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:auto;padding:10px 10px 22px;scrollbar-width:thin;scrollbar-color:var(--surf-3) transparent;
  /* a soft edge at the bottom: a column that runs on shows it does */
  -webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 22px),transparent);mask-image:linear-gradient(180deg,#000 calc(100% - 22px),transparent)}
.grp{margin:6px 4px 8px;font:600 11px/1.3 var(--body);letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.grp:first-child{margin-top:2px}
.cards{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:8px}
.empty{margin:4px;padding:14px 12px;border:1px dashed var(--line-2);color:var(--muted);font-size:13px}

/* a lead card: one button, the name and its status on top, the class and the last thing that happened under it */
.card{position:relative;background:var(--surf);border:1px solid var(--line)}
.card.due{box-shadow:inset 2px 0 0 var(--volt)}
.card-open{display:grid;gap:1px;width:100%;margin:0;padding:9px 11px 10px 12px;border:0;background:none;text-align:left;cursor:pointer}
.card-open:focus-visible{outline:2px solid var(--volt);outline-offset:-1px}
.card:hover{border-color:var(--line-2)}
.card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:2px}
.card-top .chips{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}
.nm{font-weight:600;font-size:15px;line-height:1.3;color:var(--fg)}
.mt{font-size:13px;line-height:1.35;color:var(--muted)}
.chip{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border:1px solid var(--line-2);border-radius:999px;font-size:11.5px;font-weight:700;line-height:1.2;color:var(--fg-2);white-space:nowrap}
.chip.v{border-color:var(--volt);color:var(--volt)}
.chip.new{background:var(--volt);border-color:var(--volt);color:var(--on-volt)}
.chip.ok{border-color:rgba(46,204,113,.55);color:#7fe3a9}
/* a card that has just moved or arrived */
.card.flash{animation:flash 1400ms var(--ease) both}
@keyframes flash{0%{border-color:var(--volt)}60%{border-color:var(--volt)}100%{border-color:var(--line)}}

/* ---------- Today: tonight's classes and the follow-ups due ---------- */
.today{border-left:1px solid var(--line);background:#161719}
.today .scroll{padding:12px 14px 18px}
.slot{margin:0 0 14px}
.slot-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:0 0 6px;font-size:13px;color:var(--fg-2)}
.slot-h b{font:400 18px/1 var(--disp);letter-spacing:.01em;color:var(--fg)}
.slot-h .st{margin-left:auto;font-size:11.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.slot-h .st.live{color:var(--ok)}
.todo{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.do{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 10px;padding:8px 8px 8px 10px;background:var(--surf);border:1px solid var(--line)}
.do-who{display:grid;gap:1px;min-width:0}
.who-btn{justify-self:start;margin:0;padding:0;border:0;background:none;font-weight:600;font-size:15px;line-height:1.3;text-align:left;cursor:pointer;text-decoration:underline;text-decoration-color:var(--line-2);text-underline-offset:3px}
.who-btn:hover{text-decoration-color:var(--fg)}
.do .mt{font-size:13px}
.do-acts{display:flex;gap:6px;justify-content:flex-end}
.do.done{background:transparent;border-style:dashed}
.do.done .who-btn{color:var(--fg-2)}
.do.done .mt{color:var(--muted)}
.tick{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;color:#7fe3a9;white-space:nowrap}
.tick svg{width:14px;height:14px;stroke:currentColor;stroke-width:2.4;fill:none}
.due-h{display:flex;align-items:baseline;justify-content:space-between;margin:18px 0 8px;padding-top:14px;border-top:1px solid var(--line)}
.due-h h3{margin:0;font:600 11px/1.3 var(--body);letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.due-h b{font:400 20px/1 var(--disp);color:var(--volt)}
.all-done{margin:6px 0 0;font-size:13px;color:var(--muted)}

/* ---------- A lead, opened: a sheet on the right (wide), full screen (narrow) ---------- */
.sheet{position:fixed;inset:0 0 0 auto;margin:0;width:min(440px,100%);max-width:100%;height:100%;max-height:100%;padding:0;border:0;border-left:1px solid var(--line-2);
  background:var(--bg);color:var(--fg);overflow:hidden}
.sheet[open]{display:flex;flex-direction:column}
.sheet::backdrop{background:rgba(6,7,8,.62)}
.sh-top{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:56px;padding:8px 12px 8px var(--pad);border-bottom:1px solid var(--line)}
.sh-x{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;padding:0 10px;border:1px solid var(--line-2);background:transparent;font-weight:700;font-size:12px;letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
.sh-x:hover{border-color:var(--fg)}
.sh-x svg{width:16px;height:16px;stroke:currentColor;stroke-width:2;fill:none}
.sh-body{flex:1;min-height:0;overflow-y:auto;padding:18px var(--pad) 28px}
.sh-name{margin:0;font:400 clamp(34px,4.2vw,44px)/1 var(--disp);text-transform:uppercase;letter-spacing:.005em}
.sh-class{margin:10px 0 0;display:grid;gap:2px;font-size:14px;color:var(--fg-2)}
.sh-class b{font-weight:600;font-size:16px;color:var(--fg)}
.next{margin:18px 0 0;padding:14px 14px 16px;background:var(--surf);border:1px solid var(--line);box-shadow:inset 2px 0 0 var(--volt)}
.next.quiet{box-shadow:none}
.next h3{margin:0 0 6px;font:600 11px/1.3 var(--body);letter-spacing:.18em;text-transform:uppercase;color:var(--volt)}
.next.quiet h3{color:var(--muted)}
.next h3:focus{outline:none}
.next p{margin:0;font-size:15px;line-height:1.45}
.next .q{color:var(--fg-2)}
.acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.acts .btn{flex:1 1 auto}
.picks{display:grid;gap:8px;margin-top:12px}
.picks .btn{justify-content:space-between;text-transform:none;letter-spacing:0;font-size:14px;font-weight:600;min-height:46px;padding:0 14px;text-align:left}
.picks .btn small{font-weight:500;font-size:13px;color:var(--fg-2)}
.picks .btn:not(.ghost) small{color:#2b2f12}
.or{margin:12px 0 0;font-size:13px;color:var(--muted)}
.back{margin-top:10px;padding:8px 0;border:0;background:none;font-size:13px;font-weight:600;color:var(--fg-2);cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.facts{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 16px;margin:20px 0 0;padding:14px 0 0;border-top:1px solid var(--line);font-size:14px}
.facts dt{color:var(--muted)}
.facts dd{margin:0;color:var(--fg-2);overflow-wrap:anywhere}
.note{margin:18px 0 0;padding:0 0 0 12px;border-left:2px solid var(--line-2)}
.note h3,.so-far h3{margin:0 0 6px;font:600 11px/1.3 var(--body);letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.note p{margin:0;font-size:15px;line-height:1.45;color:var(--fg)}
.note p + p{margin-top:8px}
.note small{display:block;margin-top:2px;font-size:12.5px;color:var(--muted)}
.so-far{margin:20px 0 0;padding-top:14px;border-top:1px solid var(--line)}
.time{list-style:none;margin:0;padding:0;display:grid;gap:0}
.time li{position:relative;display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;padding:7px 0 7px 16px;font-size:14px;line-height:1.4}
.time li::before{content:"";position:absolute;left:3px;top:13px;width:6px;height:6px;border-radius:50%;background:var(--line-2)}
.time li::after{content:"";position:absolute;left:5.5px;top:22px;bottom:-6px;width:1px;background:var(--line)}
.time li:last-child::after{content:none}
.time li.now::before{background:var(--volt)}
.time .when{color:var(--muted);font-size:13px}
.time .what{color:var(--fg-2)}
.sh-demo{margin:22px 0 0;font-size:12.5px;line-height:1.45;color:var(--muted)}

/* ---------- Toast: what just happened, with Undo ---------- */
/* taps pass through it to what is under it; only Undo takes a tap */
.toast{position:fixed;left:50%;bottom:16px;z-index:40;display:flex;align-items:center;gap:14px;width:max-content;max-width:min(560px,calc(100% - 24px));
  padding:10px 10px 10px 16px;background:var(--fg);color:var(--bg);font-size:14px;font-weight:600;line-height:1.35;pointer-events:none;
  box-shadow:0 0 0 1px rgba(0,0,0,.4);transform:translate(-50%,0);transition:opacity 260ms var(--ease),transform 260ms var(--ease)}
.toast .undo{pointer-events:auto}
.toast[hidden]{display:flex;visibility:hidden;opacity:0;transform:translate(-50%,12px);pointer-events:none}
.toast .undo{flex:none;min-height:36px;padding:0 12px;border:1px solid rgba(0,0,0,.35);background:transparent;color:var(--bg);font-weight:700;font-size:12px;letter-spacing:.06em;text-transform:uppercase;cursor:pointer}
.toast .undo:hover{background:rgba(0,0,0,.08)}
.toast .undo:focus-visible{outline-color:#111}
.toast .undo[hidden]{display:none}
.sheet .toast{position:absolute}

/* ---------- No JavaScript: a picture of the board ---------- */
.nojs{flex:1;min-height:0;overflow:auto;padding:16px var(--pad)}
.nojs p{margin:0 0 12px;font-size:15px;color:var(--fg-2)}
.nojs img{display:block;width:100%;height:auto;border:1px solid var(--line)}

/* ---------- Narrow: tabs, one panel at a time ---------- */
@media (max-width:999px){
  .week{grid-template-columns:repeat(4,minmax(0,1fr))}
  .week-h{display:none}
  .stat{column-gap:10px;padding:9px 12px 10px}
  .stat .num{height:38px;font-size:36px;line-height:38px}
  .stat .lbl{font-size:12px;letter-spacing:.04em}
  .stat .sub{font-size:12.5px}
  .tabs{flex:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-bottom:1px solid var(--line)}
  .tab{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;min-height:50px;padding:6px 4px;margin:0;border:0;background:none;
    color:var(--muted);cursor:pointer;transition:color 160ms var(--ease)}
  .tab + .tab{border-left:1px solid var(--line)}
  .tab span{font-size:13px;font-weight:700;line-height:1.15;text-align:center}
  .tab .badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--volt);color:var(--on-volt);
    font:700 12px/1 var(--body);font-variant-numeric:tabular-nums}
  .tab .badge:empty,.tab .badge[data-zero]{display:none}
  .tab[aria-selected="true"]{color:var(--fg);background:var(--surf)}
  .tab[aria-selected="true"]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--volt)}
  .tab:focus-visible{outline-offset:-3px}
  .desk{display:block;position:relative}
  .board{display:contents}
  .panel{position:absolute;inset:0}
  .panel:not(.on){display:none}
  .col + .col{border-left:0}
  .today{border-left:0;background:var(--bg)}
  .panel-h{display:none}
  .scroll{padding:12px var(--pad) 20px}
  .today .scroll{padding:12px var(--pad) 20px}
  .cards{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
  .sheet{inset:0;width:100%;border-left:0}
}
/* phones: the week's four numbers two by two, under one "This week" line */
@media (max-width:680px){
  .week{grid-template-columns:repeat(2,minmax(0,1fr))}
  .week-h{display:flex;flex-direction:row;align-items:baseline;gap:10px;grid-column:1 / -1;padding:7px var(--pad) 6px;border-right:0;border-bottom:1px solid var(--line)}
  .week-h b{font-size:11px}
  .week-h span{font-size:12px}
  .stat{padding:8px var(--pad) 9px}
  .stat + .stat{border-left:0}
  .stat[data-stat="showed"],.stat[data-stat="joined"]{border-left:1px solid var(--line)}
  .stat[data-stat="fu"],.stat[data-stat="joined"]{border-top:1px solid var(--line)}
}
@media (max-width:520px){
  .bar{min-height:52px;gap:8px}
  .brand{gap:10px}
  .logo{font-size:20px}
  .logo small{font-size:8px;letter-spacing:.22em}
  .where{padding-left:10px;font-size:14px}
  .clock .day{display:none}
  .bar .btn.sm{min-height:34px;padding:0 10px}
  .tag-demo{display:none}
  .stat .num{height:34px;font-size:32px;line-height:34px}
  .stat .lbl{font-size:12px;letter-spacing:.03em}
  .stat .sub{font-size:12.5px;line-height:1.25}
  .tab{gap:4px;padding:6px 3px}
  .tab span{font-size:12px}
  .tab .badge{min-width:20px;height:20px;padding:0 5px;font-size:11.5px}
  .demo .long{display:none}
  .demo .short{display:inline}
  .time li{grid-template-columns:92px minmax(0,1fr);gap:10px}
}
@media (max-width:370px){
  .clock{display:none}
}
@media (max-height:620px) and (min-width:1000px){
  .stat .num{height:36px;font-size:34px;line-height:36px}
  .stat{padding-top:6px;padding-bottom:6px}
}

@media (prefers-reduced-motion:reduce){
  .btn,.tab,.toast{transition:none}
  .stat.moved::after{animation:none;opacity:0}
  .card.flash{animation:none}
}
