/* =============================================================
   OLD FORGE ACADEMY
   The letterpress design of oldforge.tech, applied to the portal.
   Tokens, the masthead, the footer and the type come from
   oldforge.tech/assets/css/letterpress.css and letterpress-shell.css;
   keep them in step with the site. No new colours, no new typefaces.

   --ember (#C8441C) is 3.97:1 on paper and fails AA for text: it is
   for display type of 24px and up, rules, dots and ornament only.
   Anything read at body size (links, labels, buttons) uses
   --ember-text (#8C2E12, 6.79:1).

   One layout system: three column widths (--w-narrow, --w-read,
   --w-wide), and everything inside a column runs its full width,
   so headings, text, forms, tables and notes share one left and one
   right edge. Vertical rhythm comes from the --s* scale only.
   ============================================================= */

/* ---------- Type (self-hosted, as on oldforge.tech) ---------- */
@font-face { font-family: "Signifier"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/signifier-regular.da890694caa3.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../fonts/fraunces-latin.252629058502.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: "Fraunces"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../fonts/fraunces-latin-ext.92c9045f39b8.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("../fonts/fraunces-italic-latin.9eb5dd11d110.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: "Fraunces"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("../fonts/fraunces-italic-latin-ext.7f2243652faf.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.b058178d7f30.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: 300 700; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.e36841ed93d5.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("../fonts/jetbrains-mono-italic-latin.803579811861.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: italic; font-weight: 300 700; font-display: swap;
  src: url("../fonts/jetbrains-mono-italic-latin-ext.ce26d2e3a4f1.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens (letterpress.css) ---------- */
:root {
  --ink:        #14110D;
  --ink-soft:   #1E1A14;
  --ink-deep:   #0A0805;
  --paper:      #F0E7D2;
  --paper-warm: #EADEC0;
  --paper-deep: #DCCFA8;
  --paper-edge: #B9A77C;

  --ember:      #C8441C;
  --ember-hot:  #E85D2B;
  --ember-deep: #8C2E12;
  --ember-text: #8C2E12;

  --moss:       #4A5A32;
  --moss-soft:  rgba(74, 90, 50, .18);
  --ember-glow: rgba(200, 68, 28, .28);
  --copper:     #B87333;
  --steel:      #3D5568;
  --ash:        #7A6F5E;
  --rust:       #8E3A1E;

  --text:       #181511;
  --text-muted: #5B5140;
  --text-faint: #8B7F66;
  --rule:       #2E2A22;
  --rule-soft:  rgba(20, 17, 13, .18);

  --serif: "Signifier", "Fraunces", Georgia, "Times New Roman", serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --page: clamp(1.25rem, 4vw, 4rem);

  /* The three columns. */
  --w-narrow: 30rem;
  --w-read:   42.5rem;
  --w-wide:   75rem;

  /* Vertical rhythm. */
  --s1: .25rem;
  --s2: .5rem;
  --s3: .75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2.25rem;
  --s7: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { background: var(--paper); color: var(--text); }
body {
  font-family: var(--serif);
  font-feature-settings: "ss01", "onum", "liga", "calt";
  font-size: clamp(16px, .95rem + .15vw, 18px);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}
/* The paper grain of oldforge.tech, set in the page background rather than as a fixed
   overlay, so it covers the whole page however long it is and moves with it. */
html, body, .masthead, .listen.is-stuck {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.07  0 0 0 0 0.05  0 0 0 0.23 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -.015em; color: var(--text); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--ember-text); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--text); text-decoration-color: var(--ember); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
main:focus, [tabindex="-1"]:focus { outline: none; }
::selection { background: var(--ember); color: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
strong, b { font-weight: 700; }
/* JetBrains Mono's ligatures turn => into an arrow; learners need to see what to type. */
code, kbd, samp, pre, .terminal__screen { font-family: var(--mono); font-variant-ligatures: none; }

.visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.icon { width: 1em; height: 1em; flex: none; vertical-align: -.125em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  padding: .85rem 1.25rem; text-decoration: none; border-bottom: 2px solid var(--ember);
}
.skip-link:focus { left: 0; color: var(--paper); }

/* Small-caps mono: kickers, labels, metadata. */
.kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; line-height: 1.6;
  color: var(--ember-text);
}
.kicker--muted { color: var(--text-muted); }
.meta {
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase; line-height: 1.6;
  color: var(--text-muted);
}
.sep { color: var(--paper-edge); padding: 0 .35em; }
/* A run of metadata, "Task · 75 min · 3 of 6": each part keeps its dot and never wraps
   inside itself, so a line never starts with a stray dot. */
.dots > span { white-space: nowrap; }
.dots > span:not(:last-child)::after { content: "\00b7"; content: "\00b7" / ""; color: var(--paper-edge); margin-left: .5em; }
.muted { color: var(--text-muted); }

/* ---------- Masthead (letterpress.css) ---------- */
.masthead {
  position: relative; z-index: 80;
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: .4rem 1.5rem;
  width: min(100% - 2 * var(--page), var(--w-wide));
  margin: 0 auto;
  padding: .75rem 0;
}
.masthead__mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + .9vw, 2rem);
  letter-spacing: -.025em;
  line-height: .9;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex; align-items: center;
  min-height: 44px;
}
.masthead__mark:hover { color: var(--text); }
.masthead__mark em { font-style: italic; color: var(--ember); margin-left: .05em; }
.masthead__icon { display: inline-block; width: 1.15em; height: 1.15em; margin-right: .32em; }
.masthead__mark-tag {
  display: inline-block; margin-left: .7em; padding-left: .7em;
  border-left: 1px solid var(--rule-soft);
  font-family: var(--mono); font-style: normal;
  font-size: .44em; font-weight: 500; line-height: 2;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--text-muted);
}
.masthead__end { display: flex; align-items: center; gap: 1.75rem; }
.masthead__nav {
  display: flex; gap: 1.5rem; align-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
}
.masthead__nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; color: var(--text); white-space: nowrap;
  transition: color .18s ease;
}
.masthead__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px;
  background: var(--ember); transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.masthead__nav a:hover, .masthead__nav a[aria-current="page"] { color: var(--ember-text); }
.masthead__nav a:hover::after, .masthead__nav a[aria-current="page"]::after { transform: scaleX(1); }
.masthead__nav a[aria-current="page"]::after { height: 2px; }
/* The nameplate: Sign out, drawn as the site's Sign in. */
.masthead__out { margin: 0; }
.masthead__auth {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 34px; padding: .38rem .82rem .38rem .66rem;
  border: 1px solid var(--ember-text); border-radius: 2px;
  background: transparent; color: var(--ember-text); cursor: pointer;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase; line-height: 1; white-space: nowrap;
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}
.masthead__auth::before { content: ""; display: block; width: 6px; height: 6px; border: 1px solid currentColor; background: currentColor; transform: rotate(45deg); flex-shrink: 0; }
.masthead__auth:hover { background: var(--ember-deep); border-color: var(--ember-deep); color: var(--paper); }
@media (min-width: 60rem) {
  .masthead { position: sticky; top: 0; }
}
/* Below 760px the section links get a row of their own, ruled off from the mark. */
@media (max-width: 47.49rem) {
  .masthead__inner { padding-bottom: 0; }
  .masthead__end { flex: 1 0 100%; }
  .masthead__out { display: none; }
  .masthead__nav {
    flex: 1; justify-content: space-between; gap: .5rem;
    border-top: 1px solid var(--rule-soft);
    font-size: 11px; letter-spacing: .12em;
  }
  .masthead__nav a::after { bottom: 6px; }
  /* Five staff links share the row as the learner links do. */
}
/* Five learner links fit on one line from 360px; below that (down to 320px) they wrap. */
@media (max-width: 22.45rem) {
  .masthead__nav { flex-wrap: wrap; justify-content: flex-start; gap: 0 1.25rem; }
  .masthead__nav a { min-height: 36px; }
}

/* ---------- Bars above the page ---------- */
.banner { background: var(--ink-deep); color: var(--paper); }
.banner__inner {
  width: min(100% - 2 * var(--page), var(--w-wide)); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem 1.5rem;
  padding: .65rem 0;
}
.banner p { font-size: .95rem; line-height: 1.45; }
.banner .kicker { color: var(--ember-hot); margin-right: .9rem; }
.banner a {
  display: inline-flex; align-items: center; min-height: 36px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--paper-deep); text-decoration: underline; text-decoration-color: var(--ember-hot);
}
.banner a:hover { color: var(--paper); }
.clockbar { background: var(--paper-warm); border-bottom: 1px solid var(--rule-soft); }
.clockbar p {
  width: min(100% - 2 * var(--page), var(--w-wide)); margin: 0 auto; padding: .45rem 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted);
}

