/*
  Jay Maas - student feedback portal.
  Dark, calm, mobile-first. Brand: black, off-white, Jay Maas red (#d43b3b).
  No inline styles anywhere (strict CSP): every visual lives in this file.

  :host is the same page drawn inside a shadow root on Jason's own page for a
  student (nowview.js): the tokens and the page's ground are set there too, so
  their Now looks exactly like theirs. It matches nothing on the portal itself.
*/

:root, :host {
  --bg: #0a0a0b;
  --bg-2: #101012;
  --card: #151517;
  --card-2: #1c1c1f;
  --card-3: #232327;
  --line: #262629;
  --line-2: #34343a;
  --ink: #f4f2ee;
  --ink-2: #d2cfc9;
  --dim: #9c9993;
  /* Measured on the three surfaces it actually sits on: #6d6b66 gave 3.19:1 on
     --card-2, 3.43 on --card, 3.72 on --bg - all under the 4.5:1 AA floor, and
     this is not a decorative token: it carries the six bottom-tab labels, every
     message timestamp, "No link on this one", "Not answered yet", the Ask sheet's
     hint and character count, and the textarea placeholder. A drummer reading his
     phone in daylight lost all of it. #8b8883 is 4.81/5.16/5.60 and still sits
     below --dim (5.98), so the hierarchy holds. */
  --faint: #8b8883;
  --red: #d43b3b;
  --red-hi: #e24a4a;
  --red-lo: #b93030;
  --red-ink: #ff7b71;
  --red-wash: rgba(212, 59, 59, 0.13);
  /* Colour option A (Nov 24 2026, Jason: "all the buttons and everything just looks like
     an error message"). Buttons are white with dark words - the worksheet card's "Fill it
     in" - and red is the signature only: the logo, small section labels, the stepper's
     current step, new/unread dots and counts, Jay's own face and notes, the video's played
     bar, and true alerts (an error, a destructive confirm). Focus rings, "selected" and
     "you are here" are neutral, so an empty field never looks like a mistake. */
  --btn: var(--ink);
  --btn-hi: #e2dfd9;
  --btn-lo: #d2cfc9;
  --btn-ink: #131315;
  --focus: var(--ink-2);
  --tint: rgba(244, 242, 238, 0.1);
  --tint-hi: rgba(244, 242, 238, 0.16);
  --green: #5aa876;
  --amber: #d9a441;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 16px;
  --tap: 46px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
/* What body gives the portal, the shadow root's host gives the Now it holds. */
:host {
  display: block;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
}
[hidden] { display: none !important; }
/* Inline SVG icons default to text size; components below size their own. */
svg { width: 1.1em; height: 1.1em; flex: none; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: var(--ink-2); }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(244, 242, 238, 0.28); color: #fff; }

.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: 12px; top: -60px; z-index: 100; padding: 10px 14px;
  background: var(--ink); color: var(--bg); border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ top bar */

.coach-banner {
  position: relative; z-index: 40;
  padding: 9px var(--gutter);
  padding-top: max(9px, env(safe-area-inset-top));
  background: repeating-linear-gradient(135deg, #3a2a0e 0 12px, #33250c 12px 24px);
  color: #f1d49a; font-size: 13px; font-weight: 600; text-align: center;
  letter-spacing: 0.01em;
}
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px var(--gutter);
  padding-top: max(12px, env(safe-area-inset-top));
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  max-width: 1440px; margin: 0 auto;
}
.coach-banner + .topbar { padding-top: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  min-height: var(--tap); color: var(--ink);
}
/* A red "rec" light rather than a red tile with a play triangle - that shape
   reads as YouTube, which is exactly what this page replaces. */
.brand-mark {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(212, 59, 59, 0.18), 0 0 14px rgba(212, 59, 59, 0.55);
}
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.brand-sub {
  color: var(--dim); font-size: 14px; font-weight: 500;
  padding-left: 10px; border-left: 1px solid var(--line-2);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); padding: 0 12px; border-radius: 999px;
  color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none;
}
.topbar-link:hover { background: var(--card); color: var(--ink); }
.topbar-link svg { width: 16px; height: 16px; }

/* The trail (Nov 19 2026, crumbs.html): the pages outside the home - /w, /f, /lib - say
   where they are and lead back to it, in this bar, so it costs no height (the /w page
   sizes its picture from the room under the bar: nothing here may make it taller, at any
   width - test_portal_crumbs_e2e.py holds it to the base commit's heights).
   Wider than a phone it stands where the brand's divider and "Mentoring" stand on every
   other page: "Home › Feedback › <title>", the title one line, cut with an ellipsis -
   never a second line, never a sideways scroll. The brand keeps its mark and name and
   never gives up width to a long title. On a phone it is one link up to the parent,
   "‹ Feedback" (or "‹ Home"), where the page's "All feedback" link used to be.
   (A link is 44 px tall - a finger's target - and the bar's row is the brand's 46.) */
.topbar.has-crumbs .brand { flex: none; }
.topbar.has-crumbs .topbar-right:empty { display: none; }
.crumbs { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; margin-left: -2px; }
/* The brand's divider, as .brand-sub draws it: the line box of 14 px type, 10 px from the
   name (the bar's 12 px gap, less 2) and 10 px before the first word (4 + the link's 6). */
.crumbs::before { content: ""; flex: none; width: 1px; height: 22px; margin-right: 4px; background: var(--line-2); }
.crumbs ol { display: flex; align-items: center; min-width: 0; margin: 0; padding: 0; list-style: none; }
.crumb {
  display: flex; align-items: center; flex: none; min-width: 0;
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.crumb-sep { flex: none; padding: 0 2px; color: var(--faint); }
.crumb a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px;
  border-radius: 8px; color: var(--dim); text-decoration: none;
}
.crumb a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); }
/* Keyboard focus inside the link's own 44 px, so no bar height or edge ever clips it. */
.crumb a:focus-visible { outline-offset: -2px; }
.crumb-back { display: none; }
.crumb-here { flex: 0 1 auto; }
.crumb-title { min-width: 0; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-weight: 600; }
@media (min-width: 641px) {
  .topbar.has-crumbs .brand-sub { display: none; }
}
@media (max-width: 640px) {
  /* One link up, at the bar's right: the title is the page's own heading, right there. */
  .crumbs { flex: 0 1 auto; margin-left: auto; }
  .crumbs::before { display: none; }
  .crumb { display: none; }
  .crumb.up { display: flex; }
  .crumb.up .crumb-sep { display: none; }
  .crumb.up a {
    gap: 6px; padding: 0 12px; border-radius: 999px;
    color: var(--ink-2); font-weight: 600;
  }
  .crumb.up a:hover { background: var(--card); color: var(--ink); text-decoration: none; }
  .crumb.up .crumb-back { display: inline; font-size: 18px; line-height: 1; margin-top: -2px; }
}
/* A phone narrower than 375 px (a 320 px one, most Android phones' 360): the brand's name
   and the way back on one line, inside the bar, no sideways scroll. With "Mentoring" too,
   the longest ways up ("‹ Worksheets", "‹ Sent to Jay") ran up to 6px into the bar's
   padding at 360 (Nov 19 review). */
@media (max-width: 374px) {
  .topbar.has-crumbs .brand-sub { display: none; }
}
/* The section it was opened from (Nov 19 2026, .crumb-sec - trail.js on /f and /lib,
   home.js on a worksheet): its name between Sections and the title, "Home › Sections ›
   <section> › <title>". A long name is cut with an ellipsis, on the one line, and never
   takes more than 30% of the window, so it can't squeeze the page's own title (what they
   are looking at) down to a letter. Wider than a phone it keeps that width when the title
   arrives (Nov 19, with the band pages' 24px gutter): the title is filled in after the
   page's read and takes what is left, cut with its own ellipsis - so a long title never
   narrows the section's name after it was drawn (at 641-740 px it did, by up to 22 px).
   What is left for the title is never less than ~130 px (641 px wide, the 24px gutter).
   On a phone it is the way up, "‹ <section>", cut the same way inside the room it has:
   never a second line, never a sideways scroll - and the brand puts its "Mentoring" away
   for it (.has-sec-crumb, trail.js, before the first paint, as it already does under
   375 px): on a 375-430 px iPhone an ordinary name ("From the Ashes: Drums") was cut to
   "From the Ash…" while a 360 px Android, without "Mentoring", showed it whole (Nov 19
   review). The bar's height is the same either way.
   The message card's button (#msg-home, item.js) goes the trail's way up and says its
   name: one line, cut with an ellipsis inside the card - a section's long name never
   makes it wider than the card and the page scroll sideways. */
.crumb-sec { flex: 0 1 auto; }
.crumb-sec a { min-width: 0; }
.crumb-sec .crumb-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 641px) {
  .crumb-sec { flex-shrink: 0; max-width: 30vw; }
}
@media (max-width: 640px) {
  .crumb.up { flex: 0 1 auto; }
  .crumb.up a { min-width: 0; }
  .crumb.up .crumb-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar.has-sec-crumb .brand-sub { display: none; }
}
#msg-home { min-width: 0; max-width: 100%; }
#msg-home .btn-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* The trail inside the home (Nov 19 2026, home.js drillTrail): one section, worksheet or
   library folder says where it is at the top of its panel, where its "All sections" link
   was - "Home › Sections › <name>", the crumbs above; on a phone "‹ Sections", the same
   44 px link as "‹ Feedback" in the bar. It takes exactly that link's room: its 44 px row
   pulled up 8 px, so the page under it starts where it did (test_portal_home_crumbs_e2e.py
   holds it to the base commit). "Home" sits on the panel's edge; no divider (no brand
   beside it). */
.crumbs.crumbs-home { margin: -8px 0 8px -6px; }
.crumbs.crumbs-home::before { display: none; }
@media (max-width: 640px) {
  /* Where the back link stood - the panel's left, not the bar's right. */
  .crumbs.crumbs-home { margin-left: -8px; }
}

main {
  max-width: 1440px; margin: 0 auto;
  padding: 4px var(--gutter) 48px;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent; font-weight: 650; font-size: 15px; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.08s;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
/* The primary button. (Its name is from before colour option A; markup everywhere uses it.) */
.btn-red { background: var(--btn); color: var(--btn-ink); }
.btn-red:hover { background: var(--btn-hi); }
.btn-red:active { background: var(--btn-lo); }
/* Red on a button only for what can't be taken back (Discard a draft). */
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-hi); }
.btn-danger:active { background: var(--red-lo); }
.btn-light { background: var(--ink); color: #111; }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--dim); color: var(--ink); }
.btn-quiet { background: var(--card-2); color: var(--ink); }
.btn-quiet:hover { background: var(--card-3); }
/* Beside the white primary, a second white button would read as another "do this": there
   the light one is the quiet grey (a worksheet's Save for later; Try again beside Email Jay). */
.btn-light:has(~ .btn-red), .btn-red ~ .btn-light { background: var(--card-2); color: var(--ink); }
.btn-light:has(~ .btn-red):hover, .btn-red ~ .btn-light:hover { background: var(--card-3); }
.btn-block { display: flex; width: 100%; min-height: 52px; font-size: 16px; }
.linklike {
  background: none; border: 0; padding: 0; color: var(--ink-2); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2);
  min-height: 32px;
}
.linklike:hover { color: var(--ink); text-decoration-color: var(--ink-2); }
.linklike[disabled] { cursor: default; }
.linklike .spin { width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }

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

