/* CRO Accelerator platform — a product-app shell on the CRO Collective brand.
   HERO: the Week Timeline card at the top of the workspace. Three steps (Released → Live session → Due) with a
   progress fill that grows to "now" in the learner's own time zone, and the week's standing chip beside it.
   Shell: fixed navy sidebar, slim top bar, scrolling workspace of white cards on a cool canvas; on phones the
   sidebar becomes a bottom tab bar. Brand: artwork/brand/design-tokens.json. Fonts: Montserrat (headings),
   Public Sans (UI and reading), JetBrains Mono (clocks and chips). */

/* The three families, self-hosted (roadmap B10): no page sends a learner's address to Google. Each is one variable woff2
   per subset (latin, and latin-ext for names and words beyond it), served from this site under its content-hashed name
   (compiler/build/sheets.ts rewrites these plain paths to the name map's; licence: site/fonts-OFL.txt, SIL OFL 1.1).
   font-display: optional: a face that has not arrived within about 100 ms is left out of that page view and used from
   the cache on the next, so text never reflows when it lands (CLS) and nothing waits on it (LCP). */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 600; font-display: optional; src: url("/public-sans-latin-ext.1c8a26c0ed4312da.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 600; font-display: optional; src: url("/public-sans-latin.c1b6da516e0062e9.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600 800; font-display: optional; src: url("/montserrat-latin-ext.920711de9ae96c18.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600 800; font-display: optional; src: url("/montserrat-latin.6438d7b8ea9c7c39.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: optional; src: url("/jetbrains-mono-latin-ext.9c38cb2d0d2d93c1.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: optional; src: url("/jetbrains-mono-latin.2c32b9b3ee358c11.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --navy: #02033C;
  --navy-2: #0B1250;
  --ink: #0F1A3A;
  --atlantic: #033E8A;
  --azure: #1075FB;
  --azure-soft: #E8F0FF;
  --cyan: #00CCF5;
  --cyan-soft: #DDF8FE;
  --text: #0F1A3A;
  --text-2: #4A5273;
  --text-3: #646B86;   /* 5.3:1 on white, so the mono labels pass AA */
  --canvas: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #F8F9FC;
  --line: #E3E7F0;
  --line-2: #CFD5E3;
  --success: #0B6B50;   /* 6.5:1 on white */
  --success-soft: #E2F6EE;
  --warning: #7A5A00;
  --warning-soft: #FFF4D6;
  --danger: #B5123D;    /* 6.4:1 on white */
  --danger-soft: #FDE8ED;

  --display: "Montserrat", "Public Sans", system-ui, sans-serif;
  --ui: "Public Sans", "Montserrat", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --sidebar: 248px;
  --topbar: 56px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(2, 3, 60, .05), 0 8px 24px -18px rgba(2, 3, 60, .25);
  --shadow-hover: 0 2px 4px rgba(2, 3, 60, .06), 0 16px 32px -20px rgba(2, 3, 60, .35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { font-family: var(--ui); color: var(--text); background: var(--canvas); -webkit-text-size-adjust: 100%; }
/* The sticky top bar's height, for everything the browser scrolls into view: an anchor's target, a focused control,
   the first invalid field on a refused submit (Pilot, 2026-10-10: 14 of 137 Tab stops sat under the chrome at 390).
   Targets add their own 16px scroll-margin; the phone adds the tab bar below and, on the pre-work, the step bar above. */
html { scroll-padding-top: var(--topbar); }
:where(input, select, textarea, button, summary) { scroll-margin-block: 16px; } /* clear of the chrome, not flush under it */
body { margin: 0; font-size: 15px; line-height: 1.5; }
a { color: var(--atlantic); text-decoration: none; } /* atlantic on light surfaces (9.8:1); azure is for fills and indicators */
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--azure); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.hidden { display: none !important; }
.muted { color: var(--text-2); font-weight: 400; }
/* F85: the sandbox band the middleware puts first in <body> (test/sandbox-band.test.ts) */
.sandbox-band { margin: 0; padding: 8px 16px; background: var(--warning); color: #fff; font: 700 14px/1.4 var(--ui); text-align: center; overflow-wrap: break-word; }

/* ── App shell ───────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px;
  background: var(--navy); color: #fff; padding: 18px 14px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--azure), var(--cyan)); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: -.04em; color: var(--navy); flex: 0 0 auto; }
.brand .names { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand .eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8FB4FF; margin: 0 0 2px; font-weight: 400; }
.brand .program { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.nav-title { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #8C98C4; padding: 10px 10px 4px; }
.site-nav { display: flex; flex-direction: column; gap: 2px; }
.site-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #C9D3EE; font-weight: 500; font-size: 14px;
  position: relative; white-space: nowrap; transition: background 140ms var(--ease), color 140ms var(--ease);
}
.site-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.site-nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
.site-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); }
.site-nav svg { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.who { display: flex; align-items: center; gap: 10px; padding: 6px 8px; font-family: var(--mono); font-size: 10.5px; color: #AAB6D8; min-height: 40px; overflow-wrap: anywhere; line-height: 1.35; }
.who::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); flex: 0 0 auto; }
.who:empty { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 16px; padding: 0 28px;
  background: rgba(244, 246, 251, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs strong { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { color: var(--line-2); }
.topbar .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.chip.ok { background: var(--success-soft); border-color: transparent; color: var(--success); }
.chip.ok::before { background: var(--success); }
.chip.warn { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.chip.warn::before { background: var(--warning); }
.chip.live { background: var(--cyan-soft); border-color: transparent; color: var(--atlantic); }
.chip.live::before { background: var(--cyan); }
.waiver-banner { background: var(--warning-soft); color: #5C4500; font-family: var(--mono); font-size: 11.5px; padding: 7px 28px; border-bottom: 1px solid #F1E2AE; }

main { padding: 24px 28px 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 4px 0 20px; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--text); letter-spacing: -.015em; line-height: 1.2; margin: 0; }
h1 { font-weight: 700; font-size: 26px; }
h2 { font-weight: 700; font-size: 17px; }
h3 { font-weight: 600; font-size: 15px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; font-weight: 400; }
.lede { font-size: 15px; color: var(--text-2); max-width: 70ch; margin: 6px 0 0; }
.label { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 400; }

/* ── Workspace grid and cards ────────────────────────────────────────── */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1080px) { .workspace { grid-template-columns: minmax(0, 1fr) 320px; }
}

.col, .rail { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.workspace.full { grid-template-columns: minmax(0, 1fr); } /* pages with no rail (staff) take the whole width */
.card, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px;
  transition: box-shadow 160ms var(--ease), transform 160ms var(--ease);
}
.card:hover { box-shadow: var(--shadow-hover); }
.panel { margin: 0; }
.card.not-found { max-width: 560px; margin: 15vh auto; padding: 28px; } /* the site's 404 page (compiler/shell.ts) */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 15px; }
.card p { margin: 8px 0; color: var(--text-2); }
.card p:first-of-type { margin-top: 0; }
.panel h2 { margin-bottom: 8px; }
.panel p { color: var(--text-2); margin: 6px 0 12px; }

/* ── Week timeline (the hero card) ───────────────────────────────────── */
.timeline { padding: 18px 22px 20px; }
.clock { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 22px; }
.clock::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 3px; border-radius: 3px; background: var(--line); }
.clock .fill { position: absolute; left: 6px; top: 6px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--azure), var(--cyan)); width: var(--progress, 0%); max-width: calc(100% - 12px); transform-origin: left; animation: grow 900ms var(--ease) both; }
.clock .fill.off { display: none; }
.moment { position: relative; min-width: 0; }
.moment::before { content: ""; position: absolute; left: 0; top: -22px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-2); }
.moment.past::before { border-color: var(--azure); background: var(--azure); }
.moment.past strong { color: var(--text-2); }
.moment.past .sub { color: var(--text-3); }
.clock.all-past .fill { background: var(--azure); }
.moment.now::before { border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); }
.moment .label { margin-bottom: 4px; }
.moment strong { display: block; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--text); line-height: 1.25; }
.moment .sub { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.needle { display: none; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ── Next action and status ──────────────────────────────────────────── */
.next { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 20px; border-left: 4px solid var(--cyan); }
.next .label { margin-bottom: 4px; }
.next .what { font-family: var(--display); font-weight: 700; font-size: 17px; }
.next .muted { display: block; font-size: 13.5px; margin-top: 2px; }
.cta {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 0; cursor: pointer;
  background: var(--atlantic); color: #fff; font-family: var(--ui); font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background 140ms var(--ease), transform 140ms var(--ease), box-shadow 140ms var(--ease);
  box-shadow: 0 1px 2px rgba(3, 62, 138, .3);
}
.cta::after { content: "→"; transition: transform 140ms var(--ease); }
.cta:hover { background: var(--navy); text-decoration: none; color: #fff; }
.cta:hover::after { transform: translateX(2px); }
.cta:active { transform: translateY(1px); }
.cta .muted { color: #D6E4FF; font-weight: 500; }
.cta[disabled] { background: var(--line-2); box-shadow: none; cursor: not-allowed; }
.cta[disabled]::after { content: none; }
.cta.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.cta.ghost:hover { background: var(--surface-2); }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--text); line-height: 1.25; }
.stat .muted { font-size: 13px; }
.rail-list { list-style: none; margin: 4px 0 0; padding: 0; }
.rail-list li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.rail-list li:first-child { border-top: 0; padding-top: 2px; }
.rail-list .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--atlantic); padding-top: 3px; }
.rail-list time { font-weight: 600; color: var(--text); }
.rail-list .muted { display: block; font-size: 12.5px; }