/* ---------- The columns ---------- */
.main { flex: 1 0 auto; padding: var(--s7) 0 calc(var(--s7) * 1.5); }
.col, .col--narrow, .col--wide { width: min(100% - 2 * var(--page), var(--w-read)); margin-inline: auto; }
.col--narrow { width: min(100% - 2 * var(--page), var(--w-narrow)); }
.col--wide { width: min(100% - 2 * var(--page), var(--w-wide)); }

/* ---------- Page head: kicker, title with the italic accent, standfirst ---------- */
.head {
  position: relative;
  padding-bottom: var(--s5);
  margin-bottom: var(--s7);
  border-bottom: 1px solid var(--rule);
}
.head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 60px; height: 2px; background: var(--ember); }
.head .kicker { margin-bottom: var(--s3); }
.head__title {
  font-feature-settings: "lnum", "liga", "calt";
  font-size: clamp(2.1rem, 1.55rem + 2vw, 3rem);
  line-height: 1.04; letter-spacing: -.024em;
}
.head__title em { font-style: italic; color: var(--ember); }
.head__standfirst {
  margin-top: var(--s4);
  font-style: italic; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.45;
  color: var(--text-muted);
}
.head__standfirst + .head__standfirst { margin-top: var(--s2); }
.head__body { margin-top: var(--s4); color: var(--text); }
.head__body + .head__body { margin-top: var(--s3); }

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 .65rem;
  margin-bottom: var(--s5);
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-muted);
}
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--ember-text); text-decoration: underline; }
.crumbs a::before { content: "\2190"; color: var(--ember); margin-right: .5rem; }
.crumbs .sep { padding: 0; }
@media (max-width: 34rem) { .crumbs .sep, .crumbs__day { display: none; } }

/* ---------- Sections ---------- */
.section { margin-top: var(--s7); }
.section__head {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem;
  padding-top: var(--s3);
  margin-bottom: var(--s4);
  border-top: 1px solid var(--rule);
}
.section__head::before { content: ""; position: absolute; top: -1px; left: 0; width: 50px; height: 2px; background: var(--ember); }
.section__title { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); }
.section__title em { font-style: italic; color: var(--ember); }
.section__aside { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.section__lede { color: var(--text-muted); margin-bottom: var(--s4); }
/* The first section after the page head hangs from the head's rule rather than drawing its own. */
.head + .section > .section__head:first-child { border-top: 0; padding-top: 0; }
.head + .section > .section__head:first-child::before { content: none; }

/* When there is nothing to show: a line of italic text under a hair rule. */
.empty { font-style: italic; color: var(--text-muted); }
/* The page head ends on a rule, so whatever follows it does not draw another. */
.head + :is(.thread, .ledger, .checklist, .register) { border-top: 0; }

/* ---------- Buttons: one family, square, mono caps ---------- */
.btn, .wbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 44px; padding: .7rem 1.25rem;
  border: 1px solid var(--rule); border-radius: 0;
  background: transparent; color: var(--text);
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; line-height: 1.25;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover, .wbtn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--primary, .wbtn--primary { background: var(--ember-text); border-color: var(--ember-text); color: var(--paper); }
.btn--primary:hover, .wbtn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--small { min-height: 36px; padding: .45rem .85rem; font-size: 11px; letter-spacing: .14em; }
.btn--quiet { border-color: transparent; color: var(--text-muted); padding-inline: 0; justify-content: flex-start; text-align: left; text-decoration: underline; text-underline-offset: .3em; }
.btn--quiet:hover { background: transparent; border-color: transparent; color: var(--ember-text); }
.btn[disabled], .wbtn[disabled], .btn[aria-disabled="true"] { background: transparent; border-color: var(--paper-edge); color: var(--text-muted); cursor: not-allowed; }
.btn:focus-visible, .wbtn:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.btn .arrow { color: inherit; }

/* A text action with an arrow: "Log today's hours ->" */
.go {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 36px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ember-text); text-decoration: none;
}
.go::after { content: "\2192"; transition: transform .2s ease; }
.go:hover { color: var(--text); }
.go:hover::after { transform: translateX(3px); }
.linklike {
  background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em; min-height: 24px;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s5); }

/* ---------- Forms ---------- */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); min-width: 0; }
.field > label, .label, legend {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted);
}
legend { margin-bottom: var(--s2); padding: 0; }
fieldset { border: 0; min-width: 0; }
.help, .helptext { font-size: .9rem; line-height: 1.45; color: var(--text-muted); }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="search"], input[type="tel"], textarea, select {
  width: 100%; min-height: 44px;
  padding: .65rem .8rem;
  font-family: var(--serif); font-size: 1rem; line-height: 1.4; color: var(--text);
  background: var(--paper-warm);
  border: 0; border-bottom: 1.5px solid var(--rule); border-radius: 0;
  transition: border-color .18s ease, background .18s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); font-style: italic; }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--ember); outline-offset: 2px;
  border-bottom-color: var(--ember); background: var(--paper-deep);
}
input[disabled], input[readonly], textarea[readonly] { color: var(--text-muted); }
textarea { min-height: 7.5rem; resize: vertical; line-height: 1.5; }
select {
  appearance: none; padding-right: 2.25rem; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%238C2E12' stroke-width='1.5' fill='none'/></svg>");
  background-repeat: no-repeat; background-position: right .8rem center;
}
input[type="date"], input[type="time"] { font-family: var(--mono); font-size: .95rem; }
input[type="file"] { font-family: var(--serif); font-size: .95rem; max-width: 100%; color: var(--text-muted); }
input[type="file"]::file-selector-button {
  margin-right: .9rem; min-height: 36px; padding: .45rem .85rem;
  border: 1px solid var(--rule); border-radius: 0; background: transparent; color: var(--text); cursor: pointer;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
input[type="file"]::file-selector-button:hover { background: var(--ink); color: var(--paper); }
input[type="checkbox"], input[type="radio"] {
  appearance: none; flex: none; width: 20px; height: 20px; margin: .1em 0 0;
  border: 1.5px solid var(--rule); background: var(--paper); cursor: pointer; display: inline-grid; place-content: center;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked {
  background: var(--ember-text) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M4.5 10.5l3.5 3.5 7.5-8' stroke='%23F0E7D2' stroke-width='2.2' fill='none'/></svg>") center / 16px no-repeat;
  border-color: var(--ember-text);
}
input[type="radio"]:checked { border-color: var(--ember-text); background: radial-gradient(var(--ember-text) 0 42%, var(--paper) 46%); }
.choice-list { display: grid; border-top: 1px solid var(--rule-soft); }
.choice {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .7rem 0; min-height: 44px;
  border-bottom: 1px solid var(--rule-soft); cursor: pointer;
}
.choice:hover span { color: var(--ember-text); }
.errorlist { list-style: none; font-family: var(--mono); font-size: 12px; letter-spacing: .02em; line-height: 1.5; color: var(--rust); }
.errorlist:empty { display: none; }
.errorlist.nonfield {
  padding: .8rem 1rem; border-left: 3px solid var(--rust); background: var(--paper-warm);
  font-family: var(--serif); font-size: 1rem; letter-spacing: 0; color: var(--text);
}
.field--error input, .field--error textarea, .field--error select { border-bottom-color: var(--rust); }
.counter { justify-self: end; font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding-top: var(--s5); border-top: 1px solid var(--rule-soft); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); }
.pair input { min-width: 0; }
details.more { border-bottom: 1px solid var(--rule-soft); }
details.more > summary {
  list-style: none; cursor: pointer; position: relative;
  display: flex; align-items: center; min-height: 44px; padding-left: 1.4rem;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; position: absolute; left: 0; color: var(--ember-text); font-size: 14px; }
details.more[open] > summary::before { content: "\2212"; }
details.more > summary:hover { color: var(--ember-text); }
details.more[open] > summary { margin-bottom: var(--s3); }
details.more > :last-child:not(summary) { margin-bottom: var(--s4); }

/* ---------- Messages from the portal (flash) and notices ---------- */
.flash { list-style: none; display: grid; gap: var(--s2); margin-bottom: var(--s6); }
.flash li { padding: .75rem 1rem; border-left: 3px solid var(--ash); background: var(--paper-warm); }
.flash .success { border-left-color: var(--moss); }
.flash .error { border-left-color: var(--rust); }
.notice {
  margin-bottom: var(--s6); padding: var(--s4) var(--s5);
  border-left: 3px solid var(--ember); background: var(--paper-warm);
}
.notice .kicker { margin-bottom: var(--s2); }
.notice__title { font-size: 1.25rem; margin-bottom: var(--s2); }
.notice p + p, .notice p + .prose, .notice .prose { margin-top: var(--s2); }

/* ---------- The day strip: one column per placement day ---------- */
.days { list-style: none; display: flex; margin-top: var(--s5); }
.days li { flex: 1 1 0; min-width: 0; }
.days li + li { border-left: 1px solid var(--rule-soft); }
.days li[data-gap="true"] { margin-left: clamp(.35rem, 2.5vw, 1.5rem); border-left: 1px solid var(--rule); }
.days a, .days .day {
  display: grid; gap: .15rem; padding: .35rem .2rem .5rem; text-align: center;
  text-decoration: none; color: var(--text);
}
.days a:hover .day__num { color: var(--ember-text); }
.day__num { font-size: 1.5rem; line-height: 1.1; font-feature-settings: "lnum"; }
.day__date { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.day__bar { position: relative; display: block; height: 3px; margin-top: .4rem; background: var(--rule-soft); }
.day__bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ember); }
.day__bar[data-fill="1"] i { width: 10%; } .day__bar[data-fill="2"] i { width: 20%; } .day__bar[data-fill="3"] i { width: 30%; }
.day__bar[data-fill="4"] i { width: 40%; } .day__bar[data-fill="5"] i { width: 50%; } .day__bar[data-fill="6"] i { width: 60%; }
.day__bar[data-fill="7"] i { width: 70%; } .day__bar[data-fill="8"] i { width: 80%; } .day__bar[data-fill="9"] i { width: 90%; }
.day__bar[data-fill="10"] i { width: 100%; }
.days .is-locked .day__num { color: var(--text-muted); }
.days .is-locked .day__bar { background: none; border-top: 1px dotted var(--paper-edge); height: 1px; margin-top: calc(.4rem + 1px); }
.days li[aria-current="date"] .day__num { color: var(--ember); }
.days li[aria-current="date"] .day__date { color: var(--ember-text); }
.days li[aria-current="date"] a, .days li[aria-current="date"] .day { box-shadow: inset 0 2px 0 var(--ember); }
@media (max-width: 34rem) {
  .day__num { font-size: 1.25rem; }
  .days .day__month { display: none; }
  .days li:first-child .day__month, .days li[data-gap] .day__month { display: inline; }
  .days li:first-child .day__date, .days li[data-gap] .day__date { overflow: visible; }
}

