/* ===========================================================================
 * recall.css — Study Pal v1.1, Direction B (chosen 21 Sep 2026, the design
 * canvas's B-row). Loaded AFTER styles.css.
 * ---------------------------------------------------------------------------
 * ⚠️ EVERY RULE HERE IS PREFIXED `b-` OR SCOPED UNDER `body.b-page`, because
 * index.html loads this file for every student and the v1 check-in below the
 * v1.1 block must render exactly as it did. Nothing here restyles a v1 class.
 *
 * Tokens are the canvas's: ivory ground, deep-teal accent, Fraunces display
 * over Instrument Sans. The fonts are requested by the page that needs them
 * (the recall pages in <head>, index.html only once the v1.1 block renders),
 * so a v1 student downloads nothing new.
 * =========================================================================== */

:root{
  --b-ground:#F4F1EA; --b-card:#FFFFFF; --b-line:#E6E0D3; --b-ink:#16202E; --b-muted:#5B6472;
  --b-teal:#1F7A6B; --b-teal-deep:#12554A; --b-mint:#7FD6C2; --b-mint-ink:#A9E2D4;
  --b-night:#16202E; --b-amber-bg:#FBF1DD; --b-amber-ink:#7A4E0E;
  --b-display:"Fraunces",Georgia,"Times New Roman",serif;
  --b-sans:"Instrument Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}

/* ---- the recall pages' own ground (index.html keeps styles.css's) -------- */
html:has(body.b-page){background:var(--b-ground)}
body.b-page{font-family:var(--b-sans);color:var(--b-ink);font-variant-numeric:tabular-nums}
/* The gradient belongs to the page, not to the 390px body column. */
html:has(body.b-dark){background:#0A121C radial-gradient(120% 70% at 50% 38%,#14324A 0%,#0E1B2A 55%,#0A121C 100%) fixed}
body.b-dark{color:#fff}
body.b-dark .who{color:#AEB9C9}
body.b-dark .who b{color:#fff}
body.b-dark .linkbtn{color:var(--b-mint-ink)}

.b-eyebrow{margin:0;font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--b-muted)}
.b-eyebrow--light{color:var(--b-mint-ink)}
.b-quiet{margin:0;font-size:.8125rem;line-height:1.45;color:var(--b-muted)}
.b-quiet--light{color:#C9D2DF}
.b-h1{font-family:var(--b-display);font-weight:500;font-size:2rem;line-height:1.1;margin:6px 0 0}
.b-page-top{padding:18px 0 16px}

/* ⚠️ `hidden` MUST WIN. Every flex rule below would otherwise override the UA's
 * [hidden]{display:none}, showing an empty "Aarya asked" box and an "I'm done"
 * button before any call exists. Scoped so no v1 element is affected. */
.b-today [hidden],body.b-page [hidden]{display:none !important}

/* ---- buttons and links: every one at least 44px (design craft rule) ------ */
.b-cta{display:flex;align-items:center;justify-content:center;min-height:52px;padding:0 18px;
  border:0;border-radius:16px;background:var(--b-teal);color:#fff;font:600 1rem var(--b-sans);
  text-decoration:none;text-align:center;cursor:pointer;box-shadow:0 8px 18px rgba(31,122,107,.24)}
.b-cta:disabled{opacity:.6;cursor:default}
.b-cta--light{background:#fff;color:var(--b-ink);box-shadow:none}
.b-cta--ghost{background:transparent;border:1px solid rgba(255,255,255,.28);box-shadow:none}
.b-cta--quiet{background:var(--b-card);color:var(--b-teal-deep);border:1px solid var(--b-line);box-shadow:none;margin:0 0 18px}
.b-link{display:flex;align-items:center;min-height:44px;color:var(--b-teal-deep);font:600 .875rem var(--b-sans)}
.b-link--light{color:var(--b-mint-ink);justify-content:center}
.b-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.b-two .b-cta{font-size:.875rem;padding:0 10px}

/* ---- a sentence instead of a screen: loading, refused, not yet ----------- */
.b-note{background:var(--b-card);border:1px solid var(--b-line);border-radius:20px;padding:20px;
  margin:18px 0;display:flex;flex-direction:column;gap:14px}
.b-note h2{margin:0;font-family:var(--b-display);font-weight:500;font-size:1.375rem}
.b-note p{margin:0;font-size:.9375rem;line-height:1.5}
body.b-dark .b-note{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.12)}

/* ---- the Today block (index.html, v1.1 only) ----------------------------- */
.b-today{font-family:var(--b-sans);color:var(--b-ink);font-variant-numeric:tabular-nums;margin:0 0 22px}
.b-hero{display:flex;flex-direction:column;gap:14px;padding:22px 18px 76px;border-radius:24px;color:#fff;
  background:linear-gradient(160deg,#0F3D36 0%,#14524A 60%,#1B6A5E 100%)}
.b-hello{margin:0;font-family:var(--b-display);font-weight:500;font-size:1.875rem;line-height:1.1}
.b-ribbon{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.b-rday{display:flex;flex-direction:column;align-items:center;gap:6px}
.b-rbar{width:100%;height:6px;border-radius:3px;background:rgba(255,255,255,.22)}
.b-rbar.on{background:var(--b-mint)}
.b-rbar.late{background:repeating-linear-gradient(135deg,var(--b-mint) 0 3px,rgba(127,214,194,.35) 3px 6px)}
.b-rbar.miss{background:rgba(255,255,255,.12);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
.b-rbar.none,.b-rbar.ahead{background:rgba(255,255,255,.18)}
.b-rday.today .b-rbar{background:#fff}
.b-rlabel{font-size:.6875rem;color:#CDEDE5}
.b-rday.today .b-rlabel{color:#fff;font-weight:600}
.b-count{margin:0;display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:40px;
  padding:0 14px;border-radius:12px;background:rgba(255,255,255,.12);font-size:.8125rem;font-weight:600}
.b-count b{color:#F3C969;white-space:nowrap}

.b-float{margin:-60px 12px 0;position:relative;display:flex;flex-direction:column;gap:14px;padding:18px;
  border-radius:22px;background:var(--b-card);border:1px solid var(--b-line);box-shadow:0 14px 30px rgba(15,61,54,.14)}
.b-float-top{display:flex;align-items:center;gap:14px}
.b-float-title{margin:2px 0 0;font-family:var(--b-display);font-weight:500;font-size:1.3125rem;line-height:1.2}
.b-avatar{flex:none;width:48px;height:48px;border-radius:24px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(140deg,#1F7A6B,#7FD6C2);color:#fff;font:600 1.25rem var(--b-display)}
.b-avatar--sm{width:36px;height:36px;font-size:1rem}
.b-badges{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.b-badges li{display:flex;align-items:center;gap:6px;padding:5px 10px;border-radius:12px;
  background:#F4F1EA;color:var(--strand-ink,#12554A);font-size:.8125rem;font-weight:600}
.b-badges li::before{content:"";width:8px;height:8px;border-radius:4px;background:var(--spine,#1F7A6B)}

.b-budget{margin:18px 0 0;display:flex;flex-direction:column;gap:8px}
.b-budget-top{margin:0;display:flex;justify-content:space-between;align-items:baseline;font-size:.8125rem}
.b-budget-bar{height:10px;border-radius:5px;background:var(--b-line);overflow:hidden}
.b-budget-bar div{height:100%;width:100%;background:var(--b-teal);border-radius:5px}

/* ---- the sitting (dark) -------------------------------------------------- */
.b-sit-top{display:flex;justify-content:space-between;align-items:center;padding:12px 0 16px}
.b-sit-who{display:flex;align-items:center;gap:10px}
.b-sit-name{margin:0;font-weight:600;font-size:.875rem}
.b-sit-sub{margin:0;font-size:.75rem;color:#AEB9C9}
.b-sit-clock{text-align:right}
.b-sit-clock p:first-child{margin:0;font-size:1.125rem;font-weight:600}
.b-markers{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
.b-markers li{padding:6px 10px;border-radius:12px;font-size:.75rem;color:#AEB9C9;
  border:1px solid rgba(255,255,255,.18)}
.b-markers li.on{color:#06211C;background:var(--b-mint);border-color:var(--b-mint);font-weight:600}
.b-orbwrap{display:flex;justify-content:center;padding:20px 0 8px}
.b-orbwrap svg{width:min(280px,72vw);height:auto}
.b-ring-track{fill:none;stroke:rgba(255,255,255,.10);stroke-width:6}
.b-ring-fill{fill:none;stroke:var(--b-mint);stroke-width:6;stroke-linecap:round;transition:stroke-dasharray 1s linear;opacity:0}
/* A zero-length round-capped stroke still paints a dot; the ring appears with the call. */
.is-live .b-ring-fill{opacity:1}
.b-pulse{fill:none;stroke:var(--b-mint);stroke-width:2;opacity:0;transform-origin:center;transform-box:fill-box}
.is-live .b-pulse{animation:b-pulse 2.8s ease-out infinite}
.is-live .b-pulse--late{animation-delay:1.4s}
.is-speaking .b-pulse{animation-duration:1.6s}
@keyframes b-pulse{0%{transform:scale(.92);opacity:.55}100%{transform:scale(1.22);opacity:0}}
@media (prefers-reduced-motion:reduce){.is-live .b-pulse{animation:none;opacity:.4}}
.b-sit-status{margin:6px 0 16px;text-align:center;font-family:var(--b-display);font-size:1.375rem;line-height:1.25}
.b-asked{display:flex;flex-direction:column;gap:6px;padding:14px 16px;border-radius:16px;
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);margin:0 0 14px}
.b-asked p:last-child{margin:0;font-size:.9375rem;line-height:1.45}
.b-sit-actions{display:flex;flex-direction:column;gap:10px}

/* ---- after the sitting --------------------------------------------------- */
.b-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 16px}
.b-stat{display:flex;flex-direction:column;gap:2px;padding:12px;border-radius:16px;background:var(--b-card);border:1px solid var(--b-line)}
.b-stat b{font-family:var(--b-display);font-size:1.5rem;font-weight:600}
.b-stat span{font-size:.75rem;color:var(--b-muted)}
.b-panel{padding:18px 16px;border-radius:20px;background:var(--b-card);border:1px solid var(--b-line);margin:0 0 16px}
.b-trail{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column}
.b-step{display:flex;gap:14px;padding:0 0 16px;position:relative}
.b-step:not(:last-child)::after{content:"";position:absolute;left:11px;top:28px;bottom:2px;width:2px;background:var(--b-line)}
.b-step-icon svg{width:24px;height:24px;display:block}
.b-step-title{margin:0 0 3px;font-size:.9375rem;font-weight:600}
.b-doubt{display:flex;flex-direction:column;gap:14px;padding:20px;border-radius:20px;background:var(--b-night);color:#fff;
  margin:0 0 16px;box-shadow:inset 6px 0 0 var(--spine,#1F7A6B)}
.b-doubt-text{margin:0;font-family:var(--b-display);font-weight:500;font-size:1.3125rem;line-height:1.35}

/* ---- doubts -------------------------------------------------------------- */
.b-spined{display:flex;flex-direction:column;gap:12px;padding:16px 16px 16px 22px;margin:0 0 14px;border-radius:18px;
  background:var(--b-card);border:1px solid var(--b-line);box-shadow:inset 6px 0 0 var(--spine,#1F7A6B)}
.b-spined-label{margin:0;font-size:.8125rem;font-weight:600;color:var(--strand-ink,#12554A)}
.b-spined-text{margin:0;font-family:var(--b-display);font-weight:500;font-size:1.1875rem;line-height:1.35}

/* ---- the recall pages' nav ---------------------------------------------- */
.b-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:6px;margin:22px 0 0;border-radius:22px;
  background:var(--b-card);border:1px solid var(--b-line);box-shadow:0 8px 20px rgba(22,32,46,.08)}
.b-nav a{min-height:48px;display:flex;align-items:center;justify-content:center;border-radius:16px;
  color:#3A4355;font:500 .8125rem var(--b-sans);text-decoration:none}
.b-nav a[aria-current]{background:var(--b-night);color:#fff;font-weight:600}
body.b-dark .b-nav{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12);box-shadow:none}
body.b-dark .b-nav a{color:#C9D2DF}

/* ---- the plan screen, v1.1 only (week.html) ----------------------------- */
/* The day chip replaces the row number; `.num` keeps its column and size. */
.b-daychip{font:600 .6875rem var(--b-sans);letter-spacing:.06em;color:var(--b-teal-deep);
  background:#E3F2EE;border-radius:10px;padding:6px 0;text-align:center;min-width:2.75rem}
/* Direction B's dark commit bar around the existing Confirm button. */
.b-commit{display:flex;flex-direction:column;gap:10px;margin:14px 0 0;padding:16px;border-radius:20px;
  background:var(--b-night);color:#fff;font-family:var(--b-sans)}
.b-commit p{margin:0;font-size:.8125rem;color:#C9D2DF}
.b-commit .confirm{background:#2FA38F;color:#06211C;margin:0}

/* The Today card when the recall agent id is not configured: a statement, not
 * a disabled button (the same rule as a missing mic — never a dead control). */
.b-unset{margin:0;padding:12px 14px;border-radius:12px;background:var(--b-amber-bg);color:var(--b-amber-ink);
  font-size:.875rem;font-weight:600;line-height:1.4}

/* ===========================================================================
 * THE CHECK-IN, DIRECTION B (canvas B1) — v1.1 students only.
 * ---------------------------------------------------------------------------
 * ⚠️ EVERY RULE BELOW IS SCOPED UNDER `#app.b-v11`, a class index.html adds only
 * when fn_my_recall_packet says the student is on v1.1. A v1 student's #app
 * never carries it, so none of this can touch their check-in. The check-in's
 * logic is untouched: this restyles what lib/checkin-render.js draws, and the
 * only template bytes that differ (the strand on a card, the strand's name in
 * three labels) are emitted under the same flag.
 * =========================================================================== */
html:has(#app.b-v11){background:var(--b-ground)}
body:has(#app.b-v11){padding-bottom:150px}
#app.b-v11{font-family:var(--b-sans);color:var(--b-ink);font-variant-numeric:tabular-nums}

/* The text links become the floating pill nav (#b-pillnav, below). */
#app.b-v11 > .nav{display:none}

/* ⚠️ "SIGNED IN AS" STAYS ON SCREEN THE WHOLE TIME. Amendment 13 needs the
 * name visible BEFORE the first write; moved into the dock above the pill nav
 * it is fixed on screen while the child types, which is stronger, not weaker.
 * "Not you?" keeps its full 44px tap target. */
#app.b-v11 #who{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom));
  z-index:20;margin:0;width:min(350px,calc(100% - 40px));justify-content:center;padding:0 12px;
  border-radius:22px;background:rgba(244,241,234,.96);box-shadow:0 2px 10px rgba(22,32,46,.08)}
#app.b-v11 #who.who--unconfirmed{background:var(--danger-bg)}

.b-pillnav{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom));z-index:20;
  width:min(350px,calc(100% - 40px));display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:6px;
  border-radius:22px;background:var(--b-card);border:1px solid var(--b-line);box-shadow:0 8px 20px rgba(22,32,46,.12)}
.b-pillnav a{min-height:48px;display:flex;align-items:center;justify-content:center;border-radius:16px;
  color:#3A4355;font:500 .8125rem var(--b-sans);text-decoration:none}
.b-pillnav a[aria-current]{background:var(--b-night);color:#fff;font-weight:600}

/* ---- the header over the classes ----------------------------------------- */
#app.b-v11 #screen .eyebrow{font-size:.75rem;font-weight:600;letter-spacing:.08em;color:var(--b-muted)}
#app.b-v11 #screen h1{font-family:var(--b-display);font-weight:500;font-size:1.625rem;line-height:1.15}
#app.b-v11 #screen .sub{color:var(--b-muted)}

/* ---- the day bar: one chip per class, in its strand's colour ------------- */
#app.b-v11 .seg{height:6px;background:var(--b-line)}
#app.b-v11 .seg[data-strand="physics"]{background:#4B5FA8}
#app.b-v11 .seg[data-strand="chemistry"]{background:#B0782A}
#app.b-v11 .seg[data-strand="biology"]{background:#4E8A3E}
#app.b-v11 .daylabels{gap:6px;margin:4px 0 20px;letter-spacing:0;text-transform:none}
#app.b-v11 .daylabels span{display:flex;align-items:center;justify-content:center;gap:5px;padding:6px 4px;
  border-radius:12px;background:var(--b-card);border:1px solid var(--b-line);font:600 .75rem var(--b-sans);color:#12554A}
#app.b-v11 .daylabels span[data-strand="physics"]{color:#3A4A8C}
#app.b-v11 .daylabels span[data-strand="chemistry"]{color:#7A4E0E}
#app.b-v11 .daylabels span[data-strand="biology"]{color:#35642A}

/* ---- the class card: Direction B's spine ---------------------------------- */
#app.b-v11 .card{border-radius:18px;border-color:var(--b-line);padding:16px 16px 16px 22px}
#app.b-v11 .card::before{width:6px;background:var(--b-teal)}
#app.b-v11 .card[data-strand="physics"]::before{background:#4B5FA8}
#app.b-v11 .card[data-strand="chemistry"]::before{background:#B0782A}
#app.b-v11 .card[data-strand="biology"]::before{background:#4E8A3E}
#app.b-v11 .card.pending::before{background:var(--b-line)}
#app.b-v11 .card.collapsed{padding:0 0 0 6px}
#app.b-v11 .class,#app.b-v11 .class-line .class{font-family:var(--b-sans);font-size:1.0625rem;font-weight:600}
#app.b-v11 .teacher{font-size:.75rem;color:var(--b-muted)}
#app.b-v11 .shape{background:#E3F2EE;color:#12554A;letter-spacing:.06em}

/* ---- questions: unnumbered, Direction B type ------------------------------ */
#app.b-v11 .q{border-top-color:#EFEADF}
#app.b-v11 .q .num{display:none}
#app.b-v11 .indent{margin-left:0}
#app.b-v11 .q-title{font-size:.9375rem;font-weight:600}
#app.b-v11 .step{letter-spacing:.06em;font-weight:600;color:var(--b-muted)}

/* ---- chips: the segmented-control look ------------------------------------ */
#app.b-v11 .chip{border:0;background:#F1EDE3;color:#3A4355;border-radius:14px;font-weight:500}
#app.b-v11 .chip[aria-checked="true"],#app.b-v11 .chip[data-on]{background:#fff;color:#12554A;font-weight:600;
  box-shadow:0 1px 3px rgba(22,32,46,.14),inset 0 0 0 1.5px var(--b-teal)}
#app.b-v11 .chip.ghost{background:transparent;box-shadow:inset 0 0 0 1px #D8D1C2}
#app.b-v11 .chip.sm{background:#E3F2EE;color:#12554A}

/* ---- fields, mic, confirm ------------------------------------------------- */
#app.b-v11 textarea{border-radius:14px;border-color:var(--b-line);background:#FBFAF6;font-family:var(--b-sans)}
#app.b-v11 .mic{border-color:var(--b-line)}
#app.b-v11 .mic[data-state="listening"]{background:var(--b-teal);border-color:var(--b-teal);box-shadow:0 0 0 6px #E3F2EE}
#app.b-v11 .confirm{min-height:52px;border-radius:16px;background:var(--b-teal);font:600 1rem/1 var(--b-sans);
  box-shadow:0 8px 18px rgba(31,122,107,.24)}
#app.b-v11 .addclass{border-radius:16px;border:1.5px dashed #B9B2A2;color:var(--b-ink);min-height:52px;font-family:var(--b-sans)}
#app.b-v11 .msg{border-radius:12px}

/* B1's header: "Today's classes" with the pace as a quiet note beneath. */
#app.b-v11 .b-pace{margin:0 0 4px;font-size:.875rem;color:var(--b-muted)}
#app.b-v11 .top .pill{letter-spacing:.02em;text-transform:none;font-size:.75rem}

/* B1's "How sure do you feel?" — the segmented control on each v1.1 card, and
 * the header row that names it. Toggle buttons, 44px tall. */
#app.b-v11 .b-classes-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
#app.b-v11 .b-classes-head h1{margin-bottom:2px}
#app.b-v11 .b-how{font-size:.75rem;color:var(--b-muted);white-space:nowrap}
#app.b-v11 .b-conf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:12px 0 2px;
  padding:4px;border-radius:14px;background:#F1EDE3}
#app.b-v11 .b-conf-opt{min-height:44px;border:0;border-radius:11px;background:transparent;color:#3A4355;
  font:500 .875rem var(--b-sans);cursor:pointer}
#app.b-v11 .b-conf-opt[aria-pressed="true"]{background:#fff;color:#12554A;font-weight:600;box-shadow:0 1px 3px rgba(22,32,46,.14)}

/* The v1.1 B1 card: the control, one line, and — only where the server
 * requires it — one coverage input. */
#app.b-v11 .b-rest{margin:10px 0 0;font-size:.8125rem;color:var(--b-muted)}
#app.b-v11 .b-req{margin:16px 0 0}

/* ---- 0134: the editable plan -------------------------------------------
 * ⚠️ NOT scoped under `#app.b-v11`: week.html does not carry that class (only
 * index.html does), and a scoped rule left every control here unstyled. These
 * `b-` classes are rendered only when ctx.v11 is true — the gate is in
 * week-render.js — so the markup itself is the scope, as `.b-daychip` above.
 * ------------------------------------------------------------------------ */
.b-rowedit{display:flex;gap:8px;margin:8px 0 0}
.b-rowbtn{min-height:36px;padding:0 12px;border-radius:12px;border:1px solid var(--b-line);
  background:var(--b-card);color:var(--b-teal-deep);font:600 .75rem var(--b-sans);cursor:pointer}
.b-rowbtn:disabled{opacity:.6;cursor:default}
.b-days{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0}
.b-days[hidden]{display:none}
.b-day[aria-current]{background:var(--b-teal);border-color:var(--b-teal);color:#fff}
.b-locked{margin:8px 0 0;font-size:.75rem;color:var(--b-muted)}
.b-addlist{display:flex;flex-direction:column;gap:8px;margin:10px 0 0;padding:14px;
  border-radius:16px;background:var(--b-card);border:1px solid var(--b-line)}
.b-addlist[hidden]{display:none}
.b-pick{display:flex;flex-direction:column;gap:2px;text-align:left;min-height:52px;padding:10px 12px;
  border-radius:14px;border:0;background:#F1EDE3;color:var(--b-ink);font-family:var(--b-sans);cursor:pointer}
.b-pick[aria-pressed="true"]{background:#fff;box-shadow:inset 0 0 0 1.5px var(--b-teal)}
.b-pick-title{font-size:.875rem;font-weight:600}
.b-pick-why{font-size:.75rem;color:var(--b-muted)}
/* 0133: where tonight's topics came from, when they are the student's own. */
.b-src{margin:0;font-size:.75rem;color:var(--b-muted)}