/* ── Forms, the gate ─────────────────────────────────────────────────── */
fieldset { border: 0; padding: 0; margin: 16px 0 0; }
legend { font-family: var(--display); font-weight: 600; color: var(--text); font-size: 13.5px; margin-bottom: 6px; }

form label { display: block; font-weight: 600; margin: 12px 0; color: var(--text); font-size: 13.5px; }
textarea, input[type="file"] {
  display: block; width: 100%; margin-top: 6px; font-family: var(--ui); font-size: 14.5px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-weight: 400; color: var(--text); background: var(--surface); transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
input[type="file"] { font-family: var(--mono); font-size: 12.5px; padding: 8px 10px; background: var(--surface-2); }
textarea:focus { border-color: var(--azure); box-shadow: 0 0 0 3px var(--azure-soft); outline: none; }
.form-status { min-height: 1.4em; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.form-status.error { color: var(--danger); }
.form-status.ok { color: var(--success); }
/* ISC-502: a 5xx line's reference (site/src/server-failed.ts markReferences) never breaks across lines, and one tap
   selects it whole, to paste into a reply. */
.ref-code { white-space: nowrap; -webkit-user-select: all; user-select: all; }
[data-signin-note] { scroll-margin-top: 16px; } /* scrolled into view on a 401 (signedOut): clear of the top bar, not flush under it */
.recorded { border-left: 3px solid var(--success); background: var(--success-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 13.5px; margin-top: 12px; }
.recorded strong { color: var(--success); }
#gate .cta { margin-top: 8px; }

/* ── Threads (chat-shaped) ───────────────────────────────────────────── */
.thread .post-form label { font-size: 13px; }
.thread .post-form textarea { min-height: 72px; }
.thread .post-form .cta { margin-top: 10px; }
.posts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 6px; }
.post { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.post.staff { background: var(--cyan-soft); border-color: #BFEFFA; }
.post.mine { background: var(--azure-soft); border-color: #CFE0FF; }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.post-meta strong { color: var(--text); font-weight: 600; font-size: 13px; }
.post-meta time { font-family: var(--mono); font-size: 11px; }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: var(--navy); color: var(--cyan); padding: 2px 6px; border-radius: 999px; }

.posts .muted { font-size: 13.5px; padding: 6px 2px; }
.post-form .form-status { margin-left: 12px; }

/* ── Reader (a document view inside the workspace) ───────────────────── */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1180px) { .doc-layout { grid-template-columns: minmax(0, 1fr) 260px; } .doc-layout .toc { position: sticky; top: calc(var(--topbar) + 20px); order: 2; } }
.doc { width: 100%; max-width: 100%; font-size: 16px; line-height: 1.65; color: var(--text); } /* full workspace column width so cards, offline panels, tables, and instruments fill the main area cleanly */
/* The reading measure (ISC-388): the card stays full width and the prose in it wraps at about 68ch, the article's own
   paragraphs, lists and quotes and the same blocks one level down in the stepper's section.step. Headings are not
   capped: ch scales with the heading's own font, so 68ch on a 20px h2 would end its border-top mid-card; h2 and h3 and
   their divider lines span the card like the tables do. Tables, instruments, offline panels and the gate panels are not
   prose blocks and keep the column's width; a child with its own cap (.tool .help) keeps it. */
.doc > p, .doc > ul, .doc > ol, .doc > blockquote,
.doc > section.step > p, .doc > section.step > ul, .doc > section.step > ol, .doc > section.step > blockquote { max-width: 68ch; }
.doc > .eyebrow { margin-bottom: 10px; }
.doc h1 { font-size: 28px; margin: 4px 0 18px; }
.doc h2 { font-size: 20px; margin: 40px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 16px; margin: 26px 0 6px; }
.doc p { margin: 0 0 14px; }
.doc li { margin: 4px 0; }
.doc strong { font-weight: 600; }
.doc table { border-collapse: collapse; width: 100%; margin: 18px 0 24px; font-size: 13.5px; display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; line-height: 1.4; }
.doc th { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.doc tr:last-child td { border-bottom: 0; }
.doc blockquote { border-left: 3px solid var(--azure); background: var(--azure-soft); margin: 20px 0; padding: 10px 16px; border-radius: 0 10px 10px 0; color: var(--ink); }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.doc code { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: 13px; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; font-size: 13.5px; }
.toc h2 { font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; border: 0; padding: 0; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { padding: 0; margin: 0; }
.toc a { display: block; color: var(--text-2); padding: 6px 8px; border-radius: 6px; font-weight: 500; }
.toc a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* ── Footer and tab bar ──────────────────────────────────────────────── */
.site-footer { color: var(--text-3); font-family: var(--mono); font-size: 11px; padding: 18px 28px 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.tabbar { display: none; }

@media (max-width: 880px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { padding: 0 16px; gap: 10px; min-width: 0; max-width: 100%; }
  .topbar .brand-sm { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--text); min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .topbar .brand-sm .mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--azure), var(--cyan)); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--navy); flex: 0 0 auto; }
  main { padding: 16px 16px 92px; }
  .waiver-banner { padding: 7px 16px; }
  .clock { grid-template-columns: 1fr; gap: 14px; padding-top: 0; padding-left: 22px; }
  .clock::before, .clock .fill { left: 6px; right: auto; top: 6px; bottom: 6px; width: 3px; height: auto; }
  .clock .fill { height: var(--progress, 0%); width: 3px; max-height: calc(100% - 12px); max-width: none; transform-origin: top; background: linear-gradient(180deg, var(--azure), var(--cyan)); animation-name: growY; }
  .moment::before { left: -22px; top: 2px; }
  .site-footer { padding: 16px 16px 100px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); min-width: 0; max-width: 100%;
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 10.5px; font-weight: 600; color: var(--text-3); border-radius: 8px; min-height: 44px; min-width: 0; max-width: 100%; text-align: center; overflow-wrap: anywhere; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--atlantic); }
  .crumbs { display: none; }
  .tabbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .checklist .muted { white-space: normal; }
  h1 { font-size: 22px; }
  .next { grid-template-columns: minmax(0, 1fr); }
  .next .cta { justify-self: start; }
}
@media (min-width: 881px) { .topbar .brand-sm { display: none; } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ── Pass 2: state in the chrome ─────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-head { align-items: flex-start; }
.page-title { min-width: 0; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 420px; }

#standing-wrap.skeleton { min-width: calc(17ch + .68em + 34px); }
h1 { font-size: 24px; }
.lede { font-size: 14.5px; margin-top: 4px; }

.chip.skeleton { color: transparent; background: linear-gradient(90deg, var(--line) 0%, var(--surface-2) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-color: transparent; }
.chip.skeleton::before { opacity: 0; }
.posts .skeleton { color: var(--text-3); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 2px 0 14px; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--azure), var(--cyan)); transition: width 320ms var(--ease); }
/* The sidebar's cohort progress (compiler/layout.ts): week N of 18 is class pw-N, its width N/18 rounded; no style= in the markup. */
.bar > span.pw-0 { width: 0%; }
.bar > span.pw-1 { width: 6%; }
.bar > span.pw-2 { width: 11%; }
.bar > span.pw-3 { width: 17%; }
.bar > span.pw-4 { width: 22%; }
.bar > span.pw-5 { width: 28%; }
.bar > span.pw-6 { width: 33%; }
.bar > span.pw-7 { width: 39%; }
.bar > span.pw-8 { width: 44%; }
.bar > span.pw-9 { width: 50%; }
.bar > span.pw-10 { width: 56%; }
.bar > span.pw-11 { width: 61%; }
.bar > span.pw-12 { width: 67%; }
.bar > span.pw-13 { width: 72%; }
.bar > span.pw-14 { width: 78%; }
.bar > span.pw-15 { width: 83%; }
.bar > span.pw-16 { width: 89%; }
.bar > span.pw-17 { width: 94%; }
.bar > span.pw-18 { width: 100%; }
.bar.dark { background: rgba(255,255,255,.14); margin: 8px 0 0; height: 4px; }
.bar.dark > span { background: linear-gradient(90deg, var(--cyan), #8FB4FF); }
.cohort { padding: 4px 10px 10px; }
.cohort-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: #C9D3EE; font-weight: 500; white-space: nowrap; }
.cohort-row .mono { font-family: var(--mono); font-size: 10.5px; color: #8FB4FF; letter-spacing: .04em; }

.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--azure), var(--cyan)); color: var(--navy); font-family: var(--display); font-weight: 800; font-size: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; border: 0; padding: 0; cursor: pointer; line-height: 1; } /* a button in the topbar: the phone's way to the name card (ISC-136) */
.avatar:empty { visibility: hidden; }
.who-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.who::before { content: none; }
.who { padding: 0; min-height: 0; }
/* The sidebar's identity buttons (Change name, Pause daily digest) on its navy: the sign-outs' colour, 9.3:1, not the
   link colour, 1.9:1 there (Pilot's walk, 2026-11-02). */