/* ---------- The next thing to do ---------- */
.next {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "verb arrow" "title arrow" "meta arrow";
  align-items: center; column-gap: var(--s4);
  padding: var(--s4) 0 var(--s4);
  border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule);
  text-decoration: none; color: var(--text);
}
.next__verb { grid-area: verb; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--ember-text); }
.next__title { grid-area: title; font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); line-height: 1.2; margin: .2rem 0 .3rem; }
.next__meta { grid-area: meta; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.next__arrow { grid-area: arrow; font-size: 2rem; line-height: 1; color: var(--ember); transition: transform .22s ease; }
.next:hover { color: var(--text); }
.next:hover .next__title { color: var(--ember-text); }
.next:hover .next__arrow { transform: translateX(4px); }
/* Straight after the page head, the head's own rule is the top of the block. */
.head + .next { margin-top: calc(-1 * var(--s7)); border-top: 0; padding-top: var(--s5); }

/* ---------- Work list: a ledger of items ---------- */
.ledger { list-style: none; border-top: 1px solid var(--rule); }
.ledger > li { border-bottom: 1px solid var(--rule-soft); }
.work {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  grid-template-areas: "n title title" "n meta status";
  column-gap: var(--s3); row-gap: .15rem; align-items: baseline;
  padding: .85rem 0;
  text-decoration: none; color: var(--text);
}
.work__n { grid-area: n; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; color: var(--ember-text); }
.work__title { grid-area: title; font-size: 1.12rem; line-height: 1.3; }
.work__meta { grid-area: meta; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.work__status { grid-area: status; justify-self: end; text-align: right; }
a.work:hover .work__title { color: var(--ember-text); text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: .2em; }
.work--locked .work__title { color: var(--text-muted); }
@media (min-width: 40rem) {
  .work { grid-template-areas: "n title status" "n meta status"; align-items: baseline; }
}

/* Status in words, mono small caps. No dots, no pills. */
.status { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.status--in_progress { color: var(--ember-text); }
.status--done, .status--approved { color: var(--moss); }
.status--submitted { color: var(--text); }
.status--returned { color: var(--rust); }
.status--returned::before { content: "\2192\00a0"; }

/* ---------- Hours tally ---------- */
.register dd, .entries, .table, .readout, .version__head, .msg__head { font-feature-settings: "lnum", "tnum"; }
.tally__figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
.tally__n { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem); line-height: 1; font-feature-settings: "lnum", "tnum"; }
.tally__of { font-style: italic; color: var(--text-muted); font-size: 1.1rem; }
progress.meter {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 3px; margin-top: var(--s3);
  border: 0; border-radius: 0; background: var(--rule-soft); color: var(--ember);
}
progress.meter::-webkit-progress-bar { background: var(--rule-soft); }
progress.meter::-webkit-progress-value { background: var(--ember); }
progress.meter::-moz-progress-bar { background: var(--ember); }
.tally__line { margin-top: var(--s4); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); }
.tally__line p { color: var(--text-muted); }

/* ---------- Tables: printed ledger; stacked rows on a phone ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.table th {
  padding: .6rem .75rem .6rem 0; text-align: left; vertical-align: bottom;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid var(--rule);
}
.table td { padding: .85rem .75rem .85rem 0; vertical-align: top; border-bottom: 1px solid var(--rule-soft); }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .num { text-align: right; font-feature-settings: "lnum", "tnum"; white-space: nowrap; }
.table .sub { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--text-muted); overflow-wrap: anywhere; margin-top: .15rem; }
.table__actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: var(--s2); }
.table__actions .btn { white-space: nowrap; }
.table th.num, .table td.num { padding-left: 1.25rem; }
@media (max-width: 59.99rem) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: var(--s3) 0; border-bottom: 1px solid var(--rule-soft); }
  .table--stack tbody tr:first-child { border-top: 1px solid var(--rule); }
  .table--stack td { display: flex; justify-content: space-between; gap: var(--s4); padding: .3rem 0; border: 0; text-align: right; }
  .table--stack td::before { content: attr(data-label); flex: none; text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); padding-top: .2em; }
  .table--stack td.table__lead { display: block; text-align: left; padding-bottom: .5rem; }
  .table--stack td.table__lead::before { content: none; }
  .table--stack td.table__end { display: block; padding-top: .6rem; }
  .table--stack td.table__end::before { content: none; }
  .table--stack .table__actions { justify-content: flex-start; flex-wrap: wrap; }
  .table--stack .num { text-align: right; }
  /* Stacked, every label starts at the same left edge, and long names wrap instead of pushing out. */
  .table--stack th.num, .table--stack td.num { padding-left: 0; }
  .table--stack td { overflow-wrap: anywhere; }
  /* Straight after the page head, its rule is the top of the list. */
  .head + .table--stack tbody tr:first-child { border-top: 0; padding-top: 0; }
}