label, .label {
  display: block; margin: 0 0 8px; color: var(--dim);
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
input[type="email"], input[type="text"], input.code, textarea {
  width: 100%; background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 12px;
  /* 17px keeps iOS from zooming the page when the field is focused. */
  font-size: 17px; padding: 14px 15px; min-height: 52px;
  transition: border-color 0.15s, background-color 0.15s;
  -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { outline: none; border-color: var(--dim); background: #0d0d0f; }
input.code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 26px; letter-spacing: 0.4em; text-align: center; padding-left: calc(15px + 0.4em);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.form-error {
  margin: 10px 0 0; padding: 10px 12px; border-radius: 10px;
  background: var(--red-wash); border: 1px solid rgba(212, 59, 59, 0.35);
  color: #ffc1bb; font-size: 14px;
}
.form-note { margin: 10px 0 0; color: var(--dim); font-size: 14px; }
.form-note + .form-note { margin-top: 4px; }

/* ------------------------------------------------------------------ cards / states */

.center-wrap {
  display: flex; justify-content: center; align-items: flex-start;
  padding: clamp(16px, 7vh, 72px) 0 24px;
}
.card {
  width: 100%; max-width: 460px; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 28px 22px 24px; box-shadow: var(--shadow);
}
.card h1 {
  font-family: var(--font-display); font-size: 26px; line-height: 1.18;
  letter-spacing: -0.02em; margin: 0 0 10px; font-weight: 750;
}
.card .lede { margin: 0 0 24px; color: var(--ink-2); font-size: 16px; }
.card h1.h-alone { margin-bottom: 24px; }       /* a heading with no line under it */
.card form + form { margin-top: 0; }
.card .btn-block { margin-top: 14px; }
.card .fine {
  margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 14px;
}
.card .row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* The front door: a plain log-in (Nov 15) - "Log in", an email and Continue, then
   the code. The card is the size of what's in it. */
.signin-card { max-width: 440px; }
.signin-card h1 { font-size: 28px; }
.signin-card .fine { margin-top: 24px; }
.signin-card .fine a, .see-all .fine a { color: var(--ink-2); }
.signin-sent { margin-bottom: 20px; }
.signin-sent strong { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
/* "Use a different email" and "Didn't get it? Resend code": one quiet row (two on a
   phone), under the code box. */
.signin-alt {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 4px 16px; margin-top: 14px;
  color: var(--dim); font-size: 14px;
}
.signin-alt .linklike { font-size: 14px; }
.signin-alt .linklike[disabled] { color: var(--faint); text-decoration: none; }
/* /auth's welcome: where to log in next time, two quiet lines. */
.auth-foot-line { margin: 0; }
.auth-foot-line + .auth-foot-line { margin-top: 4px; }

/* The 6-digit code: one real input (autofill, paste, screen readers) laid over six
   boxes that draw what's in it (library.js drawCode). The input is invisible but
   takes every tap; the box for the next digit lights up while it has the focus. */
.code-field { position: relative; }
.code-input {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; opacity: 0; font-size: 17px;
  color: transparent; caret-color: transparent; background: transparent;
}
.code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code-boxes span {
  display: grid; place-items: center; height: 56px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 24px;
  transition: border-color 0.12s, background-color 0.12s;
}
.code-boxes span.active { border-color: var(--dim); background: #0d0d0f; }
.code-field:has(+ .form-error:not([hidden])) .code-boxes span { border-color: rgba(212, 59, 59, 0.7); }
@media (max-width: 380px) {
  .code-boxes { gap: 6px; }
  .code-boxes span { height: 52px; font-size: 22px; }
}
.card .row-actions .btn { flex: 1 1 auto; }
.icon-badge {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--card-2); margin-bottom: 18px; color: var(--ink-2);
}
.icon-badge svg { width: 26px; height: 26px; }
.icon-badge.red { background: var(--red-wash); color: var(--red-ink); }
.icon-badge.amber { background: rgba(217, 164, 65, 0.14); color: var(--amber); }
.icon-badge.green { background: rgba(90, 168, 118, 0.14); color: var(--green); }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--line-2); border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
.loading-line { display: flex; align-items: center; gap: 12px; color: var(--dim); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ video pages

   The player, its overlay, the resume bar, the title block and the thread as the item
   page (/f, /lib: item.html) draws them in .watch-grid. The watch page (/w) is its own
   full-screen shell since Nov 18 (the comments under the video): "the watch page (/w)"
   below. It shares the overlay and the resume bar. */

.watch-grid { display: block; }
/* Phone: the player stays pinned at the top while the notes and thread scroll
   under it, so a timestamp tap is always visible. A sticky element only sticks
   within its parent, so the player column's own box is dissolved (display:
   contents) to let the player stick across the whole page. (The item page itself
   unpins it: .page-item .player-wrap.) */
@media (max-width: 959px) {
  .col-player { display: contents; }
}
.player-wrap {
  position: sticky; top: 0; z-index: 30;
  margin: 0 calc(-1 * var(--gutter));
  background: #000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.player-box { position: relative; background: #000; }
.player-box video {
  display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 72vh;
  background: #000; object-fit: contain;
}
.player-overlay {
  /* Over the player's own controls (player.css .jmp-*: z 1-6). */
  position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; padding: 20px;
  text-align: center; background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.player-overlay p { margin: 0; max-width: 34ch; color: var(--ink); font-weight: 600; }
.player-overlay .sub { color: var(--dim); font-weight: 400; font-size: 14px; }


.resume {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 12px; padding: 12px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.resume .btn-red { flex: 1 1 auto; }
.resume .btn svg { width: 16px; height: 16px; }

.intro { padding: 20px 0 4px; }
.video-title {
  margin: 0; font-family: var(--font-display); font-weight: 750;
  font-size: clamp(23px, 6vw, 30px); line-height: 1.16; letter-spacing: -0.022em;
  overflow-wrap: anywhere;
}
.video-meta {
  margin: 8px 0 0; color: var(--dim); font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.video-meta .dot { padding: 0 6px; color: var(--faint); }
/* An item page's "✓ Watched" / "N% watched so far" (item.js): quiet, under the meta,
   one line tall even while empty - the live update after a pause only changes words. */
.watch-line {
  margin: 4px 0 0; min-height: 1.45em; line-height: 1.45; color: var(--faint);
  font-size: 13.5px; font-variant-numeric: tabular-nums;
}

.sec-h {
  display: flex; align-items: baseline; gap: 8px;
  margin: 30px 0 12px; font-size: 13px; font-weight: 700; color: var(--dim);
  letter-spacing: 0.09em; text-transform: uppercase;
}
.sec-h .count { color: var(--faint); font-weight: 600; }

.empty-note { color: var(--dim); font-size: 15px; margin: 0; }

.ts {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: 1px;
  margin: 0 2px; padding: 2px 8px 2px 6px; min-height: 26px;
  border: 0; border-radius: 999px; background: var(--tint); color: var(--ink);
  font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  cursor: pointer; line-height: 1.2;
}
.ts:hover { background: var(--tint-hi); color: #fff; }
.ts svg { width: 10px; height: 10px; }
/* One of Jay's timecoded notes (common.js JM.noteChip): the time it's at, first in its
   bubble or card body. A link (to the submission's page) drawn as the .ts chip - never
   underlined, never wrapped mid-time - and a click plays the video from there. */
.note-t { margin-left: 0; text-decoration: none; white-space: nowrap; }

/* thread */
.thread-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
}
.msg.coach .msg-avatar { background: var(--red); color: #fff; }
.msg.student .msg-avatar { background: var(--card-3); color: var(--ink-2); }
.msg-main { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.msg-who { font-weight: 700; font-size: 14.5px; }
.msg-when { color: var(--faint); font-size: 13px; }
.msg-bubble {
  padding: 11px 14px; border-radius: 4px 14px 14px 14px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5;
}
.msg.coach .msg-bubble { background: #1b1515; border-color: #342424; color: var(--ink); }
.msg-bubble .ts:first-child { margin-left: 0; }
.msg.pending .msg-bubble { opacity: 0.6; }
/* A comment that didn't make it stays where it was, saying so (common.js bubble):
   the whole bubble is the "try again". */
.msg.failed .msg-bubble { border-color: var(--red-lo); cursor: pointer; }
.msg-retry {
  min-height: 24px; color: var(--red-ink); font-size: 13px; font-weight: 600;
  text-decoration-color: rgba(255, 123, 113, 0.5);
}

/* "Questions and comments" under one thing - an item page (/f, /lib) and a worksheet
   (common.js JM.comments). The box is one fixed height and its status line is
   reserved, so nothing on the page moves while they type; only the thread grows,
   once they post. */
.cthread-empty { margin: 0; color: var(--dim); font-size: 15px; }
.cthread:not(:empty) + .cthread-empty { display: none; }
/* Its heading is the first thing in its section, but never the first in the column. */
.col-side .cthread-sec > .sec-h:first-child { margin-top: 30px; }
.cbox { margin-top: 14px; }
.cbox textarea.cbox-field {
  display: block; width: 100%; height: 96px; min-height: 0; margin: 0; box-sizing: border-box;
  padding: 10px 12px; border-radius: 12px; resize: none;
  font-size: 16px; line-height: 1.4;
}
.cbox-foot { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
/* Two lines, always: "Couldn't reach Jay's page - ..." fits a phone without moving. */
.cbox-say {
  flex: 1; min-width: 0; height: 40px; margin: 0; overflow: hidden;
  color: var(--dim); font-size: 13px; line-height: 20px;
}
.cbox-say.bad { color: var(--red-ink); }
.cbox-go { flex: none; min-width: 92px; }
.panel > .cthread-sec { max-width: 860px; }

/* A phone on its side (Nov 17 review): a 72vh player left the words under it a strip.
   (The watch page's own sideways layout is vthread.css's: the comments beside it.) */
@media (max-width: 959px) and (max-height: 500px) {
  .player-box video { max-height: 46vh; max-height: 46dvh; }
}

.watch-foot {
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 14px;
}
.watch-foot p { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.watch-foot svg { width: 16px; height: 16px; flex: none; color: var(--faint); }
.watch-foot .foot-eye { flex-wrap: nowrap; align-items: flex-start; }
.watch-foot .foot-eye svg { margin-top: 2px; }
.watch-foot a { color: var(--dim); }

/* loading skeleton */
.skeleton-player {
  margin: 0 calc(-1 * var(--gutter)); aspect-ratio: 16 / 9; background: #050506;
  display: grid; place-items: center;
}
.skeleton-line { height: 18px; border-radius: 8px; background: var(--card-2); margin-top: 18px; }
.skeleton-line.w70 { width: 70%; height: 26px; margin-top: 22px; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w90 { width: 90%; }
.skeleton-line.w80 { width: 80%; }
.shimmer { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

/* ------------------------------------------------------------------ the watch page (/w)

   Nov 18 2026, the comments under the video (docs/COMMENTS.md section 3): ONE column, as
   on YouTube - the video, the title, the description box, "N Comments" + Sort, the box,
   the comments - drawn by JM.vthread on its full-screen shell (.vt.vt-page): the
   picture's size, the pinned video and the docked box on a phone, the keyboard, all of
   it is vthread.css's. What is here is the page's own: the site's banner and top bar in
   the shell's title bar, <main> inside the shell, the loading and message states, the
   resume bar and the footer.

   Everything is scoped under .w-root (the shell, watch.html), never body.page-watch
   alone: vthread's own test page wears that body class with a top bar of its own. */
html:has(> body.page-watch) { height: 100%; overscroll-behavior: none; }
body.page-watch { height: 100%; overflow: hidden; overscroll-behavior: none; }
/* The site's own type in the site's own parts (the comments' is vthread's, 15px). */
.vt.w-root .w-top, .vt.w-root .w-pane { font: 16px/1.55 var(--font); }
/* The title bar: the banner (coach preview, view-as) over the top bar, as on every page,
   only a little shorter - the mockup's 60px (52 on a phone, 44 on its side). The picture
   is sized around what it really takes (watch.js measureChrome: --vt-chrome). A keyboard
   on a phone puts it away (vthread.css .vt.kb .vt-top). The mockup's line under it is
   drawn inside it (an inset shadow), so the bar keeps those heights.
   (The banner is always in the page, `hidden` unless it's a preview: the rules for a bar
   under a banner say :not([hidden]), or they would beat the phone sizes below.) */
.vt.w-root .w-top { display: block; box-shadow: inset 0 -1px 0 #2c2c31; }
.w-root .w-top .topbar { padding-top: max(7px, env(safe-area-inset-top)); padding-bottom: 7px; }
.w-root .w-top .coach-banner:not([hidden]) + .topbar { padding-top: 7px; }
/* His coach preview (view-as, or his own marked browser): the banner stays on screen
   while a keyboard is up - base.html's rule, he must never mistake a preview for the
   real thing. Where the keyboard puts the title bar away (a phone; a short iPad window)
   only the top bar under the banner goes. (fitKeyboard measures what is left.) */
.vt.vt-page.w-root.w-preview.kb .w-top { display: block; }
.vt.vt-page.w-root.w-preview.kbbig.short:not(.dock) .w-top .topbar { display: none; }
/* An iPad's full keyboard: the resume bar steps aside with the title and the write-up
   (vthread.css), so the box and its buttons still show above the keys. */
.vt.w-root.kbbig:not(.dock) .resume { display: none; }
.vt.w-root .w-main {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  width: 100%; max-width: none; margin: 0; padding: 0;
}
.w-root .w-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* Loading: the picture's black band (vthread.css, Nov 19) - edge to edge, as tall as the
   picture will be (the same room: the window less the title bar - --vt-chrome, set by
   wtop.js before this is first drawn - and the docked box's bar, --vt-dockh, the same
   240px floor, the 16:9 the page starts with) - and the grey lines in the column under
   it, so nothing moves when a 16:9 video (his recordings) arrives. The shell can't know a
   video's shape before /api/v answers: where the window's width limits the picture, a 4:3
   or upright video grows the band once, when it arrives. */
.w-root #st-loading { width: 100%; max-width: none; margin: 0; padding: 0 0 32px; }
.w-root #st-loading .skeleton-player {
  width: 100%; margin: 0; border-radius: 0; background: #000; aspect-ratio: var(--vt-ar);
  max-height: max(240px, calc(var(--vt-vh) - var(--vt-chrome) - var(--vt-dockh)));
}
.w-root #st-loading .w-skcol { max-width: 1048px; margin: 0 auto; padding: 14px 24px 0; }
.w-root #st-loading .skeleton-line:first-child { margin-top: 4px; }
.w-root #st-loading .loading-line { margin-top: 22px; }
.w-root #st-loading .w-skdock { display: none; }
/* Nov 20 2026 - the comment box docked in a bar at the bottom of a computer's or an iPad's
   window (vthread.css, "their page on a computer or an iPad"). Loading, the bar is already
   there, the same height and in the same place (sticky at the pane's bottom, under the
   column's grey lines as the real bar is over the title), saying "Loading your video…" -
   so nothing pops in at the bottom when the page arrives. Only what is sure to be where
   it is drawn is drawn: Comment's stand-in at the bar's end. Where the avatar and the
   pill start depends on what comes at the bar's start - "N comments ↓" (its count) or,
   coming back part-way through, the resume offer (much wider) - and the shell can't know
   either before /api/v answers: a stand-in pill drawn there slid sideways when the page
   arrived (Nov 20 2026 review), so the words stand in the bar on their own. */
@media (min-width: 641px) and (min-height: 561px) {
  .w-root #st-loading { display: flex; flex-direction: column; padding-bottom: 0; }
  .w-root #st-loading > * { flex: none; }
  .w-root #st-loading .w-skcol { width: 100%; padding-bottom: 28px; }
  /* (The band's fill under a picture that leaves less than the title's first line above the
     bar - vthread.css --vt-bandfill: the skeleton's black reaches the bar the same way.) */
  .w-root #st-loading .skeleton-player { box-sizing: content-box; padding-bottom: var(--vt-bandfill, 0px); }
  .w-root #st-loading .w-skcol .loading-line { display: none; }
  .w-root #st-loading .w-skdock {
    display: block; position: sticky; bottom: 0; margin-top: auto; height: var(--vt-dockh);
    background: var(--vt-page-bg, #0a0a0b); box-shadow: inset 0 1px 0 #222226;
  }
  .w-root .w-skdock-in { display: flex; align-items: flex-end; gap: 12px; height: 100%; max-width: 1048px; margin: 0 auto; padding: 0 24px 12px; }
  /* (The words on the pill's 44px row, where "N comments" will start.) */
  .w-root .w-sk-words { flex: 1; min-width: 0; height: 44px; padding-left: 12px; color: var(--dim); font-size: 15px; line-height: 44px;
                        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* (Send's stand-in, as wide as Send - Nov 23 2026: the button said "Comment" until the
     one-on-one audit 76.) */
  .w-root .w-sk-btn { flex: none; width: 70px; height: 40px; margin: 0 0 2px; border-radius: 20px; background: #232327; }
  /* His coach preview: the bar also says why it can't post, a line over the pill (76px,
     the old peek) - the server knows it's a preview (the shell's .w-preview), so the band
     leaves it that room from the first paint; watch.js sets the class again by /api/v.
     (The bar's own bottom inset is 9px then: Send's stand-in sits where Send will.) */
  .vt.vt-page.w-root.w-preview { --vt-dockh: 76px; }
  .vt.vt-page.w-root.w-preview .w-skdock-in { padding-bottom: 9px; }
  /* "Resume at 14:02 / Start over": the bar's lead, in place of "N comments ↓" while it is
     offered (watch.js moves #resume into the bar - the band leaves no peek for it under the
     picture any more). The bar's own button shapes: 40px, round. */
  .w-root .vt-compose > .resume { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 8px 0 0; padding: 0; border: 0;
                                  border-radius: 0; background: none; }
  .w-root .vt-compose > .resume .btn { flex: none; min-height: 40px; height: 40px; padding: 0 16px; gap: 6px; border-radius: 20px;
                                       font: 650 14px/1.2 var(--font); }
  .w-root .vt-compose > .resume .btn svg { width: 16px; height: 16px; }
  .w-root .vt-compose > .resume:not([hidden]) ~ .vt-jump { display: none; }
  /* The column's end: the footer, then the bar in its own place. */
  .w-root .vt-under > .w-foot { margin-bottom: 28px; }
}
/* Under 900px wide the bar is tight: "Start over" is its icon (its name is its aria-label). */
@media (min-width: 641px) and (max-width: 899px) and (min-height: 561px) {
  .w-root .vt-compose > .resume #restart-btn { width: 40px; padding: 0; }
  .w-root .vt-compose > .resume #restart-btn span { display: none; }
}
/* The docked layouts (vthread.css's phones) load as they always have. */
@media (max-width: 640px), (max-height: 560px) and (min-width: 560px) {
  .w-root #st-loading { max-width: calc(76vh * 16 / 9 + 48px); margin: 0 auto; padding: 16px 24px 32px; }
  .w-root #st-loading .skeleton-player { aspect-ratio: 16 / 9; max-height: none; border-radius: 16px; background: #050506; }
  .w-root #st-loading .w-skcol { max-width: none; margin: 0; padding: 0; }
  .w-root #st-loading .skeleton-line:first-child { margin-top: 22px; }
}
.w-root #st-msg {
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
/* "Resume at 14:02 / Start over", until it plays: under the picture on a phone, at the
   start of the docked comment bar on a computer and an iPad (above, Nov 20 2026). (Its
   buttons keep the site's look: the comments' own button reset - font and colour
   inherited - is only for the comments.) */
.w-root .resume { margin: 2px 0 14px; padding: 8px; }
.w-root .resume .btn { min-height: 42px; font: 650 15px/1.2 var(--font); }
.w-root .resume .btn-red { color: #fff; }
.w-root .resume .btn-ghost { color: var(--ink-2); }
/* The footer, under the comments ("Not you?", Privacy) - on a phone between the last
   comment and the docked box, so it is always reachable. */
.w-root .w-foot { margin: 30px 0 22px; }
.w-root .w-foot .linklike { color: var(--ink-2); font-size: 14px; }
/* A comment that is still being sent, or didn't go: a little quieter until it's there. */
.w-root .vt-cm.w-local > .vt-cm-main > .vt-body { color: var(--ink-2); }
@media (max-width: 640px) {
  .w-root .w-top .topbar { padding-top: max(3px, env(safe-area-inset-top)); padding-bottom: 3px; }
  .w-root .w-top .coach-banner:not([hidden]) + .topbar { padding-top: 3px; }
  .vt.vt-page.w-root.w-preview.kb .w-top .topbar { display: none; }
  .w-root #st-loading { padding: 0 0 24px; }
  .w-root #st-loading .skeleton-player { border-radius: 0; }
  .w-root #st-loading .skeleton-line, .w-root #st-loading .loading-line { margin-left: 14px; margin-right: 14px; }
  .w-root .w-foot { margin: 22px 0 18px; }
}
@media (max-height: 560px) and (min-width: 560px) {
  /* (The shell already keeps clear of the notch: the bar needs no inset of its own.) */
  .w-root .w-top .topbar, .w-root .w-top .coach-banner:not([hidden]) + .topbar { padding: 0 var(--gutter); }
  .w-root .w-top .brand, .w-root .w-top .topbar-link { min-height: 44px; }
  .vt.vt-page.w-root.w-preview.kb .w-top .topbar { display: none; }
}
@media (max-width: 359px) { .w-root .w-top .brand-sub { display: none; } }

/* ------------------------------------------------------------------ an item page in /w's shell

   Nov 20 2026 (Jason: "all the videos should be able to be commented on and it should be a
   unilateral experience for the user"; docs/UNIFIED-COMMENTS.md section 13): an item that
   plays a video (/f, /lib - the server says so in the shell: body.has-band) is /w's page,
   item.html's `.vt.vt-page.w-root.vt-item` - every .w-root rule above - with the item
   pages' own: their floors (vthread.css .vt-item), their top bar's height, the description
   box's "✓ Watched", the download in the band when the video can't play, link cards. */
html:has(> body.page-item.has-band) { height: 100%; overscroll-behavior: none; }
body.page-item.has-band { height: 100%; overflow: hidden; overscroll-behavior: none; }
/* The top bar keeps the item pages' height at every width - the base bar's 12px insets,
   70px (Nov 19 review: the trail and the band are sized from it; the bar is never taller or
   shorter for a page's content). /w's own bar is the mockup's 60 (52, 44). */
.vt.w-root.vt-item .w-top .topbar { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 12px; }
.vt.w-root.vt-item .w-top .coach-banner:not([hidden]) + .topbar { padding-top: 12px; }
.vt.w-root.vt-item .w-top .brand, .vt.w-root.vt-item .w-top .topbar-link { min-height: var(--tap); }
/* "✓ Watched" / "40% watched so far" at the end of the description box's top line - one of
   his videos only (.on). Its room is held whatever it says (the widest, "100% watched so
   far"), even empty: the words change in place as reports land, and the line never
   re-wraps - nothing under it moves (as the old page held its own line for it). */
.vt-item #i-watched.on { display: inline-block; min-width: 10.6em; white-space: nowrap; vertical-align: top; }
.vt-item #i-watched:not(:empty)::before { content: "\00a0·\00a0"; }   /* (no-break: a leading space at an inline-block's start is dropped) */
.vt-item #i-watched.on:empty::after { content: "\00a0"; }          /* (its line, held while it says nothing) */
/* A band whose video can't play here (a file this browser won't decode): why, and its
   download, in the picture's place. */
.vt.vt-item .vt-vid > .vt-cant {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 20px; text-align: center; font: 16px/1.5 var(--font);
}
.vt.vt-item .vt-cant-why { margin: 0; color: var(--ink-2); }
/* A comment's link cards (as under every item's comments), under its words. */
.vt.vt-item .vt-cm-main > .lp-list { margin: 8px 0 2px; }
.vt.vt-item .vt-body .inline-link { color: var(--vt-link, #3ea6ff); }

/* ------------------------------------------------------------------ library */

.lib-head { padding: 12px 0 18px; }
.lib-head h1 {
  margin: 0; font-family: var(--font-display); font-weight: 780;
  font-size: clamp(28px, 7.4vw, 40px); line-height: 1.1; letter-spacing: -0.025em;
}
.lib-head h1 .accent { color: var(--red); }
.lib-head p { margin: 8px 0 0; color: var(--dim); }
.lib-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lib-item a, .lib-item .card-link {
  display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 10px; border-radius: 16px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  transition: border-color 0.15s, background-color 0.15s, transform 0.12s;
}
.lib-item a:hover { border-color: var(--line-2); background: #18181a; }
.lib-item a:active { transform: scale(0.995); }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 20%, #2a1a1a, #121213 70%);
}
/* The placeholder sits underneath; the poster covers it, and library.js hides a
   poster that fails to load (e.g. its signed URL expired on a long-open page). */
.thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb .ph {
  position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.5);
}
.thumb .ph svg { width: 26px; height: 26px; }
.thumb .dur {
  position: absolute; right: 6px; bottom: 8px; padding: 1px 6px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* How far into it they are (JM.watchBar). Oct 6, "really easy to read ... how much has
   been watched": thicker than the 4px it was, on a phone too - still an overlay at the
   foot, under the chip (.dur sits 8px up), so no card changes size. */
.thumb progress {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 6px;
  -webkit-appearance: none; appearance: none; border: 0; display: block;
  background: rgba(255, 255, 255, 0.18); color: var(--red);
}
.thumb progress::-webkit-progress-bar { background: rgba(255, 255, 255, 0.18); }
.thumb progress::-webkit-progress-value { background: var(--red); }
.thumb progress::-moz-progress-bar { background: var(--red); }
.lib-text { min-width: 0; padding: 2px 4px 2px 0; }
.lib-title {
  margin: 0; font-weight: 700; font-size: 16px; line-height: 1.3; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.lib-meta { margin: 5px 0 0; color: var(--dim); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 750; letter-spacing: 0.02em; line-height: 1.4;
}
.badge svg { width: 12px; height: 12px; }
.badge.new { background: var(--red); color: #fff; }
.badge.replied { background: var(--ink); color: #111; }
.badge.done { background: rgba(90, 168, 118, 0.14); color: #8fd3a6; }
.badge.progress { background: var(--card-2); color: var(--ink-2); }
.badge.cmt { background: var(--card-2); color: var(--ink-2); }

.see-all {
  margin-top: 22px; padding: 18px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
}
.see-all h2 { margin: 0 0 4px; font-size: 17px; font-weight: 720; }
.see-all p { margin: 0 0 14px; color: var(--dim); font-size: 15px; }
.see-all .code-box { margin-top: 14px; }
/* The same code field as the log-in page's: its button and messages keep their own
   spacing and colours (the section's own paragraph rule above doesn't reach them). */
.see-all .code-box .btn-block { margin-top: 14px; }
.see-all .code-box .form-error, .see-all > .form-error { margin: 10px 0 0; color: #ffc1bb; }
.see-all .code-box .form-note { margin: 10px 0 0; }
.see-all .code-box .form-note + .form-note { margin-top: 4px; }

.empty-state, .fail-state {
  margin-top: 8px; padding: 28px 20px; border-radius: 18px; text-align: center;
  background: var(--card); border: 1px dashed var(--line-2);
}
.fail-state { border-style: solid; border-color: rgba(212, 59, 59, 0.35); background: #171213; }
.empty-state .icon-badge, .fail-state .icon-badge { margin: 0 auto 14px; }
.empty-state h2, .fail-state h2 { margin: 0 0 6px; font-size: 18px; }
.empty-state p, .fail-state p { margin: 0 auto; color: var(--dim); max-width: 44ch; }
.fail-state .btn { margin-top: 16px; }

.lib-foot {
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
}
.lib-foot a { color: var(--dim); }

/* ------------------------------------------------------------------ prose (privacy) */

.prose { max-width: 680px; padding: 16px 0 40px; }
.prose h1 { font-family: var(--font-display); font-size: 32px; letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 8px; }
.prose h2 { font-size: 18px; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose .updated { color: var(--faint); font-size: 14px; }

/* ------------------------------------------------------------------ view-as banner */

/* Jason previewing a student's page: pinned to the top of every page, so a
   screenshot or a glance can never be mistaken for the student's own view. */
.coach-banner.viewas {
  position: sticky; top: 0; z-index: 70;
  height: calc(var(--banner-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0;
  line-height: var(--banner-h); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(90deg, #4a3410, #5a3f12 50%, #4a3410);
  color: #ffe3a8; font-size: 13.5px; font-weight: 700;
  border-bottom: 1px solid rgba(255, 210, 120, 0.22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
:root { --banner-h: 38px; }
/* The watch page's player sticks to the top on phones: under the banner, not behind it. */
body.is-viewas .player-wrap { top: calc(var(--banner-h) + env(safe-area-inset-top)); }

/* ------------------------------------------------------------------ home: the sidebar

   ONE element, two layouts (home.html): from 960 px a column beside the page; on a
   phone a drawer behind Menu on the bottom bar. Every badge slot is always drawn -
   empty or not - so nothing in a row moves when a count changes. */

.side {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  width: min(84vw, 320px);
  display: flex; flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom))
           max(14px, env(safe-area-inset-left));
  background: var(--bg-2); border-right: 1px solid var(--line);
  overflow-y: auto; overscroll-behavior: contain;
  /* Closed, it is off-screen AND out of the tab order (visibility), so a keyboard
     never lands on links nobody can see. Transform only: the page behind never moves. */
  transform: translateX(-102%); visibility: hidden;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.26s;
}
body.side-open .side {
  transform: none; visibility: visible;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}
.side-scrim {
  position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.26s;
}
body.side-open .side-scrim { opacity: 1; pointer-events: auto; }
body.side-open { overflow: hidden; }
/* Jason's preview on a phone: the banner stays on top, so the drawer starts under it. */
body.is-viewas .side { top: calc(var(--banner-h) + env(safe-area-inset-top)); padding-top: 16px; }

.side-top { display: flex; align-items: center; min-height: 40px; margin-bottom: 20px; }
.side-brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; min-width: 0;
  color: var(--ink); text-decoration: none; padding-left: 4px;
}
.side-brand .brand-name { font-size: 14px; }
.side-brand-sub {
  color: var(--dim); font-size: 13px; font-weight: 500;
  padding-left: 9px; border-left: 1px solid var(--line-2);
}
.side-close {
  margin-left: auto; width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none; color: var(--dim); cursor: pointer;
}
.side-close:hover { background: var(--card); color: var(--ink); }
.side-close svg { width: 20px; height: 20px; }

/* Everything a student sends Jay starts here: the side column's one white button. */
.send-btn {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: var(--tap);
  padding: 0 12px; border: 0; border-radius: 12px;
  background: var(--btn); color: var(--btn-ink); font-size: 14.5px; font-weight: 700; text-align: left;
  cursor: pointer; transition: background-color 0.15s;
}
.send-btn:hover { background: var(--btn-hi); }
.send-btn:active, .send-btn[aria-expanded="true"] { background: var(--btn-lo); }
.send-btn svg { width: 18px; height: 18px; }
.send-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.send-chev { display: grid; place-items: center; }
.send-chev svg { width: 14px; height: 14px; }
.send-btn.is-off, .send-btn.is-off:hover { background: var(--card-2); color: var(--faint); cursor: default; }
.send-cap { margin: 8px 4px 0; color: var(--faint); font-size: 12.5px; line-height: 1.4; }

.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; }
.side-group {
  margin: 20px 12px 6px; color: var(--faint);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.side-row {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 40px; padding: 0 12px; border-radius: 10px;
  color: var(--dim); text-decoration: none; font-size: 14.5px; font-weight: 600;
  transition: background-color 0.15s, color 0.15s;
}
.side-row svg { width: 18px; height: 18px; color: var(--faint); transition: color 0.15s; }
.side-row:hover { background: var(--card); color: var(--ink); }
.side-row:hover svg { color: var(--ink); }
.side-row[aria-current="page"] { background: var(--card-2); color: var(--ink); }
.side-row[aria-current="page"] svg { color: var(--ink); }
/* Inside the row's own box, so marking the page you're on moves nothing. */
.side-row[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 20px;
  margin-top: -10px; border-radius: 2px; background: var(--ink);
}
.side-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-slot { flex: none; width: 28px; display: flex; align-items: center; justify-content: flex-end; }
.side-slot.wide { width: 86px; }

.pill {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700;
  line-height: 20px; text-align: center; font-variant-numeric: tabular-nums;
}
.pill.grey { background: var(--card-3); color: var(--ink-2); }
.ndot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.chip-now {
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--red-wash); color: var(--red-ink); font-size: 11.5px; font-weight: 700;
  animation: badge-in 0.12s ease-out;
}
.chip-now.amber { background: rgba(217, 164, 65, 0.14); color: var(--amber); }
@keyframes badge-in { from { opacity: 0; } to { opacity: 1; } }
/* Sent to Jay while a file is still going up (the composer can be closed). */
.ring { display: grid; place-items: center; }
.ring svg { width: 16px; height: 16px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 2.6; }
.ring-track { stroke: var(--card-3); }
.ring-arc { stroke: var(--ink); stroke-linecap: round; stroke-dasharray: 47.12; stroke-dashoffset: 47.12; transition: stroke-dashoffset 0.2s linear; }

.side-acct { position: relative; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.side-nav + .side-acct { margin-top: auto; }
.acct-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px;
  padding: 6px 8px; border: 0; border-radius: 10px; background: none;
  color: var(--ink); text-align: left; cursor: pointer;
}
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: var(--card); }
.acct-btn > svg { width: 14px; height: 14px; color: var(--faint); }
.acct-av {
  width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-3); color: var(--ink-2); font-size: 13px; font-weight: 700;
}
.acct-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.acct-name, .acct-mail { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-name { font-size: 14px; font-weight: 600; }
.acct-mail { font-size: 12px; color: var(--faint); }
.acct-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 5; padding: 6px;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
}
.acct-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px;
  border: 0; border-radius: 8px; background: none; color: var(--ink-2); text-align: left;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.acct-item:hover, .acct-item:focus-visible { background: var(--card-3); color: var(--ink); }
.acct-item svg { width: 16px; height: 16px; color: var(--faint); }

/* ---- phones: the bottom bar. Five full words, Send in the middle. */
.bbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
  background: rgba(10, 10, 11, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid var(--line);
}
.bb {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-height: 56px; padding: 6px 2px 5px; border: 0; background: none;
  color: var(--faint); font: inherit; font-size: 10.5px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: color 0.15s;
}
.bb > svg { width: 21px; height: 21px; }
.bb > span:not(.pill):not(.ndot):not(.bb-plus) { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bb:hover { color: var(--ink-2); }
.bb[aria-current="page"] { color: var(--ink); }
.bb[aria-current="page"] > svg { color: var(--ink); }
.bb[aria-current="page"]::before {
  content: ""; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px;
  border-radius: 0 0 2px 2px; background: var(--ink);
}
.bb .pill {
  position: absolute; top: 5px; left: calc(50% + 6px);
  min-width: 16px; height: 16px; padding: 0 4px; line-height: 16px; font-size: 10.5px;
  box-shadow: 0 0 0 2px #0a0a0b;
}
.bb .ndot { position: absolute; top: 9px; left: calc(50% + 8px); box-shadow: 0 0 0 2px #0a0a0b; }
/* Inside the bar, never hanging over the page: it covers nothing. */
.bb-plus {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--btn); color: var(--btn-ink); transition: background-color 0.15s;
}
.bb-plus svg { width: 22px; height: 22px; }
.bb-send:hover .bb-plus { background: var(--btn-hi); }
.bb-send.is-off .bb-plus { background: var(--card-2); color: var(--faint); }
.bb-send.is-off .bb-plus svg { width: 18px; height: 18px; }
body.page-home main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---- "Send Jay something": its choices - uploading first, drawn as the main one. A popover under the button on a
   desktop (placed by home.js), a short sheet from the bottom on a phone. */
.chooser {
  position: fixed; z-index: 80; width: 320px; padding: 6px;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow);
}
.chooser-scrim { position: fixed; inset: 0; z-index: 79; background: rgba(0, 0, 0, 0.5); }
.ch-item {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; align-items: center;
  width: 100%; min-height: 52px; padding: 8px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--ink); text-align: left; cursor: pointer;
}
.ch-item:hover, .ch-item:focus-visible { background: var(--card-3); }
.ch-ico {
  grid-row: span 2; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: var(--card-3); color: var(--ink);
}
.ch-item:hover .ch-ico, .ch-item:focus-visible .ch-ico { background: var(--line-2); }
.ch-ico svg { width: 17px; height: 17px; }
.ch-main .ch-ico, .ch-main:hover .ch-ico, .ch-main:focus-visible .ch-ico { background: var(--btn); color: var(--btn-ink); }
.ch-t { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.ch-s { font-size: 12.5px; font-weight: 500; color: var(--dim); line-height: 1.35; }

/* ---- the send window */
.cmp, .callw {
  width: min(560px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
}
.cmp::backdrop, .callw::backdrop { background: rgba(0, 0, 0, 0.6); }
.cmp-in { display: flex; flex-direction: column; padding: 18px 22px 18px; }
.cmp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cmp-h {
  margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 780; letter-spacing: -0.01em;
}
.cmp-x {
  margin-left: auto; width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border: 0; border-radius: 10px; background: none; color: var(--dim); cursor: pointer;
}
.cmp-x:hover { background: var(--card-2); color: var(--ink); }
.cmp-x svg { width: 19px; height: 19px; }
/* "Submit the assignment": what it's for, and what to send in Jay's own words, in a
   box that scrolls on its own. One fixed height on every tab - and the body below
   gives that height back (.cmp.for), so the window fits a 1280x720 viewport; shorter
   desktop windows (a 1366x768 laptop's browser) get the tighter sizes further down. */
.cmp-for { flex: none; margin: -6px 0 12px; }
.cmp-for-t {
  margin: 0 0 4px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmp .cmp-lab.cmp-for-lab { margin: 0 0 6px; line-height: 18px; }
/* Three and a half lines (two and a half on a phone): the half line says it scrolls. */
.cmp-for-what {
  height: 88px; overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink-2); font-size: 14px; line-height: 20px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.cmp-for-what:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.seg {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px;
  margin-bottom: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
}
.seg-b {
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px;
  border: 0; border-radius: 8px; background: none; color: var(--dim);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.seg-b svg { width: 16px; height: 16px; }
.seg-b:hover { color: var(--ink); }
.seg-b[aria-selected="true"] { background: var(--card-3); color: var(--ink); }
/* A fixed height: switching Work / Message - or Work's two steps - never resizes the
   window. */
.cmp-in { position: relative; }
.cmp-body { height: 338px; }
.cmp.for .cmp-body { height: 274px; }
.cmp-pane { height: 100%; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
/* Work: Add (what goes in it) and Details (its title and note), one at a time, each the
   whole pane. A step scrolls only when a phone's keyboard takes the room. */
#pane-work { overflow: hidden; }
.w-step { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.w-add { flex: none; height: 44px; display: flex; align-items: center; gap: 10px; }
.w-addbtn .w-add-chev svg { width: 16px; height: 16px; opacity: 0.85; }
.w-add.phone .w-add-chev { display: none; }
/* Add's menu: under the button, over the list - Files, or A whole folder. Its box is
   the window (.cmp-in), not the scrolling step, so a short window never clips it;
   home.js addMenu puts it under the button. Below the drop overlay. */
.w-addmenu {
  position: absolute; top: 0; left: 0; z-index: 3; width: 290px; padding: 6px;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
}
.w-addmenu[hidden] { display: none; }
.w-am-item {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; align-items: center;
  width: 100%; min-height: 52px; padding: 8px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--ink); text-align: left; cursor: pointer;
}
.w-am-item:hover, .w-am-item:focus-visible { background: var(--card-3); }
.w-am-item[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.w-am-ico {
  grid-row: span 2; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: var(--card-3); color: var(--ink);
}
.w-am-ico svg { width: 17px; height: 17px; }
.w-am-t { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.w-am-s { font-size: 12.5px; font-weight: 500; color: var(--dim); line-height: 1.35; }
.w-pick { min-height: 44px; height: 44px; padding: 0 16px; }
.w-pick[aria-disabled="true"], .w-url-add[aria-disabled="true"] { opacity: 0.55; cursor: default; }
/* Where "Add folder" would be, on a phone: at most three short lines, in the row's 44px. */
.w-phone {
  flex: 1; min-width: 0; margin: 0; color: var(--faint); font-size: 12px; line-height: 14px;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* The link line under the drop area: a quiet "Or add a link", opening into
   the box - both in the same 44px, so nothing below it moves. */
.w-link { flex: none; height: 44px; display: flex; align-items: center; margin-top: 10px; }
.w-link-open { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--dim); }
.w-link-open svg { width: 15px; height: 15px; flex: none; }
.w-link-open[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.w-link-box { flex: 1; min-width: 0; display: flex; gap: 10px; }
.w-link-box[hidden] { display: none; }
/* Nothing in it yet: Next is quiet, so the one red button is "Choose files" (home.js
   goLabel). It still works - pressed empty, it says what to add. */
.btn-red.cmp-go.is-idle { background: var(--card-2); color: var(--ink-2); }
.btn-red.cmp-go.is-idle:hover { background: var(--card-3); color: var(--ink); }
.w-link .cmp-field { flex: 1; min-width: 0; }
.w-url-add { flex: none; min-height: 44px; height: 44px; min-width: 72px; padding: 0 16px; }
/* The parts: takes what the step has left, never less than one whole row. */
.w-list {
  flex: 1 1 0; min-height: 72px; margin-top: 10px; overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 8px; align-content: start;
}
/* Said only while it can take something (home.js toggles .can-add) - and on a phone,
   which can neither drop nor pick a folder, only what a phone can do. */
/* Empty and able to take something, the list is the drop area - the window's main
   thing: a dashed box, "Drop your stems here". On a phone (no dropping, no folders) it
   says what a phone can do. */
.w-list.can-add:empty {
  border: 2px dashed var(--line-2); border-radius: 12px; cursor: pointer;
  place-content: center; justify-items: center; gap: 4px; padding: 12px; text-align: center;
  transition: border-color 0.15s, background-color 0.15s;
}
/* A click or a tap on it opens the file picker (home.js) - so it says so on hover. */
.w-list.can-add:empty:hover { border-color: var(--dim); background: rgba(255, 255, 255, 0.02); }
.w-list.can-add:empty::before { content: "Drop your stems here"; color: var(--ink); font-size: 16px; font-weight: 650; }
.w-list.can-add:empty::after { content: "Files and folders, mixed as you like - up to 6 GB a file"; color: var(--dim); font-size: 13px; }
.w-list.phone.can-add:empty::before { content: "Tap here to choose your files"; }
.w-list.phone.can-add:empty::after { content: "Up to 6 GB a file"; }
/* How far it's got (home.js drawBar). Always in its place - only the fill shows, and
   only while something is going up - so the window never moves when it starts. */
.w-bar {
  flex: none; height: 5px; margin-top: 8px; border-radius: 999px; overflow: hidden;
  background: var(--line-2); visibility: hidden;
}
.w-bar.on { visibility: visible; }
.w-bar-fill, .draft-bar-fill {
  height: 100%; width: 100%; border-radius: inherit; background: var(--ink);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.35s ease, background-color 0.3s ease;
}
.w-bar.wait .w-bar-fill, .draft-bar.wait .draft-bar-fill { background: var(--amber); }
.w-bar.done .w-bar-fill, .draft-bar.done .draft-bar-fill { background: var(--green); }
.w-sum {
  flex: none; height: 20px; margin-top: 4px; display: flex; align-items: center; gap: 10px;
  font-size: 13px; line-height: 20px; color: var(--dim);
}
.w-sum-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-sum-t .spin { flex: none; }
.w-discard { flex: none; min-height: 0; font-size: 13px; line-height: 20px; color: var(--dim); }
/* The whole window as a drop target: said over everything while files are over it. */
.w-over {
  display: none; position: absolute; inset: 8px; z-index: 4; pointer-events: none;
  border: 2px dashed var(--ink-2); border-radius: 12px; background: rgba(21, 21, 23, 0.92);
  place-items: center;
}
.cmp.over .w-over { display: grid; }
.w-over p { margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; }
.w-over svg { width: 22px; height: 22px; color: var(--ink); }
/* A press that takes a moment says so at once: its words, and this beside them. */
.spin {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; opacity: 0.8;
  animation: spin 0.8s linear infinite;
}
.is-busy { cursor: default; }
.cmp-lab { display: block; margin: 12px 0 6px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.cmp-lab.first { margin-top: 2px; }
.cmp-lab .opt { color: var(--faint); font-weight: 500; text-transform: none; letter-spacing: 0; }
/* Scoped above the site's own form rules (input[type=text], textarea min-height),
   so every box in the window matches. 16px: smaller and an iPhone zooms the whole
   page in the moment a box gets focus. */
.cmp input.cmp-field, .cmp textarea.cmp-field, .callw input.cmp-field, .callw select.cmp-field {
  display: block; width: 100%; min-height: 0; margin: 0;
  background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
  font: inherit; font-size: 16px; line-height: 1.4; resize: none;
}
.cmp-field::placeholder { color: var(--faint); }
.cmp .cmp-field:focus, .callw .cmp-field:focus { border-color: var(--dim); outline: none; }
.cmp .cmp-field:focus-visible, .callw .cmp-field:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.cmp input.cmp-field, .callw input.cmp-field, .callw select.cmp-field { height: 44px; }
/* Never squeezed to fit: a step short of room overflows (and the hold-still test
   sees it) instead of quietly drawing 37px boxes. */
.cmp input.cmp-field, .callw .cmp-field { flex-shrink: 0; }
/* The note takes whatever the step has left, so it fits its fixed body. */
.cmp textarea#w-note { flex: 1; min-height: 44px; }
.cmp .cmp-field[readonly] { color: var(--ink-2); background: var(--card-2); }
.cmp textarea.cmp-msg { flex: 1; min-height: 120px; }
.cmp-hint { margin: 8px 2px 0; color: var(--faint); font-size: 12.5px; }
/* One fixed two-line slot above the buttons: an error (red) or else the quiet line.
   Its height never changes, so nothing in the window moves when either appears. */
.cmp-says { flex: none; height: 40px; margin-top: 8px; overflow: hidden; }
.cmp-err, .cmp-keep { margin: 0; font-size: 13px; line-height: 20px; }
.cmp-err { color: var(--red-ink); }
.cmp-err:empty { display: none; }
.cmp-err:not(:empty) + .cmp-keep { display: none; }
.cmp-keep { color: var(--dim); }
.cmp-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 6px; }
/* One width whatever they say ("Next", "Send to Jay", "Checking…", "Sent ✓"; "Cancel",
   "Back", "Send without them"). */
.cmp-go { min-width: 134px; justify-content: center; }
.cmp-back { min-width: 96px; justify-content: center; }
.cmp-go[aria-disabled="true"] { opacity: 0.7; cursor: default; }
/* "Comment on “X”" (home.js forComment): one box, no tabs - a shorter window, set
   before it opens. A long title ends in "…" rather than taking a second line. */
.cmp.cmt .seg { display: none; }
.cmp.cmt .cmp-h { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp.cmt .cmp-body { height: 230px; }

/* ---- the 1-on-1 call's picker (callpick.js; home.html #callw): the send window's frame
   with ONE fixed body - its two steps fill it, one at a time, so switching steps, turning
   a week and any message leave the window exactly as it is. The grid scrolls inside its
   own box, its header row and time column stay put. */
.callw-body { position: relative; height: 480px; }
.callw-step { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.callw-load { align-items: center; justify-content: center; gap: 14px; text-align: center; }
.callw-loading { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--dim); max-width: 42ch; }
.callw-loading.failed { color: var(--ink-2); }
.callw-loading.failed .spin { display: none; }
#callw-where { overflow-y: auto; overscroll-behavior: contain; }
.callw-h3 { flex: none; margin: 0 0 2px; font-size: 17px; font-weight: 700; line-height: 24px; }
.callw-p { flex: none; margin: 0 0 2px; color: var(--dim); font-size: 14px; line-height: 20px; }
.callw select.cmp-field { padding: 0 12px; cursor: pointer; }
.callw-zone { flex: none; height: 44px; display: flex; align-items: center; }
.callw-zone-one {
  margin: 0; min-width: 0; color: var(--ink); font-size: 15.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.callw-clock { flex: none; height: 20px; margin: 10px 0 0; color: var(--dim); font-size: 13.5px; line-height: 20px; }
.callw-place {
  flex: none; height: 24px; margin: 0; display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 650; line-height: 24px;
}
.callw-place-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callw-change { flex: none; min-height: 24px; font-size: 14px; font-weight: 500; }
.callw-quiet {
  flex: none; height: 18px; margin: 0; color: var(--faint); font-size: 12.5px; line-height: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.callw-week {
  flex: none; height: 38px; margin: 8px 0; display: grid; gap: 8px; align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.callw-wk { min-height: 36px; height: 36px; padding: 0 12px; font-size: 13.5px; gap: 6px; }
.callw-wk svg { width: 15px; height: 15px; }
.callw-wk[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.callw-wk[aria-disabled="true"]:active { transform: none; }
.callw-range {
  margin: 0; text-align: center; font-size: 14.5px; font-weight: 650; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
}
/* scroll-padding: a cell scrolled to (the keyboard's focus) is never left under the
   sticky header row or time column. */
.callw-scroll {
  flex: 1 1 0; min-height: 0; overflow: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
  scroll-padding: 46px 4px 4px 68px;
}
.cg {
  width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.cg th, .cg td { padding: 0; }
.cg .cg-corner { width: 64px; }
/* Sticky, and wide enough to cover the 3px gaps around them as the hours scroll under. */
.cg thead th {
  position: sticky; top: 0; z-index: 2; height: 38px; background: var(--bg-2);
  box-shadow: 0 -3px 0 3px var(--bg-2); text-align: center; font-size: 12px; line-height: 1.15;
}
.cg-wd, .cg-dn { display: block; }
.cg-wd { color: var(--dim); font-weight: 600; }
.cg-dn { color: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cg tbody th {
  position: sticky; left: 0; z-index: 1; padding-right: 6px; background: var(--bg-2);
  text-align: right; white-space: nowrap; color: var(--ink-2); font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cg td.cg-c { height: 27px; border-radius: 7px; text-align: center; }
/* Can't be picked (outside his hours, too soon, someone else's call): dashed and inert. */
.cg td.off { border: 1px dashed #34343a; }
.cg td.open {
  background: var(--card-3); border: 1px solid #45454c; cursor: pointer;
  transition: background-color 0.1s, border-color 0.1s;
}
.cg td.open[aria-selected="true"] { background: var(--green); border-color: #7cc596; }
@media (hover: hover) {
  .cg td.open:hover { background: #2d2d33; border-color: var(--dim); }
  .cg td.open[aria-selected="true"]:hover { background: #66b783; border-color: #8fd3a6; }
}
.cg td.open:focus { outline: none; }
.cg td.open:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.cg-mark { display: none; }
.cg td[aria-selected="true"] .cg-mark { display: inline-flex; vertical-align: middle; color: #0b1f12; }
.cg-mark svg { width: 15px; height: 15px; stroke-width: 3; }
/* More than an hour between two rows (his hours cross their midnight): a thin rule. */
.cg tr.cg-rule td { height: 1px; background: var(--line-2); }
.callw-sum {
  flex: none; height: 40px; margin: 8px 0 2px; color: var(--ink-2); font-size: 13px; line-height: 20px;
  overflow: hidden; overflow-wrap: anywhere;
}
/* One width for Next / Saving… / Send these times to Jay / Sending… / Close. */
.callw-go { min-width: 214px; }
@media (min-width: 960px) and (max-height: 700px) {
  .callw-body { height: 400px; }
}
@media (max-width: 479px) {
  .cg .cg-corner { width: 58px; }
  .cg thead th { font-size: 11px; }
  .cg tbody th { font-size: 11.5px; padding-right: 4px; }
  .cg td.cg-c { height: 34px; }
  .callw-wk { padding: 0 10px; }
  /* "Prev" / "Next" on a phone, so the dates between them fit; "week" is still read out. */
  .callw-wk-w {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  .callw-range { font-size: 14px; }
  .callw-go { min-width: 0; flex: 1; }
}
.cg td.cg-empty { height: 120px; color: var(--faint); font-size: 13.5px; text-align: center; }

.toast {
  visibility: hidden;      /* off: not focusable, not read out */
  position: fixed; z-index: 85; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom));
  transform: translateX(-50%); display: flex; align-items: center; gap: 14px;
  /* As wide as its words up to the screen's width, THEN wrapping (below): left at 50%
     alone would leave it half the screen to wrap in. */
  width: max-content; max-width: calc(100vw - 32px); padding: 12px 14px 12px 16px;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, visibility 0s linear 0.2s;
}
.toast.on { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity 0.2s, visibility 0s; }
/* Up to two lines, never cut mid-sentence on a phone: a toast can be the only place
   a comment that didn't post says why ("You've posted a lot this hour - ..."). */
.toast span {
  min-width: 0; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.toast a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--dim); font-weight: 700; white-space: nowrap; }
.toast a:hover { text-decoration-color: var(--ink); }

@media (max-width: 959px) {
  /* The chooser and the window come up from the bottom, in thumb reach. */
  .chooser {
    left: 0; right: 0; bottom: 0; top: auto; width: auto;
    padding: 10px 10px max(14px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0; border-bottom: 0;
  }
  .ch-item { min-height: 62px; }
  .cmp, .callw {
    inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%;
    height: 92vh; height: 92dvh; max-height: 92dvh;
    border-radius: 18px 18px 0 0; border-bottom: 0;
  }
  .cmp-in { height: 100%; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
  .cmp-body, .cmp.for .cmp-body, .cmp.cmt .cmp-body, .callw-body { height: auto; flex: 1; min-height: 0; }
  /* The keyboard up (fitSheet's .kb, set as the sheet resizes for it - never per
     keystroke): only the "For:" line stays, so the box they're typing in has room. */
  .cmp.for.kb .cmp-for-lab, .cmp.for.kb .cmp-for-what { display: none; }
}
/* A 667px-tall phone still fits both of Work's steps at full size: the box is two and
   a half lines and the gaps round it tighter. A narrow window that's tall (an iPad, a
   browser beside the DAW) has the room, so it keeps the desktop's. */
@media (max-width: 959px) and (max-height: 760px) {
  .cmp-for { margin-bottom: 4px; }
  .cmp-for-what { height: 60px; padding: 4px 12px; }
  .cmp.for .seg { margin-bottom: 10px; }
}
/* A desktop window under 700px tall: a 1366x768 laptop's browser is about 657. The
   box goes to one and a half lines (the half says it scrolls), so Send to Jay stays in
   the window. */
@media (min-width: 960px) and (max-height: 700px) {
  .cmp-for { margin-bottom: 6px; }
  .cmp-for-what { height: 48px; }
  .cmp.for .seg { margin-bottom: 10px; }
  .cmp.for .cmp-body { height: 262px; }
}
@media (min-width: 960px) {
  .chooser-scrim { display: none; }
}

.home-head { padding: 8px 0 20px; }
.hello { margin: 0 0 4px; color: var(--dim); font-size: 15px; font-weight: 600; }
.home-title {
  margin: 0; font-family: var(--font-display); font-weight: 780;
  font-size: clamp(28px, 7.4vw, 40px); line-height: 1.1; letter-spacing: -0.025em;
}
.home-title .accent { color: var(--red); }
.home-sub { margin: 8px 0 0; color: var(--dim); max-width: 60ch; }
.home-sub:empty { display: none; }
.panel { min-height: 40vh; }
/* Inside one worksheet / section / folder the tab's big header steps aside: the trail
   at the top of the panel ("The trail inside the home") and the item's own title say
   where you are. */
body.is-drill .home-head { display: none; }
body.is-drill .panel { padding-top: 10px; }
.home-foot { margin-top: 40px; }

.group-h {
  margin: 28px 0 12px; font-size: 13px; font-weight: 700; color: var(--dim);
  letter-spacing: 0.09em; text-transform: uppercase;
}
.panel > .group-h:first-child { margin-top: 4px; }

/* Imported YouTube feedback. The page STILL never asks Google for anything: the
   frame is our own copy, fetched once server-side (youtube_thumbs.py) and served
   from /yt/<id>.jpg. The designed tile stays underneath as the fallback, for a
   video whose thumbnail hasn't been fetched yet or fails to load. */
.thumb.yt { background: radial-gradient(130% 100% at 22% 12%, #3b1717 0%, #1c1011 48%, #101011 100%); }
.thumb.yt .ph { color: #fff; }
/* The glyph and the chip must stay readable over whatever the frame shows - these
   are screen recordings, so often a near-white DAW window. */
.thumb.yt img { filter: brightness(0.74) saturate(0.95); }
.thumb.yt .ph, .thumb.yt .dur { z-index: 1; }
/* How much of it they've played (JM.watchBar): the same bar as a portal video's, over
   the frame like the chip - an overlay, so the card never changes size. */
.thumb.yt progress { z-index: 1; }

/* Where they are with one of Jay's videos, on its picture (JM.watchMarks, Oct 6 - "really
   easy to read if the video has been watched or not and also how much"): a pill in the
   top-left corner. Absolute, like the bar and the chip, so a card is the same size
   whatever it says - or when it says nothing (watch null: we couldn't know). */
.wpill {
  position: absolute; top: 7px; left: 7px; z-index: 2; max-width: calc(100% - 14px);
  padding: 2px 8px; border-radius: 999px; pointer-events: none;
  background: rgba(10, 10, 11, 0.84); color: #fff;
  font-size: 11.5px; font-weight: 750; line-height: 1.45; letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
}
.wpill.watched { color: #8fd3a6; }                       /* calm green: done */
.wpill.new { background: var(--red); color: #fff; }      /* 4.7:1 - the one that asks */
.wpill.unwatched { color: var(--ink-2); }                /* neutral: there, not shouting */
/* Watched: the picture steps back a little, so the ones still to watch stand out. */
.thumb.seen img, .thumb.yt.seen img { filter: brightness(0.5) saturate(0.7); }
.thumb.seen .ph { opacity: 0.7; }
.yt-play {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(244, 242, 238, 0.94); color: var(--btn-ink); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.38);
}
.yt-play svg { width: 19px; height: 19px; margin-left: 3px; }
/* Phone thumbnails are small: a smaller circle, lifted clear of the "YouTube" chip. */
@media (max-width: 719px) {
  .thumb progress { height: 5px; }
  .wpill { top: 6px; left: 6px; padding: 1px 7px; font-size: 11px; }
  .thumb.yt .ph { padding-bottom: 16px; }
  .yt-play { width: 34px; height: 34px; }
  .yt-play svg { width: 15px; height: 15px; margin-left: 2px; }
  /* A lesson's picture with a pill: the glyph steps down a little, clear of it. */
  .lesson-card .thumb.marked .ph { padding-top: 10px; }
  /* A list card's picture is small (136 x 76): pill at the top, chip at the foot - the
     play glyph shrinks into the band between them, so nothing sits on anything. */
  .lib-list:not(.hero) .wpill { top: 5px; left: 5px; font-size: 10.5px; line-height: 1.35; }
  .lib-list:not(.hero) .thumb.marked .ph { padding: 21px 0 28px; }
  .lib-list:not(.hero) .thumb.marked .ph > svg { width: 20px; height: 20px; }
  .lib-list:not(.hero) .thumb.marked .yt-play { width: 24px; height: 24px; box-shadow: none; }
  .lib-list:not(.hero) .thumb.marked .yt-play svg { width: 11px; height: 11px; margin-left: 1px; }
}
.lib-item .is-static { opacity: 0.8; }

/* ------------------------------------------------------------------ home: rows */

/* One row shape for submissions, worksheets and library items. */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 860px; }
.row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 14px; border-radius: 16px; color: var(--ink); text-decoration: none;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color 0.15s, background-color 0.15s, transform 0.12s;
}
a.row:hover { border-color: var(--line-2); background: #18181a; }
a.row:active { transform: scale(0.995); }
.row-tile {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card-2); color: var(--ink-2);
}
.row-tile svg { width: 21px; height: 21px; }
.row-tile.red { background: var(--tint); color: var(--ink); }
/* The section they're in is the stepper's current step: still red. */
.row-tile.sec-tile.red { background: var(--red-wash); color: var(--red-ink); }
.row-tile.green { background: rgba(90, 168, 118, 0.14); color: #8fd3a6; }
.row-tile.amber { background: rgba(217, 164, 65, 0.14); color: var(--amber); }
.row-tile.muted { color: var(--faint); }
.row-main { min-width: 0; }
.row-title {
  margin: 1px 0 0; font-size: 16px; font-weight: 700; line-height: 1.3;
  letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.row-meta { margin: 4px 0 0; color: var(--dim); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.row-note {
  margin: 8px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.row-note.clamp {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.row .badges { margin-top: 8px; }
.row-chevron { align-self: center; color: var(--faint); display: grid; }
.row-chevron svg { width: 18px; height: 18px; }
a.row:hover .row-chevron { color: var(--ink-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 700; line-height: 1.3;
}
.chip svg { width: 14px; height: 14px; }
.chip.go { background: var(--card-3); color: var(--ink); transition: background-color 0.15s, color 0.15s; }
a.row:hover .chip.go { background: var(--ink); color: #111; }
.chip.expired { background: rgba(217, 164, 65, 0.12); color: #e7c079; }
.chip.muted { background: var(--card-2); color: var(--faint); }
.badge.todo { background: rgba(217, 164, 65, 0.14); color: #e7c079; }
.badge.muted { background: var(--card-2); color: var(--faint); }

/* ------------------------------------------------------------------ home: messages */

/* Read-only history: a card per message / journal note / comment thread, with
   the same avatar-and-bubble shapes the watch page's thread uses, so the two
   read as one product. Jay's cards lean red, the student's stay neutral. */
/* minmax(0, 1fr): the "On: <title>" row keeps its title on one line, and a long
   one must shorten with an ellipsis rather than hold the whole column open and
   push the page sideways on a phone. */
.stream {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 860px;
  grid-template-columns: minmax(0, 1fr);
}
.stream-card {
  padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
}
.stream-card.coach { background: #171416; border-color: #2c2427; }
.stream-head { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
.stream-card .msg-avatar { margin-top: 2px; }
/* The card's author is its HEAD's face only: a reply inside keeps its own colours
   (.msg.coach / .msg.student) - Jay red, theirs grey - whoever started the thread. */
.stream-card.coach > .stream-head .msg-avatar { background: var(--red); color: #fff; }
.stream-card.student > .stream-head .msg-avatar { background: var(--card-3); color: var(--ink-2); }
.stream-who { min-width: 0; }
.stream-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0; }
.stream-title {
  margin: 2px 0 0; font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere;
}
.badge.kind {
  background: var(--card-2); color: var(--dim); white-space: nowrap; padding: 2px 8px;
  font-size: 11px; letter-spacing: 0.02em;
}
.stream-card.coach .badge.kind { background: rgba(212, 59, 59, 0.12); color: #e79a94; }
/* "From 01: Drum Fundamentals: Phase" on a course's own message: one line, and a long
   name shortens rather than pushing a phone's card sideways. */
.badge.kind.from-course {
  display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.stream-body {
  margin: 10px 0 0; color: var(--ink-2); line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.stream-body.clamped {
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden;
}
.show-more { margin-top: 6px; font-size: 14px; font-weight: 650; }
.stream-about {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 9px 10px;
  border-radius: 12px; background: var(--card-2); color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.stream-about span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream-about .row-chevron { margin-left: auto; overflow: visible; }
.stream-about svg { width: 16px; height: 16px; color: var(--dim); }
a.stream-about:hover { background: var(--card-3); color: var(--ink); }
.stream-about.is-gone { color: var(--faint); background: transparent; padding-left: 0; }
/* Sent to Jay: "Jay's video: “X”" under a send he answered with one (Nov 23 2026, the
   one-on-one audit 51). Cut with an ellipsis - the row (a grid item) never grows past a phone. */
.sub-item { min-width: 0; }
.sub-answer { margin-top: 8px; }
.stream-thread { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.stream-thread-h {
  margin: 0 0 10px; color: var(--faint); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.stream-replies {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px;
}
.btn.older { margin-top: 16px; }
.inline-link { color: var(--ink); text-decoration-color: var(--dim); }
.inline-link:hover { text-decoration-color: var(--ink); }

/* ---- Link previews (feedback/linkpreview.py). Every card is one fixed height and its
   picture slot is reserved before anything loads, so a card never grows, shrinks or
   moves the page; a missing picture leaves the glyph in the same slot. */
.lp-list { display: grid; gap: 8px; margin-top: 10px; max-width: 560px; container-type: inline-size; }
.lp-item { min-width: 0; }
.lp-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 12px; height: 88px; box-sizing: border-box; padding: 8px 10px 8px 8px;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px;
  overflow: hidden; contain: layout paint;
}
.lp-card:hover { border-color: #45454c; }
.lp-card:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.lp-media {
  position: relative; width: 72px; height: 72px; flex: none; border-radius: 8px; overflow: hidden;
  background: var(--card-3); color: var(--dim); display: grid; place-items: center;
}
.lp-media.round { border-radius: 50%; }
.lp-media.wide { width: 128px; }
.lp-media svg { width: 26px; height: 26px; }
.lp-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@container (max-width: 400px) {
  .lp-media.wide { width: 96px; height: 54px; }
  .lp-card { gap: 10px; }
}
/* A reply's cards on a phone have ~250px: a smaller picture and button so the title
   keeps its room (same height - nothing moves). */
@container (max-width: 320px) {
  .lp-media, .lp-media.wide { width: 52px; height: 52px; }
  .lp-media.wide { width: 72px; height: 41px; }
  .lp-play, .lp-open { width: 38px; height: 38px; }
  .lp-card { gap: 8px; padding-right: 8px; }
}
.lp-text { display: grid; gap: 1px; min-width: 0; }
.lp-title, .lp-sub, .lp-host { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-title { font-weight: 600; font-size: 15px; line-height: 20px; color: var(--ink); text-decoration: none; }
.lp-title::after { content: ""; position: absolute; inset: 0; }       /* the whole card opens it */
.lp-title:focus-visible { outline: none; }
.lp-sub { font-size: 13px; line-height: 18px; color: var(--dim); }
.lp-host { font-size: 12px; line-height: 16px; color: var(--faint); }
.lp-play, .lp-open {
  position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
}
.lp-play { border: 0; background: var(--btn); color: var(--btn-ink); cursor: pointer; }
.lp-play:hover { background: var(--btn-hi); }
.lp-play svg { width: 18px; height: 18px; margin-left: 2px; }
.lp-play.on { background: var(--card-3); color: var(--ink); }
.lp-play.on svg { margin-left: 0; }
.lp-play:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lp-open { z-index: 0; border: 1px solid var(--line-2); color: var(--dim); pointer-events: none; }
.lp-open svg { width: 16px; height: 16px; }
.lp-player { margin-top: 8px; border-radius: 12px; overflow: hidden; background: #000; }
.lp-player.wide { aspect-ratio: 16 / 9; }
.lp-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.msg-main .lp-list { margin-top: 8px; }

/* ------------------------------------------------------------------ home: detail views */

.detail { max-width: 860px; }
.detail-title {
  margin: 0; font-family: var(--font-display); font-weight: 750;
  font-size: clamp(22px, 5.6vw, 28px); line-height: 1.2; letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.detail-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 8px 0 0; color: var(--dim); font-size: 14px; font-variant-numeric: tabular-nums;
}
.qa-list { list-style: none; counter-reset: qa; margin: 26px 0 0; padding: 0; display: grid; gap: 22px; }
.qa { counter-increment: qa; position: relative; padding-left: 42px; }
.qa::before {
  content: counter(qa); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: var(--card-2); color: var(--ink); font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.qa-q {
  margin: 3px 0 10px; color: var(--ink); font-weight: 650; font-size: 16px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.qa-a {
  padding: 12px 14px; border-radius: 4px 14px 14px 14px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink-2); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.qa-a.none { background: transparent; border-style: dashed; color: var(--faint); font-style: italic; }

/* courses */
.course-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.course-card {
  display: block; height: 100%; padding: 16px; border-radius: 18px; color: var(--ink);
  text-decoration: none; background: var(--card); border: 1px solid var(--line);
  transition: border-color 0.15s, background-color 0.15s, transform 0.12s;
}
a.course-card:hover { border-color: var(--line-2); background: #18181a; }
a.course-card:active { transform: scale(0.995); }
.course-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.course-top .row-meta:empty { display: none; }
.course-status { margin-top: 14px; }
.course-bar {
  display: block; width: 100%; height: 6px; margin-top: 12px; border: 0; border-radius: 999px;
  -webkit-appearance: none; appearance: none; background: var(--card-3); color: var(--red);
  overflow: hidden;
}
.course-bar::-webkit-progress-bar { background: var(--card-3); border-radius: 999px; }
.course-bar::-webkit-progress-value {
  background: linear-gradient(90deg, var(--red-lo), var(--red-hi)); border-radius: 999px;
}
.course-bar::-moz-progress-bar { background: var(--red); border-radius: 999px; }
.course-foot { margin: 10px 0 0; color: var(--dim); font-size: 13.5px; }
.detail .course-bar { max-width: 520px; }
.day { margin-top: 26px; }
.day-h {
  display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
  font-size: 13px; font-weight: 700; color: var(--dim); letter-spacing: 0.09em; text-transform: uppercase;
}
.day-time { color: var(--faint); font-weight: 600; letter-spacing: 0.04em; text-transform: none; font-size: 13px; }
.day-h .badge { letter-spacing: 0.02em; text-transform: none; }
.day-items {
  list-style: none; margin: 0 0 0 5px; padding: 0 0 0 16px; display: grid; gap: 8px;
  border-left: 2px solid var(--line);
}
.ditem {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 11px 12px; border-radius: 14px; color: var(--ink); text-decoration: none;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color 0.15s, background-color 0.15s;
}
a.ditem:hover { border-color: var(--line-2); background: #18181a; }
.ditem-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--card-2); color: var(--ink-2);
}
.ditem-icon svg { width: 17px; height: 17px; }
a.ditem .ditem-icon { background: var(--tint); color: var(--ink); }
.ditem-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ditem-title { font-weight: 650; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.ditem-body { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Not the note's text but a line about the text NOT being here, so it must never read
   as something Jay wrote to this student. */
.ditem-body.withheld { color: var(--faint); font-style: italic; }
.ditem.message { align-items: start; background: #1b1515; border-color: #342424; }
.ditem.message .ditem-icon { background: var(--red); color: #fff; }
/* A note of his with its words: the icon at the top, beside the title, as a message's -
   and its "Show more" under the text where it starts, not stretched across the row. */
.ditem.said { align-items: start; }
.ditem-main .show-more { align-self: flex-start; margin-top: 2px; }
.course-end { display: flex; align-items: center; gap: 8px; margin: 24px 0 0; color: var(--dim); font-size: 14.5px; }
.course-end svg { width: 16px; height: 16px; color: var(--faint); }
.empty-note.spaced { margin-top: 18px; }

/* library */
.folder-grid {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.folder {
  display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 126px; padding: 14px;
  border-radius: 16px; color: var(--ink); text-decoration: none;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color 0.15s, background-color 0.15s, transform 0.12s;
}
.folder:hover { border-color: var(--line-2); background: #18181a; }
.folder:active { transform: scale(0.99); }
.folder-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card-2); color: var(--ink-2); margin-bottom: 8px;
}
.folder-icon svg { width: 20px; height: 20px; }
.folder.shared .folder-icon { background: var(--tint); color: var(--ink); }
.folder-name {
  font-weight: 700; font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.folder-count { margin-top: auto; padding-top: 4px; color: var(--dim); font-size: 13px; }
.folder-title { margin-bottom: 16px; }

/* loading skeletons (same shapes as what they stand in for) */
.sk-rows { display: grid; gap: 10px; max-width: 860px; }
.sk-row { height: 78px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.sk-grid { display: grid; gap: 10px; }
.sk-card { height: 98px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }

/* ------------------------------------------------------------------ imported item page */

.page-item .player-wrap { position: relative; top: auto; }
.embed-box iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.open-card {
  display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 18px;
  background: linear-gradient(180deg, #18181b, #131315); border: 1px solid var(--line);
}
.open-tile {
  flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--tint); color: var(--ink);
}
.open-tile svg { width: 26px; height: 26px; }
.open-main { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.open-host {
  margin: 0; color: var(--dim); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.open-state { margin: 0; color: var(--ink-2); font-weight: 600; }
.open-state.expired { color: #e7c079; }
/* Under the title the card is just its button (Oct 4): the line above already says
   where it lives ("Dropbox"), so no tile and no second "DROPBOX". */
.page-item .open-card { padding: 4px 0 0; background: none; border: 0; border-radius: 0; }
.page-item .open-tile, .page-item .open-host { display: none; }
.page-item #open-btn { min-height: 48px; padding: 0 20px; font-size: 16px; }
.eyebrow {
  margin: 0 0 8px; color: var(--red-ink); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.item-notes {
  margin: 0; padding: 16px 16px 16px 18px; border-radius: var(--radius);
  background: linear-gradient(180deg, #1a1616, #161515);
  border: 1px solid #2d2323; border-left: 3px solid var(--red);
  color: var(--ink); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}
.watch-foot a { color: var(--dim); }

/* ------------------------------------------------------------------ desktop / tablet */

@media (min-width: 720px) {
  :root, :host { --gutter: 28px; }
  .lib-list { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
  .lib-item a, .lib-item .card-link {
    display: block; height: 100%; padding: 0; overflow: hidden; border-radius: 18px;
  }
  .lib-item .thumb { border-radius: 0; }
  .lib-item .lib-text { padding: 14px 16px 16px; }
  .lib-title { font-size: 17px; -webkit-line-clamp: 2; }
  .card { padding: 36px 34px 30px; }
  .course-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
  .sk-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
  .sk-card { height: 252px; border-radius: 18px; }
  .row { padding: 16px 18px; }
  .stream-card { padding: 18px 20px; }
  .stream-head { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; }
  .stream-title { font-size: 17px; }
}

@media (min-width: 960px) {
  .watch-grid {
    display: grid; grid-template-columns: minmax(0, 68fr) minmax(330px, 32fr);
    gap: 36px; align-items: start; padding-top: 8px;
  }
  .player-wrap { position: static; margin: 0; border-radius: 16px; overflow: hidden; }
  .skeleton-player { margin: 0; border-radius: 16px; }
  .player-box video { max-height: 78vh; }
  .col-side { min-width: 0; }
  .col-side .sec-h:first-child, .col-side > section:first-child .sec-h { margin-top: 4px; }
  /* An imported item (/f, /lib): the video the page's full width, its notes and
     the questions under it, the way YouTube reads - Oct 3, Jason: "I wish the
     video was full width and the comments were below". Never taller than most of
     the screen; the text under it keeps a readable line.
     Since Nov 19 this is only a short wide window's (the phone layout's 560px or less
     tall); everywhere else wider than a phone the item pages have /w's band - "the item
     pages' band", below. (The player, #embed-wrap, sits before .item-col now, outside
     .col-player: it is given the column's width here itself.) */
  body.page-item .watch-grid { display: block; }
  body.page-item .col-player, body.page-item .col-side, body.page-item .item-band { max-width: calc(76vh * 16 / 9); margin: 0 auto; }
  body.page-item .col-side { margin-top: 26px; }
  body.page-item .col-side > * { max-width: 820px; }

  /* The home: the sidebar is a column beside the page, sticky while the page
     scrolls; the brand moves into it, so the phone's top bar goes. One width from
     960 px up, and no collapse toggle - a sidebar sliding in and out is exactly
     the kind of jump Jason's static-UI rule rules out. */
  body.page-home { display: grid; grid-template-columns: 256px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  body.page-home .coach-banner { grid-column: 1 / -1; grid-row: 1; }
  body.page-home .topbar { display: none; }
  body.page-home .side {
    position: sticky; top: 0; bottom: auto; grid-column: 1; grid-row: 2; align-self: start; z-index: 30;
    width: auto; height: 100vh; height: 100dvh; padding: 20px 14px 16px;
    transform: none; visibility: visible; transition: none;
  }
  body.page-home.is-viewas .side {
    top: calc(var(--banner-h) + env(safe-area-inset-top));
    height: calc(100dvh - var(--banner-h) - env(safe-area-inset-top));
  }
  /* Jason's own marked browser: his "Coach preview" line stays put like view-as's,
     one fixed height, and the sidebar sits under it rather than under its edge. */
  body.page-home.is-marked .coach-banner {
    position: sticky; top: 0; z-index: 40; height: var(--banner-h); padding-top: 0; padding-bottom: 0;
    line-height: var(--banner-h); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body.page-home.is-marked .side { top: var(--banner-h); height: calc(100dvh - var(--banner-h)); }
  body.page-home main {
    grid-column: 2; grid-row: 2; width: 100%; max-width: 1200px; margin: 0;
    padding: 32px 40px 56px;
  }
  body.page-home .side-scrim, body.page-home .side-close, .bbar { display: none; }
  .toast { left: calc(256px + 40px); bottom: 28px; transform: none; }
  .home-head { padding-bottom: 26px; }
  .page-item .player-wrap { border-radius: 16px; overflow: hidden; }
}

/* ------------------------------------------------------------------ the item pages' band

   Nov 19 2026 (docs/COMMENTS.md section 3, "The item pages"): /f and /lib - his older
   YouTube feedback videos, the lessons, his video files - look like /w. Jason on Nov 19
   (about /w: "Can the video be full browser width?") and Oct 3 (about /f: "I wish the
   video was full width and the comments were below"). Wider than a phone (the media
   query is /w's: outside its docked layouts) a video item's picture sits in /w's black
   band (vthread.css, their page): edge to edge right under the top bar, square, no
   shadow; it scrolls away with the page. In the band the picture is as big as fits by
   /w's rule and numbers - the whole width, unless that is taller than the room: the
   window (--vt-vh) less what is above the band (--vt-chrome: the top bar, and the coach
   banner in his preview - measured by wtop.js before the first paint, as on /w) less the
   76px peek (--vt-peek), with /w's 240px floor - its shape --vt-ar (16:9 for YouTube; one
   of his files takes its own when the player reads it, item.js).
   One more floor, the old page's (--item-floor): never smaller than the picture was on
   6cf1fa4, shape by shape. There a YouTube picture was the whole width from 641 to 959px
   (an iPad upright), one of his files at most 72% of the window's height; from 960px
   both were in a column at most 76vh * 16/9 wide, a file at most 78vh tall - so 76vh for
   a 16:9 picture, 78vh for an upright or a 4:3 one, less for a wider-than-16:9 one:
   min(78vh, 76vh * 16/9 / its shape). So the room is never less than that from 960px,
   nor than the whole width at 16:9 (or 72vh) below it. It only counts in a short window
   (from 960px: under ~608px tall at 16:9, ~664px upright; in his preview, with the
   banner, ~767 / ~836px), where it costs some of the peek. (It is declared on the band
   too - #embed-wrap, where item.js puts a file's own shape - so it is worked out with that
   shape, not <body>'s 16:9.)
   The room (--item-room) is the picture's height; its box (the player and its controls)
   is never narrower than 480px where the window has it: an upright recording's picture
   stays its own shape, black either side, inside a box its controls fit in (the
   <video> fits its picture in: object-fit, player.css), not 25px buttons in a 323px box.
   The peek shows the title's first line on first view: the eyebrow sits 12px under the
   band, the title's first line ends 74px under it (12 + the eyebrow's 19.4 + 8 + one 34.8px
   line). Under the band everything - the eyebrow, title, meta, watched line, the open
   card, the parts, Notes, "Questions and comments" and the footer - is ONE centred column,
   /w's: a 1000px line + 24px gutters (max-width 1048px). An item with no video has no
   band; its column is the same column, 32px under the bar as it was on a computer.
   The top bar on the band pages (/w, and an item page with a video: body.has-band) runs
   the window's whole width with the column's 24px gutter instead of being capped at
   1440px and centred: on a 1920 or 2560 window the brand and the trail start at the left
   edge above the band, as YouTube's do. The server says in the shell whether the item is
   a video (app.py, home.item_plays), so the bar is drawn once and never moves; an item
   with no video, and a message card, keep the site's own bar like every other page. The
   bar's height is never touched (the band is sized from it).
   Phones (/w's docked sizes: 640px or less wide, or 560px or less tall) keep the item
   page exactly as it was. */
@media (min-width: 641px) and (min-height: 561px) {
  body.page-item {
    --vt-vh: 100vh; --vt-chrome: 70px; --vt-peek: 76px; --vt-ar: calc(16 / 9);
    --item-floor: max(72vh, 56.25vw);
  }
  body.page-item, body.page-item .item-band {
    --item-room: max(240px, calc(var(--vt-vh) - var(--vt-chrome) - var(--vt-peek)), var(--item-floor));
  }
  body.page-item main { max-width: none; padding: 0 0 48px; }
  body.page-item.has-band .topbar, .vt.w-root .w-top .topbar {
    max-width: none;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  body.page-item .watch-grid { padding-top: 0; }
  /* (0,3,1: over the old rounded box at 960px and over body.is-viewas .player-wrap's
     sticky offset - in his preview the old page drew the player 38px low, over the title.) */
  body.page-item .player-wrap.item-band {
    position: relative; top: auto; max-width: none; margin: 0; border-radius: 0;
    box-shadow: none; overflow: hidden; background: #000;
  }
  body.page-item .item-band .player-box {
    margin: 0 auto;
    width: max(min(100%, 480px), min(100%, calc(var(--item-room) * var(--vt-ar))));
  }
  body.page-item .item-band .player-box video { max-height: var(--item-room); }
  body.page-item .item-col { max-width: 1048px; margin: 0 auto; padding: 0 24px; }
  body.page-item .item-band[hidden] + .item-col { padding-top: 12px; }
  body.page-item .item-band:not([hidden]) + .item-col .intro { padding-top: 12px; }
  body.page-item .col-player, body.page-item .col-side { max-width: none; margin: 0; }
  body.page-item .col-side { margin-top: 26px; }
  body.page-item .col-side > * { max-width: none; }
  body.page-item .col-side > section:first-child .sec-h { margin-top: 4px; }
  /* Loading, a video item's (body.has-band - since Nov 20 2026 /w's shell, .vt-item): /w's
     loading band, in the item pages' room (vthread.css --vt-iroom: the same floors as the
     picture's), so a 16:9 video never moves when it arrives. Any other item's: no player,
     the grey lines in the column, the first where its eyebrow comes (32px under the bar). */
  body.page-item.has-band #st-loading .skeleton-player { max-height: var(--vt-iroom); }
  body.page-item:not(.has-band) #st-loading .skeleton-player { display: none; }
  body.page-item #st-loading .item-skcol { max-width: 1048px; margin: 0 auto; padding: 12px 24px 0; }
  body.page-item:not(.has-band) #st-loading .item-skcol { padding-top: 32px; }
  body.page-item #st-loading .item-skcol .skeleton-line:first-child { margin-top: 0; }
  body.page-item #st-msg {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
}
@supports (height: 100dvh) {
  @media (min-width: 641px) and (min-height: 561px) { body.page-item { --vt-vh: 100dvh; } }
}
@media (min-width: 960px) and (min-height: 561px) {
  body.page-item, body.page-item .item-band { --item-floor: min(78vh, calc(76vh * 16 / 9 / var(--vt-ar))); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------- sending Jay something

   Sent to Jay opens with the way to send (.send-box): deliberately the first thing
   on the tab - for most students the reason to open it is to add to it. The same box
   shape is Message Jay's and a worksheet's. The rows below (.up-row) are the send
   window's list of what's going in. */

.up-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 18px;
}
.up-h { font-size: 16px; margin: 0 0 4px; }
.up-told { color: var(--faint); font-size: 13px; margin: 0 0 12px; }
/* 16px: smaller and an iPhone zooms the whole page in when the box gets focus
   (the worksheet answers, Message Jay, the file note). */
.up-note {
  width: 100%; box-sizing: border-box; background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
  font: inherit; font-size: 16px; resize: vertical; margin-bottom: 10px;
}
.up-note::placeholder { color: var(--faint); }
/* The real input stays in the DOM (it is what opens the picker) but never shows:
   a bare file input can't be styled and reads as "No file chosen" forever. */
.up-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.up-go {
  background: var(--ink); color: var(--bg); border: 0; border-radius: 10px;
  padding: 11px 16px; font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; min-height: 44px;
}
.up-go:hover { background: #fff; }
.up-rm { font-size: 12.5px; color: var(--dim); min-height: 0; line-height: inherit; }
.up-rm:hover { color: var(--ink); }

/* One part in the send window: its name and size, a bar, its folder (or why not) and
   what can be done - three fixed lines, 70px whatever it says, so the list holds a
   whole row in its smallest size and nothing in it grows as it goes. */
.up-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 20px 4px 20px;
  gap: 4px 12px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px;
}
.up-name {
  grid-row: 1; grid-column: 1; display: flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 13.5px; line-height: 20px;
}
.up-name svg { width: 15px; height: 15px; flex: none; color: var(--faint); }
.up-name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-size { grid-row: 1; grid-column: 2; font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.up-path {
  grid-row: 3; grid-column: 1; min-width: 0; font-size: 12.5px; line-height: 20px; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.up-say {
  grid-row: 3; grid-column: 2; display: flex; align-items: center; gap: 12px; justify-content: flex-end;
  font-size: 12.5px; line-height: 20px; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.up-bar {
  grid-row: 2; grid-column: 1 / -1; height: 4px; border-radius: 3px; background: var(--line-2);
  overflow: hidden;
}
.up-bar span { display: block; height: 100%; width: 0; background: var(--ink-2); transition: width .15s linear; }
.up-row.done .up-bar span { background: #5bbf7a; }
.up-row.done .up-say { color: #7fd497; }
/* A failure keeps the row and says what to do - never a bar that just stops. */
.up-row.bad { border-color: var(--red-lo); }
.up-row.bad .up-bar span { background: var(--red); }
.up-row.bad .up-path { color: var(--red-ink); }
.up-row.miss .up-path { color: var(--amber); }
.up-row.link .up-bar { visibility: hidden; }
.up-row.warn .up-path { color: #e7c079; }

/* Sent to Jay: the way to send, where the old one-file box was. */
.send-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; max-width: 860px; }
.send-box .up-told { flex: 1 1 260px; margin: 0; }
.send-box .btn { min-width: 220px; }

/* "Not sent yet": a submission they started sending (Now and Sent to Jay, from the
   page's own read - drawn with it, never arriving after). Its line is at most two lines
   and the row is as tall as its 40px buttons whatever it says, so the live count of the
   one going up never moves the page. */
.drafts { display: grid; gap: 10px; margin: 0 0 18px; max-width: 860px; }
.draft {
  position: relative;
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid rgba(217, 164, 65, 0.35);
}
/* Along the row's bottom edge, inside its border: takes no room of its own. */
.draft-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden;
  border-radius: 0 0 13px 13px; background: rgba(255, 255, 255, 0.06); visibility: hidden;
}
.draft-bar.on { visibility: visible; }
.draft-bar-fill { border-radius: 0; }
.draft-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(217, 164, 65, 0.14); color: var(--amber); }
.draft-ico svg { width: 19px; height: 19px; }
.draft-line {
  margin: 0; max-height: 40px; font-size: 14px; line-height: 20px; color: var(--ink-2); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.draft-acts { display: flex; gap: 8px; }
.draft-acts .btn { min-height: 40px; padding: 0 14px; font-size: 14px; min-width: 104px; }
@media (max-width: 559px) {
  .draft { grid-template-columns: 40px minmax(0, 1fr); }
  .draft-acts { grid-column: 1 / -1; }
  .draft-acts .btn { flex: 1; }
}

/* What a submission holds (nowview.js partsBlock): a quiet button under its row, and
   once pressed the files and links, each with its own Open or Download. */
.parts { margin: 8px 0 0; }
.parts-tog {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: none; color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.parts-tog:hover { border-color: var(--dim); color: var(--ink); }
.parts-tog svg { width: 15px; height: 15px; }
.parts-missing { margin: 8px 0 0; color: var(--amber); font-size: 13.5px; }
.part-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.part {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 8px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line);
  font-size: 13.5px;
}
.part > svg { width: 16px; height: 16px; color: var(--faint); }
.part-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part-t .part-dir { color: var(--faint); }
.part-s { color: var(--faint); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.part a.chip { text-decoration: none; }
.part a.chip:hover { background: var(--ink); color: #111; }
.part-more { margin: 6px 0 0; color: var(--faint); font-size: 13px; }
/* ...and on the submission's own page (/f, item.js renderParts): the whole list, under
   the card that says what it holds. */
.item-parts { margin: 12px 0 0; }
.item-parts .part-list { margin: 0; }
@media (max-width: 479px) {
  .part { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .part-s { display: none; }
}

/* One send, as a card (nowview.js submissionCard): what it was for, its name, when it
   was sent and what it holds, their note, then every part - each folder a heading with
   its files under it, the loose files, the links - each with its own Open or Download.
   "lead" sits under the status card; "compact" is the same card in the section's list;
   "ref" is the lead's own place in that list. */
.sub-card {
  margin-top: 12px; padding: 16px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line-2);
  scroll-margin-top: 84px; transition: border-color 0.3s, box-shadow 0.3s;
}
.sub-card:focus { outline: none; }
.sub-card.flash { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(244, 242, 238, 0.08); }
.act .sub-card { margin-top: 0; padding: 14px; border-radius: 16px; border-color: var(--line); }
.sc-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
/* Jason's Download all, beside the title (his page only - nowview.js LENS.downloadAll). */
.sc-head.has-dl { grid-template-columns: 44px minmax(0, 1fr) auto; }
.sc-head .sc-dl-btn {
  align-self: start; margin-top: 2px; min-height: 38px; padding: 0 14px; font-size: 14px; white-space: nowrap;
}
.sc-head .sc-dl-btn svg { width: 16px; height: 16px; }
.sc-head-main { min-width: 0; }
.sc-eyebrow { margin: 1px 0 3px; font-size: 11.5px; overflow-wrap: anywhere; }
.sc-title {
  margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 760;
  line-height: 1.28; letter-spacing: -0.012em; overflow-wrap: anywhere;
}
.act .sc-title { font-size: 16.5px; font-weight: 720; }
.sc-meta {
  margin: 5px 0 0; color: var(--dim); font-size: 13.5px; line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.sc-when { color: var(--ink-2); font-weight: 650; white-space: nowrap; }

/* Their note: labelled, set off like a quote, folded with "Show more" when long. */
.sc-note { margin: 14px 0 0; padding: 1px 0 1px 14px; border-left: 3px solid var(--line-2); }
.sc-note-h {
  margin: 0 0 3px; color: var(--faint); font-size: 11.5px; font-weight: 750;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.sc-note-body {
  color: var(--ink); font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.sc-note-body.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.compact .sc-note-body.clamped { -webkit-line-clamp: 2; }
.sc-note .show-more { min-height: 28px; margin-top: 2px; }

/* The parts: one bordered list, a hairline between rows. */
.sc-parts {
  list-style: none; margin: 14px 0 0; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2);
}
.sc-parts > li {
  position: relative;
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  min-height: 46px; padding: 6px 8px 6px 14px;
}
.sc-parts > li + li { border-top: 1px solid var(--line); }
.sc-parts > li > svg { width: 17px; height: 17px; color: var(--dim); }
.sc-folder { background: var(--card-2); }
.sc-parts > li.sc-folder > svg { color: var(--amber); }
/* Every name whole: it wraps rather than losing the end that tells two takes apart. */
.sc-fname { min-width: 0; font-weight: 700; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.sc-fmeta {
  padding-right: 6px; color: var(--dim); font-size: 12.5px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* A folder's own files sit under its name, a rule down their side from its icon to its
   last row - so where the folder ends is drawn, and a loose file after it is plainly
   not one of them (.sc-after: the card's own level again, a firmer line above it). */
.sc-parts > li.in { padding-left: 32px; }
.sc-parts > li.in.deep { padding-left: 50px; }
.sc-parts > li.in::before, .sc-parts > li.sc-sub::before {
  content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 1px; background: var(--line-2);
}
.sc-parts > li.sc-after { border-top-color: var(--line-2); }
/* A sub-folder, said once over its files: a quiet heading, not a row to press. */
.sc-parts > li.sc-sub {
  grid-template-columns: 14px minmax(0, 1fr); gap: 8px; min-height: 32px;
  padding: 5px 8px 5px 34px; background: rgba(255, 255, 255, 0.015);
}
.sc-parts > li.sc-sub > svg { width: 14px; height: 14px; color: var(--faint); }
.sc-sname { min-width: 0; color: var(--faint); font-size: 12.5px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.sc-pt { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.sc-pn { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.sc-ps { flex: none; color: var(--faint); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Quiet until pointed at: a column of thirteen filled buttons would shout. */
.sc-go {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 104px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  font: inherit; font-size: 13px; font-weight: 650;
  line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.sc-go svg { width: 14px; height: 14px; flex: none; color: var(--dim); transition: color 0.15s; }
a.sc-go:hover, button.sc-go:hover { background: var(--ink); border-color: var(--ink); color: #111; }
a.sc-go:hover svg, button.sc-go:hover svg { color: #111; }
.sc-go.is-busy, .sc-go.is-busy:hover { background: transparent; border-color: var(--line-2); color: var(--ink-2); cursor: default; }
.sc-go.off { background: none; border: 0; min-width: 0; padding: 0; color: var(--faint); font-weight: 600; cursor: default; }
.sc-parts .chip { justify-self: end; }

.sc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sc-acts .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
.sc-acts .btn svg { width: 16px; height: 16px; }
.sc-missing { margin: 10px 0 0; color: var(--amber); font-size: 13.5px; overflow-wrap: anywhere; }
.sc-above { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0 58px; font-size: 14px; font-weight: 600; }
.sc-above svg { width: 15px; height: 15px; transform: rotate(-90deg); }
.sc-fewer svg { transform: rotate(-90deg); }

/* Jason's Download all, reporting under the card's head (dashboard.html downloadAll). */
.sc-dl:empty { display: none; }
.sc-dl { margin-top: 12px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.sc-dl > .ec-dl:not(:empty) {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
}
.sc-dl .sc-dl-note { margin: 0; color: var(--faint); font-size: 13px; }
.sc-dl .dl-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sc-dl .dl-say.bad, .sc-dl .bad { color: #e8756f; }
.sc-dl .dl-note { margin-top: 6px; color: var(--faint); font-size: 13px; }
.sc-dl ul { margin: 6px 0 0; padding-left: 18px; }
.sc-dl button {
  min-height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
}
.sc-dl button:hover { border-color: var(--dim); color: var(--ink); }
/* ...and his "Show my controls" off (a screen recording): their page as they see it -
   the head laid out exactly as theirs, with no room kept for the button. */
:host(.lens-off) .sc-dl-btn, :host(.lens-off) .sc-dl { display: none; }
:host(.lens-off) .sc-head.has-dl { grid-template-columns: 44px minmax(0, 1fr); }

@media (min-width: 720px) {
  .sub-card { padding: 18px 20px; }
  .act .sub-card { padding: 16px 18px; }
}
@media (max-width: 479px) {
  .sc-head, .sc-head.has-dl { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  :host(.lens-off) .sc-head.has-dl { grid-template-columns: 40px minmax(0, 1fr); }
  .sc-head .row-tile { width: 40px; height: 40px; }
  /* His Download all under the time, where the head's text starts. */
  .sc-head .sc-dl-btn { grid-column: 2; justify-self: start; margin-top: 0; }
  .sc-title { font-size: 18px; }
  .sc-when { display: block; }
  .sc-sep { display: none; }
  /* A folder's count and size under its name, so the name has the row. */
  .sc-parts > li.sc-folder { grid-template-columns: 18px minmax(0, 1fr); row-gap: 0; }
  .sc-folder .sc-fmeta { grid-column: 2; padding: 0; }
  /* The size under the name, so the name has the row. */
  .sc-pt { flex-direction: column; align-items: stretch; gap: 0; }
  .sc-parts > li { padding-left: 12px; gap: 10px; }
  /* Less indent than on a computer: the rule down the side and the sub-folder's heading
     already say where a file sits, and the name needs the room. */
  .sc-parts > li.in { padding-left: 26px; }
  .sc-parts > li.in.deep { padding-left: 32px; }
  .sc-parts > li.sc-sub { padding-left: 28px; }
  .sc-parts > li.in::before, .sc-parts > li.sc-sub::before { left: 20px; }
  .sc-go { min-width: 92px; }
  .sc-above { margin-left: 52px; }
}

/* ----------------------------------------------- the way back to his own side

   Rendered for Jason alone (portal/app.py _is_coach). He signs in here with the
   same address as his test student, so without this the honest answer to "where
   are my students" is a URL he has to have been told. */

.coach-door {
  display: block; margin: 0 0 22px; padding: 13px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line-2); color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 15px;
}
.coach-door:hover { border-color: var(--ink-2); }
.coach-door span {
  display: block; margin-top: 3px; font-weight: 400; font-size: 13px; color: var(--faint);
}

/* Message Jay: the same box as sending a file, so the page has one way to talk. */
.msg-writer .msg-box { min-height: 84px; }
.msg-writer .up-go { margin-top: 2px; }
.msg-writer .up-told { margin: 10px 0 0; }

/* Answering a worksheet. */
.ws-form .ws-a { margin-top: 8px; min-height: 96px; }
.ws-acts { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.ws-acts .up-go, .ws-acts .btn { min-height: 44px; }
.ws-acts .ws-send { min-width: 150px; }
/* A worksheet's "A question about this worksheet? Ask Jay": one quiet line, not a second form. */
.ws-qs { margin-top: 26px; }
.ws-ask {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  margin-left: -12px; border: 0; border-radius: 10px; background: none; color: var(--dim);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.ws-ask:hover { background: var(--card-2); color: var(--ink); }
.ws-ask svg { width: 18px; height: 18px; }

/* ================================================== Now: the section they're on

   One section of Jay's curriculum, whole (portal/now.py). The same view shows a
   past section under Sections (#sections/<id>), without the live status card. */

.section-view { max-width: 860px; }
.sec-head {
  padding: 18px 18px 14px; border-radius: 20px;
  background: radial-gradient(120% 140% at 0% 0%, #2a1618 0%, #171415 46%, #131314 100%);
  border: 1px solid #2e2427;
}
.sec-head .eyebrow { margin-bottom: 6px; }
.sec-title {
  margin: 0; font-family: var(--font-display); font-weight: 780;
  font-size: clamp(26px, 6.6vw, 36px); line-height: 1.12; letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.sec-meta { margin: 6px 0 0; color: var(--dim); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.sec-meta:empty { display: none; }

/* The course's cover and description, from his course page (portal/now.py
   _course_face). The cover's square has its size from the first paint - the
   picture landing never moves the header - and keeps his number if it can't load. */
.sec-head.has-cover {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; align-items: start;
}
.sec-head.has-cover > .sec-desc-wrap, .sec-head.has-cover > .steps-wrap { grid-column: 1 / -1; }
.sec-head-main { min-width: 0; }
.sec-cover {
  position: relative; width: 64px; height: 64px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 120% at 20% 10%, #3b1717 0%, #1c1011 62%, #131314 100%);
  border: 1px solid #3a2629;
}
.sec-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.sec-cover-mark {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.78); font-variant-numeric: tabular-nums;
}
.sec-desc-wrap { margin-top: 12px; }
.sec-desc {
  color: var(--ink-2); font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
/* Folded at four lines (nowview.js FOLD_SHORT), "Show more" beneath. Folded, its
   paragraphs run on (no "..." alone on a blank line); opened, they're as written. */
.sec-desc.clamped, .assign-text.clamped, .ditem-body.clamped {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  white-space: normal;
}

/* The road: every section of the program, the one they're on lit. On a phone it
   scrolls sideways inside itself - never the page. */
.steps-wrap {
  margin: 16px -18px -4px; padding: 6px 18px 8px; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.steps-wrap::-webkit-scrollbar { display: none; }
@media (max-width: 719px) {
  .steps-wrap {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent);
  }
}
.sec-head > .steps-wrap { margin-top: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; }
.step { flex: 1 0 78px; position: relative; text-align: center; }
.step::before {
  content: ""; position: absolute; top: 14px; left: -50%; right: 50%; height: 2px;
  background: var(--line-2);
}
.step:first-child::before { display: none; }
.step.done::before, .step.current::before { background: rgba(90, 168, 118, 0.45); }
.step-in {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 0 3px; color: var(--dim); text-decoration: none;
}
.step-dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-2); border: 2px solid var(--line-2); color: var(--faint);
  font-size: 12.5px; font-weight: 780; font-variant-numeric: tabular-nums;
}
.step-dot svg { width: 15px; height: 15px; }
.step.done .step-dot { background: #16241b; border-color: rgba(90, 168, 118, 0.6); color: #8fd3a6; }
.step.current .step-dot {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 0 0 4px rgba(212, 59, 59, 0.22), 0 0 18px rgba(212, 59, 59, 0.45);
}
.step.here:not(.current) .step-dot { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(244, 242, 238, 0.14); }
.step-name {
  font-size: 11.5px; font-weight: 650; line-height: 1.25; max-width: 96px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.step.upcoming .step-name { color: var(--faint); }
.step.current .step-name, .step.here .step-name { color: var(--ink); }
a.step-in:hover .step-name { color: var(--ink); }
a.step-in:hover .step-dot { border-color: var(--ink-2); }

/* Where it stands, and the one or two things to do about it. */
.now-status {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; margin-top: 14px;
  padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-2);
}
.now-status.amber { background: #18160f; border-color: #3a3322; }
/* Their move (a worksheet waiting): as the assignment hero - the page's own grey, like the
   worksheet card Jason picked; its white button is what says "this one" (colour option A). */
.now-status.red {
  border-color: var(--line-2); border-left: 4px solid var(--line-2);
  background: var(--card);
}
.now-status.red .icon-badge.red, .call-card .icon-badge.red { background: var(--card-2); color: var(--ink-2); }
.now-status.red .now-acts .btn-red { min-height: 48px; padding: 8px 20px; font-size: 16px; white-space: normal; }
.now-status .icon-badge { width: 48px; height: 48px; margin: 0; border-radius: 14px; }
.now-status .icon-badge svg { width: 23px; height: 23px; }
.now-status-h {
  margin: 1px 0 4px; font-family: var(--font-display); font-size: 19px; font-weight: 780;
  line-height: 1.25; letter-spacing: -0.015em; overflow-wrap: anywhere;
}
.now-status-p { margin: 0; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
/* "Jay replied under “X” today. Read it" - first, above the rest (Nov 22 2026). */
.now-status-lead { margin: 0 0 6px; color: var(--ink); font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.now-status-read { margin-left: 8px; color: var(--ink); font-weight: 750; text-decoration: underline;
  text-underline-offset: 3px; white-space: nowrap; }
.now-status-read:hover { color: #fff; }
.now-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.now-acts .btn { min-height: 42px; padding: 0 14px; font-size: 14.5px; }
.now-acts .btn svg { width: 16px; height: 16px; }
.now-acts.center { justify-content: center; margin-top: 18px; }
/* The next step (Nov 24 2026): its eyebrow, a watch section's thin bar, and an
   assignment's three-step timeline - layout only; colours are the existing tokens. */
.now-step .now-step-eyebrow { margin-bottom: 4px; }
.now-step .now-step-bar { max-width: 360px; margin: 12px 0 0; }
.now-tl { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.now-tl li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; }
.now-tl-dot {
  width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--line-2);
  display: grid; place-items: center; color: var(--dim); font-size: 12px; font-weight: 750;
}
.now-tl-dot svg { width: 13px; height: 13px; }
.now-tl li.current .now-tl-dot { border-color: var(--ink-2); color: var(--ink); }
.now-tl li.done .now-tl-dot { border-color: var(--line-2); color: var(--ink-2); }
.now-tl-main { display: flex; flex-direction: column; min-width: 0; padding-top: 1px; }
.now-tl-t { color: var(--ink); font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.now-tl li:not(.current):not(.done) .now-tl-t { color: var(--ink-2); }
.now-tl-m { color: var(--dim); font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 479px) {
  .now-status { grid-template-columns: minmax(0, 1fr); }
  .now-status .icon-badge { display: none; }
  .now-acts .btn { flex: 1 1 auto; }
}

.jay-note {
  margin-top: 14px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(180deg, #1a1616, #161515);
  border: 1px solid #2d2323; border-left: 3px solid var(--red);
}
.jay-note .eyebrow { margin-bottom: 6px; }
.jay-note-body { line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* The 1-on-1 call Jay offered (nowview.js callCard): the first thing on Now while it's
   live - the red wash and the red rule, so it can't be missed. The same card on his page
   for them (the shadow root). Join's line under the buttons is one fixed line, so the
   card never changes height when the link starts or stops working. */
.call-card {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; max-width: 860px;
  margin: 0 0 18px; padding: 16px 18px 14px 16px; border-radius: 18px;
  border: 1px solid var(--line-2); border-left: 4px solid var(--line-2);
  background: var(--card);
}
.call-card .icon-badge { width: 48px; height: 48px; margin: 0; border-radius: 14px; }
.call-card .icon-badge svg { width: 23px; height: 23px; }
.call-main { min-width: 0; }
.call-main .eyebrow { margin-bottom: 4px; }
.call-h {
  margin: 0 0 6px; font-family: var(--font-display); font-size: 21px; font-weight: 780;
  line-height: 1.25; letter-spacing: -0.015em; overflow-wrap: anywhere;
}
.call-p, .call-when { margin: 0; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.call-when { color: var(--ink); font-size: 16.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.call-meta { margin: 6px 0 0; color: var(--dim); font-size: 14px; }
.call-note {
  margin: 2px 0 10px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line-2); color: var(--ink); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.call-note.clamped { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.call-note + .show-more { display: block; margin: -6px 0 8px; font-size: 13.5px; }
.call-times {
  margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 2px;
  color: var(--ink); font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums;
}
.call-times .call-more { color: var(--dim); }
.call-acts { margin-top: 14px; }
.call-join[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.call-join[aria-disabled="true"]:active { transform: none; }
.call-join-say {
  margin: 8px 0 0; height: 20px; color: var(--dim); font-size: 13px; line-height: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 479px) {
  .call-card { grid-template-columns: minmax(0, 1fr); padding: 14px 14px 12px; }
  .call-card .icon-badge { display: none; }
  .call-h { font-size: 19px; }
}

.blk { margin-top: 30px; }
.blk-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 4px 14px; margin-bottom: 12px;
}
.blk-h {
  margin: 0; font-size: 13px; font-weight: 750; color: var(--dim);
  letter-spacing: 0.09em; text-transform: uppercase;
}
.blk-meta { margin: 0; color: var(--faint); font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* Jay's latest: the one card on the page that gets a full-width picture. */
.lib-list.hero .lib-item a, .lib-list.hero .lib-item .card-link {
  display: block; padding: 0; overflow: hidden; border-radius: 18px;
}
.lib-list.hero .thumb { border-radius: 0; }
.lib-list.hero .lib-text { padding: 12px 14px 14px; }
.lib-list.hero .yt-play { width: 58px; height: 58px; }
.lib-list.hero .yt-play svg { width: 22px; height: 22px; }
.lib-list.hero + .act-thread { margin-top: 12px; }

/* Your assignment: what Jay marked as it, above the lessons (nowview.js assignmentBlock). */
.assign {
  margin-top: 30px; padding: 16px; border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line-2); border-left: 3px solid var(--line-2);
}
.assign-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px;
}
.assign-head .eyebrow { margin: 0; }
.assign-title {
  margin: 6px 0 0; font-family: var(--font-display); font-size: 20px; font-weight: 780;
  line-height: 1.25; letter-spacing: -0.015em; overflow-wrap: anywhere;
}
.assign-text {
  margin: 8px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.assign-files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.assign-file {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: border-color 0.15s, background-color 0.15s;
}
a.assign-file:hover { border-color: var(--line-2); background: #18181a; }
a.assign-file:hover .chip.go { background: var(--ink); color: #111; }
a.assign-file .ditem-icon { background: var(--tint); color: var(--ink); }
.assign-file-t { font-weight: 650; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.assign-acts { margin-top: 16px; }
.btn.assign-sent { color: #8fd3a6; }
/* ...and when it's what's waiting on them, it leads the page in place of the status
   card: bigger name, a plain "this is next" line, a big white Submit (assignmentBlock hero). */
.assign.hero {
  margin-top: 14px; padding: 18px; border: 1px solid var(--line-2); border-left: 4px solid var(--line-2);
  background: var(--card);
}
.assign.hero .eyebrow { color: var(--red-ink); }
.assign.hero .assign-title { margin-top: 8px; font-size: 26px; }
.assign-lead { margin: 6px 0 0; color: var(--ink); font-weight: 600; font-size: 15.5px; line-height: 1.45; }
.assign.hero .assign-text { margin-top: 12px; }
.assign-what {
  margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
}
.assign-what .eyebrow { margin: 0; }
.assign.hero .assign-what .assign-text { margin-top: 4px; color: var(--ink); }
.assign.hero .assign-acts { margin-top: 18px; }
.assign.hero .assign-acts .btn-red { min-height: 50px; padding: 8px 22px; font-size: 16px; font-weight: 700; white-space: normal; text-align: center; }
@media (max-width: 479px) {
  .assign.hero .assign-acts .btn-red { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 479px) {
  .assign-file { grid-template-columns: 34px minmax(0, 1fr); row-gap: 8px; }
  .assign-file .chip { grid-column: 2; justify-self: start; }
}

/* Lessons: the course's released days, video lessons as pictures. */
.lesson-list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lesson.wide { grid-column: 1 / -1; }
/* One release day, newest first (nowview.js lessonsBlock): "Day 3 · Today", then its
   videos, then its other things. */
.lday + .lday { margin-top: 22px; }
.lday-h {
  display: flex; align-items: center; gap: 12px; margin: 0 0 10px;
  color: var(--ink-2); font-size: 14px; font-weight: 750; letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}
.lday-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lesson-list + .lesson-list { margin-top: 10px; }
.lesson-list.rows-only { grid-template-columns: minmax(0, 1fr); }
.lesson-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}
a.lesson-card:hover { border-color: var(--line-2); background: #18181a; }
.lesson-card .thumb { border-radius: 0; }
.lesson-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
.lesson-title {
  font-weight: 700; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lesson-day { color: var(--faint); font-size: 12.5px; font-weight: 650; }
.lesson-day:empty { display: none; }
/* The lesson's write-up (its library description): three lines, the rest on its page. */
.lesson-about {
  margin-top: 3px; color: var(--dim); font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Cinema (Nov 22 2026, Jason): a day's first video is a banner - its picture sharp at about
   its own size, a soft dark copy of it filling the banner behind the title, write-up and
   Play; its newest comments under it. The day's other videos share one row beneath. */
.lesson.cine { list-style: none; }
.cine-card {
  position: relative; display: block; overflow: hidden; border-radius: 16px; color: #fff;
  text-decoration: none; background: #111; isolation: isolate;
}
.cine-back {
  position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px);
  object-fit: cover; filter: blur(30px) brightness(0.42) saturate(1.15); z-index: 0; pointer-events: none;
}
.cine-card .thumb.cine-pic { position: relative; z-index: 1; aspect-ratio: 16 / 9; border-radius: 0; background: #000; }
.cine-card .thumb.cine-pic img { filter: none; object-fit: cover; }
.cine-scrim { display: none; }
.cine-text {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px; padding: 14px 16px 16px;
}
.cine-title { font-size: 19px; font-weight: 750; line-height: 1.2; letter-spacing: -0.01em; }
.cine-meta { font-size: 12.5px; font-weight: 650; color: #d6d3cd; }
.cine-about {
  display: none; max-width: 58ch; margin-top: 2px; color: #e2dfd9; font-size: 13.5px; line-height: 1.45;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cine-play {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; padding: 8px 16px 8px 13px;
  border-radius: 999px; background: #fff; color: #121214; font-size: 13.5px; font-weight: 750;
}
.cine-play svg { width: 15px; height: 15px; }
a.cine-card:hover .cine-play { background: #e9e6e0; }
a.cine-card:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (min-width: 720px) {
  .cine-card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center;
    gap: 32px; padding: 26px 26px 26px 30px; min-height: 300px;
  }
  .cine-card .thumb.cine-pic {
    grid-column: 2; grid-row: 1; border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
  .cine-text { grid-column: 1; grid-row: 1; padding: 0; }
  .cine-title { font-size: 26px; }
  .cine-about { display: -webkit-box; }
}
/* His chosen HD frame (Nov 22 2026): sharp enough to fill the banner - the words on the
   picture over a dark wash, no blurred copy behind. */
.cine-card.wide .cine-back { display: none; }
.cine-card.wide .cine-scrim {
  display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(10,10,12,0.94) 0%, rgba(10,10,12,0.6) 45%, rgba(10,10,12,0) 80%);
}
.cine-card.wide .cine-text { position: absolute; left: 16px; right: 16px; bottom: 14px; padding: 0; }
@media (min-width: 720px) {
  .cine-card.wide { display: block; padding: 0; min-height: 0; }
  .cine-card.wide .thumb.cine-pic { aspect-ratio: 21 / 9; border-radius: 0; box-shadow: none; }
  .cine-card.wide .cine-scrim {
    background: linear-gradient(90deg, rgba(10,10,12,0.9) 0%, rgba(10,10,12,0.7) 38%, rgba(10,10,12,0) 72%);
  }
  .cine-card.wide .cine-text { left: 30px; right: 42%; bottom: 26px; }
}
.lesson-list.cine-row { margin-top: 14px; align-items: start; }
/* A worksheet on Now (Nov 22 2026, Jason): big enough not to be missed, calm - the page's
   own grey with a white "Fill it in"; green once it's with Jay. */
.wsc-list + .lesson.cine, .wsc-list + .lesson-list { margin-top: 14px; }
.lesson.wsc {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; align-items: start;
  padding: 20px 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line-2);
}
.lesson.wsc.sent { background: #111a14; border-color: #24432f; }
.wsc-icon {
  width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: var(--card-2); color: var(--ink-2);
}
.wsc-icon svg { width: 30px; height: 30px; }
.wsc.sent .wsc-icon { background: #173322; color: #8fd3a6; }
.wsc-main { min-width: 0; }
.wsc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wsc-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--card-2); color: var(--ink-2); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.wsc-tag svg { width: 13px; height: 13px; }
.wsc-tag.late { background: var(--red-wash); color: var(--red-ink); }
.wsc.sent .wsc-tag { background: #173322; color: #8fd3a6; }
.wsc-title { margin: 10px 0 0; font-size: 21px; font-weight: 750; line-height: 1.25; color: var(--ink); }
.wsc-p { margin: 6px 0 0; color: var(--dim); font-size: 14px; line-height: 1.5; }
/* His reply's first lines on a worksheet's card (Nov 22 2026): three lines at most, the
   rest on the worksheet's page. */
.wsc-reply {
  margin: 8px 0 0; padding-left: 12px; border-left: 2px solid #24432f; color: var(--ink-2);
  font-size: 14.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.wsc-qs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wsc-q {
  max-width: 100%; padding: 5px 11px; border-radius: 999px; background: var(--card-2); color: var(--ink-2);
  font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Sent back (Nov 24 2026, Jason, option A): two pills joined by a short line under the
   title - "Completed · <when>" and his word on it: green "Approved by Jay", a dashed
   "Approved · waiting for Jay", or amber "Changes asked by Jay" (never red). Only an
   approved one turns the card green. */
.wsc-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin-top: 10px; }
.wsc-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1.3; border: 1px solid transparent;
}
.wsc-pill svg { width: 13px; height: 13px; }
.wsc-pill.done { background: var(--card-3); color: var(--ink); }
.wsc-join { flex: none; width: 22px; height: 2px; background: var(--line-2); }
.wsc-pill.wait { border: 1px dashed var(--line-2); color: var(--dim); }
.wsc-pill.ok { background: #173322; color: #8fd3a6; }
.wsc-pill.ask { background: rgba(217, 164, 65, 0.14); color: var(--amber); }
.wsc.sent .wsc-pill.done { background: #173322; color: #8fd3a6; }
.wsc.sent .wsc-join { background: #2f5a3e; }
/* Its questions: the first with their answer (on a rule, lines kept), the rest opened
   under the button, in place. */
.wsc-qa { margin-top: 14px; }
.wsc-qa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.wsc-qa-rest { margin-top: 14px; }
.wsc-qa-q { margin: 0; display: flex; gap: 8px; color: var(--ink); font-size: 14.5px; font-weight: 650;
  line-height: 1.45; overflow-wrap: anywhere; }
.wsc-qa-n { flex: none; color: var(--dim); font-variant-numeric: tabular-nums; }
.wsc-qa-a {
  margin: 6px 0 0 4px; padding-left: 14px; border-left: 2px solid var(--line-2); color: var(--ink-2);
  font-size: 14.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere;
}
.wsc-qa-a.none { color: var(--dim); font-style: italic; }
.wsc.sent .wsc-qa-a { border-left-color: #2f5a3e; }
.wsc-more {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-top: 8px; padding: 0;
  background: none; border: 0; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.wsc-more:hover { color: var(--ink); }
.wsc-more svg { width: 15px; height: 15px; transform: rotate(90deg); transition: transform 0.15s; }
.wsc-more.open svg { transform: rotate(-90deg); }
/* His newest reply under it, in a small "Jay" bubble. */
.wsc-jay { margin-top: 14px; padding: 10px 14px 12px; border-radius: 12px; background: var(--card-2); }
.wsc.sent .wsc-jay { background: #162a1d; }
.wsc-jay-who { margin: 0; display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.wsc-jay-name { font-weight: 750; color: var(--ink); }
.wsc-jay-when { color: var(--dim); }
.wsc-jay .wsc-reply { margin-top: 4px; padding-left: 0; border-left: 0; }
.wsc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; }
.wsc-go, .wsc-b2 {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 12px;
  font-size: 14.5px; font-weight: 750; text-decoration: none;
}
.wsc-go { background: var(--ink); color: #131315; }
.wsc-go:hover { background: #e2dfd9; }
.wsc-b2 { background: var(--card-2); color: var(--ink); }
.wsc-b2:hover { background: #26262b; }
.wsc-go svg, .wsc-b2 svg { width: 16px; height: 16px; }
.wsc-lnk { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; color: var(--dim);
  font-size: 14px; font-weight: 650; text-decoration: none; }
.wsc-lnk:hover { color: var(--ink); }
.wsc-lnk svg { width: 16px; height: 16px; }
.sec-ws.sent { color: #8fd3a6; }
.sec-ws.todo { color: var(--ink-2); }
@media (max-width: 560px) {
  .lesson.wsc { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 12px; }
  .wsc-icon { width: 48px; height: 48px; border-radius: 12px; }
  .wsc-icon svg { width: 24px; height: 24px; }
  /* (On a phone the pills stack, the line between them standing up.) */
  .wsc-status { flex-direction: column; align-items: flex-start; }
  .wsc-join { width: 2px; height: 8px; margin-left: 17px; }
}
.cine-row .lesson-card { height: auto; }
.lthread { margin: 8px 2px 0; }
.lthread-list:empty { display: none; }
.lmsg {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 8px 0 2px;
  color: inherit; text-decoration: none;
}
.lmsg-av {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #4b4fa8; color: #fff; font-size: 12px; font-weight: 750;
}
.lmsg-av.coach { background: var(--red); }
.lmsg-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lmsg-who { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.lmsg-name { font-weight: 700; color: var(--ink); }
.lmsg-name.coach { background: #2d2d31; border-radius: 6px; padding: 0 6px; }
.lmsg-when { color: var(--faint); font-size: 12px; }
.lmsg-body {
  color: var(--ink-2); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lmsg-t { color: #7fb0ff; font-weight: 650; margin-right: 6px; }
.lmsg:hover .lmsg-body { color: var(--ink); }
.lthread-more {
  display: inline-block; margin: 6px 0 0 38px; color: var(--dim); font-size: 13px; font-weight: 650;
  text-decoration: none;
}
.lthread-more:hover { color: var(--ink); }
.lthread .lthread-add { height: 40px; margin-top: 10px; font-size: 14px; }
.lesson-list.cine-row .lthread .lthread-add { height: 38px; }
@media (min-width: 720px) {
  .lesson-list.cine-row.n1 { grid-template-columns: minmax(0, 1fr); }
  .cine-row.n1 .lesson-card { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
  .cine-row.n1 .lesson-card .lesson-text { padding: 14px 16px; }
  .lesson-list.cine-row.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-list.cine-row.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* What passed in the section, newest first. */
.act-list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
.act-who {
  margin: 0 0 6px; font-size: 12px; font-weight: 750; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint);
}
.act-who.coach { color: #e79a94; }
.act .lib-list { grid-template-columns: minmax(0, 1fr); }
.act-thread { margin: 10px 0 0 12px; padding-left: 12px; border-left: 2px solid var(--line); }
.act-thread:empty { display: none; }
/* "Add a comment or question" under a card (home.js commentRow): it looks like the box
   it opens - one fixed height, drawn with the card, so nothing arrives later. */
.cmt-row {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; margin-top: 10px;
  padding: 0 14px; box-sizing: border-box; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--bg-2); color: var(--faint); font: inherit; font-size: 16px; text-align: left;
  text-decoration: none; cursor: text;
}
a.cmt-row { cursor: pointer; }
.cmt-row:hover { border-color: var(--dim); color: var(--dim); }
.cmt-row svg { width: 18px; height: 18px; flex: none; }
.cmt-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sent to Jay's quieter one, under each thing they sent. */
.cmt-link {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 6px 0 0 2px;
  padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--dim);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.cmt-link:hover { background: var(--card-2); color: var(--ink); }
.cmt-link svg { width: 16px; height: 16px; }
/* The lesson card's one comments line: at the foot, so every card in a row matches. */
.lesson-card .lesson-text { flex: 1; }
.lesson-cmt {
  display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px;
  color: var(--dim); font-size: 12.5px; font-weight: 650;
}
.lesson-cmt svg { width: 14px; height: 14px; flex: none; }
.ditem .lesson-cmt { margin-top: 2px; padding-top: 0; }

.now-next {
  margin-top: 30px; padding: 16px 18px; border-radius: 16px; border: 1px dashed var(--line-2);
}
.now-next .eyebrow { color: var(--dim); margin-bottom: 4px; }
.now-next-t { margin: 0; font-weight: 750; font-size: 17px; overflow-wrap: anywhere; }
.now-next-p { margin: 4px 0 0; color: var(--dim); font-size: 14.5px; }
/* The lesson(s) the next release brings: when, then one row each. */
.now-next-when { margin: 0 0 8px; color: var(--ink-2); font-size: 14.5px; font-weight: 650; }
.now-next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.now-next-list li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.now-next-list .now-next-t { font-size: 16px; min-width: 0; }
.now-next-icon { flex: none; display: inline-flex; width: 20px; color: var(--dim); }
.now-next-icon svg { width: 18px; height: 18px; }
.now-next-tag {
  flex: none; margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 12.5px;
  font-weight: 700; color: var(--red-ink); background: var(--red-wash);
}

.earlier-blk { max-width: 860px; }
.earlier-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.earlier {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.earlier:hover { border-color: var(--line-2); background: #18181a; }
.earlier-t { min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.earlier-d { flex: none; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.see-sections {
  display: inline-flex; align-items: center; gap: 4px; min-height: 40px; margin-top: 8px;
  color: var(--ink-2); font-weight: 650; font-size: 14.5px; text-decoration: none;
}
.see-sections:hover { color: var(--ink); }
.see-sections svg { width: 16px; height: 16px; }

/* Sections: the road so far and ahead. */
.sec-n { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.sec-upcoming .row { opacity: 0.6; }

@media (min-width: 720px) {
  .sec-head { padding: 24px 26px 18px; }
  .sec-head.has-cover { grid-template-columns: 88px minmax(0, 1fr); column-gap: 20px; }
  .sec-cover { width: 88px; height: 88px; border-radius: 16px; }
  .sec-cover-mark { font-size: 26px; }
  .assign { padding: 20px 22px; }
  .assign-title { font-size: 22px; }
  .assign.hero { padding: 24px 26px; }
  .assign.hero .assign-title { font-size: 30px; }
  .steps-wrap { margin-left: -26px; margin-right: -26px; padding-left: 26px; padding-right: 26px; }
  .step { flex: 1 1 0; min-width: 0; }
  .now-status { padding: 20px 22px; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; }
  .now-status .icon-badge { width: 52px; height: 52px; }
  .lib-list.hero { grid-template-columns: minmax(0, 620px); }
  .lesson-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
  .lesson-list.rows-only { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lesson-list + .lesson-list { margin-top: 14px; }
  .act .lib-item a, .act .lib-item .card-link {
    display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px;
    padding: 10px; border-radius: 16px;
  }
  .act .lib-item .thumb { border-radius: 10px; }
  .act .lib-item .lib-text { padding: 4px 6px 4px 0; }
}