.sidebar .who .linkish { color: #9FB4E6; }
.sidebar .who .linkish:hover, .sidebar .who .linkish:focus-visible { background: none; color: #fff; text-decoration: underline; }

.checklist label.done { color: var(--text-2); }
.checklist label.done::after { content: none; }
#gate .bar { margin: -4px 0 12px; }

.thread .posts { margin: 8px 0 14px; max-height: 480px; overflow: auto; padding-right: 4px; }
.post { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.post .avatar { margin-top: 2px; }
.post .avatar.staff { background: var(--navy); color: var(--cyan); }

.toc a.active { background: var(--azure-soft); color: var(--atlantic); font-weight: 600; }


.card { animation: card-in 420ms var(--ease) both; }
.col > .card:nth-child(2), .rail > .card:nth-child(1) { animation-delay: 60ms; }
.col > .card:nth-child(3), .rail > .card:nth-child(2) { animation-delay: 120ms; }
.col > .card:nth-child(4), .rail > .card:nth-child(3) { animation-delay: 180ms; }
@keyframes card-in { from { transform: translateY(8px); } to { transform: none; } }

@media (max-width: 880px) {
  .page-meta { max-width: none; }
  .reading-bar { margin: -16px -16px 16px; }
  .topbar .avatar.sm { display: grid; }
}

@media (min-width: 881px) { .topbar .avatar.sm { display: none; } }
/* The account menu under the header's avatar (owner's call, 2026-10-25). At 880px and below, where the sidebar is
   hidden, the avatar is a 44px target round its 26px initial (the gradient clipped to the content box); the -9px margin
   keeps its footprint at 26px, so the top bar lays out as before and does not wrap at 320. It opens a menu dropping
   from the top bar's right edge: the name and address, then Change name, Sign out and Sign out of every device, each a
   44px row. At 881px and up neither shows. */
.account-menu { display: none; }
@media (max-width: 880px) {
  .topbar .avatar.sm { width: 44px; height: 44px; padding: 9px; margin: -9px; background-clip: content-box; }
  .topbar .avatar.sm:focus-visible { border-radius: 50%; }
  .account-menu:not([hidden]) {
    display: flex; flex-direction: column; position: absolute; top: calc(100% + 6px); right: 8px; z-index: 25;
    width: 264px; max-width: calc(100vw - 16px); padding: 6px; /* one width, so a failed note wraps inside it */
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-hover);
    animation: menu-in 160ms var(--ease) both;
  }
  .account-who { margin: 0 0 4px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); font-size: 12.5px; line-height: 1.35; color: var(--text-2); overflow-wrap: anywhere; }
  .account-who strong { display: block; font-weight: 600; font-size: 14px; color: var(--text); }
  .account-who span { display: block; font-family: var(--mono); font-size: 11px; }
  .account-item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: none; font: 600 14px var(--ui); color: var(--atlantic); text-align: left; cursor: pointer; }
  .account-item:hover, .account-item:focus-visible { background: var(--azure-soft); }
  .account-item[disabled] { color: var(--text-3); cursor: not-allowed; }
  .account-menu .signout-note { margin: 2px 10px 6px; color: var(--danger); } /* on white, not the sidebar's navy */
}
@keyframes menu-in { from { transform: translateY(-4px); } to { transform: none; } }