/* ---------- Reading: the item body ---------- */
.prose { font-size: clamp(1.05rem, .98rem + .25vw, 1.15rem); line-height: 1.68; }
.prose > * + * { margin-top: 1.05em; }
/* Headings and lists are styled where the author wrote them, not inside widgets. */
.prose > h2 {
  position: relative; margin-top: 2.1em; padding-top: .55em;
  font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); border-top: 1px solid var(--rule-soft);
}
.prose > h2::before { content: ""; position: absolute; top: -1px; left: 0; width: 50px; height: 2px; background: var(--ember); }
.prose > h3 { margin-top: 1.8em; font-size: 1.25rem; font-style: italic; color: var(--text-muted); }
.prose > h4 { margin-top: 1.6em; font-size: 1.05rem; }
.prose > h2 + *, .prose > h3 + *, .prose > h4 + * { margin-top: .55em; }
.prose a { color: var(--text); text-decoration: none; border-bottom: 1.5px solid var(--ember); }
.prose a:hover { color: var(--ember-text); }
.prose li > * + * { margin-top: .6em; }
:is(.prose, .callout__body, .steps__body) > :is(ul, ol), .prose li > :is(ul, ol) { list-style: none; }
:is(.prose, .callout__body, .steps__body) > :is(ul, ol) > li + li, .prose li > :is(ul, ol) > li + li { margin-top: .4em; }
:is(.prose, .callout__body, .steps__body) > ul > li, .prose li > ul > li { position: relative; padding-left: 1.4em; }
:is(.prose, .callout__body, .steps__body) > ul > li::before, .prose li > ul > li::before { content: ""; position: absolute; left: .15em; top: .68em; width: 6px; height: 6px; background: var(--ember); }
:is(.prose, .callout__body, .steps__body) > ol > li, .prose li > ol > li { position: relative; padding-left: 2.6em; }
/* counter(list-item) honours <ol start="2">, which a code block between steps produces. */
:is(.prose, .callout__body, .steps__body) > ol > li::before, .prose li > ol > li::before {
  content: counter(list-item, decimal-leading-zero) " /"; position: absolute; left: 0; top: .3em;
  font-family: var(--mono); font-size: .72em; letter-spacing: .08em; font-weight: 500; color: var(--ember-text);
}
.prose .footnotes ol { padding-left: 1.4em; }
.prose blockquote { padding: .2em 0 .2em 1.25em; border-left: 3px solid var(--ember); font-style: italic; font-size: 1.1em; line-height: 1.5; }
.prose hr { border: 0; text-align: center; margin: 2.5em 0; }
.prose hr::before { content: "\00a7 \00a7 \00a7"; font-style: italic; letter-spacing: .5em; color: var(--ember); font-size: 1.15rem; }
.prose img { margin-inline: auto; border: 1px solid var(--rule-soft); }
.prose > figure { margin-block: 1.5em; }
.prose > figure > figcaption { margin-top: .5em; font-style: italic; font-size: .92rem; color: var(--text-muted); }
.prose code {
  font-family: var(--mono); font-size: .84em; padding: .08em .35em;
  background: var(--paper-deep); border: 1px solid var(--rule-soft); color: var(--ember-deep);
  overflow-wrap: anywhere;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose strong { font-weight: 700; }
.prose [data-narr] { transition: background-color .3s ease; }
.prose .is-narrating { background: var(--paper-warm); box-shadow: -.4rem 0 0 var(--paper-warm), .4rem 0 0 var(--paper-warm); }
.prose .footnotes { font-size: .92rem; color: var(--text-muted); }
.prose .footnotes-sep { border: 0; border-top: 1px solid var(--rule-soft); margin: 2.5em 0 1em; }
.prose .footnotes-sep::before { content: none; }
.prose a.download::after { content: " \2193"; color: var(--ember); }
.missing-asset { font-style: italic; color: var(--text-muted); }
.table-wrap { max-width: 100%; overflow-x: auto; }
.prose > .table-wrap > table, .prose > table { width: 100%; border-collapse: collapse; font-size: .95em; line-height: 1.5; }
:is(.prose > .table-wrap > table, .prose > table) :is(th, td) { padding: .55rem .75rem .55rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule-soft); }
:is(.prose > .table-wrap > table, .prose > table) th { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ember-text); border-bottom: 1.5px solid var(--ember); }
.prose audio, .inline-audio { width: 100%; }

/* Code: ink plate with an ember edge, as the Journal sets it. */
pre.code {
  position: relative; overflow-x: auto; tab-size: 2;
  font-family: var(--mono); font-size: .84rem; line-height: 1.6;
  background: var(--ink); color: var(--paper);
  padding: 1.1rem 1.25rem; border-left: 3px solid var(--ember);
}
pre.code[data-lang] { padding-top: 2rem; }
pre.code[data-lang]::before {
  content: attr(data-lang); position: absolute; top: .55rem; left: 1.25rem;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--paper-edge);
}
pre.code .copy-btn {
  position: absolute; top: .35rem; right: .35rem; min-height: 28px; padding: .25rem .6rem;
  border-color: rgba(240, 231, 210, .3); color: var(--paper-deep); font-size: 10px;
}
pre.code .copy-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
pre.code.has-copy { padding-top: 2.5rem; }
.tok-k, .tok-kd, .tok-kn, .tok-kr, .tok-kc, .tok-ow, .tok-gd { color: var(--ember-hot); }
.tok-s, .tok-s1, .tok-s2, .tok-sb, .tok-sd, .tok-se, .tok-si, .tok-sr, .tok-sx, .tok-gi { color: var(--copper); }
.tok-c, .tok-c1, .tok-cm, .tok-cs, .tok-ch, .tok-cp { color: var(--paper-edge); font-style: italic; }
.tok-nf, .tok-fm, .tok-nc, .tok-ne, .tok-nb, .tok-bp { color: var(--paper); text-decoration: underline; text-decoration-color: rgba(240, 231, 210, .25); text-underline-offset: .25em; }
.tok-m, .tok-mi, .tok-mf, .tok-mh, .tok-mo, .tok-il { color: var(--paper-deep); }

/* Callouts: a mono label and a rule down the left. */
.callout { padding: .1rem 0 .1rem 1.25rem; border-left: 2px solid var(--rule); }
.callout__label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .35rem; }
.callout__body > * + * { margin-top: .6em; }
.callout--warning { border-left-color: var(--ember); }
.callout--warning .callout__label { color: var(--ember-text); }
.callout--safety { border-left-color: var(--moss); }
.callout--safety .callout__label { color: var(--moss); }
.callout--business { border-left-color: var(--ink); }
.callout--business .callout__label { color: var(--text); }

/* ---------- Item page ---------- */
.head--item .head__title { font-size: clamp(1.9rem, 1.45rem + 1.8vw, 2.7rem); }
.item-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .2rem; margin-bottom: var(--s3); }
.item-meta .status { font-size: 11px; letter-spacing: .22em; }
.item-body { margin-top: 0; }

/* Definition lists set as a ruled register. */
.register { border-top: 1px solid var(--rule); }
.register > div { display: grid; gap: .2rem; padding: .8rem 0; border-bottom: 1px solid var(--rule-soft); }
.register dt { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ember-text); }
.register dd { margin: 0; }
@media (min-width: 40rem) { .register > div { grid-template-columns: 11rem minmax(0, 1fr); gap: var(--s4); } .register dt { padding-top: .3em; } }

.source { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); padding: var(--s4) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule-soft); }
.source__name { font-size: 1.3rem; line-height: 1.2; }
.source__copy { display: block; margin-top: .25rem; }

.checklist { list-style: none; border-top: 1px solid var(--rule); }
.checklist li { border-bottom: 1px solid var(--rule-soft); }
.checklist form { margin: 0; }
.check-line {
  display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: var(--s4); align-items: start;
  width: 100%; min-height: 48px; padding: .8rem 0;
  background: none; border: 0; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); line-height: 1.45;
}
.check-line:hover span:last-child { color: var(--ember-text); }
.check-box { width: 20px; height: 20px; margin-top: .15em; border: 1.5px solid var(--rule); display: grid; place-items: center; background: var(--paper); }
.check-box .icon { width: 14px; height: 14px; stroke-width: 3; opacity: 0; color: var(--paper); }
.check-line[aria-pressed="true"] .check-box { background: var(--ember-text); border-color: var(--ember-text); }
.check-line[aria-pressed="true"] .check-box .icon { opacity: 1; }
.check-line[aria-pressed="true"] span:last-child { color: var(--text-muted); }
.check-count { margin-top: var(--s3); }

.tags { list-style: none; display: grid; gap: 0 var(--s5); border-top: 1px solid var(--rule); }
.tags li { display: flex; justify-content: space-between; gap: var(--s4); align-items: baseline; padding: .55rem 0; border-bottom: 1px solid var(--rule-soft); }
.tags code { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--text-muted); white-space: nowrap; }
@media (min-width: 40rem) { .tags { grid-template-columns: 1fr 1fr; } }

.stuck { padding: var(--s4) var(--s5) var(--s5); background: var(--paper-warm); border-left: 3px solid var(--ember); }
.stuck h2 { font-size: 1.3rem; margin-bottom: var(--s3); }
.stuck ol { list-style: none; counter-reset: st; display: grid; gap: .5rem; }
.stuck ol li { position: relative; padding-left: 2.2em; counter-increment: st; }
.stuck ol li::before { content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: .3em; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ember-text); }
.stuck p { margin-top: var(--s4); }