/* F34 20px root font-size phone pass (ISA.md:1304): at 320px and 390px with 20px text, the header, brand, avatar and
   7-column tab bar stay within the viewport with zero sideways scroll, no clipped avatar and no wordmark-over-mark overlap. */
@media (max-width: 420px) {
  .topbar, .app-header { height: auto; min-height: var(--topbar); flex-wrap: wrap; padding: 6px 10px; gap: 6px 8px; min-width: 0; max-width: 100%; }
  .brand, .topbar .brand-sm { min-width: 0; max-width: 100%; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
  .brand .mark, .topbar .brand-sm .mark { flex: 0 0 auto; }
  .topbar .chip { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; font-size: 10px; }
  .avatar.sm, .topbar .avatar.sm, .avatar-btn { flex: 0 0 auto; min-width: 0; max-width: 100%; }
  .tabbar, .tab-bar { grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); min-width: 0; max-width: 100%; }
  .tabbar a, .tab-bar a { min-width: 0; max-width: 100%; padding: 4px 1px; gap: 2px; font-size: 9.5px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; overflow: hidden; }
  .tabbar a span, .tab-bar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar svg, .tab-bar svg { width: 18px; height: 18px; flex: 0 0 auto; }
  .video-card, .session-recording .video-card { min-width: 0; max-width: 100%; }
  .video-card:not(.ready) .video-frame { aspect-ratio: auto; }
  .video-card:not(.ready) .video-empty { position: static; padding: 16px 18px; flex-wrap: wrap; min-width: 0; overflow-wrap: break-word; white-space: normal; }
  /* The page head's chips wrap rather than push the page sideways: at 320 the standing chip ("Standing: 0% (0/2 weeks ·
     80% required)", nowrap) was 308.6px in a 288px column and scrolled the whole page 5px (render 2026-10-23). */
  .page-meta { min-width: 0; max-width: 100%; }
  .page-meta .chip { max-width: 100%; height: auto; min-height: 26px; padding-top: 3px; padding-bottom: 3px; white-space: normal; }
}

/* ── Staff table (ISC-53) ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
/* Article tables (ISC-98): the wrapper scrolls, with shadows at whichever edge still has columns beyond it, so a
   clipped column reads as "more to the right" instead of as the end of the table. The table itself lays out
   naturally inside; headers never break mid-word. */
.doc .table-wrap {
  margin: 18px 0 24px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, var(--surface) 30%, rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(255, 255, 255, 0), var(--surface) 70%) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(2, 3, 60, 0.14), rgba(2, 3, 60, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(2, 3, 60, 0.14), rgba(2, 3, 60, 0)) 100% 0;
  background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}
.doc .table-wrap table { display: table; margin: 0; border: 0; overflow: visible; min-width: 100%; background: transparent; }
/* A flex item's min-width is its content's; pinned to 0 so a wide table can never widen the column instead of
   scrolling inside its wrapper. (The 19px sideways scroll seen at 390 on 2026-10-08 was the gate button's label, not
   a table; this rule is the guard, not that fix.) */
.doc-layout > .col, .doc .table-wrap { min-width: 0; max-width: 100%; } /* not .doc itself: its max-width is the measure */
.doc .table-wrap th { white-space: normal; } /* headers wrap at their spaces, never mid-word (the reader's 78 px table at 1440, Pilot 2026-11-02) */
/* Activity tags as chips in headings (ISC-97) and the pre-work's links into the week page's gate (ISC-95). */
.doc h2 .chip.tag, .doc h3 .chip.tag { vertical-align: middle; margin-right: 10px; height: 22px; font-size: 10.5px; background: var(--azure-soft); border-color: transparent; color: var(--azure); }
.doc h2 .chip.tag::before, .doc h3 .chip.tag::before { background: var(--azure); }

.tool { padding-bottom: 20px; }

.tool .dimension { border: 0; padding: 14px 0; margin: 0; border-top: 1px solid var(--line); }
.tool .dimension > legend { font-weight: 600; font-size: 15px; padding: 0; margin: 0 0 4px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.tool .key-question { margin: 0 0 10px; color: var(--text-2); font-style: italic; }
.tool .field { display: block; font: 600 13px var(--ui); color: var(--text); margin: 10px 0 0; }
.tool .field .muted { font-weight: 400; }
.tool select, .tool input.text-input, .tool input[type="number"], .tool input[type="text"] { display: block; width: 100%; max-width: 480px; margin-top: 6px; font-family: var(--ui); font-size: 14.5px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
/* A11Y-1: the border-and-ring focus style is for text-like controls only (:where keeps it at 0,2,1). A native radio or
   checkbox paints no border colour and the --azure-soft ring is 1.15:1 on white, so they keep a real outline: --azure is
   4.2:1 on --surface, 4.0:1 on --surface-2, 3.9:1 on --canvas and 3.7:1 on a checked likert label (--azure-soft). */
.tool select:focus, .tool input:where(:not([type="radio"]):not([type="checkbox"])):focus { border-color: var(--azure); box-shadow: 0 0 0 3px var(--azure-soft); outline: none; }
.tool input[type="radio"]:focus-visible, .tool input[type="checkbox"]:focus-visible { outline: 2px solid var(--azure); outline-offset: 2px; }
.tool textarea { margin-top: 6px; }
.tool .anchor { font-size: 13px; margin: 6px 0 0; max-width: 70ch; }

/* Pre-work tools (ISA F13, ISC-112): grid rows, worksheet tables with repeating rows, the self-check's reveal. The
   self-check's answer and mark blocks set no display, so their hidden attribute holds. */
.tool table, .tool-report table { border-collapse: collapse; width: 100%; }
.tool th, .tool td, .tool-report th, .tool-report td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.4; }
.tool thead th, .tool-report thead th { font: 400 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.tool .table-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); max-width: 100%; }

.tool .unit { font: 12px var(--mono); color: var(--text-2); }