.versions { list-style: none; margin-top: var(--s6); border-top: 1px solid var(--rule); }
.version { padding: var(--s4) 0 var(--s5); border-bottom: 1px solid var(--rule-soft); }
.version__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; }
.version__head strong { font-weight: 500; color: var(--text); }
.version .prose { margin-top: var(--s3); font-size: 1rem; }
.version__link { margin-top: var(--s3); overflow-wrap: anywhere; font-family: var(--mono); font-size: .85rem; }
.files { list-style: none; margin-top: var(--s3); display: grid; gap: .25rem; }
.files a { font-family: var(--mono); font-size: .85rem; overflow-wrap: anywhere; }
.files a::before { content: "\2193\00a0"; color: var(--ember); }
.review { margin-top: var(--s4); padding-left: var(--s4); border-left: 2px solid var(--moss); }
.review--return { border-left-color: var(--rust); }
.review__who { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); }
.review--return .review__who { color: var(--rust); }
.review .prose { margin-top: var(--s2); font-size: 1rem; }

.locked { }
.locked__when { font-size: 1.35rem; line-height: 1.3; margin-top: var(--s2); }
.locked p + p { margin-top: var(--s2); }

/* ---------- Messages ---------- */
.thread { list-style: none; border-top: 1px solid var(--rule); }
.msg { padding: var(--s4) 0 var(--s4) var(--s4); border-bottom: 1px solid var(--rule-soft); border-left: 2px solid var(--rule-soft); }
.msg--mentor { border-left-color: var(--ember); }
.msg__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .15rem 1rem; }
.msg__who { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.msg--mentor .msg__who { color: var(--ember-text); }
.msg .prose { margin-top: var(--s2); font-size: 1rem; line-height: 1.6; }
.msg__edit { margin-top: var(--s2); }
.compose { margin-top: var(--s6); }
.transparency { font-size: .92rem; line-height: 1.5; color: var(--text-muted); }

/* ---------- Hours ---------- */
.plate { padding: var(--s5); background: var(--paper-warm); border-left: 3px solid var(--ember); margin-bottom: var(--s7); }
.plate .kicker { margin-bottom: var(--s2); }
.plate__title { font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem); }
.plate__title em { font-style: italic; color: var(--ember); }
.plate > p { margin-top: var(--s2); }
.plate .register { margin-top: var(--s4); }
.plate .register > div { padding: .45rem 0; }
@media (min-width: 40rem) { .plate .register > div { grid-template-columns: 7rem 1fr; } }
.plate textarea { margin-top: var(--s4); font-family: var(--mono); font-size: .82rem; min-height: 9rem; background: var(--paper); }
.copied { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--moss); }
.stepper { display: grid; grid-template-columns: 44px minmax(0, 7rem) 44px; gap: var(--s2); align-items: center; }
.stepper button {
  min-height: 44px; border: 1px solid var(--rule); background: transparent; color: var(--text); cursor: pointer;
  font-family: var(--mono); font-size: 1.1rem; line-height: 1;
}
.stepper button:hover { background: var(--ink); color: var(--paper); }
.stepper input { text-align: center; font-family: var(--mono); }
.readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem; padding: var(--s3) 0; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.readout output { font-size: 1.5rem; line-height: 1.2; font-feature-settings: "lnum", "tnum"; }
.readout .errorlist { flex-basis: 100%; }
.weeks { display: grid; gap: var(--s6); }
.week__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--rule); }
.week__head h3 { font-size: 1.15rem; }
.entries { list-style: none; }
.entries li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem 1rem; padding: .7rem 0; border-bottom: 1px solid var(--rule-soft); }
.entries .when { font-size: 1.05rem; }
.entries .span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--text-muted); }
.entries .hrs { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 1.15rem; font-feature-settings: "lnum", "tnum"; }
.entries .note { grid-column: 1 / -1; color: var(--text-muted); font-size: .95rem; margin-top: .2rem; }

/* ---------- Progress ---------- */
.day-block .ledger { margin-top: 0; }

/* ---------- Sign in, two-factor ---------- */
.auth-form { margin-top: 0; }
.code-input { font-family: var(--mono) !important; font-size: 1.5rem !important; letter-spacing: .3em; text-transform: uppercase; }
.auth-alt { margin-top: var(--s6); border-top: 1px solid var(--rule-soft); }
.auth-alt form { margin-top: var(--s2); }
.auth-alt .form { gap: var(--s4); }
.panel { padding-top: var(--s4); margin-top: var(--s6); border-top: 1px solid var(--rule); }
.head + .panel { margin-top: 0; padding-top: 0; border-top: 0; }
.panel__title { font-size: 1.3rem; margin-bottom: var(--s2); }
.panel > p + p { margin-top: var(--s2); }
.panel .actions { margin-top: var(--s4); }
.auth-p { margin-top: var(--s3); color: var(--text); }
.auth-subtitle { font-size: 1.3rem; margin-top: var(--s2); }
.auth-rule { border: 0; border-top: 1px solid var(--rule-soft); margin: var(--s6) 0 var(--s4); }
.qr { background: #fff; padding: .75rem; width: 13rem; max-width: 100%; border: 1px solid var(--rule-soft); }
.recovery-codes { font-family: var(--mono); columns: 2; padding: var(--s4) var(--s5); background: var(--paper-warm); }
.auth-wrap table { width: 100%; border-collapse: collapse; }
.auth-wrap th, .auth-wrap td { text-align: left; padding: .5rem .5rem .5rem 0; border-bottom: 1px solid var(--rule-soft); }
.auth-wrap th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }

/* ---------- Error pages ---------- */
.head--error { padding-right: 0; }
.head__folio {
  position: absolute; right: 0; top: -.15em; pointer-events: none; user-select: none;
  font-style: italic; font-size: clamp(3.5rem, 2.5rem + 4vw, 6rem); line-height: 1; color: var(--ember); opacity: .85;
}
@media (max-width: 34rem) { .head__folio { position: static; display: block; margin-bottom: var(--s3); } }

/* ---------- Widgets (enhanced by portal.js; readable without it) ---------- */
.widget { display: block; margin-block: 2.25em; padding-top: var(--s4); border-top: 1px solid var(--rule); font-size: 1rem; line-height: 1.55; }
.prose > :is(h2, h3, h4) + .widget { border-top: 0; padding-top: var(--s2); }
.widget::before { display: block; margin-bottom: var(--s2); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ember-text); }
.widget--sorter::before { content: "Try it \00b7  Sort the cards"; }
.widget--quickcheck::before { content: "Try it \00b7  Quick check"; }
.widget--steps::before { content: "Step by step"; }
.widget--risk::before { content: "Risk matrix"; }
.widget--compare::before { content: "Side by side"; }
.widget--terminal::before, .widget--soundbite::before { content: none; }
.widget__title { font-size: 1.25rem; line-height: 1.3; }
.widget__hint { margin-top: .3rem; color: var(--text-muted); font-size: .95rem; }
.widget__answers { margin-top: var(--s4); }
.widget__answers > summary { cursor: pointer; min-height: 32px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ember-text); }
.widget__answers ul { margin-top: var(--s2); padding-left: 1.2rem; display: grid; gap: .4rem; }
.widget-error { font-family: var(--mono); font-size: 12px; color: var(--rust); }
.widget .wrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); }
.widget .wstatus { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }

/* sorter */
.sorter__cards { list-style: none; margin-top: var(--s4); display: grid; gap: var(--s2); }
.sorter__card { padding: .65rem .85rem; border-left: 2px solid var(--rule); background: var(--paper-warm); }
.sorter__text { font-family: var(--mono); font-size: .85rem; overflow-wrap: anywhere; }
.sorter__answer { margin-left: .35rem; }
.sorter__why { display: block; color: var(--text-muted); font-size: .92rem; }
forge-sorter[data-ready] .sorter__cards, forge-sorter[data-ready] > .widget__hint, forge-sorter[data-ready] > .widget__answers { display: none; }
.sort-board { display: grid; gap: var(--s4); margin-top: var(--s4); }
.sort-tray { display: grid; gap: var(--s2); }
.sort-card { padding: .75rem .85rem; border-left: 2px solid var(--rule); background: var(--paper-warm); }
.sort-card .sorter__text { display: block; }
.sort-card__choices { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.sort-card__choices button {
  min-height: 36px; padding: .4rem .75rem; border: 1px solid var(--rule); background: var(--paper); color: var(--text); cursor: pointer;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
}
.sort-card__choices button:hover { background: var(--ink); color: var(--paper); }
.sort-buckets { display: grid; gap: var(--s3); }
@media (min-width: 36rem) { .sort-buckets { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); } }
.sort-bucket { min-height: 6rem; padding: var(--s3); border-top: 2px solid var(--rule); background: var(--paper-warm); }
.sort-bucket h3 { display: flex; justify-content: space-between; margin-bottom: var(--s2); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.sort-bucket ul { list-style: none; display: grid; gap: var(--s2); }
.sort-bucket li { display: grid; gap: .3rem; padding: .5rem .65rem; background: var(--paper); border-left: 3px solid var(--rule-soft); }
.sort-bucket li .undo { justify-self: start; background: none; border: 0; padding: 0; min-height: 24px; cursor: pointer; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); text-decoration: underline; }
.sort-bucket li[data-result="right"] { border-left-color: var(--moss); }
.sort-bucket li[data-result="wrong"] { border-left-color: var(--rust); }
.sort-bucket .why { font-size: .92rem; color: var(--text-muted); }
.sort-bucket .verdict { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.sort-bucket li[data-result="right"] .verdict { color: var(--moss); }
.sort-bucket li[data-result="wrong"] .verdict { color: var(--rust); }

/* quickcheck */
.quickcheck__options { margin-top: var(--s3); padding-left: 1.3rem; display: grid; gap: .4rem; }
forge-quickcheck[data-ready] .quickcheck__options, forge-quickcheck[data-ready] .widget__answers { display: none; }
.qc-options { display: grid; margin-top: var(--s4); border-top: 1px solid var(--rule-soft); }
.qc-option { display: flex; gap: .85rem; align-items: flex-start; padding: .7rem .5rem .7rem 0; min-height: 48px; border-bottom: 1px solid var(--rule-soft); cursor: pointer; }
.qc-option[data-correct="true"]:has(input:checked) { box-shadow: inset 3px 0 0 var(--moss); padding-left: .75rem; background: var(--moss-soft); }
.qc-option[data-correct="false"]:has(input:checked) { box-shadow: inset 3px 0 0 var(--rust); padding-left: .75rem; background: var(--paper-warm); }
.qc-feedback { margin-top: var(--s3); min-height: 1.5em; }
.qc-feedback[data-kind="right"] { color: var(--moss); }
.qc-feedback[data-kind="wrong"] { color: var(--rust); }

/* steps */
.steps__list { margin-top: var(--s3); padding-left: 1.3rem; display: grid; gap: var(--s5); }
.steps__title { font-size: 1.1rem; }
.steps__body { margin-top: .25rem; }
.steps__body > * + * { margin-top: .6em; }
.steps__file { margin-top: .4rem; font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.steps__step pre.code { margin-top: .6rem; }
forge-steps[data-ready] .steps__list { list-style: none; padding: 0; display: block; }
forge-steps[data-ready] .steps__step:not(.is-current) { display: none; }
.steps-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--rule-soft); }
.steps-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; list-style: none; }
.prose .steps-dots li + li { margin-top: 0; }
.steps-dots button {
  width: 30px; height: 30px; padding: 0; border: 1px solid var(--rule-soft); background: transparent; cursor: pointer;
  font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--text-muted);
}
.steps-dots button.is-seen { border-color: var(--rule); color: var(--text); }
.steps-dots button[aria-current="step"] { background: var(--ember-text); border-color: var(--ember-text); color: var(--paper); }
.steps-count { margin-top: var(--s2); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }

/* terminal */
.widget--terminal { border: 0; padding: 0; }
.widget--terminal .widget__title { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ember-text); margin-bottom: var(--s2); }
.terminal__screen {
  font-family: var(--mono); font-size: .84rem; line-height: 1.65; white-space: pre; overflow-x: auto;
  background: var(--ink); color: var(--paper-deep); padding: 1rem 1.25rem; min-height: 6rem; border-left: 3px solid var(--ember);
}
.terminal__cmd { color: var(--paper); }
.terminal__prompt { color: var(--ember-hot); }
.terminal__out { color: var(--paper-edge); }
.widget--terminal code { background: none; border: 0; color: inherit; padding: 0; font-size: inherit; }
.widget--terminal .wrow { margin-top: var(--s3); }
.term-copy {
  margin-left: 1rem; min-height: 24px; min-width: 3.25rem; padding: .05rem .5rem; vertical-align: .1em;
  border: 1px solid rgba(240, 231, 210, .3); background: transparent; color: var(--paper-deep); cursor: pointer;
  font: 500 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.term-copy:hover { background: var(--paper); color: var(--ink); }
.term-cursor { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.2em; background: var(--ember-hot); }
@media (prefers-reduced-motion: no-preference) { .term-cursor { animation: blink 1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }

/* risk matrix */
.risk__items { margin-top: var(--s3); padding-left: 1.4rem; display: grid; gap: .3rem; }
.risk__placed, .risk__note { color: var(--text-muted); font-size: .92rem; }
.risk__wrap { margin-top: var(--s4); }
.risk__grid { border-collapse: separate; border-spacing: 2px; width: 100%; table-layout: fixed; font-size: .8rem; }
.risk__grid caption { caption-side: bottom; text-align: left; padding-top: .5rem; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.risk__grid th { padding: .25rem; text-align: center; vertical-align: middle; line-height: 1.2; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--text); }
.risk__grid tbody th { text-align: right; width: 6.5rem; }
.risk__corner { width: 6.5rem; }
.risk__axis-name { display: block; font-family: var(--serif); font-size: .78rem; font-weight: 400; color: var(--text-muted); }
@media (max-width: 30rem) { .risk__axis-name { display: none; } .risk__grid tbody th, .risk__corner { width: 1.6rem; } }
.risk__cell { height: 2.75rem; text-align: center; vertical-align: middle; padding: 2px; }
.risk__cell--low { background: var(--moss-soft); }
.risk__cell--medium { background: rgba(184, 115, 51, .22); }
.risk__cell--high { background: rgba(232, 93, 43, .32); }
.risk__cell--critical { background: rgba(200, 68, 28, .55); }
.risk__mark { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin: 1px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: .75rem; font-weight: 500; }
.risk-controls { display: grid; margin-top: var(--s4); border-top: 1px solid var(--rule-soft); }
.risk-control { display: grid; gap: var(--s2); padding: var(--s3) 0; border-bottom: 1px solid var(--rule-soft); }
.risk-control__label { display: flex; gap: .6rem; align-items: center; }
.risk-control__selects { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.risk-control__selects label { display: grid; gap: .25rem; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.risk-control__selects select { min-height: 44px; padding-block: .4rem; font-size: .95rem; }
forge-risk-matrix[data-ready][data-interactive="true"] .risk__items { display: none; }

/* soundbite */
.widget--soundbite { padding: var(--s4) 0; border-bottom: 1px solid var(--rule-soft); }
.soundbite { margin: 0; display: grid; gap: var(--s2); }
.soundbite__text { font-style: italic; font-size: 1.25rem; line-height: 1.4; }
.soundbite audio { width: 100%; }
.sb { grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: center; }
.sb .soundbite__text { margin: 0; }
.sb-play { position: relative; width: 48px; height: 48px; border: 0; display: grid; place-items: center; background: var(--ink); color: var(--paper); cursor: pointer; }
.sb-play:hover { background: var(--ember-text); }
.sb-play .icon { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.sb-play svg.ring { display: none; }

/* compare */
.compare__panes { display: grid; gap: var(--s3); margin-top: var(--s4); }
@media (min-width: 44rem) { .compare__panes { grid-template-columns: 1fr 1fr; } }
.compare__pane { margin: 0; min-width: 0; display: grid; gap: .4rem; align-content: start; }
.compare__title { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.compare__pane--right .compare__title { color: var(--ember-text); }
.compare__pane pre.code { margin: 0; height: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.compare__pane--left pre.code { border-left-color: var(--paper-edge); }

/* ---------- The narration player ---------- */
forge-listen { display: block; margin: 0 0 var(--s6); }
forge-listen > audio { width: 100%; }
.listen {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s4);
  padding: var(--s3) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule-soft);
}
.listen.is-stuck { position: sticky; top: 0; z-index: 70; }
@media (min-width: 60rem) { .listen.is-stuck { top: 4.6rem; } }
.listen__play { width: 44px; height: 44px; border: 0; display: grid; place-items: center; background: var(--ink); color: var(--paper); cursor: pointer; }
.listen__play:hover { background: var(--ember-text); }
.listen__play .icon { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.listen__mid { display: grid; gap: .1rem; min-width: 0; }
.listen__label { display: flex; justify-content: space-between; gap: .5rem; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.listen__label strong { font-weight: 500; color: var(--ember-text); }
.listen__time { font-feature-settings: "tnum"; letter-spacing: .04em; }
.listen__scrub { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer; margin: 0; }
.listen__scrub::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--ember) var(--p, 0%), var(--rule-soft) var(--p, 0%)); }
.listen__scrub::-moz-range-track { height: 3px; background: var(--rule-soft); }
.listen__scrub::-moz-range-progress { height: 3px; background: var(--ember); }
.listen__scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 18px; margin-top: -7.5px; background: var(--ink); border: 0; border-radius: 0; }
.listen__scrub::-moz-range-thumb { width: 12px; height: 18px; background: var(--ink); border: 0; border-radius: 0; }
.listen__speed {
  min-width: 3.25rem; min-height: 36px; padding: 0 .5rem; border: 1px solid var(--rule); background: transparent; color: var(--text); cursor: pointer;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; font-feature-settings: "tnum";
}
.listen__speed:hover { background: var(--ink); color: var(--paper); }

/* ---------- Footer (letterpress-shell.css) ---------- */
.colofoot {
  background: var(--ink-deep); color: var(--paper-deep);
  padding: 2.5rem 0 2rem;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
}
.colofoot__inner {
  width: min(100% - 2 * var(--page), var(--w-wide)); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem;
}
.colofoot__mark { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; letter-spacing: -.025em; line-height: .9; text-transform: none; color: var(--paper); }
.colofoot__mark em { font-style: italic; color: var(--ember-hot); margin-left: .05em; }
.colofoot__mark span { margin-left: .6em; font-family: var(--mono); font-weight: 500; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--paper-deep); vertical-align: .3em; }
.colofoot__legal { color: var(--paper-deep); opacity: .75; }
.colofoot__links { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.5rem; }
.colofoot__links form { margin: 0; }
.colofoot__links a, .colofoot__links button {
  display: inline-flex; align-items: center; min-height: 32px;
  color: var(--paper-deep); text-decoration: none; background: none; border: 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
}
.colofoot__links a:hover, .colofoot__links button:hover { color: var(--ember-hot); }
.colofoot :focus-visible { outline-color: var(--ember-hot); }

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .masthead, .colofoot, .listen, .compose, .banner, .clockbar { display: none !important; }
  body { background: #fff; }
}

/* ---------- Additions ---------- */
.form--spaced { margin-top: var(--s5); }
.next--quiet { border-top-width: 1px; }
.next--quiet .next__title { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); }
.head forge-listen { margin: var(--s5) 0 0; }
.head .listen { border-top: 1px solid var(--rule-soft); border-bottom: 0; padding-bottom: 0; }

/* ---------- R2: status words for the queue, flags and check-ins ---------- */
.status--review { color: var(--text); }
.status--flag { color: var(--rust); }
.status--message { color: var(--ember-text); }
.status--checkin-proposed { color: var(--ember-text); }
.status--checkin-accepted, .status--checkin-held { color: var(--moss); }
a.status { text-decoration: underline; text-underline-offset: .25em; }

/* ---------- R2: the queue ---------- */
.queue__counts { margin-top: var(--s4); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.queue .status { display: block; margin-bottom: .2rem; }
.queue__title { display: block; font-size: 1.12rem; line-height: 1.3; }
.table td.empty { padding-top: var(--s4); }

/* ---------- R2: two tracks, the reading column and the narrow column ---------- */
.split { display: grid; gap: var(--s6); }
.split__main, .split__aside { min-width: 0; }
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 1fr) var(--w-narrow); grid-template-areas: "main aside"; column-gap: var(--s7); align-items: start; }
  .split__main { grid-area: main; }
  .split__aside { grid-area: aside; position: sticky; top: 5.5rem; }
}
.split .section__head { margin-top: 0; }
/* As with a single column, the first section in each track hangs from the page head's rule. */
:is(.head + .split > .split__aside, .head + .split > .split__main > section:first-child) > .section__head:first-child { border-top: 0; padding-top: 0; }
:is(.head + .split > .split__aside, .head + .split > .split__main > section:first-child) > .section__head:first-child::before { content: none; }
.register--stacked > div { grid-template-columns: none !important; gap: .2rem !important; }
.register--stacked dt { padding-top: 0 !important; }
.versions--flush { margin-top: 0; }

/* ---------- R2: progress per learner, one box per item ---------- */
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s5); }
.legend > div { display: flex; align-items: center; gap: var(--s2); }
.legend dt { display: flex; }
.legend dd { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.cells { display: flex; flex-wrap: wrap; gap: 3px; }
.cell {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: none;
  border: 1px solid var(--rule); background: var(--paper);
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1; color: var(--text);
}
.cell--locked { border: 1px dotted var(--paper-edge); background: transparent; }
.cell--available { border-color: var(--rule-soft); }
.cell--in_progress { color: var(--ember-text); border-color: var(--ember-text); }
.cell--done, .cell--approved { background: var(--moss); border-color: var(--moss); color: var(--paper); }
.cell--submitted { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cell--returned { color: var(--rust); border: 1.5px solid var(--rust); }
.grid td { vertical-align: middle; }
@media (max-width: 59.99rem) {
  .grid td { align-items: center; }
  .grid .cells { justify-content: flex-end; }
}

/* ---------- R2: flags and check-ins on a record ---------- */
.flags { list-style: none; border-top: 1px solid var(--rule); }
.flag { padding: var(--s4) 0 var(--s4) var(--s4); border-bottom: 1px solid var(--rule-soft); border-left: 2px solid var(--rust); }
.flag--resolved { border-left-color: var(--rule-soft); }
.checkins .flag, #check-ins .flag { border-left-color: var(--ember); }
.flag__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .15rem 1rem; }
.flag__detail, .checkin__when { margin-top: var(--s2); }
.checkin__when { font-size: 1.25rem; line-height: 1.3; }
.flag__detail a, .flag p a { overflow-wrap: anywhere; }
.flag > p + p { margin-top: var(--s2); }
.flag__resolve { display: grid; gap: var(--s3); margin-top: var(--s3); }
.flag__resolve textarea { min-height: 4.5rem; }
.flag__note { display: grid; gap: .2rem; margin-top: var(--s2); }
.flag__said { color: var(--text); }
.flag form:not(.flag__resolve) { margin-top: var(--s3); }
.checkin__answer { display: grid; gap: var(--s3); margin-top: var(--s4); }
.checkin__answer form { margin: 0; }
.checkin__answer details.more { border-bottom: 0; }
.checkin__answer .form { gap: var(--s3); }
.checkins + .thread { margin-top: var(--s7); }
.form__title { font-size: 1.25rem; }
.pair--three { grid-template-columns: 1fr; }
@media (min-width: 40rem) { .pair--three { grid-template-columns: 1.4fr 1fr 1fr; } }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s4); }
.inline-form .field { flex: 1 1 18rem; }
.early { list-style: none; margin-top: var(--s4); border-top: 1px solid var(--rule); }
.early li { display: grid; gap: .15rem; padding: .7rem 0; border-bottom: 1px solid var(--rule-soft); }

/* ---------- R2: the weekly check ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); margin-top: var(--s4); }
.go--back::after { content: none; }
.go--back::before { content: "\2190"; transition: transform .2s ease; }
.go--back:hover::before { transform: translateX(-3px); }
.week-table__note span { display: block; }
@media (min-width: 60rem) { .week-table td.week-table__note, .week-table th:last-child { padding-left: 1.25rem; } }
.steps-done .choice { border-bottom: 0; align-self: end; }
.week-table__note .sub + .sub { margin-top: .1rem; }
@media (max-width: 59.99rem) {
  .week-table td.week-table__note { display: block; text-align: left; }
  .week-table td.week-table__note::before { display: block; margin-bottom: .2rem; }
}
.steps-done > p + p, .steps-done > p + form { margin-top: var(--s3); }
.grofar-text { margin-top: var(--s3); font-family: var(--mono) !important; font-size: .82rem !important; min-height: 9rem; background: var(--paper) !important; }
.plate .grofar-text { margin-top: var(--s4); }
.week details.more { margin-top: var(--s2); }

/* ---------- R2: handouts ---------- */
.sheets { list-style: none; border-top: 1px solid var(--rule); }
.head + .sheets { border-top: 0; }
.sheet {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem;
  padding: var(--s4) 0 var(--s5); border-bottom: 1px solid var(--rule-soft);
}
.head + .sheets > .sheet:first-child { padding-top: 0; }
.sheet__title { font-size: clamp(1.3rem, 1.15rem + .5vw, 1.55rem); line-height: 1.2; }
.sheet__title em { font-style: italic; color: var(--ember-text); }
.sheet__summary { color: var(--text); }
.sheet__meta { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.sheet__get, .sheet__opens { justify-self: start; margin-top: var(--s2); }
.sheet--locked .sheet__title, .sheet--locked .sheet__summary { color: var(--text-muted); }
.sheet--locked .sheet__title em { color: var(--text-muted); }
@media (min-width: 40rem) {
  .sheet { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s5); }
  .sheet > :not(.sheet__get, .sheet__opens) { grid-column: 1; }
  .sheet__get, .sheet__opens { grid-column: 2; grid-row: 1 / span 3; align-self: start; justify-self: end; margin-top: .3rem; }
}
.sheet-links { list-style: none; border-top: 1px solid var(--rule); }
.sheet-links li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem var(--s4); padding: .7rem 0; border-bottom: 1px solid var(--rule-soft); }
.sheet-links a { font-size: 1.1rem; }
.sheet-links a::before { content: "\2193\00a0"; color: var(--ember); }
.sheet-links em { font-style: italic; }
.sheet-links__locked { font-size: 1.1rem; color: var(--text-muted); }