@media (max-width: 480px) {
  .tool .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  input[type="file"], .handin-add input[type="file"], .upload-form input[type="file"] { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

.commit { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; max-width: 52ch; }
.commit dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding-top: 2px; }
.commit dd { margin: 0; }

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

.cal-event .was, .moment .was { font-family: var(--mono); font-size: 11px; color: var(--warning); }
.cal-what { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cal-what strong { font-weight: 600; }
.cal-what .muted { flex-basis: 100%; font-size: 13.5px; }
.chip.kind { height: 22px; }
.kind-session .chip.kind { background: var(--cyan-soft); border-color: transparent; color: var(--atlantic); }
.kind-session .chip.kind::before { background: var(--cyan); }
.kind-due .chip.kind, .kind-exam .chip.kind, .kind-defense .chip.kind { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.kind-due .chip.kind::before, .kind-exam .chip.kind::before, .kind-defense .chip.kind::before { background: var(--warning); }

.linkish { background: none; border: 0; padding: 4px 6px; min-height: 24px; font: 600 13px var(--ui); color: var(--atlantic); cursor: pointer; border-radius: var(--radius-sm); } /* text, so atlantic (A11Y-05: azure is 4.23:1 on white); at least 24 px tall whatever the font (WCAG 2.5.8: Linux metrics drew 4 px padding round 13 px text at 23 px) */
.linkish:hover, .linkish:focus-visible { background: var(--azure-soft); }

.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2); }
.seg button { min-height: 32px; padding: 6px 14px; border: 0; border-radius: 999px; background: none; font: 600 13px var(--ui); color: var(--text-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.seg button:focus-visible, .icon-btn:focus-visible, .day-btn:focus-visible { outline: 2px solid var(--azure); outline-offset: 2px; }

.day .num { align-self: flex-start; font: 600 12px var(--mono); color: var(--text-2); }
.day.out { background: var(--surface-2); }
.day.out .num { color: var(--text-3); }
.day.out .evs { opacity: .7; }
.day.today .num { padding: 1px 7px; border-radius: 999px; background: var(--azure); color: #fff; }
.day.sel { box-shadow: inset 0 0 0 2px var(--azure); }
.evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); font-size: 12px; line-height: 1.35; color: var(--text); }
.ev .t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ev b { font-weight: 600; }
.ev.cancelled .t { text-decoration: line-through; opacity: .65; }

.more { padding-left: 6px; font: 600 11px var(--ui); color: var(--atlantic); }


/* Sign-in (DESIGN-signin.md): the platform's own page, on the navy canvas, one card, two steps. */
.signin-page { min-height: 100vh; background: radial-gradient(1200px 600px at 20% -10%, var(--navy-2), var(--navy) 60%); }

.signin { display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 440px; margin: 0 auto; padding: 12vh 16px 40px; }

.signin-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.signin-brand .mark { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--azure), var(--cyan)); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: -.04em; color: var(--navy); }
.signin-brand .names { display: flex; flex-direction: column; line-height: 1.15; }
.signin-brand .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #9FB4E6; }
.signin-brand .program { font-family: var(--display); font-weight: 800; font-size: 20px; }
.signin-card { width: 100%; padding: 28px; }
.signin-card h1 { margin: 0 0 6px; font-size: 22px; }
.signin-card .muted { margin: 0 0 18px; }
.signin-card label { display: block; margin: 0 0 6px; font: 600 13px var(--ui); color: var(--text); }
.signin-card input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: 16px var(--ui); color: var(--text); background: var(--surface); }
.signin-card input:focus-visible { outline: 2px solid var(--azure); outline-offset: 1px; border-color: var(--azure); }
.signin-card #code { font: 600 24px var(--mono); letter-spacing: .3em; text-align: center; }
.signin-card .cta { width: 100%; justify-content: center; margin-top: 16px; }
.signin-card .turnstile { margin-top: 14px; }
.signin-card .turnstile:empty { margin-top: 0; }
.signin-links { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 0; }
.signin-card .form-status { margin: 12px 0 0; }
.signin-foot { max-width: 380px; text-align: center; font-size: 12.5px; color: #B9C6E8; }

.signout { display: block; margin-top: 10px; padding: 4px 0; color: #9FB4E6; font-size: 12.5px; }
.signout:hover, .signout:focus-visible { background: none; color: #fff; text-decoration: underline; }
/* MW-10: Sign out of every device, right under Sign out; its note when the platform did not confirm it (light on the
   navy sidebar, well past AA). */
.signout + .signout-all { margin-top: 2px; }
.signout-note { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: #FFD2CC; }

/* Display names (shared/names.ts): the sidebar shows the name over the address; the name card sits atop the page. */
.who-name { display: block; color: #fff; font-weight: 600; font-size: 13px; }
.who-email { display: block; }
.edit-name { padding: 2px 0; font-size: 12px; color: #9FB4E6; }
/* The identity block is a flex row elsewhere; with a name it stacks: name, address, then the edit link. */
.who { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; flex: 1 1 auto; min-width: 0; }
.who-name, .edit-name { overflow-wrap: break-word; }
.edit-name:hover, .edit-name:focus-visible { background: none; color: #fff; text-decoration: underline; }
.name-card .name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.name-card .text-input, #consent .text-input { flex: 1 1 240px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: 15px var(--ui); color: var(--text); background: var(--surface); }
#consent .text-input { display: block; width: 100%; max-width: 420px; margin: 4px 0 6px; }
.field { display: block; font: 600 13px var(--ui); color: var(--text); }

/* Multi-week shell (ISC-75, ISC-76, ISC-80): the Weeks group in the sidebar, the phones-only week strip (the sidebar is
   hidden there), the cohort home's list of weeks, and the library's one section per module. */
.site-nav .wk-num { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 5px; font-family: var(--mono); font-size: 10px; font-weight: 600; line-height: 1; opacity: .9; }
.site-nav a[aria-current="true"] { color: #fff; }
.site-nav a[aria-current="true"] .wk-num { background: var(--cyan); border-color: var(--cyan); color: var(--navy); opacity: 1; }
.week-strip { display: none; }
@media (max-width: 880px) {
  .week-strip { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface); scrollbar-width: none; }
  .week-strip::-webkit-scrollbar { display: none; }
  .week-strip .label { flex: 0 0 auto; margin-right: 4px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
  .week-strip a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
  .week-strip a:hover { text-decoration: none; border-color: var(--azure); }
  .week-strip a[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
}
.week-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.week-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.week-row:hover { text-decoration: none; border-color: var(--azure); background: var(--azure-soft); }
.week-row .wk-num { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--navy); color: #fff; font-family: var(--mono); font-weight: 600; font-size: 13px; }
.week-row .wk-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week-row .wk-text .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-row .go { font-size: 22px; line-height: 1; color: var(--text-3); }

.toc ol ol { margin: 0 0 6px 10px; padding-left: 8px; border-left: 1px solid var(--line); }
.toc ol ol a { font-weight: 400; padding: 4px 8px; font-size: 13px; }

/* Release gate (ISC-85): staff see every listed week; the server marks the ones learners cannot see yet. */
[data-unreleased] { opacity: .6; }
.site-nav a[data-unreleased] > span:last-child::after,
.week-strip a[data-unreleased]::after,
li[data-unreleased] .wk-text strong::after,
tr[data-unreleased] td:first-child strong::after,
article[data-unreleased] .doc-meta .eyebrow::after { content: " · not open yet"; font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }


/* ── The workbook (DESIGN-workbook.md) ───────────────────────────────── */
/* § 4 The sidebar carries the steps. compiler/layout.ts emits a parent's children as ol.sub-nav right after the parent
   link, on the parent's own page only: Pre-work's step sections then its gate, the Reader's H2s. Indented on a guide line under
   the parent's icon, smaller type, one line each with an ellipsis at the 248px sidebar. The sidebar scrolls once the
   children push it past the viewport (CM1's reader carries 18). */
.sidebar { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
.sub-nav { list-style: none; display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; padding: 0 0 0 8px; border-left: 1px solid rgba(255,255,255,.14); }
.sub-nav li { margin: 0; padding: 0; min-width: 0; }
.site-nav .sub-nav a { gap: 8px; padding: 5px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: #AEB9DA; }
.site-nav .sub-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sub-nav a .lbl { min-width: 0; overflow: hidden; white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.25; }
/* The active child: app.js's scroll spy sets a.active; layout.ts sets aria-current="location" when the compiler points a
   tool page's `current` at its own step. A short cyan tick on the guide line, never the parent's page bar. */
.site-nav .sub-nav a.active, .site-nav .sub-nav a[aria-current]:not([aria-current="false"]) { background: rgba(255,255,255,.09); color: #fff; }
.site-nav .sub-nav a.active::before, .site-nav .sub-nav a[aria-current]:not([aria-current="false"])::before { content: ""; position: absolute; left: -9px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--cyan); }

/* The status slot (.st, aria-hidden). Pre-work steps (a[data-tools="id1 id2"], none or several): the runtime aggregates
   their state from /api/instruments into data-state and the glyph is drawn here (○ new, ◐ in progress, ● complete) unless the runtime writes text of its own. The gate child's
   slot takes "n of m" and sits at the row's end. A numbered reader section's slot holds its number (layout.ts). */
.sub-nav .st, .toc .st { flex: 0 0 24px; display: inline-grid; place-items: center; font: 600 10px/1 var(--mono); letter-spacing: 0; }
.st[data-state]:empty::before { font-family: var(--ui); font-size: 12px; line-height: 1; }
.st[data-state="new"]:empty::before { content: "○"; }
.st[data-state="draft"]:empty::before { content: "◐"; }
.st[data-state="complete"]:empty::before { content: "●"; }
.sub-nav .st { color: #8FB4FF; }
.sub-nav .st[data-state="new"] { color: #8C98C4; }
.sub-nav .st[data-state="draft"] { color: #F5C451; }
.sub-nav .st[data-state="complete"] { color: var(--cyan); }
.sub-nav a[data-gate-child] .st, .toc a[data-gate-child] .st { order: 2; flex: 0 0 auto; margin-left: auto; padding: 0 2px; font-weight: 600; white-space: nowrap; }
.sub-nav a[data-gate-child] .lbl, .toc a[data-gate-child] .lbl { margin-left: 32px; } /* level with the labels after a 24px slot and the 8px gap */

/* The in-article TOC on a page whose sidebar carries steps: the same list (layout.ts swaps it in on the pre-work), so
   phones keep the steps. Wherever the sidebar is visible (it is hidden at max-width: 880px) the TOC is not rendered
   and the article takes the layout's full width, so there are never two step lists on screen (audit F13). */
.toc.steps a { display: flex; align-items: center; gap: 8px; }
.toc.steps .lbl { min-width: 0; }
.toc .st { color: var(--text-3); }
.toc .st[data-state="draft"] { color: var(--warning); }
.toc .st[data-state="complete"] { color: var(--success); }
@media (min-width: 881px) {
  body.has-sub-nav .doc-layout { grid-template-columns: minmax(0, 1fr); }
  body.has-sub-nav .doc-layout > .toc { display: none; }
}
/* Every sidebar and TOC target lands below the sticky top bar, not under it. */
.doc h2[id], .doc h3[id], section.instrument[id], .doc-layout #gate, #prework-status { scroll-margin-top: 16px; }
/* A course code block (CM10's ASCII time budget) is wider than a phone; it scrolls inside its box instead of spilling. */
.doc pre { overflow-x: auto; max-width: 100%; }

/* § 1 Every instrument is one wrapper (Revision 1, F02): section.instrument#tool-<id> holding its .tool-head (title,
   [data-tool-status] chip, a.tool-open), its form.tool[data-tool], its .tool-actions and its [data-tool-report]. The
   wrapper is the card and the form inside it is plain, on the tool page (one per page, outside .doc) as in the
   article. The result follows the actions inside the same card, below a rule. */
section.instrument { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
section.instrument > form.tool { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; animation: none; }

/* In the pre-work article where its tables were: a card inside the .doc card with room above and below, the tool page's
   own type (15px/1.5) rather than the article's reading size, and an azure top rule that marks it as something to fill. */
.doc section.instrument { margin: 28px 0 36px; padding: 18px 20px 20px; font-size: 15px; line-height: 1.5; border-color: var(--line-2); border-top: 3px solid var(--azure); }
@media (max-width: 720px) {
  .doc section.instrument { margin: 22px -12px 28px; padding: 14px 12px 16px; } /* reclaim the article card's gutter on a phone */
}

/* § 2 The week page's pre-work status card (section#prework-status): the gate's progress chip and bar, the workbook's
   steps as [data-step] rows with the existing chip classes, one CTA into the pre-work's gate. */
#prework-status .bar { margin: -4px 0 12px; }
#prework-status :is(ul, ol):has(> [data-step]) { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; }
#prework-status [data-step] { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
#prework-status [data-step]:first-child { border-top: 0; }
#prework-status [data-step] a { font-weight: 600; }
#prework-status [data-step] .chip { margin-left: auto; }
#prework-status .cta { margin-top: 12px; }
@media (max-width: 720px) {
  #prework-status [data-step] .chip { margin-left: 0; height: auto; min-height: 24px; padding: 3px 10px; white-space: normal; }
}

/* § 2 The pre-work's closing gate: the week page's #gate panel (same inner ids, same #gate rules above) as the last
   section of the article column, outside the .doc card and as wide as it. If it is ever placed inside the card, the
   article's H2 rule gives way to the panel's head. */
.doc-layout > .col > #gate.panel { width: 100%; max-width: 100%; font-size: 16px; } /* full workspace column width matching .doc */
.doc-layout #gate .card-head h2 { font-size: 20px; }
.doc #gate.panel { margin: 40px 0 0; font-size: 15px; line-height: 1.5; }
.doc #gate .card-head h2 { margin: 0; padding: 0; border: 0; }


/* ── F18 · The post-session leg (DESIGN-postsession.md § Revision 1, runtime lane) ──────────────────────────────────
   Every rule here mirrors one the pre-work's gate, card or sidebar step already has, under the post-session ids, so
   the two gates read as one design; nothing above is changed. */
/* The exercises page's closing gate (#post-gate) and the week page's Post-session card (#postsession-status). */
#post-gate .cta { margin-top: 8px; }
#post-gate .bar { margin: -4px 0 12px; }
.doc-layout > .col > #post-gate.panel { width: 100%; max-width: 100%; font-size: 16px; }
.doc-layout #post-gate .card-head h2 { font-size: 20px; }
.doc #post-gate.panel { margin: 40px 0 0; font-size: 15px; line-height: 1.5; }
.doc #post-gate .card-head h2 { margin: 0; padding: 0; border: 0; }
/* The reading measure (ISC-388): both gate panels stay as wide as the column, and their paragraphs and lists wrap at
   about 68ch like the article's prose; the checklist, the fields and the submit row keep the panel's width. */
#gate.panel p, #gate.panel ul, #gate.panel ol, #post-gate.panel p, #post-gate.panel ul, #post-gate.panel ol { max-width: 68ch; }
.doc-layout #post-gate, #postsession-status { scroll-margin-top: 16px; }

/* The Exercises parent's Submit step in the sidebar and the phone TOC: its slot takes the gate's text at the row's end. */
.sub-nav a[data-post-gate-child] .st, .toc a[data-post-gate-child] .st { order: 2; flex: 0 0 auto; margin-left: auto; padding: 0 2px; font-weight: 600; white-space: nowrap; }
.sub-nav a[data-post-gate-child] .lbl, .toc a[data-post-gate-child] .lbl { margin-left: 32px; }

/* The share tool (form.tool[data-kind="share"]): a link field, the shared files, a picker and Upload. The server sets
   its status, so the wrapper's Mark complete / Edit again never show (the runtime hides them too, after load). */
.tool input[type="url"] { display: block; width: 100%; max-width: 560px; margin-top: 6px; font-family: var(--ui); font-size: 14.5px; font-weight: 400; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }


/* ── F19 · The peer exchange (DESIGN-postsession.md § F19 Revision 1, runtime lane) ─────────────────────────────────
   The peer block (section.peer[data-peer], before the review tool), the feedback an author received, the review tool
   once it is final, and the staff Pairs panel. Each rule mirrors one the share tool, the instruments or the staff
   table already has; nothing above is changed. */
/* The peer block in the article: a card like an inline instrument's, with the exchange's cyan rule on top. */
.doc section.peer { margin: 28px 0 24px; padding: 18px 20px; font-size: 15px; line-height: 1.5; background: var(--surface); border: 1px solid var(--line-2); border-top: 3px solid var(--cyan); border-radius: var(--radius); box-shadow: var(--shadow); }
section.peer h3 { margin: 0 0 8px; padding: 0; border: 0; font-size: 15px; }
section.peer > p { margin: 0; }

@media (max-width: 720px) {
  .doc section.peer { margin: 22px -12px 24px; padding: 14px 12px 16px; }
}
/* The review tool once it is final: the answers stay readable, the fields read as settled; no Edit again on this kind. */
form.tool[data-kind="review"] textarea[readonly] { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }

/* ── F25 · The pre-work as steps (reviews/2026-10-10-design-prework-steps.md; app.js initStepper) ──────────────────
   The compiler wraps each step in section.step; the runtime shows one, builds its eyebrow and footer, the gate step's
   "Before you submit" and the phone step bar's toggle. Tokens only. Motion: the caret and the button press, transform
   only, and nothing depends on them. */
section.step[hidden] { display: none !important; } /* the next step is out of the layout, not just off screen (ISC-211) */
/* Before the stepper runs (gauntlet A): site/boot.js marks <html> js-steps early in <head>; initStepper adds steps-ready
   in the same task that shows the current step (and app.js adds it on the stepper's failure, or with no stepper). If
   steps-ready is still missing at DOMContentLoaded (app.js failed, 404'd or threw; DOMContentLoaded waits for a slow
   one), boot.js lifts the hold then, and a 10 s backstop lifts it if DOMContentLoaded never comes. Until then no step
   paints, so the long article's first section is never the first thing seen. Without JavaScript the class is never set
   and nothing is hidden. */
html.js-steps:not(.steps-ready) .doc > section.step { display: none; }
/* What follows the article waits too: shown under the short held page and then pushed down, it would be a layout shift
   (0.19 at 390 measured under 4x CPU); appearing with the step, it is not. */
html.js-steps:not(.steps-ready) .site-footer, html.js-steps:not(.steps-ready) .doc-layout nav.next-step { display: none; }
/* A held staff page (compiler/layout.ts hold, site/hold.js): app.js's first run puts the topic bar after the page head,
   the topic banner over the sections, the topics directory in Weeks and the topic list in the sidebar's Staff group.
   Painted before that run, everything under them moved down by up to 336 px (CLS 0.28 to 0.74 at 390 under the lab
   profile); unpainted until it, the page appears once, finished. hold.js's release: steps-ready, else DOMContentLoaded,
   else its 10 s backstop. */
html.js-held:not(.steps-ready) body.js-hold #main, html.js-held:not(.steps-ready) body.js-hold .sidebar nav.site-nav, html.js-held:not(.steps-ready) body.js-hold .site-footer { visibility: hidden; }
body.stepper .reading-bar { display: none; } /* one step's scroll is not progress through the pre-work */
.doc .step > .step-eyebrow + h2, .doc .step > .step-start + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.step-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.doc .step section#gate { margin-top: 0; }


/* The step list: minutes, and the current step. */
.toc.steps .min { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--text-3); white-space: nowrap; }
.toc.steps a[aria-current="step"] { background: var(--azure-soft); color: var(--atlantic); font-weight: 600; }
.toc.steps[data-stepbar] .stepbar-toggle, .toc.steps[data-stepbar] .segs { display: none; }
body.stepper .toc.steps[data-stepbar] > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#steps-list[hidden] { display: none; }


@media screen and (max-width: 880px) { /* screen: a narrow print page keeps its title and prints the plain list (F25-32) */
  html { scroll-padding-bottom: 88px; } /* the tab bar: 80 px at 320, where its labels wrap */
  html:has(body.stepper) { scroll-padding-top: calc(var(--topbar) + 52px); } /* and the step bar under the top bar */
  /* The phone step bar: the step list at the top, sticky under the top bar, one line and a row of segments, 52 px at
     most. The list opens as an overlay below it, so the bar's height never changes and nothing under it moves. */
  body.stepper .doc-layout, html.js-steps:not(.steps-ready) .doc-layout { gap: 14px; }
  /* The site footer after main already clears the tab bar; main's own 92 px on top of it let a full scroll carry the
     footer's buttons up under the step bar at 320 (Pilot 4: Next at 74 px under a bar ending at 108). */
  body.stepper main { padding-bottom: 8px; }
  /* The tab bar's clearance, as tall as the tab bar (80 px at 320 where its labels wrap) plus the phone's safe area,
     instead of a fixed 100 px: every footer control clears the step bar at full scroll (follow-up 2). */
  body.stepper .site-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  /* Before the stepper runs, the bar already holds its 52 px, empty, so nothing under it moves when it fills. */
  html.js-steps:not(.steps-ready) .doc-layout > .toc.steps[data-stepbar] { min-height: 52px; }
  html.js-steps:not(.steps-ready) .toc.steps[data-stepbar] > h2, html.js-steps:not(.steps-ready) .toc.steps[data-stepbar] > #steps-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.stepper .doc-layout > .toc.steps[data-stepbar], html.js-steps:not(.steps-ready) .doc-layout > .toc.steps[data-stepbar] { position: sticky; top: var(--topbar); z-index: 18; margin: -16px -16px 0; padding: 0; border-radius: 0; border-width: 0 0 1px; box-shadow: 0 6px 14px -12px rgba(2, 3, 60, .35); }
}

@media screen and (max-width: 880px) {
  .toc.steps[data-stepbar] .segs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 2px 16px 6px; }
  .segs span { height: 3px; border-radius: 2px; background: var(--line-2); }
  .segs span[data-state="draft"] { background: var(--warning); }
  .segs span[data-state="complete"] { background: var(--success); }
  .segs span[data-current] { transform: scaleY(1.67); box-shadow: 0 0 0 1px var(--navy); }
  body.stepper .toc.steps[data-stepbar] #steps-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 19; margin: 0; padding: 4px 12px 12px; max-height: 62vh; max-height: 62dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-2); box-shadow: 0 18px 24px -18px rgba(2, 3, 60, .45); }
}


@media print {
  /* Every step prints, as the long article; none of the stepper's chrome does. */
  body.stepper section.step[hidden] { display: block !important; }
  .step-footer, .toc.steps[data-stepbar], .step-left, .step-storage { display: none !important; }
}

.chip.off { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.chip.off::before { background: var(--warning); }

.none { font-size: 13px; color: var(--text-3); margin: 0 0 2px; }

.radios { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.radios label { display: inline-flex; align-items: center; gap: 6px; font: 500 14px var(--ui); color: var(--text); min-height: 32px; }
.radios input { width: 18px; height: 18px; accent-color: var(--azure); margin: 0; }

/* Empty, loading and error, the platform's own shapes. */
.empty { padding: 18px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); color: var(--text-2); font-size: 14px; background: var(--surface-2); }
.empty strong { display: block; color: var(--text); margin-bottom: 2px; }

/* Staff view of a switched-off feature (ISC-265): the [data-unreleased] treatment with its own words, and one line on a
   switched-off page itself. A learner never gets the element at all: the rewriter removed it. */
[data-feature-off] { opacity: .6; }
/* The phone tab bar's labels are text-3 on white: dimmed they fall under AA (2.42:1), so a switched-off item keeps full
   strength there and is struck through instead (staff only; the sidebar carries the words). */
.tabbar a[data-feature-off] { opacity: 1; }
.tabbar a[data-feature-off] > span { text-decoration: line-through; text-decoration-color: var(--warning); text-decoration-thickness: 2px; }
.site-nav a[data-feature-off] > span:last-child::after { content: " · off for learners"; font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
section.thread[data-feature-off] > .card-head h2::after, section.peer[data-feature-off]::before { content: "Off for learners"; display: inline-block; margin-left: 10px; font: 400 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--warning); vertical-align: middle; }
/* A menu group whose every item the rewriter removed (a learner with the library, calendar and lounge all off) goes with
   its title: no heading over nothing. */
.nav-title:has(+ .site-nav:empty), .site-nav:empty { display: none; }
.off-banner { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warning-soft); color: #5C4500; font-size: 13.5px; }
.off-banner strong { color: var(--warning); }
.off-banner a { color: #5C4500; text-decoration: underline; }
/* The author's own removed post (learner view, F36 R5): marked, and only they see it. */
.post.removed { border-style: dashed; border-color: var(--line-2); background: var(--surface-2); }

.fmt { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; width: 100%; min-height: 46px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.doc .fmt, .doc .fmt:hover { color: var(--text); text-decoration: none; }
.fmt:hover { border-color: var(--azure); background: var(--azure-soft); }
.fmt .ft, .handed .ft { padding: 5px 0; border-radius: 6px; font: 600 10px/1 var(--mono); letter-spacing: .06em; text-align: center; color: #fff; background: var(--atlantic); }
.fmt .ft.pdf, .handed .ft.pdf { background: var(--danger); }
.fmt .ft.gdoc, .fmt .ft.gsheet, .fmt .ft.xlsx, .handed .ft.xlsx, .handed .ft.link { background: var(--success); }
.fmt .fl { font: 600 14px/1.25 var(--ui); min-width: 0; overflow-wrap: anywhere; }
.fmt .fs { font: 400 11px/1.3 var(--mono); color: var(--text-3); text-align: right; }
.fmt[aria-disabled="true"] { cursor: progress; }

@media (max-width: 560px) {
  .fmt { grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 1px; padding: 8px 12px; }
  .fmt .ft { grid-row: 1 / span 2; }
  .fmt .fs { grid-column: 2; text-align: left; }
}
/* Download my answers: the learner's own copy, so it looks different from the blank template (dashed). */
.mine { margin-top: 8px; }
.mine .fmt { border-style: dashed; }
.mine .fmt .fs { white-space: normal; }

/* Staff see a switched-off row at full strength (dimmed, the mono labels fall under AA), dashed and named. */
.fmt[data-feature-off], .offline[data-feature-off], .lib-docs[data-feature-off], .mine[data-feature-off] { opacity: 1; }
.fmt[data-feature-off] { border-style: dashed; }
.fmt[data-feature-off] .fl::after { content: "Off for learners"; display: block; font: 400 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--warning); }

/* The hand-in at the end of an exercise: the instrument's frame, its own list and two ways in. */
.handin .who-sees, section.instrument > .who-sees { margin: 0 0 12px; font-size: 14px; color: var(--text-2); }
.handed { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.handed:empty { display: none; }
.handed li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.handed .ft { grid-row: 1 / span 2; }
.handed .fn { font: 400 13px/1.4 var(--mono); color: var(--atlantic); overflow-wrap: anywhere; min-width: 0; }
.handed .fm { grid-column: 2; font-size: 12px; color: var(--text-3); }
.handed .fm.late { color: var(--warning); }
/* P-8: a hand-in's Replace and Remove, and Remove's own question, under its name and time. */
.handed .acts, .handed .confirm { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 4px 0 0 -6px; font-size: 13px; color: var(--text); }
.handed .confirm > span { padding-left: 6px; }
.handed .acts .linkish, .handed .confirm .linkish { min-height: 32px; }

.progress { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 100%; background: var(--azure); transform-origin: left; transform: scaleX(0); }