/* ---------- The course as staff see it ---------- */
.course-day + .course-day { margin-top: var(--s6); }
.course-day__title { font-size: 1.25rem; }
.course-day__meta { margin: .2rem 0 var(--s3); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.open-days { list-style: none; border-top: 1px solid var(--rule); }
.open-days li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); padding: .6rem 0; border-bottom: 1px solid var(--rule-soft); }
.open-days__day { flex: 1 1 14rem; }
.open-days form { margin: 0; }
.actions form { margin: 0; }
.choice-list--row { display: flex; flex-wrap: wrap; gap: 0 var(--s6); border-top: 0; }
.choice-list--row .choice { border-bottom: 0; }

/* ---------- R3: the automatic reply during an absence ---------- */
.msg__auto { color: var(--text-muted); font-weight: 400; }
.msg__auto::before { content: "\00b7"; content: "\00b7" / ""; color: var(--paper-edge); margin: 0 .5em; }
.msg--auto { border-left-style: dotted; }

/* ---------- R3: video (a native player; captions on; the transcript from the captions) ---------- */
figure.widget--video { margin-inline: 0; }
.widget--video::before { content: "Video"; }
.widget--video > .video__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem var(--s4);
  margin: 0 0 var(--s3); font-style: normal; font-size: 1rem; color: var(--text);
}
.video__title { font-size: 1.25rem; line-height: 1.3; }
.video__duration { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--text-muted); font-feature-settings: "tnum"; }
.video__player {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  background: var(--ink); border: 0; border-left: 3px solid var(--ember); border-radius: 0;
}
.video__player::cue { font-family: var(--serif); background: rgba(10, 8, 5, .82); color: var(--paper); }
.video__transcript { margin-top: var(--s3); border-bottom: 1px solid var(--rule-soft); }
.video__transcript > summary {
  list-style: none; cursor: pointer; position: relative;
  display: flex; align-items: center; min-height: 44px; padding-left: 1.4rem;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ember-text);
}
.video__transcript > summary::-webkit-details-marker { display: none; }
.video__transcript > summary::before { content: "+"; position: absolute; left: 0; font-size: 14px; }
.video__transcript[open] > summary::before { content: "\2212"; }
.video__transcript > summary:hover { color: var(--text); }
.video__text { padding: var(--s2) 0 var(--s4) 1.4rem; border-left: 1px solid var(--rule-soft); margin-left: .3rem; }
.video__text p + p { margin-top: .8em; }
.video__voice { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ember-text); }
@media print { .video__player { display: none; } .video__transcript > .video__text { display: block; } }

/* ---------- R4: the final report and certificate (the sheet itself is in document.css) ---------- */
.head--document { margin-bottom: 0; }
.head--document .head__body { max-width: var(--w-read); }
@media print {
  .has-document .masthead, .has-document .colofoot, .has-document .skip-link, .has-document .notice,
  .has-document .flash, .has-document .head--document, .has-document .banner, .has-document .clockbar { display: none !important; }
  .has-document, .has-document .main { background: #fff; padding: 0; }
  .has-document .col, .has-document .col--wide { width: auto; margin: 0; }
}

/* Your path ----------------------------------------------------------------------------------- */
.path-summary:focus { outline: none; }
.path-summary:focus-visible { outline: 2px solid var(--ember); outline-offset: 6px; }
.path-message { padding: .75rem 1rem; border-left: 3px solid var(--ash); background: var(--paper-warm); margin-bottom: var(--s4); }
.path-message--ok { border-left-color: var(--moss); }
.path-message--no { border-left-color: var(--rust); }
.path-empty { margin-top: var(--s4); color: var(--text-muted); }
.picks { list-style: none; border-top: 1px solid var(--rule); margin-top: var(--s5); }
.pick { border-bottom: 1px solid var(--rule-soft); padding: var(--s4) 0; }
.pick__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); }
.pick__title { font-size: 1.2rem; line-height: 1.3; }
.pick__depth { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ember-text); margin-left: .35rem; }
.pick__state { font-style: italic; color: var(--text-muted); }
.pick--locked .pick__state { font-style: normal; }
.pick__units { list-style: none; margin-top: var(--s2); display: grid; gap: .2rem; }
.pick__day { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-right: .35rem; }
.pick__controls { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s3); align-items: center; }
.pick__controls form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.pick__controls select, .pick__form select { width: auto; max-width: 14rem; min-height: 36px; font: inherit; font-size: .95rem; padding: .3rem .5rem; border: 1px solid var(--rule); background: var(--paper); color: var(--text); }
.pick__controls form { flex-wrap: nowrap; }
@media (max-width: 30rem) { .pick__controls form { flex-wrap: wrap; } .pick__controls select, .pick__form select { max-width: 100%; } }
.ideas .idea { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); padding: var(--s3) 0; }
.idea__reason { flex: 1 1 18rem; }
.courses { list-style: none; border-top: 1px solid var(--rule); }
.course { border-bottom: 1px solid var(--rule-soft); padding: var(--s5) 0 var(--s3); }
.course__title { font-size: 1.35rem; line-height: 1.25; }
.course__flag { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ember-text); margin-left: .4rem; vertical-align: middle; }
.course__trailer { margin-top: var(--s2); max-width: 62ch; }
.course__chosen { margin-top: var(--s2); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); }
.depths { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0; }
.depths--text span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.depths--text span + span::before { content: "\00b7"; margin-right: var(--s2); }
.units { list-style: none; display: grid; gap: var(--s4); }
.unit__title { font-size: 1.05rem; }
.unit__n { font-family: var(--mono); font-size: 11px; color: var(--ember-text); margin-right: .3rem; }
.unit__trailer, .unit__portfolio { color: var(--text-muted); margin-top: .2rem; max-width: 62ch; }
.unit__state { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); margin-top: .3rem; }
.unit form { margin-top: var(--s2); }
.coverage { list-style: none; border-top: 1px solid var(--rule); }
.coverage > li { border-bottom: 1px solid var(--rule-soft); padding: var(--s3) 0; }
.coverage__line { display: flex; justify-content: space-between; gap: var(--s4); }
.coverage__n { font-family: var(--mono); font-feature-settings: "tnum"; }
.coverage__codes { list-style: none; display: grid; gap: .25rem; }
.coverage__codes .is-missing { color: var(--text-muted); }
.coverage__codes .is-covered::before { content: "\2713"; color: var(--moss); margin-right: .4rem; }
.coverage__codes .is-missing::before { content: "\2013"; margin-right: .4rem; }
.likes { border: 0; padding: 0; margin: 0 0 var(--s5); }
.likes__q { font-size: 1.15rem; margin-bottom: var(--s2); }
.course-subject { margin-top: var(--s7, 3rem); padding-top: var(--s4); border-top: 1px solid var(--rule); }
.course-subject__title { font-size: 1.45rem; }
.staff-unit { padding: .6rem 0; }
.quiz-answers { display: grid; gap: var(--s4); margin-top: var(--s4); padding-left: 1.2rem; }
.quiz-answers__q { font-size: 1.05rem; }
.quiz-answers__right { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--moss); margin-top: .2rem; }
.quiz-answers__why { color: var(--text-muted); margin-top: .2rem; }
