@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-weight:200 800;font-display:swap;src:url(/assets/font-bricolage-grotesque.a97804dc9fbe5fc9.woff2) format("woff2")}
@font-face{font-family:"Schibsted Grotesk";font-style:normal;font-weight:400 900;font-display:swap;src:url(/assets/font-schibsted-grotesk.4c8b93f431d462c6.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:500;font-display:swap;src:url(/assets/font-ibm-plex-mono-500.01d285447409c8a5.woff2) format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:600;font-display:swap;src:url(/assets/font-ibm-plex-mono-600.0d1f0b8d0722224e.woff2) format("woff2")}

/*
  Palette lives in gen/themes.js — three token blocks keyed off data-theme on
  <html>. Every rule below reads its colour from a token, which is what makes
  switching palettes a swap of that block and nothing else.

  Two rules survive in all three palettes because they are the guide's argument
  rather than its decoration: HUE says what kind of work is graded, TEXTURE says
  where the number came from. They never collapse into one channel and stay
  legible in grayscale.
*/
:root {
  color-scheme: light;
  --ground: #EEF0EB;
  --surface: #FFFCF7;
  --surface-2: #F4EEE7;
  --surface-3: #EBE4DC;
  --wash: none;
  --ink: #2A1832;
  --ink-dim: #5E4C66;
  --ink-faint: #716178;
  --ink-on-fill: #FFFCF7;
  --candy: #2A1832;
  --candy-hover: #3D2647;
  --candy-press: #1C0F22;
  --candy-dim: #CDBFD0;
  --candy-sunk: #F1EAF0;
  --sherbet: #BF3447;
  --sherbet-text: #B3293B;
  --sherbet-dim: #EBC2C8;
  --sherbet-sunk: #FBEDEE;
  --ok: #0F7A55;
  --ok-sunk: #E6F2EC;
  --ok-dim: #B7DCCB;
  --warn: #8A6200;
  --warn-sunk: #F8F1E1;
  --warn-dim: #E4D3A6;
  --stop: #B3293B;
  --stop-sunk: #FBEDEE;
  --stop-dim: #EBC2C8;
  --rule: #DCCFD8;
  --rule-strong: #B9AAB6;
  --focus: #2E58B0;
  --k-1: #2E58B0;
  --k-2: #BF3447;
  --k-3: #B08000;
  --k-4: #1B7F5E;
  --k-5: #6F4FA6;
  --k-0: #B9AAB6;
  --rail: rgba(238, 240, 235, 0.92);
  --scrim: rgba(42, 24, 50, 0.38);
  --selection: #E2D6E6;
  --road: #DFE5DC;
  --raise: #FFFCF7;
  --edge: transparent;
  --lift: 0 1px 0 rgba(42, 24, 50, 0.06), 0 10px 30px -14px rgba(42, 24, 50, 0.28);
  --seg-ink: #FFFFFF;
  --seg-ink-p: #2A1832;
  --tile-ink: #2A1832;
  --paper: #FFFFFF;
  --paper-ink: #2A1832;
  --b-intro: #E7A6B6;
  --b-methods: #E3C872;
  --b-thought: #BCAAE0;
  --b-elect: #98CDB6;
  --b-cap: #E6B084;
  --b-core: #A2B9E4;
  --fog: rgba(255, 252, 247, 0.62);
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #EEF0EB;
  --surface: #FFFCF7;
  --surface-2: #F4EEE7;
  --surface-3: #EBE4DC;
  --wash: none;
  --ink: #2A1832;
  --ink-dim: #5E4C66;
  --ink-faint: #716178;
  --ink-on-fill: #FFFCF7;
  --candy: #2A1832;
  --candy-hover: #3D2647;
  --candy-press: #1C0F22;
  --candy-dim: #CDBFD0;
  --candy-sunk: #F1EAF0;
  --sherbet: #BF3447;
  --sherbet-text: #B3293B;
  --sherbet-dim: #EBC2C8;
  --sherbet-sunk: #FBEDEE;
  --ok: #0F7A55;
  --ok-sunk: #E6F2EC;
  --ok-dim: #B7DCCB;
  --warn: #8A6200;
  --warn-sunk: #F8F1E1;
  --warn-dim: #E4D3A6;
  --stop: #B3293B;
  --stop-sunk: #FBEDEE;
  --stop-dim: #EBC2C8;
  --rule: #DCCFD8;
  --rule-strong: #B9AAB6;
  --focus: #2E58B0;
  --k-1: #2E58B0;
  --k-2: #BF3447;
  --k-3: #B08000;
  --k-4: #1B7F5E;
  --k-5: #6F4FA6;
  --k-0: #B9AAB6;
  --rail: rgba(238, 240, 235, 0.92);
  --scrim: rgba(42, 24, 50, 0.38);
  --selection: #E2D6E6;
  --road: #DFE5DC;
  --raise: #FFFCF7;
  --edge: transparent;
  --lift: 0 1px 0 rgba(42, 24, 50, 0.06), 0 10px 30px -14px rgba(42, 24, 50, 0.28);
  --seg-ink: #FFFFFF;
  --seg-ink-p: #2A1832;
  --tile-ink: #2A1832;
  --paper: #FFFFFF;
  --paper-ink: #2A1832;
  --b-intro: #E7A6B6;
  --b-methods: #E3C872;
  --b-thought: #BCAAE0;
  --b-elect: #98CDB6;
  --b-cap: #E6B084;
  --b-core: #A2B9E4;
  --fog: rgba(255, 252, 247, 0.62);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #15101B;
  --surface: #1E1726;
  --surface-2: #2A2133;
  --surface-3: #342A3F;
  --wash: none;
  --ink: #F5EEF7;
  --ink-dim: #C4B6CA;
  --ink-faint: #9A8BA2;
  --ink-on-fill: #15101B;
  --candy: #F5EEF7;
  --candy-hover: #FFFFFF;
  --candy-press: #DCD0E0;
  --candy-dim: #4A3D57;
  --candy-sunk: #251C2E;
  --sherbet: #F2687B;
  --sherbet-text: #F2687B;
  --sherbet-dim: #5A2A33;
  --sherbet-sunk: #2A1820;
  --ok: #3CC592;
  --ok-sunk: #13241D;
  --ok-dim: #245A45;
  --warn: #F2C23C;
  --warn-sunk: #2A2312;
  --warn-dim: #5E4D1C;
  --stop: #F2687B;
  --stop-sunk: #2A1820;
  --stop-dim: #5A2A33;
  --rule: #3B2F46;
  --rule-strong: #5A4B66;
  --focus: #7199F3;
  --k-1: #7199F3;
  --k-2: #F2687B;
  --k-3: #F2C23C;
  --k-4: #3CC592;
  --k-5: #B79BEA;
  --k-0: #5A4B66;
  --rail: rgba(21, 16, 27, 0.92);
  --scrim: rgba(5, 2, 8, 0.6);
  --selection: #4A3D57;
  --road: #261D30;
  --raise: #2A2133;
  --edge: rgba(255, 255, 255, 0.07);
  --lift: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 34px -14px rgba(0, 0, 0, 0.7);
  --seg-ink: #15101B;
  --seg-ink-p: #15101B;
  --tile-ink: #2A1832;
  --paper: #E6E0EA;
  --paper-ink: #2A1832;
  --b-intro: #D493A5;
  --b-methods: #CDB45F;
  --b-thought: #A895CF;
  --b-elect: #85BBA3;
  --b-cap: #D19C72;
  --b-core: #8FA6D3;
  --fog: rgba(30, 23, 38, 0.66);
}


/*
 * Aliases that the stylesheet used from the start and nothing ever
 * defined. (Three of them were later rewritten into self-references,
 * "--ink: var(--ink)", which is a cycle: both tokens computed to nothing
 * whenever no data-theme attribute was set, so body text fell back to black
 * and surfaces to transparent. Removed in v4; guide:check now refuses a
 * self-referencing token.) A var() with no fallback is invalid at computed-value time, so
 * every rule below that reached for one silently lost the declaration —
 * measured, not guessed: --surface, --surface, --ink and --measure all resolved
 * to the empty string in a real browser, in all four palettes.
 *
 * Two of them were doing visible damage. The max-width on .prose was the whole
 * reason a lede is readable, and without it the workspace preamble ran 100
 * characters to the line — roughly double a comfortable measure, on the one
 * screen a first-time reader meets. And the name field painted transparent
 * while the textarea beside it did not, so two inputs a centimetre apart were
 * different surfaces.
 *
 * They are aliases rather than per-palette entries on purpose: a var() inside
 * them resolves against whatever theme block is live, so defining them once
 * here gives all four palettes the right value and keeps one place to change.
 */
:root {
  /* 68ch is already this codebase's answer: app-css.js caps the
     footnote prose at exactly that. */
  --measure: 68ch;

  /*
   * The spacing scale.
   *
   * Measured before it existed: 59 distinct rem values across four
   * stylesheets, landing as 31 distinct computed paddings and 17 gaps on a
   * single page — .82rem here, .8438rem there, 1.65rem somewhere else. None of
   * it was decided; each number was tuned against whatever was next to it that
   * afternoon, which is the difference between a layout that looks designed
   * and one that looks approximately right in a hundred separate places.
   *
   * Ten steps on a 4px grid, with half-steps kept at the dense end because
   * this is data UI — a chip and a table cell genuinely need 6px and 8px to be
   * different numbers, while nothing above 32px needs finer resolution than
   * doubling. Every padding, margin and gap in the product resolves to one of
   * these.
   */
  --s-hair: 2px;   /* optical nudges, chip insets */
  --s-1: 4px;
  --s-2: 6px;
  --s-3: 8px;
  --s-4: 12px;
  --s-5: 16px;     /* the default gutter */
  --s-6: 24px;     /* card padding */
  --s-7: 32px;
  --s-8: 48px;     /* above a section heading */
  --s-9: 72px;     /* between major sections */
  --s-10: 96px;

  /*
   * The faces (DESIGN-PACK.md v4 §3). Three families, four roles: Bricolage
   * Grotesque is the display voice (titles, big figures); Schibsted Grotesk
   * carries prose, labels and interface; IBM Plex Mono is the data voice for
   * codes, n= and file names. All vendored as woff2 in standalone/fonts and
   * inlined at build time — 118KB, no network.
   */
  --f-display: "Bricolage Grotesque", "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-prose: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-label: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-ui: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /*
   * The type scale (§3.2). --t-micro is the floor: nothing smaller ships,
   * which retired a 10px step this product had been using for keycaps.
   */
  --t-hero: clamp(2.75rem, 7vw, 5.5rem);
  --t-h1: clamp(2rem, 4.4vw, 3.25rem);
  --t-h2: clamp(1.5rem, 2.6vw, 2.125rem);
  --t-h3: 1.375rem;
  --t-lead: 1.125rem;
  --t-prose: 1.0625rem;
  --t-body: 0.9375rem;
  --t-ui: 0.875rem;
  --t-meta: 0.8125rem;
  --t-label: 0.75rem;
  --t-micro: 0.6875rem;

  /* Prose measure (§3.3). 60ch, not the 68ch this carried before. */
  --measure: 60ch;

  /* Motion tokens are declared in gen/app-css.js (its motion section), which owns every
     duration and easing curve in the product. Declaring a second --ease here
     silently overrode that file's curve with a different one. */
}

* { box-sizing: border-box; }

/*
 * §3.3 / §15. Two lines the foundation asks for and this stylesheet never
 * had. The pretty value is the one that shows: without it a paragraph ends
 * regularly on a single orphaned word, which on a page this dense reads as
 * the data rather than in the line-breaking. Balance keeps a two-line
 * heading from breaking with one word on the second line.
 */
p, li, dd, figcaption { text-wrap: pretty; }
h1, h2, h3, h4, .display { text-wrap: balance; }

/*
 * §3.3: every figure, rating, percentage, count and table number is tabular,
 * so a column of them aligns and a changing value does not reflow its
 * neighbours. Stated once here rather than remembered at each call site.
 */
.figure, .code, .dtile-value, .scorenum, td, th,
[class*="fig"], [class*="count"] { font-variant-numeric: tabular-nums; }

body {
  margin:0;
  background-color: var(--ground);
    /* A glow, not a gradient — seven RGB points, per palette. Measured off the
     framebuffer rather than judged by eye, and capped by contrast rather than
     taste: the dimmest text token has to clear AA against the brightest part of
     it. scripts/audit-themes.mjs checks that for all three. */
  background-image: var(--wash);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--f-ui);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* --- Type roles ----------------------------------------------------------- */

.display {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
  margin:0;
}
.d-lg { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.d-md { font-size: clamp(1.5rem, 2.6vw, 2.125rem); }
.d-sm { font-size: 1.375rem; }

.figure {
  font-family: var(--f-display);
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.code {
  font-family: var(--f-label);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.prose {
  font-family: var(--f-prose);
  font-size: var(--t-prose);
  line-height: 1.6;
  color: var(--ink);
  max-width: var(--measure);
}
.prose.dim { color: var(--ink-dim); }

.eyebrow {
  font-family: var(--f-label);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--ink-dim);
  margin:0;
}

.verbatim {
  font-family: var(--f-prose);
  font-style: italic;
  line-height: 1.6;
  border-left: 2px solid var(--candy);
  padding-left:var(--s-5);
  color: var(--ink);
  margin:0;
  max-width: var(--measure);
}

/* --- Shell ---------------------------------------------------------------- */

.wrap { max-width: 78rem; margin:0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--candy); color: var(--ink-on-fill);
  padding:var(--s-4) var(--s-5); z-index: 100; font-weight: 700;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  /* Radius zero (§1.7). This ring carried 1px, which is a radius the pack's
     pre-ship checklist explicitly forbids anywhere but chips and avatars. */
  border-radius: 0;
  transition-duration: 0s;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
html { scroll-behavior: smooth; }
::selection { background: var(--selection); color: var(--ink); }

/*
 * §15 utilities — the only classes the pack considers worth abstracting.
 * .eyebrow, .figure, .prose and .code already exist above as type roles.
 */

/* The signature layout: 1px dividers with no border math (§4). */

/* An estimated or partial segment of a composition bar (§6.11). The color
   property is set to the category token by the segment itself, so the hatch
   is the category's own hue rather than a second encoding. */
.hatched {
  background-image: repeating-linear-gradient(-45deg, currentColor 0 2px, transparent 2px 5px);
  background-color: transparent;
}

/* Visually hidden, still announced — table captions, skip targets (§12). */
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/*
 * Native chrome, brought into the palette.
 *
 * Two things the browser paints for you, and both of them arrive in the
 * platform's colours rather than this one's. On a page that is otherwise
 * black and brass they are the only elements that look borrowed.
 *
 * accent-color is the one the product actually leans on: the acknowledgement
 * checkbox that releases a held download rendered as system blue, which is
 * not a colour this page uses anywhere else — and it sits inside the ember
 * "your file is held" box, where a blue tick is the single most important
 * control on the screen wearing the wrong uniform.
 *
 * The scrollbar is the other. A dense reference view is mostly scrollable
 * region, and a light scrollbar track against a near-black page is a bright
 * seam down the side of every long view. Firefox takes the standard
 * properties; WebKit needs its own pseudo-elements, so both are stated.
 */
:root { accent-color: var(--candy); scrollbar-color: var(--rule-strong) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--rule-strong); border: 2px solid var(--ground); background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }


/* --- Nav rail ------------------------------------------------------------- */

.rail {
  position: sticky; top: 0; z-index: 50;
  background: var(--rail);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.rail ul { display: flex; gap:0; margin:0; padding:0; list-style: none; overflow-x: auto; }
.rail a {
  display: block; padding:var(--s-4) var(--s-5); white-space: nowrap;
  font-family: var(--f-label); font-size: var(--t-label);
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
  color: var(--ink-dim); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.rail a:hover { color: var(--ink); background: var(--surface); }
.rail a.on { color: var(--candy); border-bottom-color: var(--candy); }

/* --- Sections ------------------------------------------------------------- */

section.band { padding: clamp(3rem, 6vw, 5rem) 0; border-top: 1px solid var(--rule); }
/*
 * Folio section headers — the Editorial Chrome handoff, direction 1d.
 *
 * The identity here is print, so the sections are numbered like a printed
 * one: an oversized Bodoni folio in the accent, the eyebrow and title set
 * behind a hairline. The numerals are injected in gen/build.js as real
 * elements rather than ::before content, so they are findable in the page and
 * theme with everything else.
 *
 * The header is the flex row and the lede wraps to a row of its own, which is
 * what keeps the lede below the rule rather than inside the text column.
 *
 * The two 18px values are the handoff's, stated to the pixel, and are the
 * only spacing in the product that is deliberately off the 4px scale: the
 * folio's optical relationship to the rule beside it is the thing being
 * specified, and 16px reads tight against a 5.5rem numeral while 24px reads
 * loose.
 */
.band > .wrap > header {
  /*
   * Grid rather than the flex row the handoff describes, because flex cannot
   * hold this arrangement: the lede carries max-width: var(--measure) to keep
   * its line length readable, and a capped item has a hypothetical main size
   * small enough to fit beside the title, so flex-basis: 100% never forced the
   * wrap and the lede sat in a third column. Two named columns put it under
   * the text column deterministically and keep the measure intact.
   */
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: start; gap: 18px;
  margin-bottom:var(--s-8);
}
/*
 * Placement is stated for every child, not left to auto-flow. The workspace
 * header carries a third element after the lede — the three-step strip — and
 * with only the folio and the text column placed, that strip auto-flowed into
 * column one, sized the auto track to its full width and collapsed the text
 * column to 0px. The title vanished and the page ran 121px past a phone
 * screen. Anything that is not the numeral, the text column or the lede spans
 * the whole header.
 */
.band > .wrap > header > * { grid-column: 1 / -1; }
.band > .wrap > header > .foliotext { grid-column: 2; grid-row: 1; }
.band > .wrap > header > .prose { grid-column: 2; }
.band > .wrap > header .folio { grid-column: 1; grid-row: 1;
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(4rem, 6vw, 5.5rem); line-height: 0.8;
  letter-spacing: -0.03em; color: var(--candy); flex-shrink: 0;
  font-variant-numeric: lining-nums tabular-nums;
}
.band > .wrap > header .foliotext { border-left: 1px solid var(--rule); padding-left: 18px; }
.band > .wrap > header .eyebrow { margin-bottom:var(--s-2); }
.band > .wrap > header .foliotext .display { margin-top:var(--s-2); line-height: 1.1; }
/* Its own row, aligned under the text column rather than under the numeral. */
.band > .wrap > header .prose { margin-top:var(--s-3); }

/* --- Provenance ----------------------------------------------------------- */

.tier {
  display: inline-flex; align-items: center; gap:var(--s-2);
  font-family: var(--f-label); font-size: var(--t-micro);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
  padding:var(--s-hair) var(--s-3); white-space: nowrap;
}
.tier-1 { background: var(--candy); color: var(--ink-on-fill); }
.tier-2 { border: 1px dashed var(--rule-strong); color: var(--ink-dim); }
.tier-3 { border: 1px dotted var(--ink-faint); color: var(--ink-faint); }

.caveat {
  border-left: 2px solid var(--rule);
  background: var(--surface);
  padding:var(--s-4) var(--s-5);
  font-family: var(--f-prose); font-size: var(--t-body); line-height: 1.55;
  color: var(--ink-dim);
  margin:var(--s-3) 0 0;
}
.notdoc { color: var(--ink-faint); font-style: italic; }

/* --- Cards / panels ------------------------------------------------------- */

.panel { border: 1px solid var(--rule); background: var(--surface); }
.panel > header { border-bottom: 1px solid var(--rule); padding:var(--s-5) var(--s-6); }
.panel > .body { padding:var(--s-6); }

.grid2 { display: grid; gap:var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.grid3 { display: grid; gap:var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }

/* --- Program cards -------------------------------------------------------- */

.prog { border: 1px solid var(--rule); background: var(--surface); padding:var(--s-7); display: flex; flex-direction: column; gap:var(--s-5); }
.prog .top { display: flex; justify-content: space-between; align-items: flex-start; gap:var(--s-5); flex-wrap: wrap; }
.prog ul { margin:0; padding-left:var(--s-6); display: flex; flex-direction: column; gap:var(--s-4); }
.prog li { font-family: var(--f-prose); font-size: var(--t-body); line-height: 1.6; color: var(--ink); }
.prog li::marker { color: var(--candy); }
.gate { display: inline-block; padding:var(--s-1) var(--s-4); font-family: var(--f-label); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.gate.open { background: var(--candy-sunk); color: var(--candy); border: 1px solid var(--candy-dim); }
.gate.selective { background: var(--sherbet-sunk); color: var(--sherbet); border: 1px solid var(--sherbet); }

/* --- Requirements --------------------------------------------------------- */

.bucket { border: 1px solid var(--rule); background: var(--surface); margin-bottom:var(--s-4); }
.bucket > h3 { margin:0; }
.bucket button.head {
  display: flex; width: 100%; gap:var(--s-5); align-items: flex-start; justify-content: space-between;
  background: none; border: 0; color: inherit; text-align: left; cursor: pointer;
  padding:var(--s-5) var(--s-6); font: inherit;
}
.bucket button.head:hover { background: var(--surface-2); }
.bucket .credits { font-size: 1.5rem; color: var(--candy); white-space: nowrap; }
.bucket .credits .u { font-family: var(--f-label); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-left:var(--s-1); }
.bucket .sign { font-family: var(--f-label); font-size: 1.25rem; color: var(--ink-dim); width: 1rem; text-align: center; }
.bucket .drawer { border-top: 1px solid var(--rule); padding:var(--s-6); display: none; }
.bucket[data-open="1"] .drawer { display: block; }
.codelist { display: grid; gap:var(--s-1) var(--s-6); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); margin:0; padding:0; list-style: none; }
.codelist li { font-size: var(--t-ui); }
.codelist .c { font-family: var(--f-label); font-weight: 700; }
.codelist .t { color: var(--ink-dim); }
.wid { font-family: var(--f-label); font-size: var(--t-micro); font-weight: 700; color: var(--candy); border: 1px solid var(--candy-dim); padding:0 var(--s-1); margin-left:var(--s-1); }

/* --- Tables --------------------------------------------------------------- */

.scroller { overflow-x: auto; border: 1px solid var(--rule); }
table { border-collapse: collapse; width: 100%; min-width: 44rem; }
thead th {
  position: sticky; top: 0; background: var(--surface); z-index: 2;
  font-family: var(--f-label); font-size: var(--t-micro);
  text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--ink-dim);
  text-align: left; padding:var(--s-4) var(--s-5); border-bottom: 1px solid var(--rule-strong);
}
tbody td { padding:var(--s-4) var(--s-5); border-bottom: 1px solid var(--rule); font-size: var(--t-ui); vertical-align: top; }
/* No zebra striping. In a design with no panel fills a banded table is the one
   surface still shouting, and at five columns the row rules already carry the
   eye. The 15-column faculty matrix is the exception and keeps its banding
   below — tracking one professor across fifteen columns genuinely needs it. */
tbody tr:hover { background: var(--surface-2); }
td.c { font-family: var(--f-label); font-weight: 700; white-space: nowrap; }
td.num { font-family: var(--f-label); text-align: right; font-variant-numeric: tabular-nums; }

/* --- Controls ------------------------------------------------------------- */

.controls { display: flex; flex-wrap: wrap; gap:var(--s-4); align-items: flex-end; margin-bottom:var(--s-6); }
/*
  A <select> sizes itself to its longest option, and the course picker's longest
  option is a full course title. Without min-width:0 the flex item refuses to
  shrink below that, and the whole page scrolls sideways on a phone.
*/
label.field { display: flex; flex-direction: column; gap:var(--s-2); min-width: 0; max-width: 100%; }
label.field > span { font-family: var(--f-label); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-dim); font-weight: 600; }
input[type="search"], select {
  background: var(--ground); color: var(--ink);
  border: 1px solid var(--rule-strong); padding:var(--s-3) var(--s-4);
  font-family: var(--f-ui); font-size: var(--t-ui);
  min-width: min(11rem, 100%); max-width: 100%;
}
input[type="search"] { min-width: min(15rem, 100%); }
#x-course { width: min(28rem, 100%); }
.count { font-family: var(--f-label); font-size: var(--t-meta); color: var(--ink-dim); margin-left:auto; }

/* --- Grading bars (the signature) ----------------------------------------- */

.bar { display: flex; height: 1.15rem; width: 100%; overflow: hidden; border: 1px solid var(--rule); }
.bar > div { border-right: 1px solid var(--ground); }
.bar > div:last-child { border-right: 0; }
.bar.undoc { border-style: dashed; border-color: var(--rule-strong); background: var(--surface); }
.k-writing { background: var(--ink); color: var(--ink); }
.k-exam { background: var(--sherbet); color: var(--sherbet); }
.k-participation { background: var(--candy); color: var(--candy); }
.k-applied { background: var(--ink-dim); color: var(--ink-dim); }
.hatched {
  background-image: repeating-linear-gradient(-45deg, currentColor 0 2px, transparent 2px 5px);
  background-color: transparent;
}
.legend { display: flex; flex-wrap: wrap; gap:var(--s-2) var(--s-6); margin:0; padding:0; list-style: none; }
.legend li { display: flex; align-items: center; gap:var(--s-3); font-family: var(--f-label); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); }
.legend .sw { width: 0.6rem; height: 0.6rem; display: inline-block; }
.weights { margin:var(--s-4) 0 0; display: flex; flex-direction: column; gap:var(--s-2); }
.weights .row { display: flex; gap:var(--s-4); align-items: baseline; justify-content: space-between; }
.weights dt { font-size: var(--t-ui); }
.weights dd { margin:0; font-size: var(--t-body); color: var(--ink); }
.weights .detail { font-family: var(--f-prose); font-size: var(--t-ui); color: var(--ink-dim); line-height: 1.5; }

.bd { border: 1px solid var(--rule); background: var(--surface); padding:var(--s-6); display: flex; flex-direction: column; gap:var(--s-2); }
.bd .who { display: flex; justify-content: space-between; align-items: baseline; gap:var(--s-4); flex-wrap: wrap; }
.hard { margin:var(--s-4) 0 0; padding:0; list-style: none; display: flex; flex-direction: column; gap:var(--s-1); }
.hard li { border-left: 2px solid var(--sherbet); padding-left:var(--s-4); font-family: var(--f-label); font-size: var(--t-meta); color: var(--ink); }

/* --- Faculty -------------------------------------------------------------- */
.rating { display: inline-flex; align-items: baseline; gap:var(--s-2); white-space: nowrap; }
.rating .v { font-size: 1.375rem; color: var(--candy); }
.rating .of { font-family: var(--f-label); font-size: var(--t-label); color: var(--ink-dim); }
.rating .n { font-family: var(--f-label); font-size: var(--t-label); color: var(--ink-faint); }
.rel { font-family: var(--f-label); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.1em; padding:var(--s-hair) var(--s-2); border: 1px dotted var(--ink-faint); color: var(--ink-faint); }
.chips { display: flex; flex-wrap: wrap; gap:var(--s-1); margin:0; padding:0; list-style: none; }
.chips li { font-family: var(--f-label); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--rule-strong); padding:var(--s-hair) var(--s-2); color: var(--ink-dim); }
.teaches { display: flex; flex-wrap: wrap; gap:var(--s-1); margin:0; padding:0; list-style: none; }
.teaches li { font-family: var(--f-label); font-size: var(--t-label); font-weight: 700; border: 1px solid var(--rule); padding:var(--s-hair) var(--s-2); color: var(--ink); }

/* --- Faculty matrix ------------------------------------------------------- */

.mtools { display: flex; flex-wrap: wrap; gap:var(--s-5); align-items: flex-end; margin-bottom:var(--s-5); }
.numfilters { display: flex; gap:var(--s-4); flex-wrap: wrap; }
.numrange { display: flex; flex-direction: column; gap:var(--s-1); }
.numrange input { width: 6.5rem; }
.mbuttons { display: flex; gap:var(--s-3); margin-left:auto; flex-wrap: wrap; }

.btn {
  background: var(--ground); color: var(--ink); border: 1px solid var(--rule-strong);
  font-family: var(--f-label); font-size: var(--t-label); font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; padding:var(--s-3) var(--s-4); cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn[aria-pressed="true"] { background: var(--candy); color: var(--ink-on-fill); border-color: var(--candy); }

.mpanel { border: 1px solid var(--rule); background: var(--surface); margin-bottom:var(--s-5); }
.mpanel > summary { cursor: pointer; padding:var(--s-4) var(--s-5); }
.mpanelbody { padding:0 var(--s-5) var(--s-5); display: flex; flex-direction: column; gap:var(--s-5); }
.catfilters { display: grid; gap:var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.chipset { display: flex; flex-wrap: wrap; gap:var(--s-1); margin-top:var(--s-2); }

.chip {
  display: inline-block; font-family: var(--f-label); font-size: var(--t-micro);
  letter-spacing: 0.08em; border: 1px solid var(--rule-strong); color: var(--ink-dim);
  padding:var(--s-hair) var(--s-2); margin:0 var(--s-1) var(--s-1) 0; white-space: nowrap;
}
.chip.code { color: var(--ink); font-weight: 700; }
.chip.cat { color: var(--ink); border-color: var(--rule-strong); background: var(--surface); }
.chip.warn { color: var(--sherbet-text); border-color: var(--sherbet-text); margin-left:var(--s-2); }
button.chip.toggle { cursor: pointer; background: none; }
button.chip.toggle[aria-pressed="true"] { background: var(--candy); color: var(--ink-on-fill); border-color: var(--candy); }

.mstatus { display: flex; gap:var(--s-5); align-items: baseline; flex-wrap: wrap; margin:0 0 var(--s-4); }
#m-count { font-family: var(--f-label); font-size: var(--t-meta); color: var(--ink-dim); }
.sortnote { font-family: var(--f-label); font-size: var(--t-label); color: var(--ink-faint); }

.matrixwrap { max-height: 40rem; overflow: auto; position: relative; }
table.matrix { min-width: 74rem; border-collapse: separate; border-spacing: 0; }
table.matrix th, table.matrix td {
  padding:var(--s-3) var(--s-4); border-bottom: 1px solid var(--rule); font-size: var(--t-meta);
  vertical-align: top; text-align: left; background: var(--ground);
}
table.matrix thead th {
  position: sticky; top: 0; z-index: 3; background: var(--surface);
  border-bottom: 1px solid var(--rule-strong); padding:0; white-space: nowrap;
}
/* The first column stays put while the rest scrolls; the corner needs to sit
   above both sticky axes or the header slides under the names. */
table.matrix .stick { position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--rule-strong); }
table.matrix thead .stick { z-index: 4; }
table.matrix tbody tr.frow:nth-child(4n+1) th,
/* Every fourth row, at --surface: seven RGB points, the same magnitude as the
   background wash. Enough to track a name across fifteen columns, not enough to
   read as a filled row. */
table.matrix tbody tr.frow:nth-child(4n+1) td { background: var(--surface); }
table.matrix tbody tr.frow:hover th,
table.matrix tbody tr.frow:hover td { background: var(--surface-2); cursor: pointer; }
/* Was an inset box-shadow drawing a 2px top rule. The pack allows no
   box-shadow at all (§16), and a border-top is the same 2px of candy. */
table.matrix tbody tr.frow.open th,
table.matrix tbody tr.frow.open td { background: var(--surface-2); border-top: 2px solid var(--candy); }

.sortbtn {
  background: none; border: 0; color: var(--ink-dim); font: inherit; cursor: pointer;
  font-family: var(--f-label); font-size: var(--t-micro); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; padding:var(--s-4); width: 100%;
  text-align: left; display: flex; gap:var(--s-2); align-items: center;
}
.sortbtn:hover { color: var(--ink); }
th[aria-sort="ascending"] .sortbtn, th[aria-sort="descending"] .sortbtn { color: var(--candy); }
th[aria-sort="ascending"] .arrow::after { content: "\2191"; }
th[aria-sort="descending"] .arrow::after { content: "\2193"; }
.arrow { font-size: .8em; }

.who { font-family: var(--f-display); font-weight: 700; font-size: var(--t-body); letter-spacing: -.01em; }
td .num, .num { font-family: var(--f-label); font-variant-numeric: tabular-nums; color: var(--ink); }
.range { font-family: var(--f-label); font-size: var(--t-micro); color: var(--ink-faint); margin-left:var(--s-2); }

/* Crowd numbers must not read like published ones, so a Tier 3 rating is
   bracketed rather than merely a different colour. */
.rating.crowd .v { color: var(--ink-dim); }
.rating.crowd::before { content: "~"; color: var(--ink-faint); margin-right:var(--s-hair); }
.rating .n { font-family: var(--f-label); font-size: var(--t-label); color: var(--ink-faint); margin-left:var(--s-1); }
.rating.conf-low .v { color: var(--ink-faint); }
.flag { color: var(--sherbet-text); font-weight: 700; margin-left:var(--s-1); }

.tierdot { display: inline-block; width: .4rem; height: .4rem; margin-left:var(--s-2); vertical-align: middle; }
.tierdot.t1 { background: var(--candy); }
.tierdot.t2 { border: 1px dashed var(--rule-strong); }
.tierdot.t3 { border: 1px dotted var(--ink-faint); border-radius: 50%; }

.covset { display: inline-flex; gap:var(--s-1); }
.cov {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.1rem; height: 1.1rem; font-family: var(--f-label);
  font-size: var(--t-micro); font-weight: 700;
}
.cov-found { background: var(--candy); color: var(--ink-on-fill); }
.cov-searched-none { border: 1px solid var(--rule-strong); color: var(--ink-dim); }
/* Visibly unfinished rather than merely empty. */
.cov-not-researched {
  border: 1px dashed var(--sherbet-text); color: var(--sherbet-text);
  background-image: repeating-linear-gradient(-45deg, var(--sherbet-sunk) 0 2px, transparent 2px 4px);
}

.fdrawer td { background: var(--surface) !important; padding:0; }
/*
  The detail panel is pinned to the left edge of the scroll container and sized
  to it in JS. Without this it scrolls sideways with the grid while the sticky
  name column stays put, and the first inch of every line disappears under it.
*/
.drawerbody {
  position: sticky; left: 0;
  padding:var(--s-6); display: grid; gap:var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.drawerbody h4 { margin:0 0 var(--s-2); font-family: var(--f-label); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-dim); font-weight: 700; }
.drawerbody ul { margin:0; padding-left:var(--s-5); display: flex; flex-direction: column; gap:var(--s-2); }
.drawerbody li, .drawerbody p { font-family: var(--f-prose); font-size: var(--t-body); line-height: 1.55; color: var(--ink); }
.basis { color: var(--ink-dim); font-style: italic; }

.matrix.compact th, .matrix.compact td { padding:var(--s-1) var(--s-3); font-size: var(--t-label); }
.matrix.compact .who { font-size: var(--t-ui); }
.matrix.compact .chip { font-size: var(--t-micro); }

.mlegend { margin-top:var(--s-4); }
.sronly { position: absolute; left: -9999px; }

/* --- Compare -------------------------------------------------------------- */

.cmp { display: grid; gap:1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.cmp > div { background: var(--surface); padding:var(--s-6); }
/*
 * The compare verdict, set as the page's voice — Editorial Chrome 1d.
 *
 * It was Bodoni bold in a tinted box with a 3px accent border, which made the
 * one genuinely editorial sentence on the page look like a callout component.
 * It is a pull-quote now: Newsreader italic over a hairline, with the
 * decisive clause carrying the accent and a small attribution beneath. No
 * box, no background, no left border.
 */
.verdict {
  font-family: var(--f-prose); font-style: italic; font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem); line-height: 1.45;
  border-top: 1px solid var(--rule); padding-top: 18px;
  margin:var(--s-6) 0 0; color: var(--ink); text-wrap: balance;
}
/* The clause that actually decides it. */
.verdict .call { color: var(--candy); }
.verdictsrc {
  font-family: var(--f-ui); font-size: var(--t-micro); text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--ink-faint); margin:var(--s-3) 0 0;
}

/* --- Sources -------------------------------------------------------------- */

.tierdef { border-left: 3px solid var(--rule-strong); padding-left:var(--s-5); }
.tierdef.t1 { border-left-style: solid; border-left-color: var(--candy); }
.tierdef.t2 { border-left-style: dashed; }
.tierdef.t3 { border-left-style: dotted; border-left-color: var(--ink-faint); }
.gaps { margin:0; padding-left:var(--s-6); display: flex; flex-direction: column; gap:var(--s-3); }
.gaps li { font-family: var(--f-prose); line-height: 1.6; color: var(--ink-dim); max-width: var(--measure); }
.gaps li::marker { color: var(--sherbet); }

/* --- Footer --------------------------------------------------------------- */

footer.site { border-top: 1px solid var(--rule); padding:var(--s-8) 0 var(--s-9); margin-top:var(--s-7); }
footer.site .disc { border-left: 3px solid var(--sherbet); padding-left:var(--s-5); max-width: var(--measure); }
footer.site .disc strong { color: var(--ink); }
footer.site a { color: var(--candy); }

.hide { display: none !important; }


/* ==== Shell: the bar, the viewport, one view at a time, the command palette ==== */

/* --- App shell ------------------------------------------------------------ */

:root { --bar: 64px; --rail: 248px; }

html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; }
.sh-ic { flex-shrink: 0; }
.sh-omnitext { font-size: var(--t-meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-kbd {
  margin-left:auto; font-family: var(--f-label); font-size: var(--t-micro);
  letter-spacing: 0.06em; border: 1px solid var(--rule); padding:var(--s-hair) var(--s-1); color: var(--ink-faint);
}
.sh-release {
  color:var(--candy); font-family:var(--f-label); font-size:var(--t-micro);
  font-weight:700; letter-spacing:.1em; text-transform:uppercase; text-decoration:none;
  white-space:nowrap; border-bottom:1px solid currentColor; padding:var(--s-2) 0;
}
.sh-release:hover { color:var(--ink); }

.sh-appbody { flex: 1; display: flex; min-height: 0; }
.sh-navindex { width:1.45rem; flex-shrink:0; color:var(--ink-faint); font-family:var(--f-label); font-size:var(--t-micro); letter-spacing:.08em; }

/* One view at a time. The section markup is unchanged; what changed is that
   nine of them are not in the way of the tenth. */
.sh-viewport { flex: 1; min-width: 0; overflow-y: auto; scroll-behavior: smooth; }
.sh-viewport > section.band { display: none; border-top: 0; padding:var(--s-7) 0 var(--s-8); }
.sh-viewport > section.band.on { display: block; }
.sh-viewport > section.band > .wrap { max-width: 82rem; }

/*
 * A section heading that filled a third of the screen was right when it was a
 * chapter mark in a long document. In a view you have already navigated to it
 * is a header pushing the controls below the fold — on the Studio it put the
 * dropzone off-screen, which is the one thing that screen is for.
 */
.sh-viewport .band > .wrap > header { margin-bottom:var(--s-6); }
.sh-viewport .band > .wrap > header .d-lg { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.sh-viewport .band > .wrap > header .prose { font-size: var(--t-body); margin-top:var(--s-3); }
.sh-viewport .policybanner { padding:var(--s-4) var(--s-5); margin-bottom:var(--s-5); }
.sh-viewport .policybanner .prose { font-size: var(--t-ui); }

/* --- Command palette ------------------------------------------------------ */

.sh-palette { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.62); display: flex; justify-content: center; padding-top: calc(var(--s-9) + var(--s-8)); }
.sh-palettebox { width: min(40rem, 92vw); max-height: 62vh; display: flex; flex-direction: column; background: var(--ground); border: 1px solid var(--rule-strong); }
.sh-paletteinput { display: flex; align-items: center; gap:var(--s-4); padding:0 var(--s-5); height: 50px; border-bottom: 1px solid var(--rule); color: var(--ink-faint); }
.sh-paletteinput input { flex: 1; background: transparent; border: 0; outline: none; color: var(--ink); font-family: var(--f-ui); font-size: var(--t-body); }
.sh-paletteresults { overflow-y: auto; padding:var(--s-2) 0; }
.sh-pgroup { margin:var(--s-3) var(--s-5) var(--s-1); font-family: var(--f-label); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-faint); }
.sh-pitem { display: flex; align-items: baseline; gap:var(--s-4); width:100%; padding:var(--s-3) var(--s-5); border:0; border-left: 2px solid transparent; background:transparent; color:inherit; font:inherit; text-align:left; cursor: pointer; }
.sh-pitem .sh-pname { font-size: var(--t-meta); color: var(--ink); }
.sh-pitem .sh-pmeta { font-family: var(--f-label); font-size: var(--t-micro); color: var(--ink-faint); }
.sh-pitem.sel { background: var(--surface-2); border-left-color: var(--candy); }
.sh-palettefoot { display: flex; gap:var(--s-5); padding:var(--s-3) var(--s-5); border-top: 1px solid var(--rule); font-family: var(--f-label); font-size: var(--t-micro); color: var(--ink-faint); }
.sh-pempty { padding:var(--s-6) var(--s-5); color: var(--ink-faint); font-style: italic; }

/* --- Detail panel --------------------------------------------------------- *
   Named .sh-detail rather than .drawer. The requirement buckets already own
   ".bucket .drawer" for their expanding body, and a bare ".drawer" rule with
   position:fixed and inset:0 turned every one of them into a full-screen
   overlay that silently swallowed clicks on the rail. Nothing errored; the
   nav simply stopped responding on one view. */

.sh-detail { position: fixed; inset: 0; z-index: 190; }
.sh-detailscrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.sh-detailbody {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(30rem, 94vw);
  background: var(--ground); border-left: 1px solid var(--rule-strong);
  overflow-y: auto; padding:var(--s-6) var(--s-6) var(--s-7);
}
.sh-detailclose { position: absolute; top: 0.7rem; right: 0.9rem; background: none; border: 0; color: var(--ink-dim); font-size: 1.25rem; cursor: pointer; line-height: 1; }
.sh-detailclose:hover { color: var(--ink); }
.sh-dsec { margin-top:var(--s-6); }
.sh-dsec > .eyebrow { margin-bottom:var(--s-3); }
.sh-drow { display: flex; flex-direction: column; gap:var(--s-1); padding:var(--s-3) 0; border-bottom: 1px solid var(--rule); }
.sh-drow .sh-dtop { display: flex; justify-content: space-between; gap:var(--s-4); }
.sh-drow .sh-dval { font-size: var(--t-meta); color: var(--ink); }
.sh-dbasis { margin:0; font-family: var(--f-prose); font-style: italic; font-size: var(--t-label); line-height: 1.45; color: var(--ink-faint); }

@media (max-width: 60rem) {
  .sh-appbody { flex-direction: column; }
  .sh-navindex { display:none; }

  /*
   * The top bar wraps rather than shrinking. At 390px the four-way theme
   * switch and the "Independent research" badge together are 294px of a
   * 390px bar, so with everything on one row the whole page scrolled
   * sideways — on every view, including the ones with no wide table in
   * them, which is what made it look like a table problem rather than a
   * bar problem.
   *
   * Nothing is hidden to buy the room. The badge is the only place this
   * page says it is not a GW product, and a disclosure that disappears on
   * the device most students will open this on is not a disclosure. So the
   * search moves to its own row, full width, where it is also a better tap
   * target than a 32px-tall strip sharing a line with eight other things.
   */
  .sh-omnitext { display: block; }
  .sh-kbd { display: none; }
  .sh-release { order:2; }
}

/* ==== Motion and state. Durations and easing are declared here as --dur-*;
   nothing in this section sets geometry, so a timing change cannot move a box ==== */

/* --- Motion + state polish ------------------------------------------------ */

/* Durations live here so a single edit slows or quickens the whole app.
   Named --dur-* rather than --t-*: the type scale in gen/css.js owns --t-*,
   and one namespace meaning both "type size" and "timing" is how a rule ends
   up reading a duration into a font-size. */
:root { --dur-fast: 140ms; --dur: 180ms; --dur-slow: 240ms; --ease: cubic-bezier(0.2, 0, 0, 1);
  /* The board's two moves: --ease-pop for a candy landing (a card, a stamp,
     a found grader, confetti), --ease-out for a settle. One language across
     the page instead of a curve tuned per animation. */
  --ease-pop: cubic-bezier(0.2, 1.4, 0.4, 1); --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Chrome acknowledges the pointer. Colour only — nothing moves. */
.btn,
.chip,
.sortbtn {
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease,
              border-color var(--dur-fast) ease;
}

/* The rail marker is the one piece of chrome that earns a moving part: it is
   how you know which view you are in, so it grows rather than appearing. */

/* Focus is never implied. Keyboard users get the accent, at full strength. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* A view arrives rather than cutting. Short enough not to be waited on. */
.sh-viewport > section.band.on { animation: sh-view var(--dur-slow) var(--ease) both; }
@keyframes sh-view { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* The grade bars are the argument of the whole product, so they draw in from
   the left on the axis they are measured against. Segments keep their order
   and their width; only the reveal is animated. */
.sh-viewport > section.band.on .bar > div {
  transform-origin: left; animation: sh-bar var(--dur-slow) var(--ease) both;
}
@keyframes sh-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Overlays: the palette drops, the detail panel slides from the edge it is
   docked to. Both under a fifth of a second — they are tools, not reveals. */
.sh-palettebox { animation: sh-drop var(--dur) var(--ease) both; }
@keyframes sh-drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.sh-detailbody { animation: sh-slide var(--dur) var(--ease) both; }
@keyframes sh-slide { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.sh-detailscrim { animation: sh-fade var(--dur) ease both; }
@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }

/* A long matrix scrolled under a flat header lost the header. The sticky row
   gets the panel ground and a rule so it stays readable over data. */
table.matrix thead th { background: var(--surface-2); }
.matrixwrap { scroll-behavior: smooth; }

/* The Studio dropzone is the one control the product exists for; it says so
   on hover and while a file is over it, using the accent it already owns. */
.zone { transition: border-color var(--dur) ease, background-color var(--dur) ease; }
.zone:hover { border-color: var(--candy); }
.zone.over { border-color: var(--candy); background: var(--candy-sunk); }

/* Primary action. Lifts 1px — enough to read as pressable, not as a card. */
.runbtn { transition: background-color var(--dur-fast) ease, transform var(--dur-fast) ease; }
.runbtn:not(:disabled):hover { transform: translateY(-1px); }
.runbtn:not(:disabled):active { transform: none; }

/* Rows in the two big tables settle on hover rather than flashing. */
tbody tr,
table.matrix tbody tr.frow th,
table.matrix tbody tr.frow td { transition: background-color var(--dur-fast) ease; }

/* Requirement drawers already toggle on a data attribute; give the sign the
   rotation so open/closed is legible before you read the glyph. */
.bucket .sign { display: inline-block; transition: transform var(--dur) var(--ease); }
.bucket[data-open="1"] .sign { transform: rotate(180deg); }

/*
 * Everything above is an enhancement, so all of it comes off together. This
 * repeats the guard in gen/css.js deliberately: the polish file must be safe
 * to include on its own.
 */
@media (prefers-reduced-motion: reduce) {
  .sh-viewport > section.band.on,
  .sh-viewport > section.band.on .bar > div,
  .sh-palettebox, .sh-detailbody, .sh-detailscrim { animation: none; }
  .runbtn:not(:disabled):hover { transform: none; }
}

/* ==== Reference drawer treatments ==== */

.sh-detailbody .drawerbody > div,
.drawerbody > div {
  border: 1px solid var(--rule); border-left: 2px solid var(--candy-dim);
  padding:var(--s-4) var(--s-5); margin-bottom:var(--s-4);
}
.drawerbody > div:last-child { margin-bottom:0; }

/* Breakdown cards answer the pointer with the accent they already own. */
.bd { transition: border-color var(--dur-fast, 120ms) ease; }
.bd:hover { border-color: var(--candy-dim); }

/* ==== Assignment workspace: composer, detection, progress, result ==== */

.studio-refine{margin-top:var(--s-6);padding:var(--s-6);border:1px solid var(--rule);background:var(--surface);display:grid;gap:var(--s-5)}
.studio-refine textarea{width:100%;resize:vertical;border:1px solid var(--rule);background:var(--surface);color:var(--ink);padding:var(--s-5);font:inherit;line-height:1.5}
.filemanifest{flex:1 1 24rem;border:1px solid var(--rule);background:var(--surface);padding:var(--s-4)}
.fileitem{display:grid;grid-template-columns:1fr auto auto;gap:var(--s-4);align-items:center;padding:var(--s-4);border-bottom:1px solid var(--rule)}
.fileitem:last-child{border-bottom:0}.fileitem strong{display:block}.fileitem small{color:var(--ink-dim)}
.archive-review { margin:var(--s-4) 0; padding:var(--s-4); border:1px solid var(--rule); border-radius:var(--r-m); background:var(--surface); color:var(--ink); }
.archive-review h3 { margin:0; font:800 var(--t-h3)/1.3 var(--f-display); }
.archive-review p { font:400 var(--t-ui)/1.5 var(--f-ui); }
.archive-actions { display:flex; flex-wrap:wrap; gap:var(--s-2); }
.archive-group { margin:var(--s-3) 0; }
.archive-group summary { cursor:pointer; overflow-wrap:anywhere; font:700 var(--t-ui)/1.5 var(--f-ui); }
.archive-list { list-style:none; padding:0; margin:var(--s-2) 0; }
.archive-list label { display:flex; align-items:start; gap:var(--s-3); padding:var(--s-2); }
.archive-list input { width:20px; height:20px; flex:none; accent-color:var(--candy); }
.archive-list span { display:grid; min-width:0; }
.archive-list b { overflow-wrap:anywhere; font:600 var(--t-ui)/1.4 var(--f-ui); }
.archive-list small { color:var(--ink-dim); font:400 var(--t-meta)/1.4 var(--f-ui); }
.archive-review button:focus-visible, .archive-group summary:focus-visible, .archive-list input:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
.fileitem select{max-width:11rem;background:var(--surface);color:var(--ink);border:1px solid var(--rule);padding:var(--s-2)}.fileitem button{border:0;background:transparent;color:var(--ink-dim);cursor:pointer}
.intentbox{display:flex;justify-content:space-between;align-items:center;gap:var(--s-5);margin:var(--s-5) 0;padding:var(--s-5);border-left:3px solid var(--candy);background:color-mix(in srgb,var(--candy) 8%,var(--surface))}.intentbox p{margin:var(--s-1) 0}
.versionlist{margin-top:var(--s-5);border-top:1px solid var(--rule);padding-top:var(--s-5)}.versionlist button{margin:var(--s-1)}
/* The deliverable box.
   The download is the product; the rendered prose is a preview of it. This is
   the loudest thing on the results screen on purpose — it used to sit under a
   two-thousand-word wall of text, which made copy-and-paste the obvious move
   and quietly threw away the formatting, the page numbers and the author. */
.deliverable{border:1px solid var(--candy);background:color-mix(in srgb,var(--candy) 7%,var(--surface));margin:var(--s-6) 0;padding:0 0 var(--s-6)}
.deliverable > header{border-bottom:1px solid var(--rule);padding:var(--s-5) var(--s-6);background:color-mix(in srgb,var(--candy) 10%,transparent)}
.deliverable > header h4{margin:0 0 var(--s-hair);font-family:var(--f-display);font-weight:700;font-size: 1.5rem;color:var(--ink)}
.deliverable.held{border-color:var(--sherbet-text);background:var(--sherbet-sunk)}
.dtiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:1px;background:var(--rule);border-bottom:1px solid var(--rule)}
.dtile{background:var(--surface);padding:var(--s-4) var(--s-6)}
.dtile-label{font-family:var(--f-label);font-size: var(--t-micro);text-transform:uppercase;letter-spacing:.14em;color:var(--ink-dim);margin:0}
/* The one number on each tile, set in the face this system already reserves
   for figures (.figure in gen/css.js: Bodoni, lining tabular numerals) rather
   than in the label face. Bigger, and finally on-system — the type role
   existed and the results screen was the one place not using it. */
.dtile-value{font-family:var(--f-display);font-weight:600;font-variant-numeric:lining-nums tabular-nums;letter-spacing:-.02em;font-size: 2.25rem;line-height:1;margin:var(--s-1) 0 var(--s-1);color:var(--ink)}
.dtile-note{font-family:var(--f-prose);font-size: var(--t-meta);color:var(--ink-dim);margin:0}
.dtile.off .dtile-value{color:var(--ink-dim)}
.dtile.good .dtile-value{color:var(--ink)}
/* Red is for a held file. Something to look at — a length a little off, a
   preview pane — is said calmly in ink, marked with a warm pastel bar. */
.dtile.bad .dtile-value{color:var(--sherbet-text)}
.dtile.warn .dtile-value{color:var(--ink)}
.dtile.warn .dtile-value::after{content:"";display:inline-block;width:8px;height:8px;margin-left:var(--s-2);vertical-align:middle;border-radius:999px;background:var(--b-methods);box-shadow:inset 0 0 0 1px var(--tile-ink)}
.dwarn{font-family:var(--f-label);font-size: var(--t-meta);margin:var(--s-4) var(--s-6) 0;padding-left:var(--s-4);border-left:3px solid var(--b-methods);color:var(--ink-dim)}
.held .dwarn{border-left-color:var(--sherbet-text);color:var(--sherbet-text)}
.drow{display:flex;align-items:flex-end;gap:var(--s-5);flex-wrap:wrap;padding:var(--s-6) var(--s-6) 0}
.dpick{display:flex;flex-direction:column;gap:var(--s-1)}
.dpick label{font-family:var(--f-label);font-size: var(--t-micro);text-transform:uppercase;letter-spacing:.14em;color:var(--ink-dim)}
.dpick select{background-color:var(--surface);color:var(--ink);border:1px solid var(--rule);padding:var(--s-4) var(--s-4);font:inherit;min-width:11rem;color-scheme:light dark}.dpick select option{background-color:var(--surface);color:var(--ink)}
.dgo{flex:1 1 16rem;background:var(--candy);color:var(--surface);border:0;padding:var(--s-5) var(--s-6);font-family:var(--f-label);font-size: var(--t-body);text-transform:uppercase;letter-spacing:.1em;cursor:pointer}
.dgo:hover:not(:disabled){filter:brightness(1.1)}
.dgo:disabled{background:var(--rule);color:var(--ink-dim);cursor:not-allowed}
.deliverable .matchack{margin:var(--s-4) var(--s-6) 0}
.dhint{font-family:var(--f-prose);font-size: var(--t-ui);color:var(--ink-dim);margin:var(--s-4) var(--s-6) 0;max-width:60ch}
.completed-work > header .eyebrow{text-transform:none;letter-spacing:.02em}
.review-navigation { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:16px 0; margin-top:32px; border-block:1px solid var(--rule-strong); }
.review-navigation > span { font:italic 24px/1.2 var(--f-display); margin-right:auto; color:var(--ink); }
.review-navigation button { min-height:44px; border:1px solid var(--rule); background:var(--surface); color:var(--ink); padding:10px 14px; cursor:pointer; font:13px/1.4 var(--f-ui); transition:background-color .2s, border-color .2s; }
.review-navigation button:hover,.review-navigation button:focus-visible { border-color:var(--candy); background:color-mix(in srgb,var(--candy) 8%,var(--surface)); }
#studio-out #completion,#studio-out #evidence-ledger,#studio-out #studio-refine,#studio-out #deliverable { scroll-margin-top:100px; }
#studio-out .completed-work { position:relative; margin:40px auto; max-width:58rem; background:var(--surface); border:1px solid var(--rule-strong); outline:1px solid var(--rule); outline-offset:4px; }
#studio-out .completed-work > header { padding:24px clamp(20px,4vw,56px); }
#studio-out .completed-work > .panelbody { padding:32px clamp(20px,4vw,56px) 48px; }
#studio-out .completed-work .panelbody p,#studio-out .completed-work .panelbody li { font-size:18px; line-height:1.8; }
#studio-out .completed-work .panelbody p { margin-bottom:1em; }
#studio-out .completed-work .panelbody table { display:block; width:100%; min-width:0; max-width:100%; overflow-x:auto; }
#studio-out .completed-work,#studio-out .completed-work > .panelbody { min-width:0; overflow-wrap:anywhere; }
.dpick { min-width:0; max-width:100%; }
.dpick select { max-width:100%; min-width:0; }
@media(max-width:40rem) { .review-navigation > span { flex-basis:100%; } .review-navigation button { flex:1 1 40%; } #studio-out .completed-work { outline:none; margin:24px 0; } #studio-out .completed-work .panelbody p,#studio-out .completed-work .panelbody li { font-size:17px; } }
@media(prefers-reduced-motion:reduce) { .review-navigation button { transition:none; } }
/* The gate that releases a held file.
   It was a block with an inline checkbox, so the second line of the label
   wrapped underneath the box rather than staying in the text column — and the
   box itself was the browser default, a 13px target on the single most
   important control the results screen has. A flex row keeps the label a
   column of text beside the control, and the control is sized to be hit. */
.matchack{display:flex;align-items:flex-start;gap:var(--s-3);margin-top:var(--s-4);font-family:var(--f-label);font-size: var(--t-meta);line-height:1.45;color:var(--ink);max-width:48ch;cursor:pointer}
.matchack input{flex:0 0 auto;width:1.125rem;height:1.125rem;margin:0}
/* Surface, border and focus ring come from the shared field rule below. */

/* The originality check. Colour carries state here the way it carries
   provenance in the grading bars: ember means a passage matched something
   published, and nothing else on the page borrows that meaning. */
.originality .panelbody{display:grid;gap:var(--s-5)}
.scorerow{display:grid;grid-template-columns:1fr;gap:var(--s-3)}
.scorenum{font-family:var(--f-label);font-size: 2rem;line-height:1;margin:var(--s-1) 0;color:var(--ink)}
.scorebar{height:.5rem;background:var(--surface);border:1px solid var(--rule);position:relative}
.scorebar span{display:block;height:100%}
.scorebar.ai span{background:var(--candy)}
.scorebar.plag span{background:var(--sherbet-text)}
.scorecaveat{max-width:60ch;margin:0}
.matchblock,.matchwarn{font-family:var(--f-label);font-size: var(--t-meta);padding:var(--s-3) var(--s-4);margin:0;border-left:3px solid var(--candy);color:var(--ink)}
.matchblock{border-left-color:var(--sherbet-text);background:var(--sherbet-sunk);color:var(--sherbet-text)}
.matchlist{list-style:none;margin:0;padding:0;display:grid;gap:var(--s-4)}
.matchlist li{border-left:2px solid var(--sherbet-text);padding-left:var(--s-4)}
.matchhead{font-family:var(--f-label);font-size: var(--t-meta);margin:0;color:var(--ink)}
.matchtext{font-family:var(--f-prose);color:var(--ink-dim);margin:var(--s-1) 0 0;max-width:66ch}
/* What the guide actually holds on the selected instructor, said before a
   request is spent rather than discovered from a vague answer afterwards. */
.evidence {
  margin-top:var(--s-4); padding:var(--s-3) var(--s-4);
  border-left: 3px solid var(--rule-strong);
  font-family: var(--f-label); font-size: var(--t-meta); color: var(--ink-dim);
}
.evidence.ev-rich { border-left-color: var(--candy); color: var(--ink); }
.evidence.ev-partial { border-left-color: var(--candy-dim); }
.evidence.ev-thin, .evidence.ev-name-only, .evidence.ev-none {
  border-left-color: var(--sherbet); color: var(--sherbet-text, var(--sherbet));
}

/* What the answer stands on, printed with the answer. A department median and
   a professor's published rule read identically in fluent prose; this is the
   only place the difference is visible. */
.basis {
  border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong);
  background: var(--surface); padding:var(--s-4) var(--s-5); margin:var(--s-4) 0 var(--s-6);
}
.basis.specific { border-left-color: var(--candy); }
.basis p { margin:0; font-family: var(--f-label); font-size: var(--t-ui); color: var(--ink); }
.basistags { display: flex; flex-wrap: wrap; gap:var(--s-2); margin-top:var(--s-3); }
.basistag {
  font-family: var(--f-label); font-size: var(--t-micro); letter-spacing: .04em;
  text-transform: uppercase; padding:var(--s-hair) var(--s-3);
  border: 1px dotted var(--rule-strong); color: var(--ink-dim);
}
.basistag.own { border-style: solid; border-color: var(--candy); color: var(--candy); }

/* --- Assignment Studio ---------------------------------------------------- */

.policybanner {
  display: flex; gap:var(--s-5); align-items: flex-start; justify-content: space-between;
  border: 1px solid var(--candy-dim); background: var(--candy-sunk);
  padding:var(--s-5) var(--s-5); margin-bottom:var(--s-6);
}
.policybanner p { margin:0; font-family: var(--f-prose); font-size: var(--t-body); color: var(--ink); max-width: 62ch; }

/* Blender supplies the geometry; this rule keeps it an editorial accent. It
 * never carries meaning, never blocks a control, and disappears on narrow
 * screens where the workspace needs every pixel for the form. */

/* The studio is the emotional front door. The visual treatment is deliberately
 * bigger here than in reference views: the work starts with a source, moves
 * through a grader's rules, then becomes a deliverable. The art panel makes
 * that sequence feel like a workspace rather than another settings form. */

/* The three-step strip repeats the same idea at working scale. Each station
 * is a small physical scene: sheets arrive, constraints are registered, and
 * a clean file leaves. The labels live in their own text column so geometry
 * never fights the words. */
.source-sheet { position:absolute; left:50%; top:55%; width:5.3rem; height:6.5rem; transform-style:preserve-3d; border:1px solid var(--rule-strong); background:var(--candy-sunk); }
.source-sheet::before { content:""; position:absolute; left:18%; right:18%; top:25%; height:3.35rem; background:linear-gradient(var(--ink-dim),var(--ink-dim)) 0 0/100% 2px no-repeat,linear-gradient(var(--ink-dim),var(--ink-dim)) 0 1.1rem/100% 2px no-repeat,linear-gradient(var(--ink-dim),var(--ink-dim)) 0 2.2rem/100% 2px no-repeat,linear-gradient(var(--candy),var(--candy)) .7rem 3.3rem/70% 2px no-repeat; opacity:.68; }
@keyframes candyStationFloat { 0%,100% { translate:0 0; } 50% { translate:0 -.35rem; } }
@keyframes candyStationBreath { 0%,100% { opacity:.78; transform:translateX(-50%) rotateX(56deg) scaleY(.96); } 50% { opacity:1; transform:translateX(-50%) rotateX(56deg) scaleY(1.02); } }
@keyframes candyThreadPass { 0%,100% { opacity:.4; transform:rotate(-7deg) scaleX(.72); } 50% { opacity:1; transform:rotate(-7deg) scaleX(1); } }

.settings { border: 1px solid var(--rule); background: var(--surface); margin-bottom:var(--s-6); }
/* Before a key exists this is the only thing on the page that matters. */
.settings > summary { cursor: pointer; padding:var(--s-4) var(--s-5); }
.settingsbody { padding:0 var(--s-5) var(--s-5); display: flex; flex-direction: column; gap:var(--s-5); }
.settingsbody input[type="password"], .settingsbody input[type="url"] { width: min(30rem, 100%); }
.keystate { font-family: var(--f-label); font-size: var(--t-meta); padding:var(--s-2) var(--s-4); border-left: 3px solid var(--rule-strong); }
.keystate.ok { border-left-color: var(--candy); color: var(--ink); }
.keystate.warn { border-left-color: var(--sherbet-text); color: var(--sherbet-text); }
.keynote { font-family: var(--f-prose); font-size: var(--t-body); color: var(--ink-dim); max-width: 64ch; margin:0; }

.zones { display: grid; gap:var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.zone {
  border: 1px dashed var(--rule-strong); background: var(--surface);
  padding:var(--s-6) var(--s-6); cursor: pointer; text-align: left; min-height:12rem;
}
.zone:hover, .zone.over { border-color: var(--candy); background: var(--surface-2); }
.zone h3 { margin:0 0 var(--s-1); font-size: var(--t-lead); }
.zone p { margin:0; font-family: var(--f-prose); font-size: var(--t-body); color: var(--ink-dim); }
.zone input[type="file"] { display: block; margin-top:var(--s-4); font-family: var(--f-label); font-size: var(--t-meta); color: var(--ink-dim); }
.zone input[type="file"]::file-selector-button { background:var(--ground); color:var(--ink); border:1px solid var(--rule-strong); padding:var(--s-3) var(--s-4); margin-right:var(--s-3); font:inherit; cursor:pointer; }
.zonestatus { font-family: var(--f-label); font-size: var(--t-meta); margin:var(--s-4) 0 0; color: var(--ink-dim); }
.zonestatus.ok { color: var(--candy); }
.zonestatus.err { color: var(--sherbet-text); }
/*
 * One field surface for the whole screen. The textarea painted itself the page
 * colour (--ground) while the name input beside it asked for --surface, so the
 * two controls a centimetre apart were different materials — and for most of
 * this file's life that was invisible, because --surface resolved to nothing and
 * left the input transparent over the same page colour. Defining the token
 * made the mismatch real, so both now sit on --surface: a field should look like
 * somewhere you can type, not like the page.
 */
textarea {
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong);
  font-family: var(--f-ui); font-size: var(--t-ui); padding:var(--s-4) var(--s-4); width: 100%;
  line-height: 1.5;
}
textarea { resize: vertical; }
textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.detectbox { border: 1px solid var(--rule); background: var(--surface); padding:var(--s-6); margin-top:var(--s-6); }
.detectbox ul { margin:var(--s-2) 0 0; padding-left:var(--s-6); }
.detectbox li { font-family: var(--f-prose); font-size: var(--t-body); color: var(--ink-dim); }
.detectwarn { border-left: 3px solid var(--sherbet-text); background: var(--sherbet-sunk); padding:var(--s-4) var(--s-5); margin-top:var(--s-5); }
.detectwarn strong, .detectwarn li, .detectwarn p { color: var(--ink); font-family: var(--f-prose); font-size: var(--t-body); }
.detectwarn p { margin:var(--s-2) 0 0; }

/* The lede is one sentence now; give it a size that says so. */
.lede { font-size: var(--t-lead); line-height: 1.5; margin-top:var(--s-4); }

/* Three steps, one glance. Same grid-of-cells construction as .dtiles on the
   results screen — 1px gaps over a --rule ground — so the two screens read as
   one system rather than two. */
/* Ordinals, not a call to action. §1.8 allows exactly one candy element per
   screen and §2.2 spends it on a CTA, the active nav item, a key figure, a
   selected chip or a link — a sequence marker is none of those, and three of
   them in candy read as three things you could click. */

.runrow { display: flex; gap:var(--s-5); align-items: center; margin-top:var(--s-6); flex-wrap: wrap; }
/*
 * The primary action of the whole input screen, and it used to be typeset
 * smaller than the download button on the results screen — .875rem against
 * 1rem, .7rem of padding against .95rem. Same weight as .dgo now: whatever
 * the one button on a screen is, it should be unmissable at a glance.
 */
.runbtn {
  background: var(--candy); color: var(--ink-on-fill); border: 1px solid var(--candy);
  font-family: var(--f-label); font-size: var(--t-body); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; padding:var(--s-5) var(--s-7); cursor: pointer;
  flex: 0 1 auto; min-width: 14rem;
}
.runbtn:hover:not(:disabled) { filter: brightness(1.1); }
.runbtn:disabled { background: transparent; color: var(--ink-faint); border-color: var(--rule-strong); cursor: not-allowed; }

/* Touch and narrow-screen pass. Inputs stay at the browser's comfortable
 * 16px size, file rows stack instead of creating sideways scroll, and the
 * two primary controls keep a 44px hit area. */
@media (max-width: 40rem) {
  .sh-viewport > section.band > .wrap { padding-left:var(--s-4); padding-right:var(--s-4); }
  #studio .wrap > header .display { font-size:clamp(2rem, 10vw, 3.25rem); }
  .policybanner { flex-direction:column; }
  .zone { min-height:0; padding:var(--s-5); }
  .zone input[type="file"],
textarea,
select { font-size:16px; }
  .fileitem { grid-template-columns:1fr; gap:var(--s-2); }
  .fileitem select, .fileitem button { width:100%; min-height:44px; }
  .runbtn, .dgo { min-height:52px; width:100%; }
  .runrow { align-items:stretch; }
}

.running { font-family: var(--f-label); color: var(--candy); font-size: var(--t-body); }
.studioerr { border-left: 3px solid var(--sherbet-text); background: var(--sherbet-sunk); padding:var(--s-5) var(--s-5); margin-top:var(--s-5); }
.studioerr strong { color: var(--ink); }
.studioerr p { margin:var(--s-2) 0 0; font-family: var(--f-prose); color: var(--ink-dim); }

.ctxbanner, .genericbanner, .regen {
  font-family: var(--f-label); font-size: var(--t-meta);
  padding:var(--s-3) var(--s-4); margin:var(--s-5) 0 0; border-left: 3px solid var(--candy); color: var(--ink);
}
.genericbanner { border-left-color: var(--sherbet-text); color: var(--sherbet-text); }
.regen { border-left-color: var(--rule-strong); color: var(--ink-dim); }
.refusal {
  border-left: 3px solid var(--sherbet-text); background: var(--sherbet-sunk);
  padding:var(--s-5); margin-top:var(--s-5); font-family: var(--f-prose); color: var(--ink); max-width: 66ch;
}

.panelgrid { display: grid; gap:var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); margin-top:var(--s-6); }
.panelout { border: 1px solid var(--rule); background: var(--surface); }
.panelout > header { border-bottom: 1px solid var(--rule); padding:var(--s-4) var(--s-5); }
.panelout h4 { margin:0 0 var(--s-1); font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.panelbody { padding:var(--s-5); }
.panelbody ul { margin:0; padding-left:var(--s-6); display: flex; flex-direction: column; gap:var(--s-2); }
.panelbody li, .panelbody p { font-family: var(--f-prose); font-size: var(--t-body); line-height: 1.55; color: var(--ink); }
.panelbody p { margin:0 0 var(--s-3); }
.panelbody h5 { margin:var(--s-4) 0 var(--s-1); font-family: var(--f-label); font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-dim); }
.panelbody code { font-family: var(--f-label); background: var(--surface); padding:0 var(--s-1); }
/* Composition: the opening spans the workspace, independently of the form rail. */
#studio .source-sheet { top:43%; }
#studio .zone { text-align:left; }
#studio .zone p,#studio .zone input[type=file] { margin-left:0; margin-right:0; }

/* The working area comes before the explanatory scenes in DOM and tab order. */
#studio > .wrap { display:block; }
#studio > .wrap > header.studio-header { display:block; margin-bottom:var(--s-6); }
.workspace-entry { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); align-items:start; gap:var(--s-7); }
.workflow-rail { list-style:none; padding:0; margin:0 0 var(--s-7); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-block:1px solid var(--rule); }
.workflow-rail li { position:relative; display:flex; align-items:center; gap:16px; padding:20px 16px; min-width:0; border-right:1px solid var(--rule); transition:background-color .3s ease; }
.workflow-rail li:last-child { border-right:0; }
.workflow-rail li::after { content:""; position:absolute; bottom:-1px; left:0; right:0; height:3px; background:var(--candy); transform:scaleX(0); transform-origin:left; transition:transform .45s ease; }
.workflow-rail li[aria-current="step"] { background:color-mix(in srgb,var(--candy) 7%,var(--surface)); }
.workflow-rail li[aria-current="step"]::after { transform:scaleX(1); }
.workflow-number { font:italic 32px/1 var(--f-display); color:var(--ink-faint); }
.workflow-rail li[aria-current="step"] .workflow-number { color:var(--candy); }
.workflow-rail strong { display:block; font:600 15px/1.4 var(--f-ui); color:var(--ink); }
.workflow-rail div span { display:block; font:13px/1.5 var(--f-ui); color:var(--ink-dim); overflow-wrap:anywhere; }
@media(max-width:40rem) { .workflow-rail li { padding:14px 8px; gap:8px; align-items:flex-start; flex-direction:column; } .workflow-number { font-size:25px; } .workflow-rail strong { font-size:13px; } .workflow-rail div span { font-size:12px; } }
@media(prefers-reduced-motion:reduce) { .workflow-rail li,.workflow-rail li::after { transition:none; } }
.workspace-perspective { min-width:0; }
@media(max-width:58rem) {
 .workspace-entry { grid-template-columns:1fr; gap:var(--s-6); }
}

/* Keep the first action in reach without removing progress or policy context. */
#studio .policybanner { padding:12px 16px; margin-bottom:16px; gap:12px; }
#studio .policybanner .btn { flex-shrink:0; white-space:nowrap; }
#studio .policybanner p { font-size:14px; line-height:1.45; }
#studio .workflow-rail { margin-bottom:20px; }
#studio .workflow-rail li { padding:12px; }
#studio .zone input[type="file"] { width:100%; max-width:100%; font-size:14px; }
#studio .zone input[type="file"]::file-selector-button { min-height:44px; border:1px solid var(--candy); background:var(--candy); color:var(--ink-on-fill); padding:10px 16px; margin-right:12px; font:600 14px var(--f-ui); cursor:pointer; }
#studio .zone input[type="file"]:focus-visible { outline:2px solid var(--focus); outline-offset:4px; }
.field-help { display:block; font:13px/1.5 var(--f-ui); color:var(--ink-dim); margin-top:6px; }
@media(max-width:40rem) {
 #studio .policybanner { flex-direction:row; align-items:center; }
 #studio .workflow-rail li { flex-direction:row; align-items:center; gap:6px; padding:10px 6px; }
 #studio .workflow-number { font-size:18px; }
 #studio .workflow-rail div span { display:none; }
 #studio .zone { padding:16px; }
}
/* Focused writing desk. */
#studio .workspace-entry { grid-template-columns:minmax(0,1fr) minmax(260px,.48fr); gap:36px; }
#studio .zone { padding:36px 28px; border:1px dashed var(--candy); text-align:center; background:color-mix(in srgb,var(--candy) 4%,var(--surface)); }
#studio .zone h3 { font-size:1.75rem; margin-bottom:8px; }
#studio .zone p,
#studio .settingsbody,
.detectbox,
.intentbox,
.context-card { font-family:var(--f-ui); }
#studio .zone input[type="file"] { max-width:310px; margin:20px auto 0; }
.context-card { padding:24px; border-top:3px solid var(--candy); background:var(--surface); }
.context-card h3 { font-size:1.6rem; margin:12px 0; }
.context-card p { font-size:14px; line-height:1.6; color:var(--ink-dim); }
#studio .context-card .evidence { padding:0; border:0; margin-top:16px; }
.evidence-person { display:block; font-size:16px; margin-bottom:12px; }
.evidence-stats { display:grid; gap:8px; margin-bottom:16px; }
.evidence-stat { padding:12px; background:var(--surface-2); border-left:2px solid var(--rule-strong); font:14px/1.5 var(--f-ui); }
.evidence-stat.unresolved { border-color:var(--warn); }
.evidence-details summary { min-height:44px; cursor:pointer; color:var(--candy); font:500 14px/1.5 var(--f-ui); padding:10px 0; }
.evidence-details a { color:var(--candy); }
.review-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(270px,.45fr); gap:28px; align-items:start; }
#studio-out .review-layout .completed-work { margin:0; max-width:none; outline:0; }
.review-sidebar { min-width:0; font-family:var(--f-ui); }
.review-sidebar .panelgrid { display:block; }
.review-sidebar .panelout { margin-bottom:16px; }
.review-sidebar .panelbody { padding:16px; font-size:14px; }
.review-sidebar .panelbody p,.review-sidebar .panelbody li { font:14px/1.6 var(--f-ui); }
#studio-out .review-navigation { position:sticky; top:0; z-index:10; background:var(--surface); margin-bottom:20px; }
.export-panel { margin-top:24px; border:1px solid var(--rule); padding:16px; }
.export-panel > summary { cursor:pointer; font:600 16px/1.5 var(--f-ui); min-height:44px; }
#studio-out .studio-refine { margin-top:24px; }
.cloudbackup { margin-top:var(--s-5); padding-top:var(--s-5); border-top:1px solid var(--rule); }
.cloudbackup .field { margin-top:var(--s-4); }
.cloudbackup input { width:100%; font-family:var(--f-label); font-size:var(--t-micro); }
.cloudbackup .mbuttons { display:flex; flex-wrap:wrap; gap:var(--s-3); margin-top:var(--s-4); }
.releasecheck { margin-top:var(--s-5); padding-top:var(--s-5); border-top:1px solid var(--rule); }
.releasecheck .mbuttons { display:flex; flex-wrap:wrap; gap:var(--s-3); margin-top:var(--s-3); }
@media(max-width:60rem) {
 #studio .workspace-entry,.review-layout { grid-template-columns:1fr; gap:24px; }
 #studio .context-card { padding:20px; }
 #studio .zone { padding:24px 16px; }
 #studio .review-navigation { top:0; }
 #studio .review-navigation > span { display:none; }
 #studio .review-navigation button { flex:1; font-size:12px; padding:10px 6px; }
 #studio .workspace-perspective { border-top:1px solid var(--rule); }
}

/* ==== Research desk: form controls, the brief, the application composition ==== */

/* Palettes live in gen/themes.js only. This file used to redefine all four
   here, which silently overrode themes.js: the colours that shipped were
   never the ones the audited palette file declared. */
.desk-nav { display:flex; align-items:center; gap:28px; font:14px var(--f-ui); }
.desk-nav > a { text-decoration:none; color:var(--ink); padding:12px 0; }
.desk-nav > a[aria-current=page] { color:var(--candy); border-bottom:2px solid var(--candy); }
.desk-menu { position:relative; font:14px var(--f-ui); }
.desk-menu > summary { cursor:pointer; list-style:none; padding:14px 0; color:var(--ink-dim); }
.desk-menu.on > summary { color:var(--candy); }
.desk-menu > summary::after { content:'⌄'; margin-left:8px; }
.desk-menu-body { position:absolute; top:100%; right:0; z-index:50; padding:16px; min-width:220px; background:var(--surface); border:1px solid var(--rule); box-shadow:0 16px 48px var(--desk-shadow-strong); }
.desk-menu-body a { display:block; color:var(--ink); text-decoration:none; padding:12px; }
.desk-menu-body a:hover { background:var(--surface-2); }
.desk-browse-body { left:0; right:auto; width:min(460px,calc(100vw - 32px)); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 24px; padding:20px; transform-origin:top left; }
.desk-menu-group > p { margin:0 0 7px; font:600 10px/1.4 var(--f-ui); text-transform:uppercase; letter-spacing:.16em; color:var(--ink-faint); }
.desk-browse-body .desk-menu-group a { display:grid; grid-template-columns:22px 18px minmax(0,1fr); align-items:center; gap:7px; min-height:36px; padding:8px 6px; border-bottom:1px solid color-mix(in srgb,var(--rule) 70%,transparent); font:13px/1.35 var(--f-ui); }
.desk-browse-body .desk-menu-group a:last-child { border-bottom:0; }
.desk-browse-body .desk-menu-group a:hover { background:var(--surface-2); }
.desk-menu-index { color:var(--ink-faint); font:10px var(--f-ui); letter-spacing:.08em; }
.desk-browse-body .sh-ic { color:var(--ink-faint); }
.desk-menu-status { grid-column:1/-1; display:grid; gap:3px; margin-top:2px; padding-top:14px; border-top:1px solid var(--rule); font-family:var(--f-ui); }
.desk-menu-status span { font:600 10px/1.4 var(--f-ui); text-transform:uppercase; letter-spacing:.16em; color:var(--ink-faint); }
.desk-menu-status b { font:500 12px/1.4 var(--f-ui); color:var(--ink); }
.desk-menu-status small { font:11px/1.4 var(--f-ui); color:var(--ink-dim); }
.sh-viewport > section.band { scroll-margin-top:76px; }
/* The workspace is still an app in its calm arrival state; navigation lives
   in the topbar menu so the content keeps the full reading width. */
#studio.on ~ * { min-width:0; }
.desk-browse-body a[aria-current="page"] { background:var(--candy-sunk); color:var(--candy); border-radius:4px; }
.desk-browse-body a:focus-visible,.desk-menu > summary:focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
.desk-browse-body { max-height:calc(100dvh - 90px); overflow-y:auto; overscroll-behavior:contain; }
.desk-browse-body .desk-menu-group a { min-height:44px; }
@media(prefers-reduced-motion:reduce) { .desk-menu-body { animation:none!important; } }
.sh-viewport { width:100%; }
#studio.band { min-height:calc(100vh - var(--bar)); }
#studio.band { padding:clamp(56px,7vw,104px) 0 72px; }
#studio > .wrap { width:calc(100% - 80px); max-width:1200px; margin:auto; }
#studio:not(.has-input):not(.has-result) > .wrap { display:grid; grid-template-columns:1fr 1fr; column-gap:80px; align-items:start; }
#studio > .wrap > header.studio-header { margin-bottom:32px; }
#studio:not(.has-input):not(.has-result) .workspace-entry { display:block; grid-column:2; grid-row:1 / span 3; padding-top:22px; }
#studio:not(.has-input) .workspace-perspective,
#studio:not(.has-input) .workflow-rail { display:none; }
#studio .workspace-entry { gap:48px; grid-template-columns:minmax(0,1fr) minmax(280px,.5fr); }
#studio .zone { position:relative; isolation:isolate; border:1px solid var(--rule); background:var(--surface); padding:56px 36px 40px; box-shadow:0 24px 70px var(--desk-shadow); transition:transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s ease; }
#studio .zone:focus-within { transform:translateY(-4px); box-shadow:0 30px 80px var(--desk-shadow-strong); }
#studio .zone::before { content:''; position:absolute; z-index:-1; inset:0; border:1px solid var(--rule); background:var(--surface); transform:rotate(-2deg); transform-origin:50% 90%; }
#studio .zone::after { content:'↥'; display:block; width:44px; height:44px; position:absolute; top:-22px; left:calc(50% - 22px); border:1px solid var(--rule); border-radius:50%; background:var(--surface); color:var(--candy); font:24px/44px var(--f-ui); }
#studio .zone h3 { font-size:32px; font-weight:500; letter-spacing:-.025em; }
#studio .zone p { font:14px/1.6 var(--f-ui); }
#studio .zone input[type=file] { margin-top:28px; max-width:300px; font:13px var(--f-ui); }
#studio .zone input[type=file]::file-selector-button { border-radius:3px; padding:13px 20px; font-weight:500; }
#studio .zone .zonestatus { font-size:12px; }
#studio .zone.over { border-color:var(--candy); background:var(--candy-sunk); transform:translateY(-4px); box-shadow:0 20px 50px color-mix(in srgb,var(--candy) 14%,transparent); }
#studio .zone.over::after { content:'↓'; background:var(--candy); color:var(--ink-on-fill); border-color:var(--candy); box-shadow:0 0 0 5px var(--candy-sunk); }
#studio .zone.is-reading { border-color:var(--candy); }
#studio .zone.is-reading::after { content:'…'; background:var(--candy); color:var(--ink-on-fill); border-color:var(--candy); animation:desk-pulse 1s ease-in-out infinite; }
#studio .zone input[type=file] { font-size:0; }
#studio .zone input[type=file]::file-selector-button { margin-right:0; }
#studio .runrow { margin-top:20px; align-items:center; }
#studio .runbtn { min-height:52px; border-radius:3px; font:600 14px var(--f-ui); letter-spacing:.01em; text-transform:none; background:var(--candy); color:var(--ink-on-fill); box-shadow:0 6px 18px color-mix(in srgb,var(--candy) 24%,transparent); transition:transform .2s ease,box-shadow .2s ease,background .2s ease; }
#studio .runbtn:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 10px 24px color-mix(in srgb,var(--candy) 32%,transparent); background:var(--candy-hover); }
#studio .runbtn:disabled { background:var(--surface-2); color:var(--ink-dim); border-color:var(--rule); }
#studio .policybanner { padding:8px 0; border:0; background:transparent; margin:12px 0 0; }
#studio .policybanner p { font:11px/1.5 var(--f-ui); color:var(--ink-dim); }
#studio .policybanner .btn { padding:6px 8px; font-size:10px; min-height:36px; }
#studio .settings { border:0; padding:0; margin-top:12px; }
#studio .settings summary { font:12px var(--f-ui); letter-spacing:0; text-transform:none; }
#studio.has-input .workflow-rail { margin:24px 0 32px; border:0; gap:24px; }
#studio .workflow-rail li { background:none; border:0; padding:10px 0; }
#studio .workflow-rail .workflow-number { font-size:24px; }
#studio .workflow-rail strong { font-size:13px; }
#studio .workflow-rail div span { font-size:11px; }
#studio.has-input .zone { padding:22px 16px; box-shadow:none; }
#studio.has-input .zone::before,#studio.has-input .zone::after,#studio.has-input .zone > p:not(.zonestatus) { display:none; }
#studio.has-input .zone h3 { font-size:20px; }
#studio.has-input .zone input[type=file] { margin-top:12px; }
#studio .filemanifest { padding:0; border:0; background:none; margin-top:16px; }
#studio .fileitem { margin-top:8px; padding:16px; border:1px solid var(--rule); border-left:3px solid var(--candy-dim); background:var(--surface); box-shadow:0 3px 0 var(--surface-2); font:13px/1.5 var(--f-ui); animation:desk-arrive .25s ease-out both; }
#studio .fileitem { grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:center; }
#studio .fileitem > div:first-child { min-width:0; }
#studio .file-actions { display:flex; align-items:center; gap:8px; min-width:0; }
#studio .fileitem strong { overflow-wrap:anywhere; font-weight:500; }
#studio .fileitem small { font-size:11px; }
#studio .fileitem select { width:122px; max-width:100%; min-width:0; font-size:12px; text-transform:capitalize; text-overflow:ellipsis; overflow:hidden; }
#studio .context-card { padding:0; background:none; border:0; }
#studio .context-card > h3 { font-size:25px; font-weight:500; }
#studio .context-card > .eyebrow { font-size:10px; }
#studio .evidence-stat { border:0; padding:12px 0; border-bottom:1px solid var(--rule); background:none; }
#studio .evidence-stat.unresolved { color:var(--ink-dim); border-left:2px solid var(--warn); padding-left:12px; }
.desk-status:empty { display:none; }
.desk-status { border-left:2px solid var(--candy); padding:16px 20px; margin:0 0 24px; background:var(--surface); font:14px/1.6 var(--f-ui); }
#studio.has-result:not(.editing-inputs) > .wrap > .studio-header,#studio.has-result:not(.editing-inputs) .workspace-entry,#studio.has-result:not(.editing-inputs) .workflow-rail { display:none; }
#studio.has-result { padding-top:24px; }
#studio.has-result #studio-out { grid-column:1/-1; }
#studio-out .review-navigation { border:0; border-bottom:1px solid var(--rule); background:var(--ground); padding:0 0 16px; gap:8px; }
#studio-out .review-navigation > span { font:italic 26px var(--f-display); }
.review-navigation button { border:0; background:transparent; color:var(--ink); border-radius:3px; font:13px var(--f-ui); }
.review-navigation button[data-review-target=deliverable] { background:var(--candy); color:var(--ink-on-fill); }
.review-basis { font:12px/1.5 var(--f-ui); margin:0 0 24px; }
.review-basis > summary { cursor:pointer; color:var(--ink-dim); padding:10px 0; }
#studio-out .review-layout { grid-template-columns:minmax(0,1fr) 320px; gap:40px; }
#studio-out .completed-work { border:0; box-shadow:0 8px 40px var(--desk-shadow-soft); }
#studio-out .completed-work > header { padding:48px 56px 24px; border-bottom:1px solid var(--rule); }
#studio-out .completed-work > header h4 { font-size:32px; font-weight:500; }
#studio-out .completed-work > .panelbody { padding:32px 56px 64px; }
#studio-out .completed-work .panelbody p { font-size:18px; line-height:1.85; }
.review-sidebar { position:sticky; top:84px; max-height:calc(100vh - 190px); overflow:auto; scrollbar-width:thin; }
.desk-tabs { display:flex; position:sticky; top:0; background:var(--ground); border-bottom:1px solid var(--rule); z-index:2; }
.desk-tabs button { flex:1; min-height:48px; padding:8px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--ink-dim); font:13px var(--f-ui); cursor:pointer; }
.desk-tabs button[aria-selected=true] { color:var(--candy); border-bottom-color:var(--candy); }
.desk-tab-panel[hidden] { display:none; }
#studio-out .review-sidebar .panelout { border:0; background:transparent; }
#studio-out .review-sidebar .panelout > header { padding:20px 0 8px; }
#studio-out .review-sidebar .panelout > header h4 { font-size:20px; }
#studio-out .review-sidebar .panelbody { padding:12px 0; }
#studio-out .evidence-list { padding:0; list-style:none; }
#studio-out .evidence-item { padding:16px; margin:12px 0; background:var(--surface); border:1px solid var(--rule); border-top:2px solid var(--rule-strong); }
#studio-out .evidence-item.supported { border-top-color:var(--ok); }
#studio-out .evidence-item.unresolved { border-top-color:var(--warn); }
#studio-out .evidence-item.inference { border-top-style:dashed; }
#studio-out .evidence-meta { font-size:12px; }
.claim-source { border:0; background:none; color:var(--candy); padding:12px 0 0; cursor:pointer; font:12px var(--f-ui); text-align:left; }
.source-inspector { padding:16px; margin:12px 0; border:1px solid var(--rule); background:var(--surface); font:13px/1.65 var(--f-ui); }
.source-inspector:empty { display:none; }
.source-inspector blockquote { margin:12px 0; padding-left:12px; border-left:2px solid var(--candy); }
.source-inspector h5 { font:500 14px var(--f-ui); margin:12px 0; }
.source-inspector a { color:var(--candy); }
.evidence-item.selected { outline:2px solid var(--candy); outline-offset:2px; }
.draft-editor { width:100%; min-height:420px; resize:vertical; border:1px solid var(--rule-strong); padding:20px; background:var(--surface); color:var(--ink); font:16px/1.7 var(--f-ui); }
.draft-editor-actions { display:flex; gap:12px; margin-top:12px; }
.draft-editor-actions button { min-height:44px; padding:10px 16px; border:1px solid var(--rule); background:var(--surface); color:var(--ink); cursor:pointer; }
.source-card { margin-top:12px; padding:14px; background:var(--surface); border:1px solid var(--rule); font:13px/1.6 var(--f-ui); }
.source-card summary { cursor:pointer; }
.source-card blockquote { margin:12px 0; padding-left:12px; border-left:2px solid var(--candy); }
[data-inline-claim] { cursor:pointer; border-bottom:1px dotted var(--candy); }
[data-inline-claim]:focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
mark.desk-claim { color:inherit; background:var(--candy-sunk); box-shadow:0 2px var(--candy); }
#studio .export-panel { background:var(--surface); border:0; padding:20px 24px; }
#studio .versionlist { border:0; margin:0; padding:16px 0; }
#studio .versionlist button { display:block; text-align:left; width:100%; padding:14px; margin:8px 0; }
#studio .studio-refine { background:var(--surface); padding:24px; border:0; }
#studio .studio-refine .prose { font:14px/1.6 var(--f-ui); }
@keyframes desk-arrive { from { opacity:0; transform:translateY(12px) scale(.985); } to { opacity:1; transform:none; } }
@keyframes desk-rise { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
@keyframes desk-pulse { 0%,100% { opacity:.75; transform:scale(.96); } 50% { opacity:1; transform:scale(1.04); } }
#studio .zone { animation:desk-rise .65s .12s cubic-bezier(.2,.7,.2,1) both; }
@media(max-width:960px) {
 #studio.band { padding-top:32px; }
 #studio > .wrap { width:calc(100% - 40px); }
 #studio:not(.has-input):not(.has-result) > .wrap { column-gap:32px; }
 #studio .workspace-entry { gap:24px; grid-template-columns:minmax(0,1fr) minmax(240px,.65fr); }
 #studio-out .review-layout { grid-template-columns:minmax(0,1fr) 270px; gap:24px; }
 #studio-out .completed-work > header { padding:28px 24px; }
 #studio-out .completed-work > .panelbody { padding:24px; }
}
@media(max-width:650px) {
 .desk-nav { gap:16px; font-size:12px; }
 .desk-nav > a { display:none; }
 .desk-menu { font-size:12px; }
 .desk-menu-body { right:0; min-width:210px; }
 #studio.band { padding-top:32px; }
 #studio > .wrap { width:calc(100% - 32px); }
 #studio:not(.has-input):not(.has-result) > .wrap { display:block; }
 #studio:not(.has-input):not(.has-result) .workspace-entry { padding-top:8px; }
 #studio .zone { padding:34px 16px 24px; }
 #studio .zone h3 { font-size:27px; }
 #studio .workspace-entry,#studio-out .review-layout { grid-template-columns:1fr; }
 #studio .workspace-perspective { border:0; }
 #studio .workflow-rail { gap:12px; }
 #studio .workflow-rail li { gap:6px; }
 #studio .workflow-rail div span { display:none; }
 #studio .fileitem { grid-template-columns:minmax(0,1fr) auto; }
 #studio .fileitem > div:first-child { grid-column:1/-1; }
 #studio .file-actions { grid-column:1/-1; justify-content:space-between; }
 #studio-out .review-navigation { flex-wrap:wrap; padding-bottom:12px; }
 #studio-out .review-navigation > span { display:block; flex-basis:100%; }
 #studio-out .review-navigation button { flex:1; min-height:44px; }
 .review-sidebar { position:static; max-height:none; overflow:visible; }
 #studio-out .completed-work > header h4 { font-size:27px; }
 #studio-out .completed-work .panelbody p { font-size:17px; }
 .desk-tabs { position:static; }
}
@media(prefers-reduced-motion:reduce) { #studio *,#studio *::before,#studio *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

/* Form controls share one deliberate product language instead of inheriting
   browser defaults. The native arrow stays available, but the field surface,
   text metrics, and focus state are ours. */
#studio select,
#studio input[type="text"],
#studio textarea,
#studio .fileitem select,
#studio-out select,
#studio-out input,
#studio-out textarea {
  box-sizing:border-box;
  min-height:48px;
  border:1px solid var(--rule-strong);
  border-radius:3px;
  background:var(--surface);
  color:var(--ink);
  font:15px/1.45 var(--f-ui);
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
#studio select,#studio-out select { appearance:none; padding:0 42px 0 14px; background-image:linear-gradient(45deg,transparent 50%,var(--candy) 50%),linear-gradient(135deg,var(--candy) 50%,transparent 50%); background-position:calc(100% - 20px) 21px,calc(100% - 14px) 21px; background-size:6px 6px,6px 6px; background-repeat:no-repeat; }
#studio input[type="text"],#studio textarea,#studio-out input,#studio-out textarea { padding:12px 14px; }
#studio select:hover,#studio input[type="text"]:hover,#studio textarea:hover,#studio-out select:hover,#studio-out input:hover,#studio-out textarea:hover { border-color:var(--candy-dim); }
#studio select:focus-visible,#studio input[type="text"]:focus-visible,#studio textarea:focus-visible,#studio-out select:focus-visible,#studio-out input:focus-visible,#studio-out textarea:focus-visible { outline:none; border-color:var(--candy); box-shadow:0 0 0 3px color-mix(in srgb,var(--candy) 18%,transparent); }
#studio ::placeholder,#studio-out ::placeholder { color:var(--ink-faint); opacity:1; }
#studio .field > span,#studio-out .dpick label { display:block; margin-bottom:7px; font:600 11px/1.4 var(--f-ui); text-transform:uppercase; letter-spacing:.1em; color:var(--ink-dim); }
#studio .fileitem select { min-height:40px; font-size:13px; padding-left:10px; padding-right:30px; background-position:calc(100% - 15px) 17px,calc(100% - 10px) 17px; background-size:5px 5px,5px 5px; }
#studio .fileitem button { min-height:40px; padding:8px 10px; border-radius:3px; font:13px var(--f-ui); }
#studio .fileitem button:hover { color:var(--candy); background:var(--candy-sunk); }
#studio .detectbox > .eyebrow { margin-bottom:6px; color:var(--ink); letter-spacing:.12em; }
#studio .detectbox #detect-why { margin-top:12px; }
#studio .detectbox #detect-why li { margin:5px 0; }
#studio .detectbox { padding:24px; border:1px solid var(--rule); border-top:3px solid var(--candy); background:var(--surface); }
#studio .detectbox .evidence { font-family:var(--f-ui); }
#studio .runrow { gap:20px; }
.select-shell { position:relative; display:block; min-width:0; }
.select-shell::after { content:""; position:absolute; z-index:1; top:50%; right:16px; width:7px; height:7px; border-right:1.5px solid var(--candy); border-bottom:1.5px solid var(--candy); transform:translateY(-68%) rotate(45deg); pointer-events:none; transition:transform .2s ease, border-color .2s ease; }
.select-shell:focus-within::after { transform:translateY(-30%) rotate(225deg); border-color:var(--candy-hover); }
.select-shell select { width:100%; min-width:0; background-image:none!important; background-position:initial!important; padding-right:44px; box-shadow:0 1px 0 color-mix(in srgb,var(--rule) 65%,transparent); }
.select-shell select:hover { box-shadow:0 2px 0 color-mix(in srgb,var(--candy-dim) 45%,transparent); }
.select-shell.compact { width:122px; }
.select-shell.compact { flex:0 0 122px; }
.select-shell.compact::after { right:12px; width:6px; height:6px; }
#studio .select-shell.compact select { min-height:40px; padding:0 30px 0 11px; font-size:12px; }
#studio .file-actions button { width:auto; flex:0 0 auto; }
#studio .field .select-shell { margin:0; }
#studio .field .select-shell select { display:block; }
#studio .detectbox .select-shell select { min-height:44px; }
@keyframes desk-field-in { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }
#studio .detectbox:not(.hide) .select-shell { animation:desk-field-in .3s ease-out both; }
#studio .detectbox:not(.hide) .field:nth-child(2) .select-shell { animation-delay:.06s; }
#studio .context-card #detect-box { margin:24px 0 0; padding:20px 0 0; border:0; border-top:1px solid var(--rule); background:transparent; }
#studio .context-card #detect-box #detect-why { margin-top:10px; }
#studio .context-card #detect-box #detect-why ul { padding-left:18px; }
#studio .context-card #detect-box .field > span { margin-bottom:6px; }
#studio.has-input .workspace-perspective .context-card { animation:desk-arrive .42s .08s cubic-bezier(.2,.7,.2,1) both; }
.desk-menu-body { animation:menu-in .16s ease-out both; transform-origin:top right; }
@keyframes menu-in { from { opacity:0; transform:translateY(-5px) scale(.98); } to { opacity:1; transform:none; } }
@media(max-width:650px) { #studio select { font-size:14px; } #studio input[type="text"],#studio textarea { min-height:48px; font-size:16px; } #studio .detectbox { padding:18px; } }
@media(max-width:650px) { #studio .file-actions { gap:12px; } #studio .file-actions button { min-width:72px; } }
@media(max-width:650px) { .desk-browse-body { position:fixed; top:60px; left:12px; right:12px; width:auto; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:70vh; overflow:auto; padding:14px; gap:14px 12px; } .desk-browse-body .desk-menu-group a { grid-template-columns:18px 16px minmax(0,1fr); gap:4px; padding:7px 2px; font-size:12px; } .desk-menu-status { grid-column:1/-1; } }

/* The assignment stays in place as materials become a brief. */
:root { --desk-radius:6px; --desk-shadow:color-mix(in srgb,var(--ink) 8%,transparent); --desk-shadow-soft:color-mix(in srgb,var(--ink) 4%,transparent); --desk-shadow-strong:color-mix(in srgb,var(--ink) 13%,transparent); }
#studio.band { padding:52px 0 72px; }
#studio > .wrap,#studio:not(.has-input):not(.has-result) > .wrap { max-width:1240px; width:calc(100% - 80px); display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:24px 64px; align-items:start; }
#studio > .wrap > .studio-header { grid-column:1; grid-row:1; margin:0; }
#studio .workspace-entry,#studio:not(.has-input):not(.has-result) .workspace-entry { display:flex; flex-direction:column; grid-column:2; grid-row:1 / span 4; padding:0; gap:28px; min-width:0; }
#studio .workspace-perspective { width:100%; }
#studio .workspace-perspective { border-top:1px solid var(--rule); padding-top:24px; }
#studio .zone,#studio.has-input .zone { padding:32px 24px 24px; border:1px solid var(--rule-strong); border-radius:var(--desk-radius); box-shadow:0 8px 24px var(--desk-shadow-soft); background:var(--surface); }
#studio .zone::before { transform:rotate(-1.1deg); border-radius:var(--desk-radius); }
#studio .zone::after { display:none; }
#studio .zone:focus-within { transform:none; box-shadow:0 0 0 3px var(--candy-sunk); }
#studio .zone h3,#studio.has-input .zone h3 { font-size:1.75rem; }
#studio .zone p,#studio.has-input .zone > p:not(.zonestatus) { display:block; font: .875rem/1.55 var(--f-ui); }
#studio .zone.over { outline:2px solid var(--candy); outline-offset:4px; }
#studio .zone input[type=file] { max-width:100%; width:100%; font-size:.875rem; }
#studio .zone input[type=file]::file-selector-button { border-radius:4px; }
.brief-fields input { border-radius:4px; font:1rem/1.5 var(--f-ui); }
#studio .runrow { display:flex; flex-direction:column; gap:12px; }
#studio .runbtn { width:100%; min-height:48px; border-radius:4px; box-shadow:none; font:600 .9375rem/1.4 var(--f-ui); }
#studio .policybanner { padding:12px 0; margin:0; }
#studio .policybanner p { font:.75rem/1.6 var(--f-ui); }
#studio .settings > summary { font:.875rem/1.5 var(--f-ui); min-height:44px; }
#studio .field-help,.field-help { font:.8125rem/1.55 var(--f-ui); }
#studio .fileitem small { font-size:.75rem; }
#studio .fileitem select,#studio .fileitem button { font-size:.875rem; min-height:44px; }
#studio > .wrap > .workflow-rail,#studio.has-input .workflow-rail { grid-column:1; grid-row:3; display:grid; margin:0; gap:8px; border-top:1px solid var(--rule); }
#studio .workflow-rail li { padding:16px 0; gap:8px; }
#studio .workflow-rail strong { font-size:.875rem; }
#studio .workflow-rail div span { font-size:.75rem; }
#studio .workflow-rail .workflow-number { font-size:1.5rem; }
#studio > .wrap > .desk-status { grid-column:1; grid-row:4; font-size:.875rem; }
.desk-example { grid-column:1; grid-row:2; padding:20px 24px; border-left:2px solid var(--candy); background:var(--surface); }
.desk-example .eyebrow { font:.75rem/1.5 var(--f-ui); letter-spacing:.05em; }
.desk-example blockquote { font:1rem/1.5 var(--f-prose); margin:8px 0; }
#studio.has-input .desk-example { display:none; }
.assignment-brief { margin-top:24px; padding:24px; border:1px solid var(--rule); border-top:3px solid var(--candy); background:var(--surface); border-radius:4px; }
.assignment-brief[hidden],.revision-proposal[hidden],button[hidden] { display:none!important; }
.assignment-brief header { display:flex; align-items:start; justify-content:space-between; gap:12px; }
.assignment-brief h3 { font:1.625rem/1.25 var(--f-display); margin:4px 0 12px; }
.assignment-brief .eyebrow { font-size:.75rem; }
.assignment-brief .btn { font-size:.75rem; min-height:44px; }
.brief-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:20px 0; }
.brief-fields label { display:grid; gap:6px; font:.875rem/1.5 var(--f-ui); }
.brief-fields label:first-child { grid-column:1/-1; }
.brief-fields input { min-width:0; width:100%; border:1px solid var(--rule-strong); padding:10px 12px; background:var(--surface); color:var(--ink); }
.brief-fields small { font-size:.75rem; color:var(--ink-dim); }
.brief-gap { font:.8125rem/1.6 var(--f-ui); padding-top:12px; border-top:1px solid var(--rule); color:var(--ink-dim); }
#studio .intentbox { display:none; }
#studio .context-card h3 { font-size:1.5rem; }
#studio .context-card .eyebrow { font-size:.75rem; }
#studio.has-result > .wrap { display:block; }
#studio.has-result:not(.editing-inputs) .desk-example { display:none; }
#studio.has-result.editing-inputs .studio-header,#studio.has-result.editing-inputs .desk-example { display:none; }
#studio.has-result.editing-inputs .workspace-entry { max-width:760px; margin:0 auto 40px; }
#studio.has-result.editing-inputs .workflow-rail { display:none; }
#studio-out .review-navigation { position:sticky; top:76px; margin:0 0 16px; padding:12px 0; gap:4px; background:var(--ground); z-index:15; }
#studio-out .review-navigation button { font-size:.875rem; min-height:44px; padding:10px 12px; }
.document-toolbar-title small { display:block; font:.75rem/1.6 var(--f-ui); color:var(--ink-dim); margin-top:6px; }
#studio-out .review-layout { grid-template-columns:minmax(0,1fr) 340px; gap:32px; }
#studio-out .completed-work { border:1px solid var(--rule); border-radius:3px; box-shadow:0 8px 28px var(--desk-shadow-soft); }
#studio-out .completed-work > header { padding:36px 40px 24px; }
#studio-out .completed-work > header h4 { font-size:2rem; line-height:1.25; }
#studio-out .completed-work > header .eyebrow { font-size:.75rem; }
#studio-out .completed-work > .panelbody { padding:28px 40px 48px; max-width:75ch; margin:auto; }
#studio-out .completed-work .panelbody p,#studio-out .completed-work .panelbody li { font-size:1.125rem; line-height:1.75; }
.review-sidebar { top:174px; max-height:calc(100dvh - 200px); }
.desk-tabs button { font-size:.875rem; }
#studio-out .evidence-item { border-radius:4px; }
#studio-out .claim-source { min-height:44px; font-size:.875rem; }
#studio-out .evidence-meta { font-size:.8125rem; }
[data-inline-claim] { border-bottom:1px dotted var(--candy); border-radius:2px; }
[data-inline-claim]:hover,[data-inline-claim].desk-claim { background:var(--candy-sunk); box-shadow:0 2px var(--candy); }
[data-evidence-status=unresolved] { border-bottom-style:dashed; border-bottom-color:var(--warn); }
.source-inspector h3,.source-sheet h3 { font:1.25rem/1.5 var(--f-prose); }
.source-text,.version-diff pre,.revision-comparison pre { white-space:pre-wrap; overflow-wrap:anywhere; font:.9375rem/1.65 var(--f-prose); max-height:420px; overflow:auto; padding:16px; background:var(--surface-2); border:1px solid var(--rule); }
.source-inspector:empty { display:none; }
.passage-source { border-top:1px solid var(--rule); padding-top:16px; margin-top:16px; }
.source-sheet { color:var(--ink); background:var(--surface); border:1px solid var(--rule); border-radius:16px 16px 0 0; padding:20px; width:100%; max-width:760px; max-height:85dvh; margin:auto auto 0; }
.source-sheet::backdrop { background:var(--scrim); }
.source-sheet > button { position:sticky; top:0; background:var(--surface); }
.mobile-review-switch { display:none; }
.paragraph-tools { display:flex; flex-wrap:wrap; gap:10px; align-items:center; font:.875rem/1.5 var(--f-ui); }
.paragraph-tools select { max-width:100%; min-width:0; flex:1 1 250px; min-height:44px; background:var(--surface); color:var(--ink); border:1px solid var(--rule-strong); border-radius:4px; padding:8px; font:inherit; }
.paragraph-tools .field-help { flex-basis:100%; }
.revision-proposal { margin:24px 0; padding:24px; background:var(--surface); border:1px solid var(--candy); scroll-margin-top:180px; }
.revision-proposal h3 { font:1.75rem/1.4 var(--f-display); }
.revision-proposal p,.revision-proposal h4 { font:.875rem/1.5 var(--f-ui); }
.revision-comparison { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.revision-comparison section { min-width:0; }
.revision-comparison section:last-child pre { border-left:3px solid var(--candy); }
.revision-actions { display:flex; gap:16px; }
.versionlist button small { display:block; margin-top:6px; color:var(--ink-dim); }
.version-diff { font:.875rem/1.5 var(--f-ui); }
.desk-menu-body a,.desk-browse-body .desk-menu-group a { font-size:.875rem; }
.desk-menu-group > p,.desk-menu-index,.desk-menu-status span { font-size:.75rem; }
.desk-menu-status small { font-size:.75rem; }
.desk-nav,.desk-menu { font-size:.875rem; }
@media(max-width:1050px) {
 #studio > .wrap,#studio:not(.has-input):not(.has-result) > .wrap { width:calc(100% - 48px); gap:24px 32px; }
 #studio-out .review-layout { grid-template-columns:minmax(0,1fr) 280px; gap:24px; }
 #studio-out .review-navigation { top:64px; }
 #studio-out .completed-work > header,#studio-out .completed-work > .panelbody { padding:24px; }
 .review-sidebar { top:180px; }
}
@media(max-width:760px) {
 #studio.band { padding:28px 0 40px; }
 #studio > .wrap,#studio:not(.has-input):not(.has-result) > .wrap { width:calc(100% - 32px); display:flex; flex-direction:column; gap:24px; }
 #studio > .wrap > .studio-header { width:100%; }
 .desk-example { display:none; }
 #studio > .wrap > .workflow-rail,#studio.has-input .workflow-rail { width:100%; order:1; }
 #studio .workflow-rail div span { display:none; }
 #studio .workspace-entry,#studio:not(.has-input):not(.has-result) .workspace-entry { width:100%; order:2; gap:24px; }
 #studio .zone,#studio.has-input .zone { padding:24px 18px; }
 #studio .desk-status { order:3; }
 #studio #studio-out { width:100%; order:4; }
 .assignment-brief { padding:20px; }
 .brief-fields { grid-template-columns:1fr; }
 .brief-fields label:first-child { grid-column:auto; }
 .desk-browse-body { position:fixed; top:60px; left:12px; right:12px; width:auto; grid-template-columns:1fr; max-height:calc(100dvh - 76px); box-shadow:0 12px 30px var(--desk-shadow-strong); }
 .desk-browse-body .desk-menu-group a { grid-template-columns:18px 1fr; }
 .desk-menu-index { display:none; }
 .desk-menu-group > p { margin-top:8px; }
 #studio-out .review-navigation { top:60px; gap:2px; flex-wrap:wrap; }
 #studio-out .review-navigation > span { display:block; flex-basis:100%; font-size:1.5rem; margin-bottom:8px; }
 #studio-out .review-navigation button { font-size:.8125rem; flex:1 1 auto; padding:8px; }
 #studio-out .review-navigation [data-review-target=evidence-ledger],#studio-out .review-navigation [data-review-target=studio-refine] { display:none; }
 .mobile-review-switch { display:flex; border-bottom:1px solid var(--rule); margin:0 0 20px; }
 .mobile-review-switch button { flex:1; min-height:48px; background:transparent; color:var(--ink-dim); border:0; border-bottom:2px solid transparent; font:.875rem var(--f-ui); }
 .mobile-review-switch button[aria-pressed=true] { color:var(--candy); border-bottom-color:var(--candy); }
 #studio-out .review-layout { display:block; }
 #studio-out[data-mobile-view=draft] .review-sidebar { display:none; }
 #studio-out[data-mobile-view=context] .review-document { display:none; }
 .review-sidebar { position:static; max-height:none; overflow:visible; }
 #studio-out .completed-work > header { padding:24px 20px 16px; }
 #studio-out .completed-work > .panelbody { padding:24px 20px 32px; }
 #studio-out .completed-work > header h4 { font-size:1.7rem; }
 #studio-out .completed-work .panelbody p { font-size:1.0625rem; }
 .revision-comparison { grid-template-columns:1fr; gap:8px; }
 .revision-proposal { padding:20px; }
 .revision-actions { flex-direction:column; }
 #studio.has-result.editing-inputs .workspace-entry { display:flex; }
}
/* Application composition. Shared across arrival, preparation and review. */
:root { --bar:64px; }
.sh-release-mobile { display:none; }
.sh-navindex { display:none; }
#studio.band { padding:28px 0 40px; min-height:0; }
#studio > .wrap,#studio:not(.has-input):not(.has-result) > .wrap { display:block; width:100%; max-width:1120px; padding:0 40px; }
#studio > .wrap > header.studio-header { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:0 0 28px; }
.desk-example { display:none; }
#studio > .wrap > .workflow-rail,#studio.has-input .workflow-rail { display:flex; margin:0 0 24px; padding:0 0 20px; border-bottom:1px solid var(--rule); gap:32px; }
#studio .workflow-rail li { flex:1; display:flex; align-items:center; gap:12px; padding:0; }
#studio .workflow-rail .workflow-number { font:600 12px var(--f-ui); width:30px; height:30px; display:grid; place-items:center; border:1px solid var(--rule); border-radius:50%; color:var(--ink-dim); }
#studio .workflow-rail li[aria-current=step] .workflow-number { background:var(--candy-sunk); border-color:var(--candy); color:var(--candy); }
#studio .workflow-rail strong { font:600 14px/1.5 var(--f-ui); }
#studio .workflow-rail div span { font:12px/1.5 var(--f-ui); }
#studio .workspace-entry,#studio:not(.has-input):not(.has-result) .workspace-entry { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; padding:0; align-items:start; }
#studio.has-input .workspace-entry { grid-template-columns:minmax(0,1fr) 280px; }
#studio:not(.has-input) .workspace-perspective { display:none; }
#studio .zone,#studio.has-input .zone { display:grid; grid-template-columns:1fr auto; column-gap:20px; align-items:center; min-height:0; padding:20px; text-align:left; border:1px dashed var(--rule-strong); border-radius:6px; background:var(--ground); box-shadow:none; transform:none; }
#studio .zone h3,#studio .zone p { grid-column:1; }
#studio .zone::before,#studio .zone::after { display:none; }
#studio .zone:focus-within,#studio .zone.over { transform:none; box-shadow:none; border-color:var(--candy); background:var(--candy-sunk); }
#studio .zone h3,#studio.has-input .zone h3 { font:600 16px/1.5 var(--f-ui); letter-spacing:-.02em; }
#studio .zone p { font:14px/1.6 var(--f-ui); }
#studio .zone input[type=file] { position:absolute; width:1px; height:1px; padding:0; margin:0; opacity:0; overflow:hidden; }
#studio .zone .zonestatus { font-size:12px; margin-top:8px; }
#studio .runrow { display:flex; flex-direction:row-reverse; align-items:center; justify-content:space-between; gap:24px; }
#studio .runbtn { width:auto; flex:0 0 auto; min-width:160px; min-height:44px; padding:12px 24px; border-radius:6px; box-shadow:none; font:600 15px var(--f-ui); }
#studio .runbtn:disabled { background:var(--surface-2); color:var(--ink-faint); box-shadow:none; cursor:not-allowed; }
#studio .runbtn:hover:not(:disabled) { transform:none; box-shadow:none; }
#studio .context-card { padding:24px; background:var(--surface); border:1px solid var(--rule); border-top:3px solid var(--candy); border-radius:6px; }
#studio .context-card h3 { font:500 26px/1.2 var(--f-display); }
#studio .context-card p { font:14px/1.65 var(--f-ui); }
#studio .workspace-perspective { padding-top:0; border-top:0; min-width:0; }
#studio.has-result:not(.editing-inputs) > .wrap > header.studio-header,
#studio.has-result:not(.editing-inputs) > .wrap > .workflow-rail,
#studio.has-result:not(.editing-inputs) .workspace-entry { display:none; }
#studio.has-result.editing-inputs > .wrap > header.studio-header { display:none; }
.sh-viewport { scrollbar-gutter:stable; }
#studio .fileitem { min-width:0; }
#studio .fileitem strong { overflow-wrap:anywhere; }
#studio .file-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
#studio .desk-status:not(:empty) { margin:0 0 20px; padding:16px; border:1px solid var(--rule); border-left:3px solid var(--candy); border-radius:6px; background:var(--surface); }
#studio .field-help { font-size:14px; line-height:1.5; }
#studio .settings { display:block; height:auto; min-height:0; margin:20px 0 0; padding:0; border-top:1px solid var(--rule); }
#studio .settings summary { min-height:44px; display:list-item; padding:16px 0 0; font-size:13px; }
#studio .settings:not([open]) > :not(summary) { display:none; }
.sh-palette { align-items:flex-start; padding-top:12vh; }
.sh-palettebox { flex:none; height:auto; min-height:0; max-height:70vh; align-self:flex-start; border-radius:6px; background:var(--surface); box-shadow:0 24px 80px var(--desk-shadow-strong); overflow:hidden; }
.sh-paletteresults { flex:0 1 auto; min-height:0; max-height:45vh; }
.sh-paletteinput input { font:16px var(--f-ui); }
.sh-palettefoot { padding:12px 16px; font:12px var(--f-ui); }
.sh-viewport > section.band:not(#studio) > .wrap { max-width:none; padding:0 36px; }
.sh-viewport > section.band:not(#studio) > .wrap > header { display:block; margin-bottom:24px; }
.sh-viewport > section.band > .wrap > header .folio { display:none; }
.sh-viewport > section.band:not(#studio) > .wrap > header .display { font:600 28px/1.3 var(--f-ui); letter-spacing:-.025em; }
.sh-viewport > section.band:not(#studio) > .wrap > header .prose { margin:8px 0 0; max-width:75ch; font:14px/1.6 var(--f-ui); }
.sh-viewport .controls { padding:16px; background:var(--surface); border:1px solid var(--rule); border-radius:6px; margin-bottom:16px; gap:16px; }
.sh-viewport .controls .field:first-child { flex:1; min-width:180px; }
.sh-viewport .controls input,.sh-viewport .controls select { min-height:44px; border-radius:4px; font:14px var(--f-ui); }
.sh-viewport .scroller { border-radius:6px; background:var(--surface); }
.sh-viewport th { font:600 12px/1.5 var(--f-ui); letter-spacing:.04em; padding:14px 16px; }
.sh-viewport td { font:14px/1.6 var(--f-ui); padding:16px; }
.sh-viewport tbody tr:hover { background:var(--surface-2); }
.sh-viewport > footer.site { padding:20px 36px; margin:0; background:var(--ground); }
.sh-viewport > footer.site .wrap { max-width:none; padding:0; }
.sh-viewport > footer.site .disc { max-width:none; border:0; padding:0; }
.sh-viewport > footer.site .prose,.sh-viewport > footer.site .code { font:12px/1.6 var(--f-ui); color:var(--ink-dim); }
body:has(#studio.on) .sh-viewport > footer.site { display:none; }
#studio-out .review-navigation { top:0; padding:12px 0; margin-top:0; border-top:0; background:var(--ground); }
#studio-out .review-layout { grid-template-columns:minmax(0,1fr) 320px; gap:24px; }
.review-sidebar { top:80px; }
#studio-out .completed-work { border-radius:6px; box-shadow:0 8px 24px var(--desk-shadow); }
#studio-out .completed-work > .panelbody { padding:36px clamp(24px,4vw,64px); }
@media(min-width:1101px) { .desk-nav { display:none; } }
@media(max-width:1100px) {
 #studio.has-input .workspace-entry { grid-template-columns:minmax(0,1fr) 260px; }
}
@media(max-width:760px) {
 #studio.band { padding:24px 0; }
 #studio > .wrap,#studio:not(.has-input):not(.has-result) > .wrap { width:100%; padding:0 16px; }
 #studio > .wrap > .workflow-rail,#studio.has-input .workflow-rail { gap:12px; }
 #studio .workflow-rail li { gap:8px; }
 #studio .workflow-rail div span { display:none; }
 #studio .workspace-entry,#studio:not(.has-input):not(.has-result) .workspace-entry { display:flex; flex-direction:column; gap:20px; }
 #studio .runrow { flex-direction:column; align-items:stretch; gap:12px; }
 #studio .runbtn { width:100%; }
 #studio .zone,#studio.has-input .zone { display:block; }
 .sh-viewport > section.band:not(#studio) > .wrap { padding:0 16px; }
 #studio-out .review-layout { display:block; }
 #studio-out .review-navigation { top:0; }
}

/* --- Quality pass: a composed Candy Land workspace ----------------------
 *
 * The application composition above keeps every view efficient, but its last
 * desktop pass flattened the branded research desk into generic admin UI. The
 * rules below restore a clear hierarchy and the product's editorial character
 * without changing a single workflow or making the reference tables precious.
 */
body { background-color:var(--ground); background-image:var(--wash); }

.sh-viewport { background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 12%,transparent),transparent 14rem); }
.sh-viewport > section.band:not(#studio) { padding-top:36px; }
.sh-viewport > section.band:not(#studio) > .wrap { padding-inline:clamp(24px,3vw,44px); }
.sh-viewport > section.band:not(#studio) > .wrap > header .display {
 font:600 clamp(2.2rem,3.2vw,3rem)/1.02 var(--f-display); letter-spacing:-.035em;
}
.sh-viewport > section.band:not(#studio) > .wrap > header .prose { font-family:var(--f-prose); font-size:16px; }
.sh-viewport .controls { padding:18px; border-color:color-mix(in srgb,var(--rule-strong) 76%,transparent); box-shadow:0 12px 32px var(--desk-shadow-soft); }
.sh-viewport .scroller { border:1px solid var(--rule); box-shadow:0 16px 40px var(--desk-shadow-soft); }

#studio.band { padding:38px 0 56px; }
#studio > .wrap,#studio:not(.has-input):not(.has-result) > .wrap { max-width:1160px; padding-inline:48px; }
#studio > .wrap > header.studio-header {
 display:grid; grid-template-columns:minmax(0,1fr) 270px; align-items:center; gap:52px;
 margin-bottom:30px; padding:4px 0 30px; border-bottom:1px solid var(--rule);
}

#studio > .wrap > .workflow-rail,#studio.has-input .workflow-rail {
 position:relative; gap:0; margin:0 0 22px; padding:0; overflow:hidden; border:1px solid var(--rule); border-radius:6px; background:var(--surface);
}
#studio .workflow-rail li { position:relative; padding:15px 18px; gap:11px; }
#studio .workflow-rail li + li { border-left:1px solid var(--rule); }
#studio .workflow-rail li[aria-current=step] { background:linear-gradient(90deg,var(--candy-sunk),color-mix(in srgb,var(--candy-sunk) 35%,transparent)); }
#studio .workflow-rail li[aria-current=step]::after { transform:scaleX(1); height:2px; }
#studio .workflow-rail .workflow-number { width:32px; height:32px; background:var(--ground); }
#studio .zones { grid-column:1; }
#studio .assignment-brief,
#studio .intentbox,
#studio .runrow,
#studio .policybanner,
#studio .studioerr,
#studio .settings { grid-column:1 / -1; }
#studio .zone,#studio.has-input .zone { height:100%; min-height:174px; padding:24px; background:color-mix(in srgb,var(--ground) 68%,var(--surface)); }
#studio .zone h3,#studio.has-input .zone h3 { font:600 23px/1.12 var(--f-display); letter-spacing:-.025em; }
#studio .zone p { max-width:30ch; font-family:var(--f-ui); }
#studio .runrow { padding-top:3px; }
#studio .runbtn { min-width:176px; min-height:48px; border-radius:6px; box-shadow:0 10px 26px color-mix(in srgb,var(--candy) 18%,transparent); }
#studio .runbtn:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 14px 30px color-mix(in srgb,var(--candy) 24%,transparent); }
#studio.has-input .workspace-entry { grid-template-columns:minmax(0,1fr) 294px; }

@media(max-width:1100px) {
 #studio > .wrap,#studio:not(.has-input):not(.has-result) > .wrap { padding-inline:32px; }
 #studio > .wrap > header.studio-header { grid-template-columns:minmax(0,1fr) 230px; gap:32px; }
}
@media(max-width:820px) {
 #studio > .wrap > header.studio-header { grid-template-columns:1fr; }
 #studio .zones { grid-column:1; }
 #studio.has-input .workspace-entry { grid-template-columns:1fr; }
}
@media(max-width:760px) {
 #studio.band { padding-top:30px; }
 #studio > .wrap,#studio:not(.has-input):not(.has-result) > .wrap { padding-inline:16px; }
 #studio > .wrap > header.studio-header { padding-bottom:24px; margin-bottom:20px; }
 #studio > .wrap > .workflow-rail,#studio.has-input .workflow-rail { display:grid; grid-template-columns:repeat(3,1fr); }
 #studio .workflow-rail li { padding:12px 8px; border-left:0; }
 #studio .workflow-rail li + li { border-left:1px solid var(--rule); }
 #studio .workflow-rail .workflow-number { width:28px; height:28px; }
 #studio .zone,#studio.has-input .zone { min-height:0; }
}
@media(prefers-reduced-motion:reduce) { #studio *,#studio *::before,#studio *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }


:root {
  --r-s: 8px;    /* small squares: the file icon, chips' inner parts */
  --r-m: 14px;   /* cards, tiles, inputs, board squares */
  --r-l: 22px;   /* panels, sheets, the menu tray */
  --bar-h: 60px;
}

/* ---------------------------------------------------------------- *
 * The top bar — the prototype's .bar, value for value
 * (design/prototype/candy-land.src.html). It sits 8px in from the edges,
 * where the prototype's page margin puts it.
 * ---------------------------------------------------------------- */
.cl-bar {
  position: relative; z-index: 60; flex-shrink: 0;
  display: flex; align-items: center; gap: var(--s-4);
  margin: var(--s-3) var(--s-3) 0;
  padding: 10px var(--s-5);
  background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  font: 400 15px/1.5 var(--f-ui);
  view-transition-name: chrome;
}
.cl-brand { flex: none; display: flex; align-items: center; gap: 10px; padding: var(--s-1); color: var(--ink); text-decoration: none; }
.cl-brand svg { width: 30px; height: 30px; flex: none; }
.cl-word { font: 800 19px/1 var(--f-display); letter-spacing: -.02em; }
/* Three tabs: the two places a student works, and Explore (the menu). */
.cl-tabs {
  flex: 0 1 auto; min-width: 0; margin-left: var(--s-3); display: flex; gap: var(--s-1); padding: var(--s-1);
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
}
.cl-tab {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 6px var(--s-4); border: 0; border-radius: 999px; background: none;
  color: var(--ink-dim); font: 700 14px/1.5 var(--f-ui); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s;
}
.cl-tab:hover { background: var(--surface-2); color: var(--ink); }
.cl-tab[aria-current="page"], .cl-tab.on { background: var(--ink); color: var(--surface); }
.cl-deckbtn[aria-expanded="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.cl-spacer { flex: 1; }
.cl-search {
  flex: none; display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--surface); color: var(--ink-dim);
  font: 400 15px/1.5 var(--f-ui); cursor: pointer;
}
.cl-search .sh-omnitext { font-size: 15px; }
.cl-search .sh-kbd { border: 0; border-radius: 6px; background: var(--surface-2); padding: var(--s-hair) var(--s-2); font: 600 11px var(--f-mono); color: var(--ink-faint); letter-spacing: 0; }
.cl-iconbtn {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--rule); border-radius: 50%;
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.cl-search:hover, .cl-iconbtn:hover { border-color: var(--ink-faint); }
/* The prototype's bar has no download button; the self-contained file is
   offered from the menu instead. */
.cl-bar .sh-release { display: none; }
@media (max-width: 640px) {
  .cl-bar { gap: var(--s-3); }
  .cl-word, .cl-search .sh-omnitext, .cl-search .sh-kbd { display: none; }
  .cl-search { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .cl-bar { flex-wrap: wrap; }
  .cl-tabs { order: 5; flex: 1 1 100%; margin-left: 0; }
  .cl-tab { flex: 1 1 0; padding: 7px var(--s-2); }
  .cl-bar #theme-toggle { display: none; }
}

/* ---------------------------------------------------------------- *
 * The menu — the prototype's .deck and .dcard
 * ---------------------------------------------------------------- */
.cl-deck { position: fixed; inset: 0; z-index: 150; font: 400 15px/1.5 var(--f-ui); }
.cl-deck[hidden] { display: none; }
.cl-scrim { position: absolute; inset: 0; background: var(--scrim); animation: cl-fade .18s both; }
.cl-tray {
  position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 64px);
  transform: translateX(-50%);
  width: min(880px, calc(100% - 32px));
  max-height: calc(100% - 80px); overflow-y: auto;
  padding: 18px;
  background: var(--raise); border: 1px solid var(--rule); border-radius: var(--r-l);
  box-shadow: var(--lift), inset 0 1px 0 var(--edge);
  animation: cl-drop .22s var(--ease-out) both;
}
.cl-trayhead { margin: 0 0 var(--s-4); font: 700 12px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.cl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cl-traynote { margin: calc(-1 * var(--s-2)) 0 var(--s-4); font: 400 13px/1.45 var(--f-ui); color: var(--ink-dim); }
.cl-card {
  position: relative; text-align: left; display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-4); border: 1px solid var(--rule); border-radius: var(--r-m);
  background: var(--surface-2); color: var(--ink); text-decoration: none;
  transition: transform .18s var(--ease-out), border-color .18s;
}
.cl-card:hover { transform: translateY(-2px); border-color: var(--ink-faint); }
.cl-card:active { transform: scale(.99); }
.cl-card[aria-current="page"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cl-card svg { width: 100%; height: auto; border-radius: 10px; background: var(--surface); }
.cl-card b { font: 700 16px/1.5 var(--f-ui); }
.cl-card small { font: 400 13px/1.35 var(--f-ui); color: var(--ink-dim); }
.cl-card small.cl-count { font: 400 13px/1.35 var(--f-mono); color: var(--ink-faint); }
.cl-card .sh-navindex { position: absolute; top: 10px; right: 10px; display: block; width: auto; font: 600 11px var(--f-mono); color: var(--ink-faint); }
.cl-cached { position: absolute; top: 14px; left: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); opacity: 0; transition: opacity .3s; }
.cl-card.ready .cl-cached, .cl-card[data-view="studio"] .cl-cached { opacity: 1; }
/* Every older reference view, one line under the five cards. */
.cl-more { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-4); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px dashed var(--rule); }
.cl-group { margin: 0; font: 700 11px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.cl-more a { color: var(--ink-dim); font: 600 13px/1.5 var(--f-ui); text-decoration: none; }
.cl-more a:hover, .cl-more a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.cl-more .sh-release-mobile { margin-left: auto; letter-spacing: 0; text-transform: none; }
.cl-more .sh-release-mobile[hidden] { display: none; }
.cl-more .sh-release-mobile:not([hidden]) { display: inline-flex; }
@media (max-width: 720px) {
  .cl-tray { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: 88%;
    border-radius: var(--r-l) var(--r-l) 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    animation: cl-rise .24s var(--ease-out) both; }
  .cl-cards { grid-template-columns: 1fr 1fr; }
}
@keyframes cl-fade { from { opacity: 0; } }
@keyframes cl-drop { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes cl-rise { from { opacity: .4; transform: translateY(40px); } }

/* ---------------------------------------------------------------- *
 * Changing views: the bar holds still, the content fades (§23.2)
 * ---------------------------------------------------------------- */
::view-transition-group(chrome) { animation: none; }
::view-transition-old(chrome) { display: none; }
::view-transition-new(chrome) { animation: none; }
::view-transition-old(root) { animation: cl-vt-out .14s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: cl-vt-in .24s var(--ease-out) .05s both; }
@keyframes cl-vt-out { to { opacity: 0; } }
@keyframes cl-vt-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------------------------------------------------------------- *
 * The frame: the rail is gone, so the view takes the width
 * ---------------------------------------------------------------- */
/*
 * One scroller, at every width: the viewport under the bar.
 *
 * The phone layout used to hand scrolling to the body (body overflow:auto,
 * viewport overflow:visible) while this rule, loaded later and unscoped,
 * clipped the app body — so on a phone nothing a finger could move was
 * scrollable, and only code (scrollIntoView, scrollTop) ever moved the page.
 * Every script already resets .sh-viewport on a view change, so it is the one
 * scroller everywhere. 100dvh keeps the frame to the visible area when a
 * phone's toolbars come and go; overscroll-behavior stops a flick at either
 * end from dragging the whole frame, bar included, with it.
 */
html, body { height: 100%; }
@supports (height: 100dvh) { html, body { height: 100dvh; } }
.sh-appbody { display: block; flex: 1; min-height: 0; overflow: hidden; }
.sh-viewport { height: 100%; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
/*
 * On a phone the page is the only vertical scroller. The course, faculty and
 * source tables each capped themselves at 26-40rem and scrolled inside that
 * box — most of a phone's screen — so a swipe that began on a table moved
 * the table's thousands of rows and the page seemed stuck. They grow to full
 * height here and keep only sideways scrolling. (The caps are inline styles
 * in the generator, hence !important.)
 */
@media (max-width: 60rem) {
  .sh-viewport .scroller { max-height: none !important; overflow-y: visible !important; }
}
/* The prototype's main: 1148px of content (1368px from 1440px up), 24px in
   from each edge on a phone, 20px under the bar. */
.sh-viewport > section.band, .sh-viewport > section.band:not(#studio) { padding: 20px 0 60px; }
.sh-viewport > section.band > .wrap, .sh-viewport > section.band:not(#studio) > .wrap { max-width: 1196px; padding-left: var(--s-6); padding-right: var(--s-6); padding-inline: var(--s-6); }
@media (min-width: 1440px) { .sh-viewport > section.band > .wrap, .sh-viewport > section.band:not(#studio) > .wrap { max-width: 1416px; } }

/* Search and the detail sheet, in the v4 materials */
.sh-palette { background: var(--scrim); padding-top: calc(var(--bar-h) + var(--s-3)); }
.sh-palettebox { background: var(--raise); border: 1px solid var(--rule); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--lift), inset 0 1px 0 var(--edge); }
.sh-pitem { border-left: 0; border-radius: 10px; margin: 0 var(--s-2); width: calc(100% - var(--s-4)); }
.sh-pitem.sel { background: var(--surface-2); }
.sh-detailscrim { background: var(--scrim); }
.sh-detailbody { background: var(--raise); border-left: 1px solid var(--rule); box-shadow: var(--lift); animation: cl-slide .24s var(--ease-out) both; }
@keyframes cl-slide { from { opacity: 0; transform: translateX(24px); } }
@media (max-width: 640px) {
  .sh-detailbody { top: auto; left: 0; width: 100%; max-height: 88%; border-left: 0; border-top: 1px solid var(--rule);
    border-radius: var(--r-l) var(--r-l) 0 0; animation: cl-rise .24s var(--ease-out) both; }
}

/* The front page (§6) is styled in board-views-css.js, which loads last. */

/* The download, kept one tap away while the result is scrolled */
#studio .dl-bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--s-4);
  margin: 0 calc(var(--s-5) * -1); padding: var(--s-3) var(--s-5);
  background: var(--rail); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule);
  box-shadow: inset 0 1px 0 var(--edge); animation: cl-bar-in .22s var(--ease-out) both;
}
#studio .dl-bar[hidden] { display: none; }
#studio .dl-bar { min-height: 56px; background: var(--raise); backdrop-filter: none; }
/* The review screen's own navigation is sticky too; it sits under the
   download bar while the bar is showing, and at the top otherwise. */
#studio-out .review-navigation { top: 0; }
#studio .dl-bar:not([hidden]) ~ #studio-out .review-navigation { top: 56px; }
#studio .dl-bar-name { flex: 1; min-width: 0; font: 600 13.5px var(--f-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#studio .dl-bar-go { flex: none; min-height: 40px; padding: 0 var(--s-5); border: 0; border-radius: 999px; background: var(--candy); color: var(--ink-on-fill); font: 800 14px var(--f-ui); cursor: pointer; }
#studio .dl-bar-go:disabled { opacity: .45; cursor: not-allowed; }
@keyframes cl-bar-in { from { transform: translateY(-100%); opacity: 0; } }

/* ---------------------------------------------------------------- *
 * Reference views (§7–10), restyled on the existing markup
 * ---------------------------------------------------------------- */
#studio .zone::before, #studio .zone::after { display: none; }

/* Section heads: the folio numerals and their hairline retire; the title is
   the display face at page size. */
.band > .wrap > header { display: block; }
.band > .wrap > header .folio { display: none; }
.band > .wrap > header .foliotext { border-left: 0; padding-left: 0; }
.band > .wrap > header .eyebrow { margin: 0 0 var(--s-2); font: 700 12px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.band > .wrap > header .display { margin: 0; font: 800 clamp(28px, 4.4vw, 42px)/1.04 var(--f-display); letter-spacing: -.022em; text-wrap: balance; }
.band > .wrap > header .prose { max-width: 64ch; font: 400 15.5px/1.55 var(--f-prose); color: var(--ink-dim); }

/* Grade splits: hue is the kind of work (never the accent); the bar is a
   candy stick on the shared 0-100 scale. */
.k-writing { background: var(--k-1); color: var(--k-1); }
.k-exam { background: var(--k-2); color: var(--k-2); }
.k-participation { background: var(--k-3); color: var(--k-3); }
.k-applied { background: var(--k-4); color: var(--k-4); }
.bar { position: relative; height: 26px; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface-2); }
.bar::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); top: 3px; height: 5px; border-radius: 999px; background: var(--paper); opacity: .38; pointer-events: none; }
.bar > div { border-right: 2px solid color-mix(in srgb, var(--paper) 55%, transparent); }
.bar.undoc { border: 2px dashed var(--ink-faint); background: var(--surface-2); }
.bar.undoc::after { display: none; }
.legend .sw { border-radius: 3px; }

/* Source tier is line style, never a fill: solid official, dashed rehosted,
   dotted student review. */
.tier { border-radius: 6px; font-family: var(--f-mono); letter-spacing: 0; text-transform: none; }
.tier-1 { background: transparent; color: var(--ink-dim); border: 1.5px solid var(--ink-faint); }
.tier-2 { background: transparent; border: 1.5px dashed var(--ink-faint); color: var(--ink-dim); }
.tier-3 { background: transparent; border: 1.5px dotted var(--ink-faint); color: var(--ink-dim); }

/* Materials: panels and cards round to the v4 steps */
.panel, .bd, .bucket, .program, .tierdef { border-radius: var(--r-l); }
.panel > header { border-radius: var(--r-l) var(--r-l) 0 0; }
.matrixwrap { border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--surface); }
.btn { border-radius: 999px; font-family: var(--f-ui); letter-spacing: 0; text-transform: none; font-weight: 700; }
.chip { border-radius: 999px; }
.chips li { border-radius: 999px; font-family: var(--f-mono); letter-spacing: 0; text-transform: none; }
.sh-viewport input[type="search"], .sh-viewport input[type="text"], .sh-viewport input[type="number"], .sh-viewport select { border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  #studio .runbtn { transition: none; }
  #studio .dl-bar { animation: none; }
  .cl-scrim, .cl-tray, .sh-detailbody { animation: none; }
  .cl-card, .cl-deckbtn .sh-ic { transition: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}


/* Page heads: the prototype's .head — title and one line side by side. */
.sh-viewport > section.v4-band:not(#studio) > .wrap > header.b-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-4) 20px; margin: 0 0 var(--s-5); padding: 0; border: 0; }
.sh-viewport > section.v4-band:not(#studio) > .wrap > header.b-head .b-title { margin: 0; font: 800 clamp(28px, 4.4vw, 42px)/1.04 var(--f-display); letter-spacing: -.022em; text-wrap: balance; color: var(--ink); }
.sh-viewport > section.v4-band:not(#studio) > .wrap > header.b-head p { margin: 0; max-width: 52ch; font: 400 15px/1.5 var(--f-ui); color: var(--ink-dim); }
.v4-band .b-headslot:empty { display: none; }
.v4-root { min-width: 0; font: 400 15px/1.5 var(--f-ui); color: var(--ink); }
.b-mono { font-family: var(--f-mono); }
.b-sub { margin: var(--s-6) 0 var(--s-2); font: 700 12px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.b-lede { margin: var(--s-3) 0 0; color: var(--ink-dim); max-width: 62ch; }
.b-quote { margin: 0; font-size: 13px; color: var(--ink-dim); font-style: italic; line-height: 1.45; }
.b-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-l); }

.b-seg { display: inline-flex; padding: var(--s-1); border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); }
.b-seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font: 700 15px/1.5 var(--f-ui); color: var(--ink-dim); cursor: pointer; }
.b-seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.b-seg .b-sh { display: none; }

.b-tier { display: inline-block; font: 600 10.5px/1 var(--f-mono); padding: var(--s-hair) var(--s-2); border-radius: 6px; border: 1.5px solid currentColor; color: var(--ink-faint); font-style: normal; vertical-align: 1px; white-space: nowrap; }
.b-tier.b-t1 { border-style: solid; } .b-tier.b-t2 { border-style: dashed; } .b-tier.b-t3 { border-style: dotted; }

.b-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font: 600 13px/1.5 var(--f-ui); color: var(--ink); border: 1px solid transparent; }
.b-chip i { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.b-chip .b-mono { color: var(--ink-faint); font-size: 12px; }
button.b-chip { border-color: var(--rule); cursor: pointer; min-height: 32px; }
button.b-chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
button.b-chip[aria-pressed="true"] .b-mono { color: inherit; opacity: .75; }

.b-go { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3); min-height: 40px; padding: 0 var(--s-5); border-radius: 999px; border: 0; background: var(--ink); color: var(--surface); font: 700 14px var(--f-ui); cursor: pointer; }
.b-class-who { margin: var(--s-1) 0 var(--s-3); font: 600 15px/1.4 var(--f-ui); color: var(--ink-dim); }
.b-class-note { margin: var(--s-2) 0; font: 400 13px/1.5 var(--f-ui); color: var(--ink-dim); }
.b-class-go { margin: var(--s-5) 0 0; }
.b-sheet .cl-path { margin: var(--s-2) 0 var(--s-4); }
.b-sheet .cl-path li span { display: none; }
.b-sheet .cl-path li.on span, .b-sheet .cl-path li.stuck span, .b-sheet .cl-path li.castle.done span { display: inline; }
.b-go.b-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--rule); }
.b-link { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; font: inherit; cursor: pointer; }

/* ---------- degree map ---------- */
.b-boardtop { display: grid; grid-template-columns: 1fr auto; gap: var(--s-5); align-items: center; padding: var(--s-5); border-bottom: 1px dashed var(--rule); }
.b-tube { position: relative; height: 14px; border-radius: 999px; background: var(--surface-2); border: 1.5px solid var(--ink); overflow: hidden; }
.b-tube i { position: absolute; inset: 0 auto 0 0; width: 0; background: repeating-linear-gradient(-45deg, var(--k-2) 0 8px, color-mix(in srgb, var(--k-2) 55%, var(--surface)) 8px 16px); transition: width .5s var(--ease-out); }
.b-tubelab { display: flex; flex-wrap: wrap; gap: var(--s-hair) var(--s-4); justify-content: space-between; margin-top: var(--s-2); font-size: 13px; color: var(--ink-dim); }
.b-tubelab b { color: var(--ink); } .b-tubelab span { white-space: nowrap; }
.b-bigcr { font: 800 40px/1 var(--f-display); letter-spacing: -.03em; color: var(--ink); }
.b-bigcr small { font: 600 13px var(--f-mono); color: var(--ink-faint); margin-left: var(--s-1); }
.b-board { position: relative; padding: var(--s-3) var(--s-2); }
.b-board svg { display: block; width: 100%; height: auto; overflow: visible; }
.b-tile { cursor: pointer; outline: none; }
.b-tile:hover .b-face, .b-tile:focus-visible .b-face { stroke: var(--ink) !important; stroke-width: 3; }
.b-tile text { pointer-events: none; }
.b-pop .b-face { transform-box: fill-box; transform-origin: center; animation: b-pop .32s var(--ease-pop); }
@keyframes b-pop { from { transform: scale(.7); } }
.b-legend { display: flex; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-4) var(--s-5) var(--s-5); border-top: 1px dashed var(--rule); }
.b-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); margin-top: var(--s-4); }
.b-post { position: relative; padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5); border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--rule); }
.b-st { display: inline-flex; align-items: center; gap: var(--s-2); font: 700 11px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--s-2); }
.b-st i { width: 9px; height: 9px; border-radius: 50%; }
.b-post.b-done { opacity: .62; }
.b-post p { margin: 0 0 var(--s-3); font-weight: 600; line-height: 1.4; color: var(--ink); }
.b-post p.b-quote { font-weight: 400; color: var(--ink-dim); }

/* sheets */
.b-sheet { padding-top: var(--s-1); }
.b-grab { display: none; }
.b-kicker { margin: 0 0 var(--s-2); font: 600 12px var(--f-mono); color: var(--ink-faint); }
.b-h { margin: 0; font: 800 28px/1.08 var(--f-display); letter-spacing: -.025em; text-wrap: balance; color: var(--ink); }
.b-opt { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); align-items: center; width: 100%; padding: var(--s-4); border-radius: var(--r-m); border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.b-opt + .b-opt { margin-top: var(--s-3); }
.b-opt b { font: 700 13.5px var(--f-mono); }
.b-opt .b-t { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.b-meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.b-meta span { font: 600 11px var(--f-mono); padding: var(--s-hair) var(--s-2); border-radius: 6px; background: var(--surface); color: var(--ink-dim); }
.b-opt.b-fogged { position: relative; overflow: hidden; }
.b-opt.b-fogged::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, var(--fog)); pointer-events: none; }
.b-opt[aria-pressed="true"] { border: 2px solid var(--ink); }
.b-opt:disabled { opacity: .5; cursor: not-allowed; }
.b-ev { padding: var(--s-3) 0; border-top: 1px dashed var(--rule); }
.b-evk { display: flex; justify-content: space-between; gap: var(--s-3); font-weight: 700; font-size: 14px; color: var(--ink); }
.b-ev p { margin: var(--s-1) 0 0; font-size: 13.5px; color: var(--ink-dim); }
.b-ev p.b-support { margin-top: var(--s-2); padding-left: var(--s-3); border-left: 2px solid var(--rule-strong); font: 500 12.5px/1.45 var(--f-mono); color: var(--ink-dim); overflow-wrap: anywhere; }
.b-ev p.b-nosupport { border-left-style: dashed; color: var(--ink-faint); }
.b-live-note { color: var(--ink-dim); font-size: 13px; line-height: 1.5; }
.b-live-section { margin-top: var(--s-3); padding: var(--s-3); border: 1px dotted var(--rule-strong); border-radius: var(--r-m); }
.b-live-section summary { cursor: pointer; font-weight: 700; }
.b-live-section summary small { margin-left: var(--s-2); color: var(--ink-faint); font: 600 11px var(--f-mono); }
.b-live-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-dim); line-height: 1.5; }
.b-live-sources { padding-left: var(--s-5); overflow-wrap: anywhere; }
.b-live-sources li { margin-top: var(--s-2); font-size: 13px; }
.b-live-sources a { color: var(--ink); }
.b-live-sources span { color: var(--ink-faint); font: 600 11px var(--f-mono); }
.b-live-list { margin-bottom: var(--s-5); padding: var(--s-4); border: 1px dotted var(--rule-strong); border-radius: var(--r-m); }
.b-live-list .b-sub { margin-top: 0; }
.b-pillrow { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.b-pill { font: 600 12px var(--f-mono); padding: var(--s-1) var(--s-3); border-radius: 999px; background: var(--surface-2); border: 1px solid var(--rule); color: var(--ink); }
button.b-pill { cursor: pointer; min-height: 32px; }
button.b-pill:hover { border-color: var(--ink-faint); }
.b-pillrow .b-go { min-height: 36px; font-size: 13px; }
.b-rate { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-4) 0 var(--s-3); font-size: 13.5px; color: var(--ink-dim); line-height: 1.5; }
.b-rate b { color: var(--ink); }

/* ---------- faculty cards ---------- */
.b-tools { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-bottom: var(--s-4); }
.b-field { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); min-width: 0; flex: 1 1 220px; max-width: 340px; color: var(--ink-faint); }
.b-field input, .b-field input:focus { border: 0; background: none; outline: none; width: 100%; min-width: 0; min-height: 0; padding: 0; font: 15px var(--f-ui); color: var(--ink); }
.b-field svg { width: 16px; height: 16px; flex: none; }
.b-field:focus-within { border-color: var(--ink); }
.b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: var(--s-4); }
.b-card { position: relative; text-align: left; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-m); background: var(--surface); color: var(--ink); border: 2px solid var(--ink-faint); font: inherit; cursor: pointer; transition: transform .18s var(--ease-out), border-color .18s; content-visibility: auto; contain-intrinsic-size: auto 250px; }
.b-card.b-t1 { border-style: solid; } .b-card.b-t2 { border-style: dashed; } .b-card.b-t3 { border-style: dotted; }
.b-card:hover { transform: translateY(-2px); border-color: var(--ink); }
.b-top { display: flex; justify-content: space-between; gap: var(--s-3); align-items: start; }
.b-who { min-width: 0; display: flex; flex-direction: column; }
.b-dept { font: 600 11px var(--f-mono); color: var(--ink-faint); letter-spacing: .04em; }
.b-name { margin-top: var(--s-hair); font: 800 18px/1.15 var(--f-ui); text-wrap: balance; }
.b-rank { font-size: 12.5px; color: var(--ink-dim); line-height: 1.3; margin-top: var(--s-hair); }
.b-score { flex: none; text-align: center; min-width: 62px; padding: var(--s-2) var(--s-2) var(--s-1); border-radius: 10px; background: var(--surface-2); }
.b-score b { display: block; font: 800 28px/1 var(--f-display); letter-spacing: -.03em; color: var(--ink); }
.b-score span { display: block; font: 600 11px var(--f-mono); color: var(--ink-faint); margin-top: var(--s-1); }
.b-score.b-thin b { color: var(--ink-faint); }
.b-score.b-none { background: none; border: 1.5px dashed var(--rule); }
.b-score.b-none b { font-size: 22px; color: var(--ink-faint); }
.b-traits { display: grid; gap: var(--s-1); margin: 0; padding: 0; list-style: none; }
.b-traits li { display: grid; grid-template-columns: 18px 1fr auto; gap: var(--s-3); align-items: center; font-size: 13px; color: var(--ink-dim); }
.b-traits svg { width: 16px; height: 16px; color: var(--ink-dim); }
.b-v { font-weight: 700; text-align: right; color: var(--ink); }
.b-pips { display: inline-flex; gap: var(--s-1); }
.b-pips i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-dim); }
.b-pips i.b-on { background: var(--ink-dim); }
.b-srt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.b-fogline { position: relative; font-size: 12px; color: var(--ink-faint); padding: var(--s-2) var(--s-3); border-radius: 10px; overflow: hidden; background: repeating-linear-gradient(90deg, transparent 0 6px, color-mix(in srgb, var(--ink-faint) 8%, transparent) 6px 7px), var(--surface-2); }
.b-fogline::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 20% 50%, var(--fog), transparent 70%), radial-gradient(50% 140% at 80% 40%, var(--fog), transparent 70%); filter: blur(2px); }
.b-fogline span { position: relative; }
.b-ministick { display: flex; height: 12px; border-radius: 999px; overflow: hidden; border: 1.5px solid var(--ink); }
.b-ministick i { height: 100%; }
.b-divider { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-6) 0 var(--s-4); color: var(--ink-faint); }
.b-divider::before, .b-divider::after { content: ""; flex: 1; border-top: 1px dashed var(--rule); }
.b-divider b { font: 800 20px var(--f-display); letter-spacing: -.02em; color: var(--ink-dim); }
.b-foggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
.b-ghost:not(.b-go) { position: relative; text-align: left; padding: var(--s-3) var(--s-4); border-radius: 10px; border: 1.5px dashed var(--rule); background: var(--surface-2); color: var(--ink-dim); font: 600 13.5px var(--f-ui); overflow: hidden; cursor: pointer; }
.b-ghost:not(.b-go)::after { content: ""; position: absolute; inset: -10px; background: radial-gradient(40% 80% at 30% 40%, var(--fog), transparent 70%), radial-gradient(50% 70% at 75% 70%, var(--fog), transparent 70%); filter: blur(6px); pointer-events: none; }
.b-ghost small { display: block; font: 500 11px var(--f-mono); color: var(--ink-faint); }
.b-empty { padding: var(--s-6); text-align: center; color: var(--ink-dim); border: 1.5px dashed var(--rule); border-radius: var(--r-m); }

/* ---------- grade splits ---------- */
.b-k-w { background-color: var(--k-1); } .b-k-e { background-color: var(--k-2); }
.b-k-p { background-color: var(--k-3); } .b-k-a { background-color: var(--k-4); }
.b-key { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-4); }
.b-hatchsw { background-image: repeating-linear-gradient(-45deg, var(--seg-ink) 0 2px, transparent 2px 5px); }
.b-clear { border: 1.5px dashed var(--ink-faint); background: none; }
.b-shelf { padding: var(--s-5); border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--rule); margin-bottom: var(--s-4); }
.b-shelf h3 { margin: 0 0 var(--s-hair); font: 800 17px var(--f-ui); color: var(--ink); }
.b-shelf h3 .b-mono { font-size: 14px; color: var(--ink-faint); margin-right: var(--s-3); }
.b-rows { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.b-srow { display: grid; grid-template-columns: minmax(150px, 210px) 1fr 34px; gap: var(--s-4); align-items: center; }
.b-srow > * { min-width: 0; }
.b-who2 b { display: block; font-size: 14px; line-height: 1.2; color: var(--ink); }
.b-who2 span { font-size: 12px; color: var(--ink-faint); }
.b-stick { position: relative; display: flex; height: 30px; border-radius: 999px; border: 2px solid var(--ink); overflow: hidden; background: var(--surface-2); }
.b-stick i { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; font: 600 11px var(--f-mono); font-style: normal; color: var(--seg-ink); border-right: 2px solid color-mix(in srgb, var(--paper) 55%, transparent); min-width: 0; overflow: hidden; white-space: nowrap; }
.b-stick i:last-child { border-right: 0; }
.b-stick i.b-k-p { color: var(--seg-ink-p); }
.b-stick::after { content: ""; position: absolute; left: 8px; right: 8px; top: 4px; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 35%, transparent); pointer-events: none; }
.b-stick.b-hatch i { background-image: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--paper) 34%, transparent) 0 3px, transparent 3px 8px); }
.b-stick.b-fog { border-style: dashed; border-color: var(--ink-faint); }
.b-stick.b-fog::after { display: none; }
.b-stick.b-fog span { position: relative; z-index: 1; display: flex; align-items: center; min-width: 0; flex: 1 1 auto; padding: 0 var(--s-4); font-size: 12px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-pick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--rule); background: var(--surface); color: var(--ink); display: grid; place-items: center; font: 700 12px var(--f-mono); cursor: pointer; }
.b-pick[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.b-h2h { position: sticky; top: var(--s-3); z-index: 5; margin-bottom: var(--s-5); padding: var(--s-4) var(--s-5); border-radius: var(--r-l); background: var(--raise); box-shadow: var(--lift), inset 0 1px 0 var(--edge); border: 2px solid var(--ink); }
.b-h2h:empty { display: none; }
.b-vs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); margin-top: var(--s-3); }
.b-cell { padding: var(--s-3); border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-dim); }
.b-cell b { display: block; font: 600 15px var(--f-mono); color: var(--ink); }
.b-cell i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: var(--s-2); }
.b-lines { display: grid; gap: var(--s-3); }
.b-lines > div { display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3); align-items: center; }
.b-tag { font: 700 12px var(--f-mono); text-align: center; color: var(--ink); }

/* ---------- coverage ---------- */
.b-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-5); }
.b-stat { padding: var(--s-4) var(--s-5); border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--rule); }
.b-stat b { display: block; font: 800 34px/1 var(--f-display); letter-spacing: -.03em; color: var(--ink); }
.b-stat span { font-size: 13px; color: var(--ink-dim); }
.b-dots { display: flex; flex-wrap: wrap; gap: var(--s-1); padding: var(--s-5); border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--rule); }
.b-dots button { width: 18px; height: 18px; border-radius: 4px; border: 0; padding: 0; cursor: pointer; }
.b-m3 { background: var(--ink); } .b-m2 { background: var(--ink-faint); } .b-m1 { background: var(--rule-strong); }
.b-m0 { background: var(--surface-2); outline: 1.5px solid var(--rule); outline-offset: -1.5px; }
.b-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3); }
.b-list li { padding: var(--s-3) var(--s-4); border-radius: 10px; background: var(--surface); border: 1px solid var(--rule); font-size: 14px; color: var(--ink); }
.b-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }

/* ---------- placeholders while a view builds ---------- */
.b-sk { display: block; border-radius: var(--r-s); background: var(--surface-2); animation: b-shim 1.2s ease-in-out infinite alternate; }
@keyframes b-shim { to { opacity: .55; } }
.b-skc { pointer-events: none; border-color: var(--rule) !important; border-style: solid !important; }
.b-skc .b-sk + .b-sk { margin-top: var(--s-1); }

/* ---------- settings ---------- */
.b-setrows { display: grid; margin-top: var(--s-4); }
.b-setrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); padding: var(--s-4) 0; border-top: 1px dashed var(--rule); }
.b-setrow > span { flex: 1 1 200px; min-width: 0; }
.b-setrow b { display: block; font-size: 14.5px; color: var(--ink); }
.b-setrow small { display: block; color: var(--ink-dim); font-size: 13px; line-height: 1.4; margin-top: var(--s-hair); }
.b-setrow input, .b-setrow select { flex: 1 1 180px; max-width: 240px; min-height: 40px; padding: 0 var(--s-3); border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: 14px var(--f-ui); }

/* ---------- app layer ---------- */
.b-toasts { position: fixed; left: 50%; bottom: calc(var(--s-5) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; display: grid; gap: var(--s-3); width: min(440px, calc(100% - 32px)); pointer-events: none; view-transition-name: toasts; }
.b-toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) var(--s-4) var(--s-3) var(--s-5); border-radius: var(--r-m); background: var(--ink); color: var(--surface); font: 600 14px var(--f-ui); animation: b-in .26s var(--ease-pop); }
.b-toast button, .b-coach button { flex: none; border: 0; border-radius: var(--r-s); padding: var(--s-2) var(--s-4); background: color-mix(in srgb, var(--surface) 16%, transparent); color: inherit; font: 800 13px var(--f-ui); cursor: pointer; }
.b-toast > span { flex: 1; }
.b-toast .b-toast-x { padding: var(--s-1) var(--s-3); background: none; font-size: 16px; line-height: 1; opacity: .8; }
.b-toast .b-toast-x:hover { opacity: 1; background: color-mix(in srgb, var(--surface) 16%, transparent); }
.b-toast button:focus-visible { outline: 2px solid var(--surface); outline-offset: 2px; }
.b-toast.b-out, .b-coach.b-out { animation: b-away .2s ease forwards; }
@keyframes b-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes b-away { to { opacity: 0; transform: translateY(8px); } }
::view-transition-group(toasts) { animation: none; }
.b-coach { position: relative; z-index: 2; display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-3); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); border-radius: var(--r-m); background: var(--ink); color: var(--surface); font: 500 13.5px var(--f-ui); animation: b-in .3s var(--ease-pop) .4s backwards; }
.b-coach::before { content: ""; position: absolute; left: 22px; top: -6px; width: 12px; height: 12px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
.b-spin { animation: b-turn .9s var(--ease-out); }
@keyframes b-turn { to { transform: rotate(360deg); } }
.cl-mint { flex: none; }
body:has(#studio.is-working) .cl-mint { animation: b-turn 1.6s linear infinite; }

/* ================================================================ *
 * The front page — the prototype's workspace (#p-work), rule for rule.
 * Earlier stylesheets (now merged into app-css.js) laid this page out several
 * times over by ID; the first two rules match their most specific selectors
 * so that this file, loaded last, is the one that paints.
 * ================================================================ */
#studio > .wrap, #studio:not(.has-input):not(.has-result) > .wrap {
  display: block; width: auto; max-width: 1196px; margin: 0 auto; padding: 0 var(--s-6); grid-template-columns: none; gap: 0;
}
@media (min-width: 1440px) { #studio > .wrap, #studio:not(.has-input):not(.has-result) > .wrap { max-width: 1416px; } }
#studio .w-work, #studio:not(.has-input):not(.has-result) .w-work, #studio.has-input .w-work {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start;
  grid-column: auto; grid-row: auto; flex-direction: row; padding: 0; margin: 0; width: auto; max-width: none;
}
@media (min-width: 1440px) {
  #studio .w-work, #studio:not(.has-input):not(.has-result) .w-work, #studio.has-input .w-work { grid-template-columns: minmax(0, 1fr) 330px 330px; }
}
@media (max-width: 900px) {
  #studio .w-work, #studio:not(.has-input):not(.has-result) .w-work, #studio.has-input .w-work { grid-template-columns: 1fr; }
}
#studio.has-result:not(.editing-inputs) .w-work { display: none; }
#studio.has-result.editing-inputs .w-work { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 760px; margin: 0 auto var(--s-7); }
#studio.has-result.editing-inputs .w-aside { display: none; }
.w-wide { display: none; }
@media (min-width: 1440px) { #studio .w-wide { display: grid; } }
#studio .w-sr { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }

html body .sh-viewport > section#studio.band { padding: 20px 0 60px; }
/* the head: eyebrow and the three steps on one line, then the headline */
#studio > .wrap > header.studio-header { display: block; grid-template-columns: none; gap: 0; padding: 0; margin: 0 0 var(--s-5); border: 0; }
#studio > .wrap > header.studio-header > * { grid-column: auto; }
#studio .studio-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
#studio .studio-top .eyebrow { margin: 0; font: 700 12px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--sherbet-text); }
#studio .studio-header h2.display {
  margin: 0; max-width: 24ch;
  font: 800 clamp(28px, 3.8vw, 44px)/1.06 var(--f-display); letter-spacing: -.022em; word-spacing: .04em;
  text-wrap: balance; color: var(--ink);
}
#studio .studio-header .lede { margin: 10px 0 0; max-width: 62ch; font: 400 16px/1.5 var(--f-ui); color: var(--ink-dim); text-wrap: pretty; }
#studio .workflow-rail, #studio.has-input .workflow-rail, #studio:not(.has-input) .workflow-rail {
  display: flex; align-items: center; gap: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; list-style: none; overflow: visible; grid-template-columns: none;
}
#studio .workflow-rail li, #studio .workflow-rail li + li { flex: none; display: flex; align-items: center; gap: var(--s-3); padding: 0; border: 0; background: none; min-width: 0; }
#studio .workflow-rail li::after { display: none; }
#studio .workflow-rail li + li::before { content: ""; position: static; flex: none; width: 28px; height: 3px; border-radius: 2px; background: var(--road); margin: 0 var(--s-3); }
#studio .workflow-rail .workflow-number {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-s);
  border: 2px solid var(--rule); background: var(--surface); color: var(--ink-faint); font: 700 12px var(--f-mono);
}
#studio .workflow-rail strong { font: 700 13.5px var(--f-ui); color: var(--ink-faint); }
#studio .workflow-rail div > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#studio .workflow-rail li[aria-current="step"] { background: none; }
#studio .workflow-rail li[aria-current="step"] strong { color: var(--ink); }
#studio .workflow-rail li[aria-current="step"] .workflow-number { background: var(--ink); border-color: var(--ink); color: var(--surface); }
#studio .workflow-rail li.done .workflow-number { background: var(--b-elect); border-color: var(--tile-ink); color: var(--tile-ink); }

/* the composer: one panel */
#studio .w-main { min-width: 0; }
#studio .w-composer { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-l); overflow: hidden; overflow: clip; }
/* Create stays in reach while the brief is long: the button row sticks to the
   bottom of the screen until the composer ends. overflow: clip (not hidden)
   above keeps the composer from becoming the row's scroll container. */
@media (min-width: 641px) {
  #studio .w-cta { position: sticky; bottom: 0; z-index: 4; box-shadow: 0 -1px 0 var(--rule); }
}
#studio .w-drop { position: relative; padding: 18px 18px var(--s-4); }
#studio .w-drop.over::after { content: "Drop to attach"; position: absolute; inset: var(--s-3); display: grid; place-items: center; border: 2px dashed var(--ink); border-radius: var(--r-m); background: color-mix(in srgb, var(--surface) 88%, transparent); font: 800 18px var(--f-ui); color: var(--ink); }
#studio .w-drop.is-reading::after { content: "Reading…"; position: absolute; inset: var(--s-3); display: grid; place-items: center; border-radius: var(--r-m); background: color-mix(in srgb, var(--surface) 80%, transparent); font: 700 15px var(--f-ui); color: var(--ink-dim); }
#studio .w-hl { position: relative; }
#studio .w-hlback, #studio .w-hl textarea#paste-text {
  font: 400 16px/1.55 var(--f-ui); letter-spacing: normal; padding: 0; margin: 0;
  white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
}
#studio .w-hlback { position: absolute; inset: 0; color: transparent; overflow: hidden; pointer-events: none; }
#studio .w-hlback mark { color: transparent; border-radius: 4px; padding: 0; }
#studio .w-hl textarea#paste-text {
  position: relative; display: block; width: 100%; min-height: 190px; resize: vertical;
  border: 0; border-radius: 0; background: transparent; outline: none; box-shadow: none; color: var(--ink);
}
#studio .w-hl textarea#paste-text::placeholder { color: var(--ink-faint); }
#studio .w-hl textarea#paste-text:focus, #studio .w-hl textarea#paste-text:focus-visible { border: 0; box-shadow: none; outline: none; }
#studio .w-composer:focus-within { border-color: var(--rule-strong); }
#studio .b-coach { position: absolute; left: var(--s-5); bottom: 10px; margin: 0; max-width: calc(100% - 32px); }

#studio .w-dropbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: 10px 14px; border-top: 1px dashed var(--rule); background: var(--surface-2); }
#studio .w-file { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
#studio .w-attach {
  display: inline-flex; order: 0; margin: 0; min-height: 0; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 700 13.5px/1.5 var(--f-ui); cursor: pointer;
}
#studio .w-attach[hidden] { display: none; }
#studio #file-camera, #studio .w-camera { display: none; }
@media (pointer: coarse) {
  #studio #file-camera { display: block; }
  #studio .w-camera { display: inline-flex; min-height: 44px; }
}
#studio .w-attach:hover { border-color: var(--ink-faint); }
#studio .w-file:focus-visible + .w-attach { outline: 3px solid var(--focus); outline-offset: 2px; }
#studio .w-status { margin: 0; font: 600 12.5px var(--f-ui); color: var(--ink-dim); }
#studio .w-status:not(.ok):not(.err):not(.warn) { display: none; }
#studio .w-status.err { color: var(--stop); } #studio .w-status.warn { color: var(--warn); }
#studio .w-hint { margin-left: auto; font: 400 12.5px var(--f-ui); color: var(--ink-faint); }
#studio .filemanifest { margin: 0; padding: var(--s-3) 18px; border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: var(--surface); }

#studio .w-sec, #studio .assignment-brief, #studio .detectbox { margin: 0; padding: var(--s-5) 18px; border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: transparent; }
#studio .w-sec[hidden] { display: block; }
#studio .w-sec h3 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-1) var(--s-3); margin: 0 0 10px; font: 700 12px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
#studio .w-sec h3 span { letter-spacing: 0; text-transform: none; font-weight: 500; }
#studio .w-reset { border: 0; background: none; padding: 0; font: 600 12px var(--f-ui); letter-spacing: 0; text-transform: none; color: var(--ink-dim); text-decoration: underline; cursor: pointer; }
#studio .w-reset[hidden] { display: none; }
#studio .w-brief { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#studio .w-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#studio .w-bf { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; --hue: var(--rule); }
#studio .w-bf label, #studio .w-label { display: block; font: 700 12.5px/1.5 var(--f-ui); color: var(--ink-dim); letter-spacing: 0; text-transform: none; }
#studio .w-bf input, #studio .w-bf select, #studio .w-sel {
  width: 100%; min-width: 0; min-height: 0; height: auto; padding: 9px 10px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: 400 14px/1.5 var(--f-ui); box-shadow: none;
}
#studio .w-sel { appearance: auto; -webkit-appearance: menulist; }
#studio .w-bf input:focus, #studio .w-sel:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent); }
#studio .w-bf small { font: 600 10.5px/1.5 var(--f-mono); color: var(--ink-faint); }
#studio .w-bf small.det { color: var(--k-1); }
#studio .w-bf small.set { color: var(--ok); }
#studio #bfw-kind { --hue: var(--b-thought); } #studio #bfw-length { --hue: var(--b-core); } #studio #bfw-style { --hue: var(--b-elect); } #studio #bfw-due { --hue: var(--b-methods); }
#studio .w-bf.det label::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: var(--s-2); background: var(--hue); vertical-align: 0; }
#studio .w-bf.det input { border-color: color-mix(in srgb, var(--k-1) 50%, var(--rule)); background: color-mix(in srgb, var(--k-1) 5%, var(--surface)); }
#studio .w-why { font: 400 12.5px/1.45 var(--f-ui); color: var(--ink-faint); }
#studio .w-why { display: none; }
#studio .w-why ul { margin: 10px 0 0; padding-left: var(--s-5); }
#studio .w-why p { margin: 10px 0 0; }
#studio .intentbox { margin: 0; padding: var(--s-4) 18px; border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: var(--surface); }

#studio .w-cta, #studio .runrow { display: flex; flex-wrap: wrap; flex-direction: row; align-items: flex-end; gap: var(--s-4); margin: 0; padding: var(--s-5) 18px; border-top: 1px solid var(--rule); background: var(--surface-2); }
#studio .w-cta .w-name { flex: 1 1 100%; }
/* The file's details, folded to one line: the type and whose name is on it. */
#studio .w-opts { flex: 1 1 100%; }
#studio .w-opts > summary { display: flex; align-items: baseline; gap: var(--s-3); cursor: pointer; list-style: none; color: var(--ink-dim); font: 600 13.5px/1.5 var(--f-ui); }
#studio .w-opts > summary::-webkit-details-marker { display: none; }
#studio .w-opts-change { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
#studio .w-opts[open] .w-opts-change { display: none; }
#studio .w-opts-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-4); margin-top: var(--s-3); }
#studio .w-opts > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r-s); }
#studio .w-cta .w-fmtwrap { flex: 0 0 auto; }
#studio .w-fmt { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--rule); }
#studio .w-fmt button { border: 0; background: none; padding: 7px var(--s-4); border-radius: 10px; font: 700 13.5px/1.5 var(--f-ui); color: var(--ink-dim); cursor: pointer; }
#studio .w-fmt button:hover:not([aria-pressed="true"]) { color: var(--ink); }
#studio .w-fmt button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
#studio .w-create, #studio .w-create.runbtn {
  order: 0; flex: 1 1 240px; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 0; min-height: 0; height: auto; padding: 14px 20px; border: 0; border-radius: var(--r-m);
  background: var(--ink); color: var(--surface); box-shadow: none;
  font: 800 16px/1.5 var(--f-ui); letter-spacing: -.01em; text-transform: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
#studio .w-create:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--lift); background: var(--ink); }
#studio .w-create:active:not(:disabled) { transform: none; box-shadow: none; }
#studio .w-create:disabled { opacity: .38; cursor: not-allowed; }
#studio .w-create kbd { font: 600 11px var(--f-mono); padding: var(--s-hair) var(--s-2); border-radius: 6px; background: color-mix(in srgb, var(--surface) 18%, transparent); }
#studio .w-policy { margin: 10px var(--s-hair) 0; font: 400 12.5px/1.5 var(--f-ui); color: var(--ink-faint); }
#studio .w-policy a { display: inline-block; padding: var(--s-2) 0; color: var(--ink-dim); text-underline-offset: 3px; }
#studio .policybanner { display: none; }
#studio .studioerr { margin: var(--s-3) 0 0; }
#studio .settings { margin: var(--s-3) 0 0; border: 0; border-radius: 0; background: none; }
#studio .settings > summary { padding: var(--s-1) var(--s-hair); font: 600 12.5px var(--f-ui); letter-spacing: 0; text-transform: none; color: var(--ink-faint); cursor: pointer; }
#studio .settings[open] { padding: var(--s-4); border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--surface); }

/* the aside: the grader card, then files and what you get back */
#studio .w-aside, #studio .workspace-perspective, #studio:not(.has-input) .workspace-perspective { display: grid; gap: 14px; position: sticky; top: var(--s-4); padding: 0; border: 0; }
#studio .w-aside[hidden] { display: none; }
@media (max-width: 900px) { #studio .w-aside, #studio .workspace-perspective { position: static; } }
#studio .w-gcard, #studio .context-card { text-align: left; padding: var(--s-5); border: 1.5px dashed var(--rule); border-radius: var(--r-l); background: var(--surface); }
#studio .w-gcard.rich { border: 2px solid var(--ink-faint); }
#studio .w-gcard.w-t1 { border-style: solid; } #studio .w-gcard.w-t2 { border-style: dashed; } #studio .w-gcard.w-t3 { border-style: dotted; }
#studio .w-gcard .eyebrow { margin: 0 0 10px; font: 700 11px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
#studio .w-gcard > h3 { margin: 0; font: 800 20px/1.1 var(--f-display); letter-spacing: -.02em; color: var(--ink-faint); }
#studio .w-gcard.rich > h3, #studio .w-gcard.rich #context-empty { display: none; }
#studio .w-gcard #context-empty { margin: var(--s-3) 0 0; font: 400 13.5px/1.5 var(--f-ui); color: var(--ink-dim); }
#studio .w-gtop { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
#studio .w-gtop h3 { margin: 0; font: 800 20px/1.1 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
#studio .w-gsub { margin-top: 3px; font: 400 12.5px/1.4 var(--f-ui); color: var(--ink-dim); }
#studio .w-gtraits { margin-top: var(--s-4); }
#studio .w-gsplit { margin-top: var(--s-4); }
#studio .w-gsplit .b-dept { margin-top: var(--s-1); }
#studio .w-level { display: inline-flex; align-items: center; gap: var(--s-2); margin-top: 10px; padding: var(--s-1) 9px; border-radius: 999px; background: var(--surface-2); font: 700 12px var(--f-ui); color: var(--ink); }
#studio .w-level i { width: 8px; height: 8px; border-radius: 50%; }
#studio .w-gnote { margin: 10px 0 0; font: 400 13px/1.45 var(--f-ui); color: var(--ink-dim); }
#studio .w-gcard .evidence { margin-top: var(--s-4); padding: 0; border: 0; background: none; }
#studio .w-gcard.rich .evidence-person, #studio .w-gcard.rich .evidence-stats { display: none; }
#studio .w-gcard .evidence-details summary { font: 600 12.5px var(--f-ui); color: var(--ink-dim); cursor: pointer; }

#studio .w-gets { padding: var(--s-5); border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--rule); }
#studio .w-nofiles { display: grid; grid-template-columns: 64px 1fr; gap: var(--s-4); align-items: center; font: 400 13px/1.45 var(--f-ui); color: var(--ink-dim); }
#studio .w-nofiles[hidden] { display: none; }
#studio .w-nofiles svg { width: 64px; height: 48px; }
#studio .w-nofiles b { display: block; font: 700 14px/1.4 var(--f-ui); color: var(--ink); }
#studio .your-files { margin: 0; }
#studio .w-fhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#studio .w-fhead b { font: 700 11px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
#studio .w-fhead .b-mono { font-size: 12px; color: var(--ink-faint); }
#studio .your-files-row { display: grid; grid-template-columns: 1fr; gap: var(--s-2); }
#studio .your-file-row { display: flex; align-items: center; gap: var(--s-2); }
#studio .your-file-row .your-file { flex: 1; min-width: 0; }
#studio .your-file-dl { flex: none; width: 34px; height: 34px; border: 1px solid var(--rule); border-radius: 50%; background: var(--surface); color: var(--ink); font: 700 15px/1 var(--f-ui); cursor: pointer; }
#studio .your-file-dl:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }
#studio .your-file { padding: var(--s-2); border: 0; border-radius: 10px; background: none; grid-template-columns: 38px 1fr; }
#studio .your-file:hover { background: var(--surface-2); }
#studio .your-file-page { width: 38px; height: 49px; }
#studio .your-file b { font: 600 12.5px var(--f-mono); }

/* what only the student can add: their real example, the textbook */
#studio .w-extras { display: grid; gap: var(--s-4); padding: var(--s-4) 18px; border-top: 1px solid var(--rule); background: var(--surface); }
#studio .w-extras[hidden], #studio .w-ask[hidden] { display: none; }
#studio .w-ask { padding-left: var(--s-4); border-left: 4px solid var(--b-methods); }
#studio #bfw-textbook { border-left-color: var(--b-core); }
#studio .w-ask label span { margin-left: var(--s-1); font-weight: 500; color: var(--ink-faint); }
#studio .w-ask small { font: 500 12px/1.4 var(--f-ui); color: var(--ink-faint); }
#studio .w-ask textarea { width: 100%; min-height: 60px; padding: 9px 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); font: 400 14px/1.5 var(--f-ui); resize: vertical; }
#studio .w-ask textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent); }

/* the student's classes, as chips above the prompt */
#studio .w-classes { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-3) 18px; border-bottom: 1px dashed var(--rule); background: var(--surface-2); }
#studio .w-classes[hidden] { display: none; }
#studio .w-classes-label { font: 700 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
#studio .w-class-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
#studio .w-class-chip { --hue: var(--b-intro); display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; padding: var(--s-1) var(--s-3) var(--s-1) var(--s-2); border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 13px/1.2 var(--f-ui); cursor: pointer; transition: transform .15s, background .15s; }
#studio .w-class-chip::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--hue); box-shadow: inset 0 0 0 1px var(--tile-ink); }
#studio .w-class-chip small { font: 500 12px var(--f-ui); color: var(--ink-dim); }
#studio .w-class-chip:hover { border-color: var(--ink-faint); }
#studio .w-class-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
#studio .w-class-chip[aria-pressed="true"] small { color: var(--surface); }
@media (prefers-reduced-motion: no-preference) { #studio .w-class-chip:active { transform: scale(.96); } }
#studio .w-level .w-level-ok { background: var(--ok); }

/* the third column at 1440px: what the draft will follow */
#studio .w-asks-fold > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--s-1); cursor: pointer; list-style: none; }
#studio .w-asks-fold > summary b { grid-column: 1; grid-row: 1; }
#studio .w-asks-fold > summary span { grid-column: 1 / -1; grid-row: 2; line-height: 1.45; }
#studio .w-asks-fold > summary::-webkit-details-marker { display: none; }
#studio .w-asks-fold > summary::after { content: "▾"; grid-column: 2; grid-row: 1; margin-left: var(--s-2); color: var(--ink-dim); }
#studio .w-asks-fold[open] > summary::after { content: "▴"; }
#studio .w-asks-fold > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
#studio .w-ledger { margin-top: 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-l); overflow: hidden; }
#studio .w-lhead { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding: var(--s-5) 18px var(--s-2); }
#studio .w-lhead b { font: 700 12px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
#studio .w-lhead span { font: 500 12px var(--f-ui); color: var(--ink-faint); }
#studio .w-lrow { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-top: 1px dashed var(--rule); font: 400 13px/1.5 var(--f-ui); color: var(--ink-dim); }
#studio .w-lrow b { display: block; font: 700 14px/1.4 var(--f-ui); color: var(--ink); }
#studio .w-lnum { padding-top: var(--s-hair); font: 700 12px var(--f-mono); color: var(--ink-faint); }
#studio .w-lsrc { font: 600 11px var(--f-mono); color: var(--ink-faint); }

/* phones: the brief two by two, and the Create button stays in reach */
@media (max-width: 640px) {
  #studio .w-brief { grid-template-columns: 1fr 1fr; }
  #studio .w-two { grid-template-columns: 1fr; }
  #studio.returning .studio-header h2.display { font-size: 21px; line-height: 1.2; max-width: none; }
  #studio.returning .studio-header .lede { display: none; }
  #studio.returning > .wrap > header.studio-header { margin-bottom: var(--s-4); }
}
@media (max-width: 640px) { html body .sh-viewport > section#studio.band { padding-bottom: 96px; } }
.w-mcta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px var(--s-5) calc(10px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--rule); }
.w-mcta[hidden] { display: none; }
.w-mcta button { width: 100%; display: flex; align-items: center; justify-content: center; padding: 14px 20px; border: 0; border-radius: var(--r-m); background: var(--ink); color: var(--surface); font: 800 16px/1.5 var(--f-ui); letter-spacing: -.01em; cursor: pointer; }
.w-mcta button:disabled { opacity: .38; cursor: not-allowed; }

/* the h2h caption under each stick */
.b-h2hcap { margin-top: var(--s-1); font: 400 13px/1.4 var(--f-ui); color: var(--ink-dim); }
.b-h2hcap b { color: var(--ink); font-weight: 700; }

/* ---------- the result: the file first (the prototype's .deliver) ---------- */
#studio .export-first { margin: var(--s-5) 0 var(--s-6); padding: 0; border: 0; background: none; }
#studio .export-first .deliverable { margin: 0; padding: 0; border: 2px solid var(--ink); border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
#studio .export-first .deliverable > header {
  position: relative; display: block; min-height: 92px; margin: 0; padding: 18px 18px var(--s-4) 82px;
  border: 0; border-bottom: 1px solid var(--rule); background: none;
}
#studio .export-first .dfile {
  position: absolute; left: 18px; top: 18px; width: 46px; height: 56px; display: grid; place-items: end center; padding-bottom: 7px;
  border-radius: var(--r-s); background: linear-gradient(225deg, var(--surface-2) 0 10px, var(--ink) 10px); color: var(--surface);
  font: 700 11px var(--f-mono);
}
/* The first page, small, beside "Your file is ready". */
#studio .export-first .dpaper { position: absolute; left: 18px; top: 14px; width: 84px; height: 108px; overflow: hidden; display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-2) 7px; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--lift); transform: rotate(-3deg); }
#studio .export-first .dpaper b { font: 700 6.5px/1.25 var(--f-ui); text-align: center; }
#studio .export-first .dpaper span { font: 400 4.5px/1.6 var(--f-ui); white-space: pre-wrap; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, currentColor 65%, transparent); mask-image: linear-gradient(180deg, currentColor 65%, transparent); }
#studio .export-first .deliverable > header:has(.dpaper) { min-height: 136px; padding-left: 124px; }
#studio .export-first .deliverable > header:has(.dpaper) .dfile { left: 72px; top: 92px; width: 34px; height: 40px; font-size: 9px; z-index: 1; }
@media (max-width: 640px) { #studio .export-first .dpaper { display: none; } #studio .export-first .deliverable > header:has(.dpaper) { min-height: 80px; padding-left: 72px; } #studio .export-first .deliverable > header:has(.dpaper) .dfile { left: var(--s-4); top: var(--s-4); width: 40px; height: 50px; font-size: inherit; } }
@media (prefers-reduced-motion: no-preference) { #studio .export-first .just-ready .dpaper { animation: w-paper-in .6s var(--ease-pop) both; } }
@keyframes w-paper-in { from { opacity: 0; transform: translateY(14px) rotate(-4deg); } }
#studio .export-first .dfit { margin-top: var(--s-2); min-height: 32px; padding: 0 var(--s-3); border: 1px solid var(--ink); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 12.5px var(--f-ui); cursor: pointer; }
#studio .export-first .dfit:hover { background: var(--ink); color: var(--surface); }
#studio .export-first .dbasis { margin: var(--s-1) 0 0; font: 600 13.5px/1.4 var(--f-ui); color: var(--ink); }
/* The stamps: each a check that passed, in the words of what it checked. */
#studio .export-first .dstamps { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 0; }
#studio .export-first .dstamp { display: inline-flex; align-items: center; gap: var(--s-1); padding: 3px var(--s-3); border: 1.5px solid var(--tile-ink); border-radius: 999px; background: var(--b-elect); color: var(--tile-ink); font: 700 12px/1.3 var(--f-ui); }
#studio .export-first .dstamp::before { content: "✓"; font-weight: 800; }
#studio .export-first .dstamp:nth-child(2) { background: var(--b-thought); } #studio .export-first .dstamp:nth-child(3) { background: var(--b-methods); } #studio .export-first .dstamp:nth-child(4) { background: var(--b-intro); }
@media (prefers-reduced-motion: no-preference) {
  #studio .export-first .just-ready .dstamp { animation: w-stamp .45s var(--ease-pop) both; }
  #studio .export-first .just-ready .dstamp:nth-child(2) { animation-delay: .12s; } #studio .export-first .just-ready .dstamp:nth-child(3) { animation-delay: .24s; } #studio .export-first .just-ready .dstamp:nth-child(4) { animation-delay: .36s; }
}
@keyframes w-stamp { from { opacity: 0; transform: scale(1.6) rotate(-6deg); } }
/* Confetti: a one-off burst of the board pastels from the file icon. */
#studio .export-first .w-confetti { position: absolute; left: 40px; top: 40px; width: 0; height: 0; pointer-events: none; z-index: 2; }
#studio .export-first .w-confetti i { --x: 0px; --y: 0px; --r: 0deg; --t: .9s; position: absolute; width: 7px; height: 11px; border-radius: 2px; background: var(--b-intro); animation: w-confetti var(--t) var(--ease-out) both; }
#studio .export-first .w-confetti i:nth-child(6n+2) { background: var(--b-methods); } #studio .export-first .w-confetti i:nth-child(6n+3) { background: var(--b-thought); width: 9px; height: 9px; border-radius: 999px; }
#studio .export-first .w-confetti i:nth-child(6n+4) { background: var(--b-elect); } #studio .export-first .w-confetti i:nth-child(6n+5) { background: var(--b-core); } #studio .export-first .w-confetti i:nth-child(6n) { background: var(--b-cap); width: 9px; height: 9px; border-radius: 999px; }
@keyframes w-confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) { #studio .export-first .w-confetti { display: none; } }
#studio .export-first .just-ready .dfile { animation: w-file-in .5s var(--ease-pop); }
#studio .export-first .just-ready { animation: w-card-in .35s var(--ease-out); }
@keyframes w-file-in { 0% { transform: translateY(-10px) rotate(-8deg); opacity: 0; } 70% { transform: translateY(2px) rotate(2deg); } }
@keyframes w-card-in { from { transform: translateY(8px); opacity: .6; } }
#studio .export-first .deliverable > header h4 { margin: 0; font: 800 22px/1.15 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
#studio .export-first .deliverable:not(.held) > header .eyebrow { display: none; }
#studio .export-first .deliverable > header .eyebrow { display: block; margin-top: var(--s-1); font: 400 13.5px/1.4 var(--f-ui); letter-spacing: 0; text-transform: none; color: var(--ink-dim); }
#studio .export-first .drow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-4); margin: 0; padding: var(--s-5) 18px; }
#studio .export-first .dpick { flex: 1 1 160px; display: flex; flex-direction: column; gap: var(--s-1); }
#studio .export-first .dpick label { font: 700 12.5px/1.5 var(--f-ui); color: var(--ink-dim); letter-spacing: 0; text-transform: none; }
#studio .export-first .dpick select { padding: 9px 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); font: 400 14px/1.5 var(--f-ui); }
#studio .export-first .dgo {
  flex: 2 1 240px; min-height: 0; padding: 14px 20px; border: 0; border-radius: var(--r-m);
  background: var(--ink); color: var(--surface); font: 800 16px/1.5 var(--f-ui); letter-spacing: -.01em; text-transform: none; cursor: pointer;
}
#studio .export-first .dgo:hover:not(:disabled) { filter: none; box-shadow: var(--lift); transform: translateY(-1px); }
#studio .export-first .dgo:disabled { opacity: .45; background: var(--ink); color: var(--surface); }
#studio .export-first .dhint { max-width: none; margin: 0; padding: 10px 18px; border-top: 1px dashed var(--rule); background: var(--surface-2); font: 400 12.5px/1.5 var(--f-ui); color: var(--ink-faint); }
#studio .export-first .matchack { margin: 0 18px var(--s-4); }
#studio .export-first .dcode { margin: 0 18px var(--s-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
#studio .export-first .dcode > span { flex: 1 1 200px; font-family: var(--f-mono); font-size: 13px; color: var(--ink-dim); }
#studio .export-first .dtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--rule); background: none; }
#studio .export-first .dtile { margin: 0; border: 0; border-right: 1px solid var(--rule); border-bottom: 0; padding: var(--s-4) 18px; background: none; }
#studio .export-first .dtile:last-child { border-right: 0; }
#studio .export-first .dwarn { margin: 0 18px var(--s-4); }
#studio .export-first .dwarn { display: flex; align-items: flex-start; gap: var(--s-2); }
#studio .export-first .dwarn > span { flex: 1; }
#studio .dwarn-x { flex: none; width: 24px; height: 24px; margin: -2px -4px 0 0; border: 0; border-radius: 999px; background: none; color: var(--ink-dim); font: 700 15px/1 var(--f-ui); cursor: pointer; }
#studio .dwarn-x:hover { background: var(--surface-2); color: var(--ink); }
#studio .dwarn-x:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
/* What the assignment asks, ticked off (studio-client/12-render.js requirementList). */
#studio .export-first .dreqs { border-top: 1px solid var(--rule); }
#studio .export-first .dreqs > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-3); padding: var(--s-3) 18px; cursor: pointer; list-style: none; font: 700 14px/1.4 var(--f-ui); color: var(--ink); }
#studio .export-first .dreqs > summary::-webkit-details-marker { display: none; }
#studio .export-first .dreqs > summary::after { content: "▾"; margin-left: auto; color: var(--ink-dim); }
#studio .export-first .dreqs[open] > summary::after { content: "▴"; }
#studio .export-first .dreq-sum { color: var(--ink-dim); font-weight: 600; font-size: 13px; }
#studio .export-first .dreq-fixed, #studio .export-first .dreq-note { margin: 0 18px var(--s-2); font: 500 12.5px/1.45 var(--f-ui); color: var(--ink-dim); }
#studio .export-first .dreq-fixed { color: var(--ok); font-weight: 700; }
#studio .export-first .dreq-met { margin: 0 18px var(--s-3); }
#studio .export-first .dreq-met > summary { cursor: pointer; padding: var(--s-1) 0; font: 700 13px/1.4 var(--f-ui); color: var(--ok); }
#studio .export-first .dreq-met > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-s); }
#studio .export-first .dreq-met > .dreq-list { padding: var(--s-2) 0 0; }
#studio .export-first .dreq-list { list-style: none; margin: 0; padding: 0 18px var(--s-3); display: grid; gap: var(--s-2); }
#studio .export-first .dreq { display: grid; grid-template-columns: 24px 1fr auto; align-items: start; gap: var(--s-3); padding: var(--s-2) var(--s-3); border: 1.5px solid var(--rule); border-radius: var(--r-m); background: var(--surface); }
#studio .export-first .dreq > i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; border: 1.5px solid var(--tile-ink); color: var(--tile-ink); font: 800 13px/1 var(--f-ui); font-style: normal; background: var(--b-elect); }
#studio .export-first .dreq.is-uncertain > i { background: var(--b-intro); }
#studio .export-first .dreq.is-missing > i { background: var(--b-thought); }
#studio .export-first .dreq.is-missing { border-color: var(--warn); }
#studio .export-first .dreq b { display: block; font: 600 13.5px/1.4 var(--f-ui); color: var(--ink); }
#studio .export-first .dreq small { display: block; margin-top: 2px; font: 400 12px/1.4 var(--f-ui); color: var(--ink-dim); overflow-wrap: anywhere; }
#studio .export-first .dreq > em { font: 700 11.5px/1.6 var(--f-ui); font-style: normal; color: var(--ink-dim); white-space: nowrap; }
#studio .export-first .dreq.is-missing > em { color: var(--warn); }
#studio .export-first .dreq.is-top > i { background: var(--b-elect); }
#studio .export-first .dreq-amode { color: var(--ink); font-weight: 700; }
/* The header details only the student knows (lab section, TA…): one small field each, beside the row that asks for them. */
#studio .export-first .dreq-fill { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-2) var(--s-3); margin-top: var(--s-2); }
#studio .export-first .dreq-fill label { display: flex; flex-direction: column; gap: var(--s-1); font: 700 var(--t-label)/1.4 var(--f-ui); color: var(--ink-dim); }
#studio .export-first .dreq-fill input { width: 12rem; max-width: 100%; padding: var(--s-1) var(--s-2); border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font: 400 var(--t-ui)/1.4 var(--f-ui); }
#studio .export-first .dreq-fill button { padding: var(--s-1) var(--s-3); border: 1.5px solid var(--ink); border-radius: var(--r-s); background: var(--ink); color: var(--surface); font: 700 var(--t-meta)/1.4 var(--f-ui); cursor: pointer; }
#studio .export-first .dreq-fill input:focus-visible, #studio .export-first .dreq-fill button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#studio .w-amode { display: flex; align-items: flex-start; gap: var(--s-2); flex: 1 1 100%; cursor: pointer; font: 500 13px/1.4 var(--f-ui); color: var(--ink); }
#studio .w-amode[hidden] { display: none; }
#studio .w-amode input { flex: none; margin: 0; width: 24px; height: 24px; accent-color: var(--ink); }
#studio .w-amode b { display: block; font-weight: 700; }
#studio .w-amode small { display: block; color: var(--ink-dim); font-size: 12px; }
@media (max-width: 640px) {
  #studio .export-first .dreq { grid-template-columns: 24px 1fr; }
  #studio .export-first .dreq > em { display: none; }
}
@media (max-width: 640px) {
  #studio .export-first .deliverable > header { padding: var(--s-4) var(--s-4) var(--s-4) 72px; min-height: 80px; }
  #studio .export-first .dfile { left: var(--s-4); top: var(--s-4); width: 40px; height: 50px; }
  #studio .export-first .drow { padding: var(--s-4); gap: 10px; }
  #studio .export-first .dpick { flex: 1 1 calc(50% - 5px); min-width: 0; }
  #studio .export-first .dgo { flex: 1 1 100%; order: -1; }
  #studio .export-first .dtiles { grid-template-columns: 1fr 1fr; }
  #studio .export-first .dtile { padding: var(--s-3) 10px; }
  #studio .export-first .dtile-value { font-size: 18px; }
  #studio .review-navigation .desk-new { flex: 0 0 auto; }
}
#studio .review-navigation .desk-new { order: -1; background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* ---------- the review screen, in the v4 materials ---------- */
#studio-out .review-navigation {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin: 0; padding: var(--s-3) 0;
  border: 0; border-bottom: 1px solid var(--rule); background: var(--ground);
}
#studio-out .review-navigation button {
  flex: none; min-height: 38px; padding: 0 var(--s-4); border: 1px solid var(--rule); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: 700 13.5px/1 var(--f-ui); letter-spacing: 0; text-transform: none; cursor: pointer;
}
#studio-out .review-navigation button:hover { border-color: var(--ink-faint); }
#studio-out .review-navigation .desk-new { order: 0; background: var(--surface); color: var(--ink); border-color: var(--rule); }
#studio-out .review-navigation .document-toolbar-title { order: 1; flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-hair); font: 400 13px var(--f-ui); font-style: normal; color: var(--ink-dim); }
#studio-out .review-navigation .document-toolbar-title b { font: 800 17px/1.2 var(--f-display); letter-spacing: -.015em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#studio-out .review-navigation .document-toolbar-title small { font: 400 12.5px var(--f-ui); color: var(--ink-faint); }
#studio-out .review-navigation .rv-actions { order: 2; display: flex; flex-wrap: wrap; gap: var(--s-2); }
#studio-out .review-navigation .rv-more { order: 3; display: none; }
#studio-out .review-basis { margin: 0 0 var(--s-4); padding: var(--s-4) var(--s-5); border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--surface); }
#studio-out .review-basis[open] > summary { margin-bottom: var(--s-3); }
#studio-out .review-basis .ctxbanner.own { border-left: 4px solid var(--b-elect); padding-left: var(--s-3); }
#studio-out .review-basis > summary { font: 700 11px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); cursor: pointer; }
/* the text, folded under the file; Copy text sits on the fold's header row */
#studio-out .rv-fold { position: relative; margin: 0 0 var(--s-5); }
#studio-out .review-text > summary { list-style: none; display: flex; flex-direction: column; gap: var(--s-1); min-height: 44px; padding: var(--s-4) calc(var(--s-9) + var(--s-8)) var(--s-4) var(--s-5); border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--surface); cursor: pointer; }
#studio-out .review-text > summary::-webkit-details-marker { display: none; }
#studio-out .review-text > summary b { font: 700 16px/1.3 var(--f-ui); color: var(--ink); }
#studio-out .review-text > summary b::before { content: "\25B8"; display: inline-block; margin-right: var(--s-2); transition: transform var(--dur-fast) ease; }
#studio-out .review-text[open] > summary b::before { transform: rotate(90deg); }
#studio-out .review-text > summary small { font: 400 13px/1.4 var(--f-ui); color: var(--ink-dim); }
#studio-out .review-text > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#studio-out .review-text[open] > summary { margin-bottom: var(--s-4); }
#studio-out .rv-copy { position: absolute; top: var(--s-3); right: var(--s-3); min-height: 44px; padding: 0 var(--s-5); border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface-2); color: var(--ink); font: 600 14px var(--f-ui); cursor: pointer; }
#studio-out .rv-copy:hover { border-color: var(--ink); }
#studio-out .rv-copy:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 640px) {
  #studio-out .review-navigation, #studio .dl-bar:not([hidden]) ~ #studio-out .review-navigation { position: static; gap: var(--s-2); }
  #studio-out .review-navigation .document-toolbar-title { order: 0; flex: 1 1 100%; }
  #studio-out .review-navigation .desk-new { order: 1; }
  #studio-out .review-navigation .rv-more { order: 2; display: inline-flex; align-items: center; }
  #studio-out .review-navigation .rv-actions { order: 4; display: none; flex: 1 1 100%; padding: var(--s-3); border: 1px solid var(--rule); border-radius: var(--r-m); background: var(--raise); }
  #studio-out .review-navigation.open .rv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
  #studio-out .review-navigation.open .rv-more { background: var(--ink); color: var(--surface); border-color: var(--ink); }
}

/* the preview: a page, not a panel */
#studio-out .review-document .completed-work { border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
#studio-out .completed-work > header { padding: var(--s-6) var(--s-7) var(--s-4); border-bottom: 1px dashed var(--rule); background: none; }
#studio-out .completed-work > header h4 { margin: 0; font: 800 26px/1.15 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
#studio-out .completed-work > header .eyebrow { display: block; margin-top: var(--s-2); font: 600 12px var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
#studio-out .completed-work .panelbody h5 { margin: var(--s-6) 0 var(--s-2); font: 700 12px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
/* the paper's own title and its course line, as the exported file sets them: centred, above the body */
#studio-out .completed-work .panelbody h5.c-title { margin: 0 0 var(--s-2); text-align: center; font: 700 var(--t-h3)/1.3 var(--f-prose); letter-spacing: 0; text-transform: none; color: var(--ink); }
#studio-out .completed-work .panelbody .c-byline { margin: 0 0 var(--s-6); text-align: center; color: var(--ink-dim); }
#studio-out .completed-work .panelbody .c-note { margin: 0 0 var(--s-2); font-size: 13px; color: var(--ink-dim); }
/* Figures drawn from the work (gen/figures.js): a printed figure on paper, in both themes. */
#studio-out .completed-work .panelbody .c-figure { margin: var(--s-5) 0; padding: var(--s-3); border: 1px solid var(--rule); border-radius: var(--r-m); background: var(--surface); text-align: center; }
#studio-out .completed-work .panelbody .c-figure svg { max-width: 100%; height: auto; border-radius: var(--r-s); }
#studio-out .completed-work .panelbody .c-figure figcaption { margin-top: var(--s-2); font-size: 13px; font-style: italic; color: var(--ink-dim); }
/* A labeled diagram: the photo with the names on its blanks, its key, and what is left to check. */
#studio-out .completed-work .panelbody .c-labeled img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--r-s); }
#studio-out .completed-work .panelbody .c-label-key { margin: var(--s-3) auto 0; text-align: left; font-size: 13px; }
#studio-out .completed-work .panelbody .c-label-key caption { font-size: 13px; font-weight: 600; color: var(--ink-dim); text-align: left; }
#studio-out .completed-work .panelbody .c-label-key tr[data-status] strong { color: var(--warn); font-weight: 600; }
#studio-out .completed-work .panelbody .c-label-key th, #studio-out .completed-work .panelbody .c-label-key td:first-child, #studio-out .completed-work .panelbody .c-label-key td:last-child { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
/* The work's column wraps anywhere (04-assignment.css), which in a narrow table
   broke "Supraorbital" across two lines; a name wraps between its words, and
   the cells sit closer on a phone. */
#studio-out .completed-work .panelbody .c-label-key th, #studio-out .completed-work .panelbody .c-label-key td { padding: var(--s-2) var(--s-3); }
#studio-out .completed-work .panelbody .c-label-key td:nth-child(2) { overflow-wrap: break-word; }
#studio-out .completed-work .panelbody .c-label-note { margin: var(--s-2) 0 0; font-size: 13px; color: var(--ink-dim); text-align: left; }
/* A figure is prose (a caption, a key of names, a note), not a column of
   numbers: the base rule for [class*="fig"] set its punctuation tabular,
   which this face draws as wide as a digit ("9 , 10 ."). Only the key's
   number column keeps tabular figures. */
#studio-out .completed-work .panelbody .c-figure { font-variant-numeric: normal; }
#studio-out .completed-work .panelbody .c-label-key td:first-child { font-variant-numeric: tabular-nums; }
#studio-out .completed-work .panelbody .c-code { margin: var(--s-4) 0; padding: var(--s-3) var(--s-4); overflow-x: auto; border-radius: var(--r-m); background: var(--surface-2); color: var(--ink); font: 400 13px/1.5 var(--f-mono); white-space: pre; }
#studio-out .completed-work .panelbody blockquote { margin: 0 0 var(--s-4); padding: 0 var(--s-6); border-left: 2px solid var(--rule); color: var(--ink); }
#studio-out .completed-work .panelbody .c-field { margin: 0 0 var(--s-4); text-align: left; }
@media (max-width: 640px) { #studio-out .completed-work > header { padding: var(--s-5) var(--s-5) var(--s-4); } #studio-out .completed-work > header h4 { font-size: 22px; } }

/* evidence: a numbered marker in the text, the same number on its card */
#studio-out [data-inline-claim] { cursor: pointer; border-radius: 3px; background: color-mix(in srgb, var(--k-1) 12%, transparent); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--k-1) 55%, transparent); }
#studio-out [data-inline-claim]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#studio-out [data-inline-claim]::after {
  content: attr(data-mark); display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: var(--s-hair); padding: 0 3px;
  border-radius: 999px; background: var(--k-1); color: var(--seg-ink); font: 700 10px/1 var(--f-mono); vertical-align: 6px;
}
#studio-out .review-sidebar .desk-tabs { display: inline-flex; gap: 0; padding: var(--s-1); border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); }
#studio-out .review-sidebar .desk-tabs [role="tab"] { min-height: 34px; padding: 0 var(--s-4); border: 0; border-radius: 999px; background: none; color: var(--ink-dim); font: 700 13px var(--f-ui); letter-spacing: 0; text-transform: none; }
#studio-out .review-sidebar .desk-tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
#studio-out .evidence-ledger > header h4 { margin: 0; font: 800 18px/1.2 var(--f-display); letter-spacing: -.015em; }
#studio-out .evidence-list { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
#studio-out .evidence-item { position: relative; margin: 0; padding: var(--s-4) var(--s-4) var(--s-4) 44px; border: 1px solid var(--rule); border-top: 1px solid var(--rule); border-radius: var(--r-m); background: var(--surface); }
#studio-out .evidence-item::before { content: attr(data-mark); position: absolute; left: var(--s-4); top: var(--s-4); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--k-1); color: var(--seg-ink); font: 700 11px/1 var(--f-mono); }
#studio-out .evidence-item.unresolved::before { content: "!"; background: var(--warn); }
#studio-out .evidence-claim { margin: 0; font: 400 14px/1.45 var(--f-ui); color: var(--ink); }
#studio-out .evidence-meta { margin: var(--s-1) 0 0; font: 400 13px/1.45 var(--f-ui); color: var(--ink-dim); }
#studio-out .claim-source { margin-top: var(--s-3); min-height: 32px; padding: 0 var(--s-4); border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 12.5px var(--f-ui); cursor: pointer; }

/* request changes: one-tap revisions above the box */
#studio-out .studio-refine { margin-top: var(--s-6); padding: var(--s-5); border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--surface); }
#studio-out .rv-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 var(--s-4); }
#studio-out .rv-chip { min-height: 34px; padding: 0 var(--s-4); border: 1px solid var(--rule); border-radius: 999px; background: var(--surface-2); color: var(--ink); font: 600 13px var(--f-ui); cursor: pointer; }
#studio-out .rv-chip:hover { border-color: var(--ink-faint); }
#studio-out #refine-text { width: 100%; padding: 10px var(--s-4); border: 1px solid var(--rule); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: 400 15px/1.5 var(--f-ui); }
#studio-out #refine-run { min-height: 40px; padding: 0 var(--s-5); border: 0; border-radius: 999px; background: var(--ink); color: var(--surface); font: 700 14px var(--f-ui); letter-spacing: 0; text-transform: none; }
#studio-out #refine-run:disabled { opacity: .45; }

/* the check, when it could not run: one calm line */
#studio .export-first .dtile-wide { grid-column: span 2; }
#studio .export-first .dtile-calm { font: 700 15px/1.35 var(--f-ui); color: var(--ink); }
@media (max-width: 640px) { #studio .export-first .dtile-wide { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--rule); } }
@media (prefers-reduced-motion: reduce) { #studio .export-first .just-ready, #studio .export-first .just-ready .dfile { animation: none; } }
/* A new file lands with a handful of candy sprinkles over its icon: once,
   short, and never under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  #studio .export-first .just-ready > header::after {
    content: ""; position: absolute; left: 14px; top: 6px; width: 72px; height: 72px; pointer-events: none;
    background:
      radial-gradient(circle, var(--b-intro) 0 3px, transparent 3.5px) 8px 30px / 12px 12px no-repeat,
      radial-gradient(circle, var(--b-methods) 0 3px, transparent 3.5px) 52px 10px / 12px 12px no-repeat,
      radial-gradient(circle, var(--b-thought) 0 3px, transparent 3.5px) 60px 46px / 12px 12px no-repeat,
      radial-gradient(circle, var(--b-elect) 0 3px, transparent 3.5px) 22px 4px / 12px 12px no-repeat,
      radial-gradient(circle, var(--b-core) 0 3px, transparent 3.5px) 0 58px / 12px 12px no-repeat,
      radial-gradient(circle, var(--b-cap) 0 3px, transparent 3.5px) 40px 62px / 12px 12px no-repeat;
    animation: w-sprinkle .9s var(--ease-out) both;
  }
}
@keyframes w-sprinkle { from { opacity: 1; transform: scale(.3) rotate(-20deg); } 70% { opacity: 1; } to { opacity: 0; transform: scale(1.35) rotate(15deg); } }

/* ---------- progress road and error cards ---------- */
/* The candy path: the board game's road of coloured squares, lit by what has
   actually happened — the draft's progress and each class's research. Each
   square takes the next board pastel; the last one is the castle. */
.w-stages, .cl-path { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) 0; margin: 0; padding: 0; list-style: none; }
.w-stages li, .cl-path li { display: flex; align-items: center; gap: var(--s-2); font: 700 13px/1.3 var(--f-ui); color: var(--ink-faint); }
.w-stages li + li::before, .cl-path li + li::before { content: ""; flex: none; width: 22px; height: 5px; margin: 0 var(--s-2); border-radius: 999px; background: repeating-linear-gradient(90deg, var(--road) 0 5px, transparent 5px 9px); }
.w-stages li.done + li::before, .cl-path li.done + li::before { background: var(--rule-strong); }
.w-stages b, .cl-path b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 2px dashed var(--rule-strong); border-radius: var(--r-s); background: var(--surface); font: 700 12px var(--f-mono); color: var(--ink-faint); --sq: var(--b-intro); }
.w-stages li:nth-child(2) b, .cl-path li:nth-child(2) b { --sq: var(--b-methods); }
.w-stages li:nth-child(3) b, .cl-path li:nth-child(3) b { --sq: var(--b-thought); }
.w-stages li:nth-child(4) b, .cl-path li:nth-child(4) b { --sq: var(--b-elect); }
.w-stages li:nth-child(5) b, .cl-path li:nth-child(5) b { --sq: var(--b-core); }
.w-stages li.on, .cl-path li.on { color: var(--ink); }
.w-stages li.on b, .cl-path li.on b { border: 2px solid var(--tile-ink); background: var(--sq); color: var(--tile-ink); }
.w-stages li.done b, .cl-path li.done b { border: 2px solid var(--tile-ink); background: var(--sq); color: var(--tile-ink); }
.w-stages li.done, .cl-path li.done { color: var(--ink-dim); }
.w-stages li.castle b, .cl-path li.castle b { width: 32px; border: 0; border-radius: 0; background: var(--surface-3); color: var(--ink-faint);
  clip-path: polygon(0 22%, 20% 22%, 20% 0, 40% 0, 40% 22%, 60% 22%, 60% 0, 80% 0, 80% 22%, 100% 22%, 100% 100%, 0 100%); padding-top: var(--s-1); }
.w-stages li.castle.done b, .cl-path li.castle.done b, .cl-path li.castle.on b { background: var(--b-cap); color: var(--tile-ink); }
.cl-path li.stuck b { border: 2px solid var(--stop); background: var(--stop-sunk); color: var(--stop); }
@media (prefers-reduced-motion: no-preference) {
  .w-stages li.on b, .cl-path li.on b { animation: cl-hop 1.1s var(--ease-out) infinite; }
  .cl-path li.castle.done b { animation: cl-land .5s var(--ease-pop) both; }
}
@keyframes cl-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-4px); } 60% { transform: translateY(0) scale(1.04, .94); } }
@keyframes cl-land { from { transform: scale(.4); } }
@media (max-width: 640px) { .w-stages li span, .cl-path li span { display: none; } .w-stages li.on span, .cl-path li.on span { display: inline; } }
#studio .studioerr { padding: 0; border: 0; background: none; }
.w-err { display: grid; grid-template-columns: 36px 1fr; gap: var(--s-4); padding: var(--s-5); border: 2px solid var(--stop); border-radius: var(--r-l); background: var(--surface); }
.w-err-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--stop); color: var(--surface); font: 800 18px var(--f-display); }
.w-err-body strong { display: block; font: 800 18px/1.25 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.w-err-body p { margin: var(--s-2) 0 0; font: 400 14px/1.5 var(--f-ui); color: var(--ink-dim); }
.w-err-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.w-err-go, .w-err-close { min-height: 40px; padding: 0 var(--s-5); border-radius: 999px; font: 700 14px var(--f-ui); cursor: pointer; }
.w-err-go { border: 0; background: var(--ink); color: var(--surface); }
.w-err-close { border: 1px solid var(--rule); background: var(--surface); color: var(--ink); }

/* ---------- composer extras: brief chips, freshness, how it works ---------- */
#studio .w-chips { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-1); }
#studio .w-chips[hidden] { display: none; }
#studio .w-chips button { min-height: 26px; padding: 0 var(--s-3); border: 1px solid var(--rule); border-radius: 999px; background: var(--surface-2); color: var(--ink-dim); font: 600 11.5px/1 var(--f-ui); cursor: pointer; }
#studio .w-chips button:hover { border-color: var(--ink-faint); color: var(--ink); }
#studio .w-fresh { margin: var(--s-3) 0 0; font: 600 11.5px/1.4 var(--f-mono); color: var(--ink-faint); }
#studio .w-fresh:empty { display: none; }
@media (max-width: 640px) {
  /* One compact row on a phone: the three verbs, not three cards. */
}

/* ---------- the shortcut sheet ---------- */
.cl-keys { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3) var(--s-5); margin: var(--s-5) 0 0; align-items: center; }
.cl-keys dt { margin: 0; font: 400 12px var(--f-ui); color: var(--ink-faint); white-space: nowrap; }
.cl-keys dd { margin: 0; font: 400 14px/1.45 var(--f-ui); color: var(--ink-dim); }
.cl-keys kbd { display: inline-block; padding: var(--s-1) var(--s-3); border: 1px solid var(--rule); border-radius: 6px; background: var(--surface-2); font: 600 12.5px var(--f-mono); color: var(--ink); white-space: nowrap; }

/* ---------- comparing two people ---------- */
#b-pcmp:empty { display: none; }
.b-cmp { margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5); border: 2px solid var(--ink); border-radius: var(--r-l); background: var(--raise); box-shadow: var(--lift), inset 0 1px 0 var(--edge); }
.b-cmp-one { font: 400 14px/1.5 var(--f-ui); color: var(--ink-dim); }
.b-cmp-one b { color: var(--ink); }
.b-cmphead, .b-cmprow { display: grid; grid-template-columns: minmax(110px, 170px) 1fr 1fr; gap: var(--s-4); align-items: center; }
.b-cmphead { padding-bottom: var(--s-3); border-bottom: 1px solid var(--rule); }
.b-cmpname { text-align: left; border: 0; background: none; padding: 0; color: var(--ink); cursor: pointer; }
.b-cmpname b { display: block; font: 800 18px/1.2 var(--f-display); letter-spacing: -.015em; }
.b-cmpname small { display: block; font: 400 12.5px var(--f-ui); color: var(--ink-dim); }
.b-cmprow { padding: var(--s-2) 0; border-bottom: 1px dashed var(--rule); font: 400 13.5px/1.4 var(--f-ui); color: var(--ink); }
.b-cmprow > span:first-child { font: 600 12.5px var(--f-ui); color: var(--ink-faint); }
.b-cmprow small { display: block; margin-top: var(--s-1); }
.b-cmpnone { color: var(--ink-faint); font-style: italic; }
.b-cmpfoot { margin: var(--s-3) 0 0; }
@media (max-width: 640px) { .b-cmphead, .b-cmprow { grid-template-columns: 1fr 1fr; } .b-cmphead > span:first-child { display: none; } .b-cmprow > span:first-child { grid-column: 1 / -1; } }
.b-alt { margin-left: auto; font: 600 13px var(--f-ui); color: var(--ink-dim); }
.b-print { margin-left: auto; min-height: 36px; font-size: 13px; }
.b-plan { display: none; }

/* ---------- paper ---------- */
@media print {
  @page { margin: 16mm; }
  html, body, .sh-appbody, .sh-viewport { height: auto !important; overflow: visible !important; background: var(--surface) !important; }
  #studio .w-aside, #studio .w-policy, #studio .settings, .review-navigation, .studio-refine, .rv-chips { display: none !important; }
  .sh-viewport > section.band:not(.on) { display: none !important; }
  .b-card, .b-post, .b-shelf, .b-stat, .b-cmp, .w-composer, .evidence-item, tr { break-inside: avoid; }
  .b-plan { display: block; margin-top: var(--s-6); }
  .b-plan h3 { font: 800 18px var(--f-display); margin: 0 0 var(--s-3); }
  .b-plan table { width: 100%; border-collapse: collapse; font: 400 12px/1.4 var(--f-ui); }
  .b-plan th, .b-plan td { text-align: left; padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--rule); }
  .b-plan p { font: 400 11px var(--f-ui); color: var(--ink-dim); }
}

/* ---------- the folded brief, pressable steps, the ledger's course group ---------- */
#studio .w-folded.w-folded { display: none; }
#studio .w-summary { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) 18px; border-top: 1px solid var(--rule); background: var(--surface); }
#studio .w-summary[hidden] { display: none; }
#studio .w-sumtext { flex: 1; min-width: 0; display: grid; gap: var(--s-hair); font: 400 13px/1.45 var(--f-ui); color: var(--ink-dim); }
#studio .w-sumtext b { font: 700 14.5px/1.35 var(--f-ui); color: var(--ink); }
#studio .w-summiss { color: var(--ink-faint); }
#studio .w-sumedit { flex: none; min-height: 36px; padding: 0 var(--s-4); border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 13px var(--f-ui); cursor: pointer; }
#studio .w-sumedit:hover { border-color: var(--ink-faint); }
#studio .workflow-rail .w-step { display: flex; align-items: center; gap: var(--s-3); min-height: 32px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
#studio .workflow-rail .w-step:hover strong { color: var(--ink); text-decoration: underline; }
#studio .workflow-rail li.done .workflow-number { font-size: 0; }
#studio .workflow-rail li.done .workflow-number::after { content: "✓"; font: 700 13px var(--f-ui); }
#studio .w-lgroup { margin: 0; padding: var(--s-3) var(--s-5) 0; border-top: 1px solid var(--rule); font: 700 11px/1.4 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- your files ---------- */
.your-files { margin-top: var(--s-6); }
.your-files h3 { margin: 0 0 var(--s-3); }
.your-files-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); }
.your-file { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: var(--s-4); align-items: center; padding: var(--s-4); border: 1px solid var(--rule); border-radius: var(--r-m); background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.your-file:hover { border-color: var(--ink-faint); }
.your-file-page { grid-row: 1 / 3; width: 30px; height: 38px; border: 1.5px solid var(--rule-strong); border-radius: 4px; background: repeating-linear-gradient(180deg, transparent 0 6px, var(--rule) 6px 7px) var(--paper); }
.your-file b { font: 700 14px/1.25 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.your-file small { font: 500 12px var(--f-mono); color: var(--ink-faint); }

/* ---------- the live draft ---------- */
.live-draft { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: var(--s-6); padding: var(--s-6); border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--surface); }
.live-main { display: grid; gap: var(--s-4); align-content: start; min-width: 0; }
.live-follow { align-self: start; padding: var(--s-5); border: 1px dashed var(--rule-strong); border-radius: var(--r-m); background: var(--surface-2); }
.live-follow-h { margin: 0 0 var(--s-3); font: 700 11px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.live-follow ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.live-follow li { display: grid; grid-template-columns: 12px 1fr; gap: var(--s-2); font: 600 13.5px/1.4 var(--f-ui); color: var(--ink); }
.live-follow li::before { content: ""; width: 10px; height: 10px; margin-top: 4px; border-radius: 3px; background: var(--b-elect); box-shadow: inset 0 0 0 1px var(--tile-ink); }
.live-follow li:nth-child(2)::before { background: var(--b-thought); } .live-follow li:nth-child(3)::before { background: var(--b-methods); } .live-follow li:nth-child(4)::before { background: var(--b-intro); } .live-follow li:nth-child(5)::before { background: var(--b-core); }
.live-follow .field-help { margin: var(--s-3) 0 0; }
/* While it writes, the writing is the page: the form folds away (it comes
   back on its own if the run fails) and the progress takes its place. */
#studio.is-working:not(.has-result) .w-work, #studio.is-working:not(.has-result) .studio-header .lede, #studio.is-working:not(.has-result) .w-policy, #studio.is-working:not(.has-result) .settings { display: none; }
#studio.is-working:not(.has-result) .studio-header h2.display { font-size: clamp(24px, 3vw, 34px); }
#studio.is-working:not(.has-result) .desk-status { display: none; }
.live-draft .w-stages li:not(.on):not(.castle) span { display: none; }
@media (max-width: 800px) { .live-draft { grid-template-columns: 1fr; gap: var(--s-4); padding: var(--s-4); } }
.live-draft .running { margin: 0; }
.live-draft .field-help { margin: 0; }
.live-pages { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.live-page { position: relative; width: 44px; height: 58px; border: 1.5px solid var(--rule-strong); border-radius: 4px; background: var(--paper); overflow: hidden; }
.live-page i { position: absolute; left: 0; right: 0; top: 0; background: repeating-linear-gradient(180deg, var(--ink-faint) 0 2px, transparent 2px 7px); opacity: .5; transition: height .3s ease; }
.live-page.full { border-color: var(--ink); }
.live-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.live-bar i { display: block; height: 100%; background: var(--k-1); transition: width .3s ease; }
@media (prefers-reduced-motion: reduce) { .live-page i, .live-bar i { transition: none; } }
/* Watching it write: which part of the plan is streaming, then the real
   words arriving on a sheet of paper, newest at the bottom. */
.live-phase { margin: 0; font: 700 15px/1.4 var(--f-ui); color: var(--ink); }
.live-paper { position: relative; max-height: 220px; overflow: hidden; padding: var(--s-5) var(--s-6); border: 1px solid var(--rule-strong); border-radius: var(--r-m); background: var(--paper); color: var(--paper-ink); box-shadow: var(--lift); display: flex; flex-direction: column; justify-content: flex-end; }
.live-paper::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 64px; background: linear-gradient(180deg, var(--paper), transparent); pointer-events: none; }
.live-paper b { display: block; margin: 0 0 var(--s-3); font: 700 15px/1.3 var(--f-display); text-align: center; }
.live-paper p { margin: 0; font: 400 14px/1.7 var(--f-ui); white-space: pre-wrap; overflow-wrap: anywhere; }
.live-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--paper-ink); }
@media (prefers-reduced-motion: no-preference) { .live-caret { animation: live-blink 1s steps(2, start) infinite; } }
@keyframes live-blink { to { visibility: hidden; } }
/* A deck arrives as slides: the one being written, and a strip of those done. */
.live-deck { display: grid; gap: var(--s-3); }
.live-slide { aspect-ratio: 16 / 9; max-height: 240px; overflow: hidden; padding: var(--s-5) var(--s-6); border: 1px solid var(--rule-strong); border-radius: var(--r-m); background: var(--paper); color: var(--paper-ink); box-shadow: var(--lift); }
.live-slide b { display: block; margin: 0 0 var(--s-3); font: 700 17px/1.25 var(--f-display); }
.live-slide ul { margin: 0; padding-left: var(--s-5); display: grid; gap: var(--s-1); font: 400 13.5px/1.45 var(--f-ui); }
.live-notes { margin: var(--s-3) 0 0; font: 500 12px/1.4 var(--f-mono); color: var(--paper-ink); opacity: .6; }
.live-thumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.live-thumbs li { width: 64px; height: 36px; padding: var(--s-1); overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--paper); color: var(--paper-ink); font: 600 8px/1.2 var(--f-ui); }
.live-thumbs li.on { border-color: var(--ink); }
/* A workbook arrives as rows: its sheet tabs, its columns, the newest rows; a formula cell is set in mono. */
.live-sheet { overflow: hidden; border: 1px solid var(--rule-strong); border-radius: var(--r-m); background: var(--paper); color: var(--paper-ink); box-shadow: var(--lift); }
.live-tabs { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: 0; padding: var(--s-2) var(--s-3) 0; }
.live-tabs span { padding: var(--s-1) var(--s-3); border-bottom: 2px solid transparent; font: 600 12px/1.3 var(--f-ui); color: var(--paper-ink); opacity: .6; }
.live-tabs span.on { border-bottom-color: var(--paper-ink); opacity: 1; }
.live-sheet table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font: 400 12.5px/1.4 var(--f-ui); }
.live-sheet th, .live-sheet td { padding: var(--s-1) var(--s-2); border: 1px solid var(--rule); color: var(--paper-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.live-sheet th { font-weight: 700; background: transparent; color: var(--paper-ink); border-bottom-width: 2px; }
.live-sheet .f { font-family: var(--f-mono); }
/* "Improve it" shows its rewrite arriving under the button. */
.live-refine { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.live-refine .running { margin: 0; }
/* The grader the prompt named: the card gives a small hop when it is found. */
@media (prefers-reduced-motion: no-preference) { #studio .w-gcard.w-found { animation: w-found .55s var(--ease-pop); } }
@keyframes w-found { 0% { transform: scale(.97); } 45% { transform: scale(1.015); box-shadow: 0 0 0 4px var(--b-elect); } 100% { transform: none; } }

@media (max-width: 800px) { .b-cols { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .b-srow { grid-template-columns: 1fr 34px; }
  .b-srow .b-who2 { grid-column: 1 / -1; }
  .b-vs { grid-template-columns: 1fr 1fr; }
  .b-toasts { bottom: calc(var(--s-9) + env(safe-area-inset-bottom, 0px)); }
  .b-grab { display: block; width: 40px; height: 6px; border-radius: 3px; background: var(--rule-strong); margin: 0 auto var(--s-4); box-sizing: content-box; padding: var(--s-3) var(--s-5); background-clip: content-box; touch-action: none; }
  .sh-detailbody { touch-action: pan-y; }
}
@media (max-width: 520px) {
  .b-seg .b-lg { display: none; } .b-seg .b-sh { display: inline; }
  .b-boardtop { grid-template-columns: 1fr; } .b-bigcr { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .b-toast, .b-coach, .b-spin, .cl-mint, .b-pop .b-face, .b-sk, .b-tube i, .b-card { animation: none; transition: none; }
}
/* The empty Assignment page: the prompt box, your classes, and a grader card
   that says only what it is for. The file shelf appears with the first file. */
#studio.w-blank #context-empty, #studio.w-blank #w-fresh { display: none; }
#studio.w-blank .w-gcard > h3 { font-size: 16px; color: var(--ink-dim); }
#studio.w-blank .w-gets:has(#your-files[hidden]) { display: none; }
/* Writing on a phone: the paper is the screen. The path stays on one line,
   the step rail and eyebrow give their room back while it writes. */
@media (max-width: 640px) {
  .live-draft .w-stages { flex-wrap: nowrap; }
  .live-draft .w-stages li + li::before { width: 12px; margin: 0 var(--s-1); }
  .live-draft .w-stages b { width: 24px; height: 24px; }
  .live-draft .w-stages li.castle span { display: none; }
  #studio.is-working:not(.has-result) .workflow-rail, #studio.is-working:not(.has-result) .studio-header .eyebrow { display: none; }
  .live-paper { max-height: 260px; padding: var(--s-4); }
}


.sy-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,.8fr); gap:var(--s-4); align-items:start; }
.sy-side { display:grid; gap:var(--s-4); min-width:0; }
.sy-card { min-width:0; padding:var(--s-5); border:1px solid var(--rule); border-radius:var(--r-l); background:var(--surface); }
.sy-main { padding:var(--s-6); }
.sy-card h3 { margin:var(--s-2) 0 var(--s-3); font:800 clamp(22px,2.5vw,30px)/1.13 var(--f-display); letter-spacing:-.025em; color:var(--ink); text-wrap:balance; }
.sy-card .sy-check-title { font-size:22px; }
.sy-card p { color:var(--ink-dim); line-height:1.5; }
.sy-intro { max-width:56ch; margin:0 0 var(--s-5); font-size:15px; }
.sy-step { display:flex; align-items:center; gap:var(--s-2); color:var(--ink-faint); font:800 11px/1.2 var(--f-ui); letter-spacing:.12em; text-transform:uppercase; }
.sy-step span { color:var(--ink-dim); }
.sy-switch { display:inline-flex; max-width:100%; gap:var(--s-1); margin-bottom:var(--s-4); padding:var(--s-1); border:1px solid var(--rule); border-radius:999px; background:var(--surface-2); }
.sy-switch button { min-height:36px; padding:6px var(--s-4); border:0; border-radius:999px; background:transparent; color:var(--ink-dim); font:700 13px/1.2 var(--f-ui); cursor:pointer; }
.sy-switch button[aria-pressed="true"] { background:var(--ink); color:var(--surface); }
.sy-file { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:var(--s-2); min-height:186px; padding:var(--s-5); border:2px dashed var(--rule-strong); border-radius:var(--r-m); background:var(--surface-2); color:var(--ink-dim); text-align:center; cursor:pointer; }
.sy-file:hover, .sy-file:focus-within, .sy-file.sy-dragging { border-color:var(--ink); background:var(--raise); }
.sy-file-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:var(--r-m); background:var(--ink); color:var(--surface); font:800 24px/1 var(--f-ui); }
.sy-file strong { color:var(--ink); font:800 17px/1.2 var(--f-display); }
.sy-file > span:last-of-type { font:400 12px/1.4 var(--f-ui); }
.sy-file input { max-width:100%; font:600 12px/1.4 var(--f-ui); color:var(--ink-dim); }
.sy-file input::file-selector-button { margin-right:var(--s-2); padding:7px 10px; border:1px solid var(--rule); border-radius:var(--r-s); background:var(--surface); color:var(--ink); font:700 12px var(--f-ui); cursor:pointer; }
#sy-camera, .sy-camera-action { display:none; }
@media (pointer: coarse) {
  #sy-camera { display:block; position:absolute; width:1px; height:1px; opacity:0; }
  .sy-camera-action { display:inline-flex; min-height:44px; align-items:center; margin-top:var(--s-3); padding:var(--s-3) var(--s-4); border:1px solid var(--rule); border-radius:999px; background:var(--surface); color:var(--ink); font:700 13px var(--f-ui); cursor:pointer; }
  #sy-camera:focus-visible + .sy-camera-action { outline:3px solid var(--focus); outline-offset:2px; }
}
.sy-text-label { display:block; margin-bottom:var(--s-2); color:var(--ink); font:700 13px/1.3 var(--f-ui); }
.sy-card textarea { width:100%; min-height:190px; resize:vertical; padding:var(--s-4); border:1px solid var(--rule-strong); border-radius:var(--r-m); background:var(--surface-2); color:var(--ink); font:400 14px/1.5 var(--f-ui); }
.sy-card textarea:focus, .sy-fields input:focus { outline:2px solid var(--ink); outline-offset:2px; }
.sy-card .sy-small { margin:0; font:400 13px/1.5 var(--f-ui); color:var(--ink-dim); }
#sy-text-pane .sy-small { margin-top:var(--s-2); }
.sy-source { display:flex; align-items:center; gap:var(--s-2); min-width:0; margin-top:var(--s-3); padding:var(--s-3); border:1px solid var(--rule); border-radius:var(--r-m); background:var(--surface-2); color:var(--ink); font:700 13px/1.3 var(--f-ui); }
.sy-source span:nth-child(2) { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sy-source span:first-child { color:var(--ok); }
.sy-source small { margin-left:auto; flex:none; color:var(--ink-dim); font:600 11px var(--f-ui); }
.sy-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s-3); margin:var(--s-4) 0 var(--s-5); }
.sy-fields label { display:grid; grid-template-columns:1fr auto; gap:var(--s-2); align-items:end; color:var(--ink); font:700 13px/1.3 var(--f-ui); }
.sy-fields label.sy-wide { grid-column:1 / -1; }
/* Several sections on one syllabus: the teachers as one-tap chips. */
.sy-teachers { margin-top:var(--s-4); padding-top:var(--s-4); border-top:1px dashed var(--rule-strong); }
.sy-teachers p { margin:0 0 var(--s-3); color:var(--ink); font:700 14px/1.4 var(--f-ui); }
.sy-teachers div { display:flex; flex-wrap:wrap; gap:var(--s-2); }
.sy-teacher { min-height:36px; padding:0 var(--s-4); border:1.5px solid var(--ink); border-radius:999px; background:var(--surface); color:var(--ink); font:600 13.5px var(--f-ui); cursor:pointer; }
.sy-teacher:hover, .sy-teacher:focus-visible { background:var(--ink); color:var(--surface); }
.sy-field-hint { color:var(--ink-faint); font:600 11px/1.2 var(--f-ui); text-align:right; }
.sy-fields input { grid-column:1/-1; width:100%; min-width:0; padding:11px 12px; border:1px solid var(--rule-strong); border-radius:var(--r-s); background:var(--surface-2); color:var(--ink); font:500 15px/1.3 var(--f-ui); }
.sy-save { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s-4); justify-content:space-between; padding:var(--s-4); border:1px solid var(--rule); border-radius:var(--r-m); background:var(--surface-2); }
.sy-save > div { flex:1 1 210px; }
.sy-save strong { font:800 13px/1.3 var(--f-ui); color:var(--ink); }
.sy-save p { margin:var(--s-1) 0 0; font-size:12px; }
.sy-save label { display:flex; align-items:flex-start; gap:8px; margin-top:12px; color:var(--ink); font:600 12px/1.4 var(--f-ui); cursor:pointer; }
.sy-save label input { flex:none; margin-top:2px; width:16px; height:16px; accent-color:var(--ink); }
.sy-submit { display:inline-flex; align-items:center; gap:var(--s-3); min-height:44px; padding:10px 14px; border:1px solid var(--ink); border-radius:var(--r-s); background:var(--ink); color:var(--surface); font:800 13px/1.2 var(--f-ui); cursor:pointer; }
.sy-submit:disabled { opacity:.45; cursor:not-allowed; }
.sy-status { min-height:20px; margin:var(--s-3) 0 0; font:600 12px/1.4 var(--f-ui); }
.sy-progress { margin-top:var(--s-3); padding:var(--s-4); border:1px solid var(--rule-strong); border-left:4px solid var(--ok); border-radius:var(--r-s); background:var(--surface-2); }
.sy-progress strong { display:block; color:var(--ink); font:800 14px/1.3 var(--f-ui); }
.sy-progress p { margin:var(--s-2) 0; color:var(--ink-dim); font-size:13px; }
.sy-progress small { color:var(--ink-faint); font-size:11px; }
.sy-error { color:var(--stop) !important; }.sy-ok { color:var(--ok) !important; }
.sy-excerpts, .sy-shared-list { margin-top:var(--s-4); }
.sy-empty { margin:0; padding:var(--s-5); border:1px dashed var(--rule-strong); border-radius:var(--r-m); background:var(--surface-2); font-size:13px; }
.sy-excerpt, .sy-shared { padding:var(--s-3) 0; border-top:1px solid var(--rule); }
.sy-excerpt b, .sy-shared b { color:var(--ink); font:800 11px/1.3 var(--f-ui); letter-spacing:.06em; text-transform:uppercase; }
.sy-excerpt p { margin:6px 0 0; font-size:13px; overflow-wrap:anywhere; }
.sy-shared-list { color:var(--ink-dim); font-size:13px; }
.sy-shared ul { margin:var(--s-2) 0 0; padding-left:20px; color:var(--ink-dim); }
.sy-deepen, .sy-share { justify-self:start; min-height:36px; padding:6px var(--s-4); border:1px solid var(--rule-strong); border-radius:999px; background:transparent; color:var(--ink); font:700 12px/1.2 var(--f-ui); cursor:pointer; }
.sy-deepen:hover, .sy-share:hover { background:var(--surface-2); }
.sy-open { justify-self:start; min-height:36px; padding:6px var(--s-4); border:1px solid var(--rule-strong); border-radius:999px; background:var(--surface); color:var(--ink); font:700 13px/1.2 var(--f-ui); cursor:pointer; }
.sy-open:hover { background:var(--surface-2); }
.sy-deepen:disabled { cursor:wait; opacity:.6; }
.sy-grading-read { border-top:0; }
.sy-mine-state { font-weight:700; }
.sy-mine-state.sy-busy { color:var(--ink); }
.sy-mine-state.sy-warn { color:var(--stop); }
.sy-layout [hidden] { display:none !important; }
/* The dropper builds the class card as it reads: live, before anything is sent. */
.sy-live { margin-top:var(--s-3); }
.sy-class-live { border-style:dashed; border-color:var(--rule-strong); }
.sy-live-miss { margin:0; font:700 13px/1.4 var(--f-ui); color:var(--warn) !important; }
.sy-live-ok { margin:0; font:700 13px/1.4 var(--f-ui); color:var(--ok) !important; }
.sy-details { margin:var(--s-5) 0 0; padding-top:var(--s-4); border-top:1px solid var(--rule); }
.sy-details > summary { display:flex; align-items:center; justify-content:space-between; gap:var(--s-3); cursor:pointer; list-style:none; }
.sy-details > summary::-webkit-details-marker { display:none; }
.sy-details-state { font:700 12px/1.3 var(--f-ui); color:var(--ink-dim); text-decoration:underline; text-underline-offset:3px; }
.sy-details[open] .sy-details-state { text-decoration:none; }
.sy-auto { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--s-3); margin:var(--s-3) 0 0; padding:var(--s-3) var(--s-4); border:1px solid var(--ok); border-radius:var(--r-m); background:var(--ok-sunk); color:var(--ink); font:700 13.5px/1.4 var(--f-ui); }
.sy-auto[hidden] { display:none; }
.sy-auto button { min-height:34px; padding:0 var(--s-4); border:1px solid var(--ink); border-radius:999px; background:var(--surface); color:var(--ink); font:700 12.5px var(--f-ui); cursor:pointer; }
/* My classes: every syllabus is a class card on the board, each in its own pastel. */
.sy-classes { margin:0 0 var(--s-5); }
.sy-classes-head { display:flex; align-items:baseline; justify-content:space-between; gap:var(--s-3); margin:0 0 var(--s-3); }
.sy-classes-head h3 { margin:0; font:800 22px/1.2 var(--f-display); letter-spacing:-.02em; color:var(--ink); }
.sy-add-link { color:var(--ink-dim); font:700 13px/1.4 var(--f-ui); text-underline-offset:3px; }
.sy-class-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(290px, 1fr)); gap:var(--s-3); }
.sy-class { --hue:var(--b-intro); position:relative; display:grid; gap:var(--s-2); align-content:start; min-width:0; padding:var(--s-5) var(--s-5) var(--s-4); border:1px solid var(--rule); border-radius:var(--r-l); background:var(--surface); overflow:hidden; }
.sy-class::before { content:""; position:absolute; inset:0 0 auto; height:8px; background:var(--hue); }
.sy-hue-2 { --hue:var(--b-methods); } .sy-hue-3 { --hue:var(--b-thought); } .sy-hue-4 { --hue:var(--b-elect); } .sy-hue-5 { --hue:var(--b-core); }
.sy-class-top { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--s-1) var(--s-2); }
.sy-class-top b { font:800 20px/1.15 var(--f-display); letter-spacing:-.02em; color:var(--ink); }
.sy-class-top span { font:600 13px/1.3 var(--f-ui); color:var(--ink-dim); }
.sy-class-who { margin:0; font:400 13px/1.4 var(--f-ui); color:var(--ink-dim); }
.sy-class .cl-path { margin:var(--s-2) 0 0; }
.sy-class .cl-path li span { display:none; }
.sy-class .cl-path li.on span, .sy-class .cl-path li.stuck span, .sy-class .cl-path li.castle.done span { display:inline; }
.sy-class .sy-mine-state { margin:0; font:700 13px/1.4 var(--f-ui); color:var(--ink-dim); }
.sy-class-grade { margin:0; font:400 13px/1.45 var(--f-ui); color:var(--ink); }
.sy-class-grade span { margin-right:var(--s-1); font:700 10.5px/1 var(--f-mono); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-faint); }
.sy-class small { color:var(--ink-faint); font:500 12px/1.4 var(--f-mono); }
.sy-class-actions { display:flex; flex-wrap:wrap; gap:var(--s-2); margin-top:var(--s-1); }
.sy-class-actions:empty { display:none; }
.sy-write { min-height:36px; padding:6px var(--s-4); border:0; border-radius:999px; background:var(--ink); color:var(--surface); font:700 13px/1.2 var(--f-ui); cursor:pointer; }
.sy-write:hover { background:var(--candy-hover); }
.sy-class-empty { border-style:dashed; background:var(--surface-2); }
.sy-class-empty::before { background:repeating-linear-gradient(90deg, var(--b-intro) 0 24px, var(--b-methods) 24px 48px, var(--b-thought) 48px 72px, var(--b-elect) 72px 96px, var(--b-core) 96px 120px); }
.sy-class-empty b { font:800 18px/1.2 var(--f-display); color:var(--ink); }
.sy-class-empty p { margin:0; max-width:60ch; font:400 14px/1.5 var(--f-ui); color:var(--ink-dim); }
@media (max-width:900px) { .sy-layout { grid-template-columns:1fr; }.sy-side { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .sy-main { padding:var(--s-4); }.sy-side { grid-template-columns:1fr; }.sy-fields { grid-template-columns:1fr; }.sy-source small { display:none; } }
/* ---------- Due soon: every dated assignment across the classes ---------- */
.sy-due { margin:0 0 var(--s-5); padding:var(--s-5); border:2px solid var(--ink); border-radius:var(--r-l); background:var(--surface); }
.sy-duehead { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--s-3); margin-bottom:var(--s-3); }
.sy-duehead h3 { margin:0; font:800 22px/1.1 var(--f-display); letter-spacing:-.02em; color:var(--ink); }
.sy-duehead span { color:var(--ink-dim); font:600 13px var(--f-ui); }
.sy-ics { margin-left:auto; min-height:34px; padding:0 var(--s-4); border:1.5px solid var(--ink); border-radius:999px; background:var(--surface); color:var(--ink); font:700 13px var(--f-ui); cursor:pointer; }
.sy-ics:hover { background:var(--ink); color:var(--surface); }
.sy-due h4 { margin:var(--s-4) 0 var(--s-2); font:700 11px/1 var(--f-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--ink-faint); }
.sy-due ul { margin:0; padding:0; list-style:none; display:grid; gap:var(--s-2); }
.sy-duerow { display:grid; grid-template-columns:auto 92px minmax(0,1fr) auto; align-items:center; gap:var(--s-3); padding:var(--s-2) var(--s-3); border-radius:var(--r-m); background:var(--surface-2); border-left:6px solid var(--hue); }
.sy-duerow.late .sy-duewhen b { color:var(--sherbet-text); }
.sy-duerow.done { opacity:.62; }
.sy-duerow.done .sy-duewhat b { text-decoration:line-through; }
.sy-duecheck { position:relative; display:grid; place-items:center; }
.sy-duecheck input { width:20px; height:20px; accent-color:var(--ink); cursor:pointer; }
.sy-duecheck span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.sy-duewhen { display:grid; }
.sy-duewhen b { font:800 15px/1.15 var(--f-ui); color:var(--ink); }
.sy-duewhen small, .sy-duewhat small { color:var(--ink-dim); font:600 12px/1.3 var(--f-ui); }
.sy-duewhat { display:grid; min-width:0; }
.sy-duewhat b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:700 14px/1.3 var(--f-ui); color:var(--ink); }
.sy-duego { min-height:32px; padding:0 var(--s-4); border:0; border-radius:999px; background:var(--ink); color:var(--surface); font:700 12.5px var(--f-ui); cursor:pointer; white-space:nowrap; }
.sy-duedone summary { margin-top:var(--s-4); cursor:pointer; color:var(--ink-dim); font:700 13px var(--f-ui); }
.sy-duedone ul { margin-top:var(--s-2); }
@media (max-width:620px) {
  .sy-duerow { grid-template-columns:auto minmax(0,1fr) auto; column-gap:var(--s-3); row-gap:0; padding:var(--s-2) var(--s-3); }
  .sy-duewhen { grid-column:2; display:flex; flex-wrap:wrap; align-items:baseline; gap:0 var(--s-2); }
  .sy-duewhen b { font-size:13px; } .sy-duewhen small { font-size:11.5px; }
  .sy-duewhat { grid-column:2; } .sy-duego { grid-column:3; grid-row:1 / span 2; }
  .sy-duecheck { grid-row:1 / span 2; }
  .sy-due { padding:var(--s-4); }
}
/* A class's candy tube: how much of its dated work is done. */
.sy-tube { display:flex; align-items:center; gap:var(--s-2); margin:var(--s-2) 0 0; font:600 12px var(--f-ui); color:var(--ink-dim); }
.sy-tube i { --fill:0%; flex:1; height:10px; border-radius:999px; border:1.5px solid var(--tile-ink); background:linear-gradient(90deg, var(--b-elect) var(--fill), var(--surface) var(--fill)); }
@media (prefers-reduced-motion: no-preference) { .sy-tube i { transition:background .4s ease; } }
/* With classes on the board, adding one is a compact drop box until a syllabus is in it. */
/* Until a syllabus is in the box, the dropper is just the box: the details, the save and the preview wait for it. */
#syllabus-root:not(.sy-active) .sy-intro, #syllabus-root:not(.sy-active) .sy-details, #syllabus-root:not(.sy-active) .sy-save,
#syllabus-root:not(.sy-active) .sy-side, #syllabus-root:not(.sy-active) .sy-status, .sy-has-classes:not(.sy-active) .sy-class-empty { display:none; }
#syllabus-root:not(.sy-active) .sy-layout { grid-template-columns:1fr; }
.sy-dragging .sy-file { outline:3px dashed var(--ink); outline-offset:4px; }
/* A whole class cleared: pastels falling across the screen, once. */
.cl-celebrate { position:fixed; inset:0; pointer-events:none; z-index:200; overflow:hidden; }
.cl-celebrate i { --x:50vw; --r:0deg; --t:1.6s; --d:0s; position:absolute; top:-20px; left:var(--x); width:9px; height:14px; border-radius:2px; background:var(--b-intro); animation:cl-fall var(--t) var(--ease-out) var(--d) both; }
.cl-celebrate i:nth-child(5n+2) { background:var(--b-methods); } .cl-celebrate i:nth-child(5n+3) { background:var(--b-thought); border-radius:999px; width:11px; height:11px; }
.cl-celebrate i:nth-child(5n+4) { background:var(--b-elect); } .cl-celebrate i:nth-child(5n) { background:var(--b-core); }
@keyframes cl-fall { 0% { transform:translateY(0) rotate(0); opacity:1; } 85% { opacity:1; } 100% { transform:translateY(105vh) rotate(var(--r)); opacity:0; } }
@media (prefers-reduced-motion: reduce) { .cl-celebrate { display:none; } }
.sy-dueprev ul { margin:var(--s-2) 0 0; padding:0; list-style:none; display:grid; gap:var(--s-1); }
.sy-dueprev li { display:grid; grid-template-columns:56px minmax(0,1fr); gap:var(--s-2); font-size:13px; line-height:1.4; }
.sy-dueprev li span { font:700 12px/1.4 var(--f-mono); color:var(--ink); }
/* A Due soon row from the school calendar: its platform badge, its link back, and "Which class?". */
.sy-duefrom { margin-left:var(--s-1); padding:0 var(--s-2); border-radius:999px; background:var(--b-elect); color:var(--tile-ink); font:700 10.5px/1.6 var(--f-ui); font-style:normal; }
.sy-duewhat a { color:inherit; text-decoration:underline; text-decoration-color:var(--rule-strong); text-underline-offset:3px; }
.sy-dueplace { background:var(--surface); color:var(--ink); border:1.5px solid var(--ink); }
.sy-duewhy { display:block; margin-top:var(--s-1); color:var(--ink-dim); font:500 11.5px/1.35 var(--f-ui); white-space:normal; }
.sy-duewhy.is-conflict { color:var(--warn); font-weight:700; }
.sy-duewhy.is-conflict::before { content:"⚑ "; }
.sy-duewhich { padding:0; border:0; background:none; color:var(--ink); font:700 12px/1.3 var(--f-ui); text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
/* Taking things back: × on a class card, the file in the dropper, a queued file and a Due soon row. */
.sy-remove, .sy-source-x, .sy-waitfile button, .sy-duehide { display:inline-grid; place-items:center; flex:none; width:28px; height:28px; padding:0; border:1.5px solid transparent; border-radius:999px; background:transparent; color:var(--ink-dim); font:700 17px/1 var(--f-ui); cursor:pointer; }
.sy-remove:hover, .sy-source-x:hover, .sy-waitfile button:hover, .sy-duehide:hover,
.sy-remove:focus-visible, .sy-source-x:focus-visible, .sy-waitfile button:focus-visible, .sy-duehide:focus-visible { border-color:var(--ink); background:var(--surface); color:var(--ink); }
.sy-remove { position:absolute; top:var(--s-2); right:var(--s-2); }
.sy-class-top { padding-right:var(--s-6); }
.sy-source-x { margin-left:var(--s-1); }
.sy-waitlist { display:flex; flex-wrap:wrap; gap:var(--s-2); margin-top:var(--s-2); }
.sy-waitfile { display:inline-flex; align-items:center; gap:var(--s-1); max-width:100%; padding:0 0 0 var(--s-3); border:1px solid var(--rule); border-radius:999px; background:var(--surface-2); color:var(--ink); font:600 12px/1.2 var(--f-ui); }
.sy-waitfile button { width:24px; height:24px; font-size:15px; }
.sy-duerow { position:relative; }
.sy-duehide { position:absolute; top:-8px; right:-8px; width:24px; height:24px; border-color:var(--rule); background:var(--surface); font-size:14px; opacity:0; }
.sy-duerow:hover .sy-duehide, .sy-duehide:focus-visible { opacity:1; }
@media (hover:none) { .sy-duehide { opacity:1; } }
.sy-duerow.is-hidden { opacity:.72; }

/* ---------- The hill: My classes' top, the next step, the syllabus reads (hill-client.js) ---------- */
.sy-hero { margin:0 0 var(--s-6); }
.sy-hero-kicker { display:flex; align-items:center; gap:var(--s-2); margin:0 0 var(--s-3); font:700 11px/1.3 var(--f-mono); letter-spacing:.14em; text-transform:uppercase; color:var(--ink-faint); }
.sy-hero-kicker i { width:10px; height:10px; border-radius:50%; background:var(--b-elect); box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--tile-ink) 30%, transparent); }
.sy-hero h3 { margin:0; font:800 clamp(32px,4.6vw,52px)/1.02 var(--f-display); letter-spacing:-.04em; color:var(--ink); text-wrap:balance; }
.sy-hero > p b { color:var(--ink); }
.sy-hero > p { max-width:52ch; margin:var(--s-3) 0 0; color:var(--ink-dim); font:400 16px/1.5 var(--f-ui); }
.sy-hero-stats { display:flex; flex-wrap:wrap; gap:var(--s-3); margin:var(--s-5) 0 0; padding:0; list-style:none; }
.sy-hero-stats li { display:flex; align-items:baseline; gap:var(--s-2); padding:var(--s-3) var(--s-5); border-radius:999px; background:var(--hue); color:var(--tile-ink); box-shadow:inset 0 -3px 0 color-mix(in srgb, var(--tile-ink) 14%, transparent); }
.sy-hero-stats b { font:800 26px/1 var(--f-display); letter-spacing:-.03em; }
.sy-hero-stats span { font:700 13px/1 var(--f-ui); }
@media (prefers-reduced-motion: no-preference) {
  .sy-hero-stats li { animation:sy-pop .5s var(--ease-pop) both; }
  .sy-hero-stats li:nth-child(2) { animation-delay:.07s; } .sy-hero-stats li:nth-child(3) { animation-delay:.14s; }
  .sy-due.is-arriving .sy-duerow { animation:sy-arrive .45s var(--ease-out) both; }
  .sy-due.is-arriving li:nth-child(2) { animation-delay:.08s; } .sy-due.is-arriving li:nth-child(3) { animation-delay:.16s; }
  .sy-due.is-arriving li:nth-child(4) { animation-delay:.24s; } .sy-due.is-arriving li:nth-child(5) { animation-delay:.32s; }
  .sy-due.is-arriving li:nth-child(n+6) { animation-delay:.4s; }
}
@keyframes sy-pop { from { opacity:0; transform:scale(.8); } }
@keyframes sy-arrive { from { opacity:0; transform:translateY(10px); } }
/* With nothing in yet, the page is the two doors: Classroom and the school calendar, side by side. */
.sy-hill.is-empty { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s-4); align-items:start; }
.sy-hill.is-empty > * { grid-column:1 / -1; }
.sy-hill.is-empty > .sy-gc, .sy-hill.is-empty > #sy-cal { grid-column:auto; margin:0; }
.sy-hill.is-empty > .sy-hero { margin-bottom:var(--s-2); }
.sy-hill.is-empty .sy-classes-head, .sy-hill .sy-class-empty { display:none; }
@media (max-width:760px) { .sy-hill.is-empty { grid-template-columns:1fr; } }
/* The next step up the hill: a candy stop, a sentence, one button. The last stop is gold. */
.sy-nexts { display:grid; gap:var(--s-3); margin:0 0 var(--s-5); }
.sy-next { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s-4); margin:0; padding:var(--s-4) var(--s-5); border:2px solid var(--ink); border-radius:var(--r-l); background:color-mix(in srgb, var(--b-thought) 24%, var(--surface)); }
.sy-next > div { flex:1 1 240px; min-width:0; }
.sy-next { position:relative; padding-right:var(--s-7); }
.sy-next-x { position:absolute; top:var(--s-1); right:var(--s-1); width:28px; height:28px; border:0; border-radius:999px; background:none; color:var(--ink-dim); font:700 16px/1 var(--f-ui); cursor:pointer; }
.sy-next-x:hover { background:var(--surface-2); color:var(--ink); }
.sy-next-x:focus-visible { outline:3px solid var(--focus); outline-offset:1px; }
.sy-next p { margin:0; color:var(--ink); font:500 15px/1.45 var(--f-ui); }
.sy-next .sy-next-kicker { margin-bottom:var(--s-1); color:var(--ink-dim); font:700 11px/1.3 var(--f-mono); letter-spacing:.14em; text-transform:uppercase; }
.sy-next-stop { flex:none; width:16px; height:16px; border-radius:50%; background:var(--b-thought); box-shadow:inset 0 0 0 2px color-mix(in srgb, var(--tile-ink) 30%, transparent); }
.sy-next.is-gold { background:color-mix(in srgb, var(--b-methods) 34%, var(--surface)); }
.sy-next.is-gold .sy-next-stop { width:22px; height:22px; border-radius:0; background:var(--b-methods); box-shadow:none; clip-path:polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.sy-next.is-small { padding:var(--s-3) var(--s-4); border-width:1.5px; }
.sy-next.is-small p { font-size:14px; }
.sy-next.is-small .sy-next-go { min-height:36px; background:var(--surface); color:var(--ink); border:1.5px solid var(--ink); }
.sy-next.is-quiet { justify-content:center; border:0; background:none; padding:var(--s-2) 0; }
.sy-next.is-quiet p { color:var(--ink-dim); font-size:14px; }
.sy-next-go { flex:none; min-height:42px; padding:0 var(--s-5); border:0; border-radius:999px; background:var(--ink); color:var(--surface); font:800 14px var(--f-ui); cursor:pointer; transition:transform .15s var(--ease-pop); }
.sy-next-go::after { content:" →"; }
.sy-next-go:hover { transform:translateX(2px); }
.sy-next.is-quiet .sy-next-go { min-height:36px; background:var(--surface); color:var(--ink); border:1.5px solid var(--ink); }
.sy-next-go:focus-visible, .sy-duewhen:focus-visible, .sy-read-when:focus-visible, .sy-read-add:focus-visible, .sy-read-more:focus-visible, .sy-read-write:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
/* A due date is a button: tap it to change it. */
button.sy-duewhen { margin:calc(-1 * var(--s-1)); padding:var(--s-1); border:0; border-radius:var(--r-s); background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
button.sy-duewhen:hover { background:var(--surface); }
.sy-duedate { box-sizing:border-box; width:100%; min-height:36px; padding:var(--s-1) var(--s-2); border:1.5px solid var(--ink); border-radius:var(--r-s); background:var(--surface); color:var(--ink); font:700 13px var(--f-ui); }
/* Syllabi: each syllabus as it was read. */
.sy-reads { margin:0 0 var(--s-7); }
.sy-reads-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--s-3); margin-bottom:var(--s-4); }
.sy-reads-head h3 { margin:0; font:800 26px/1.1 var(--f-display); letter-spacing:-.025em; color:var(--ink); }
.sy-reads-head span { color:var(--ink-dim); font:600 13px var(--f-ui); }
.sy-reads-list { display:grid; gap:var(--s-3); }
.sy-read { border:1px solid var(--rule); border-left:6px solid var(--hue); border-radius:var(--r-l); background:var(--surface); }
.sy-read > summary { display:flex; align-items:center; gap:var(--s-4); padding:var(--s-4) var(--s-5); cursor:pointer; list-style:none; }
.sy-read > summary::-webkit-details-marker { display:none; }
.sy-read > summary::after { content:""; flex:none; width:8px; height:8px; margin-left:var(--s-1); border-right:2px solid var(--ink-dim); border-bottom:2px solid var(--ink-dim); transform:rotate(45deg); transition:transform .2s; }
.sy-read[open] > summary::after { transform:rotate(-135deg); }
.sy-read-name { display:grid; flex:1; min-width:0; }
.sy-read-name b { font:800 18px/1.2 var(--f-display); color:var(--ink); }
.sy-read-name small { color:var(--ink-dim); font:600 13px/1.3 var(--f-ui); }
.sy-read-count { flex:none; padding:var(--s-1) var(--s-3); border-radius:999px; background:var(--hue); color:var(--tile-ink); font:700 12px var(--f-ui); }
.sy-read-grade, .sy-read-dates, .sy-read-none, .sy-read-loose, .sy-read-foot { margin:0 var(--s-5) var(--s-4); }
.sy-read-line { margin:var(--s-2) 0 0; color:var(--ink); font:700 15px/1.4 var(--f-ui); }
.sy-read-dates { padding:0; list-style:none; display:grid; gap:var(--s-2); }
.sy-read-dates li { display:grid; grid-template-columns:auto minmax(0,1fr); gap:var(--s-3); align-items:start; }
.sy-read-dates li.is-past { opacity:.6; }
.sy-read-when { min-width:92px; padding:var(--s-1) var(--s-3); border:1.5px solid var(--rule-strong); border-radius:999px; background:var(--surface-2); color:var(--ink); font:700 12.5px/1.4 var(--f-mono); text-align:left; cursor:pointer; }
.sy-read-when:hover { border-color:var(--ink); }
.sy-read-what { display:grid; min-width:0; }
.sy-read-what b { color:var(--ink); font:700 14px/1.35 var(--f-ui); }
.sy-read-what small, .sy-read-loose small { color:var(--ink-dim); font:400 12.5px/1.4 var(--f-ui); overflow-wrap:anywhere; }
.sy-read-what small.sy-read-conflict { color:var(--warn); font-weight:700; }
.sy-read-none { color:var(--ink-dim); font:400 14px var(--f-ui); }
.sy-read-loose { padding:var(--s-3) var(--s-4); border:1.5px dashed var(--rule-strong); border-radius:var(--r-m); }
.sy-read-loose > p { margin:0 0 var(--s-2); color:var(--ink-faint); font:700 11px/1.3 var(--f-mono); letter-spacing:.12em; text-transform:uppercase; }
.sy-read-loose ul { margin:0; padding:0; list-style:none; display:grid; gap:var(--s-2); }
.sy-read-loose li { display:flex; align-items:center; justify-content:space-between; gap:var(--s-3); }
.sy-read-loose li > span { display:grid; min-width:0; }
.sy-read-loose b { color:var(--ink); font:700 14px/1.35 var(--f-ui); }

/* Semester home: the three existing inputs meet on one launch screen. */
.sy-home, .sy-hill.is-empty { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(280px,.75fr); gap:var(--s-4); align-items:start; }
.sy-home > #sy-hero { grid-column:1 / -1; grid-row:1; margin:0 0 var(--s-2); }
.sy-home > .sy-home-actions { grid-column:1; grid-row:2; min-width:0; padding:var(--s-5); border:1px solid var(--rule); border-radius:var(--r-l); background:var(--surface); }
.sy-home-actions-head { margin-bottom:var(--s-4); }
.sy-home-actions > summary { cursor:pointer; font:800 var(--t-h3)/1.2 var(--f-display); color:var(--ink); }
.sy-home-actions > summary:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.sy-home-actions-head p { margin:var(--s-1) 0 0; color:var(--ink-dim); font:400 13px/1.45 var(--f-ui); }
.sy-home-doors { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--s-3); }
.sy-home-door { display:flex; flex-direction:column; align-items:start; gap:var(--s-2); min-width:0; min-height:182px; padding:var(--s-4); border:1px solid color-mix(in srgb,var(--tile-ink) 12%,transparent); border-radius:var(--r-m); color:var(--tile-ink); text-align:left; text-decoration:none; font:inherit; cursor:pointer; transition:transform .16s var(--ease-out), box-shadow .16s var(--ease-out); }
.sy-home-door:hover { transform:translateY(-2px); box-shadow:var(--lift); }
.sy-home-door:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.sy-home-door.is-classroom { background:var(--b-elect); }
.sy-home-door.is-syllabus { background:var(--b-thought); }
.sy-home-door.is-assignment { background:var(--b-methods); }
.sy-home-door > span { display:grid; place-items:center; width:36px; height:36px; border-radius:var(--r-s); background:color-mix(in srgb,var(--paper) 60%,transparent); font:800 19px/1 var(--f-display); }
.sy-home-door strong { font:800 18px/1.12 var(--f-display); }
.sy-home-door small { font:500 12.5px/1.4 var(--f-ui); }
.sy-home-door em { margin-top:auto; font:700 12px/1.3 var(--f-ui); font-style:normal; }
.sy-home-door[hidden] { display:none; }
.sy-home-doors:has(.is-classroom[hidden]) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.sy-home > #sy-home-context { grid-column:2; grid-row:2; min-width:0; margin:0; padding:var(--s-5); border:1px solid var(--ok-dim); border-radius:var(--r-l); background:var(--ok-sunk); }
.sy-home-context h3 { margin:0 0 var(--s-3); color:var(--ink); font:800 22px/1.12 var(--f-display); }
.sy-home-kicker { margin:0 0 var(--s-2); color:var(--ink-dim); font:700 11px/1.3 var(--f-mono); letter-spacing:.1em; text-transform:uppercase; }
.sy-home-context ul { display:grid; gap:var(--s-3); margin:0; padding:0; list-style:none; }
.sy-home-context li { display:flex; align-items:start; gap:var(--s-2); color:var(--ink); font:500 13px/1.4 var(--f-ui); }
.sy-home-context li b { color:var(--ok); }
.sy-home-context-foot { margin:var(--s-4) 0 0; padding-top:var(--s-3); border-top:1px solid var(--ok-dim); color:var(--ink-dim); font:400 12px/1.45 var(--f-ui); }
.sy-home > .sy-classes-head { grid-column:1 / -1; grid-row:3; margin:var(--s-2) 0 0; }
.sy-home > .sy-classes-head h3 { font-size:26px; }
.sy-home > #sy-mine { grid-column:1; grid-row:4; }
.sy-home > #sy-mine { grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)); }
.sy-home > #sy-next { grid-column:2; grid-row:4; margin:0; }
.sy-home > #sy-due { grid-column:1; grid-row:5; margin:0; }
.sy-home > #sy-plan { grid-column:2; grid-row:5; margin:0; }
.sy-home > #sy-cal { grid-column:1; grid-row:6; margin:0; }
.sy-home > #sy-gc { grid-column:2; grid-row:6; margin:0; }
.sy-home.is-empty > .sy-home-actions { grid-column:1 / -1; }
.sy-home.is-empty > #sy-home-context, .sy-home.is-empty > .sy-classes-head, .sy-home.is-empty > #sy-mine, .sy-home.is-empty > #sy-next { display:none; }
.sy-home.is-empty > #sy-gc { grid-column:1; grid-row:3; }
.sy-home.is-empty > #sy-cal { grid-column:2; grid-row:3; }
.sy-home.is-empty > #sy-gc.is-compact { display:none; }
.sy-home.is-empty > #sy-cal { grid-column:1 / -1; }
.sy-home .sy-class-empty { display:block; }
.sy-home > #sy-resume { grid-column:1 / -1; grid-row:2; }
.sy-home:not(.is-empty) > #sy-next { grid-row:3; }
.sy-home:not(.is-empty) > #sy-due, .sy-home:not(.is-empty) > #sy-plan { grid-row:4; }
.sy-home:not(.is-empty) > .sy-classes-head, .sy-home:not(.is-empty) > #sy-home-context { grid-row:5; }
.sy-home:not(.is-empty) > #sy-mine { grid-row:6; }
.sy-home:not(.is-empty) > .sy-home-actions { grid-row:7; }
.sy-home:not(.is-empty) > #sy-cal, .sy-home:not(.is-empty) > #sy-gc { grid-row:8; }
.sy-home.is-empty > #sy-resume { grid-row:3; }
.sy-home.is-empty > #sy-cal, .sy-home.is-empty > #sy-gc { grid-row:4; }
@media (max-width:1000px) { .sy-home, .sy-hill.is-empty { grid-template-columns:1fr; }.sy-home > .sy-home-actions,.sy-home > #sy-home-context,.sy-home > .sy-classes-head,.sy-home > #sy-mine,.sy-home > #sy-next,.sy-home > #sy-due,.sy-home > #sy-plan,.sy-home > #sy-cal,.sy-home > #sy-gc,.sy-home > #sy-resume { grid-column:1; grid-row:auto !important; }.sy-home.is-empty > #sy-gc,.sy-home.is-empty > #sy-cal { grid-column:1; grid-row:auto; } }
@media (max-width:640px) { .sy-home > .sy-home-actions { padding:var(--s-4); }.sy-home-doors,.sy-home-doors:has(.is-classroom[hidden]) { grid-template-columns:1fr; }.sy-home-door { display:grid; grid-template-columns:36px minmax(0,1fr); gap:var(--s-1) var(--s-3); min-height:0; }.sy-home-door > span { grid-row:1 / 4; }.sy-home-door small,.sy-home-door em { grid-column:2; }.sy-home-door em { margin-top:var(--s-1); } }
.sy-read-add, .sy-read-more { flex:none; min-height:32px; padding:0 var(--s-4); border:1.5px solid var(--ink); border-radius:999px; background:var(--surface); color:var(--ink); font:700 12.5px var(--f-ui); cursor:pointer; }
.sy-read-add:hover, .sy-read-more:hover { background:var(--ink); color:var(--surface); }
.sy-read-foot { display:flex; flex-wrap:wrap; justify-content:space-between; gap:var(--s-3); }
.sy-read-write { min-height:36px; padding:0 var(--s-5); border:0; border-radius:999px; background:var(--ink); color:var(--surface); font:800 13px var(--f-ui); cursor:pointer; }
.sy-read-new { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--s-3); width:100%; }
.sy-read-new label { display:grid; gap:var(--s-1); color:var(--ink); font:700 12px var(--f-ui); }
.sy-read-new label:first-child { flex:1 1 180px; }
.sy-read-new input { box-sizing:border-box; min-height:38px; padding:var(--s-2) var(--s-3); border:1.5px solid var(--rule-strong); border-radius:var(--r-s); background:var(--surface-2); color:var(--ink); font:500 14px var(--f-ui); }
.sy-read-new button { min-height:38px; padding:0 var(--s-4); border:1.5px solid var(--ink); border-radius:999px; background:var(--ink); color:var(--surface); font:700 13px var(--f-ui); cursor:pointer; }
.sy-read-new button[type="button"] { background:var(--surface); color:var(--ink); }
.sy-reads-next { margin-top:var(--s-5); }
@media (max-width:620px) { .sy-read > summary { padding:var(--s-4); } .sy-read-grade, .sy-read-dates, .sy-read-none, .sy-read-loose, .sy-read-foot { margin-left:var(--s-4); margin-right:var(--s-4); } .sy-next { padding:var(--s-4); } .sy-hero-stats li { padding:var(--s-2) var(--s-4); } }
/* What the read is sure of: drop rules, a failed grading check, and what a revised syllabus changed. */
.sy-read-evidence, .sy-read-changes, .sy-calc { margin:0 var(--s-5) var(--s-4); }
.sy-read-flag { margin:0 0 var(--s-2); padding:var(--s-2) var(--s-3); border-left:4px solid var(--warn); border-radius:var(--r-s); background:var(--warn-sunk); color:var(--ink); font:600 13px/1.45 var(--f-ui); }
.sy-read-rules { display:flex; flex-wrap:wrap; gap:var(--s-2); margin:0; padding:0; list-style:none; }
.sy-read-rules li { display:inline-flex; align-items:baseline; gap:var(--s-2); padding:var(--s-1) var(--s-3); border-radius:999px; background:var(--b-elect); color:var(--tile-ink); font:700 12px/1.4 var(--f-ui); cursor:help; }
.sy-read-rules small { font:500 11px var(--f-mono); opacity:.8; }
.sy-read-changes { padding:var(--s-3) var(--s-4); border-radius:var(--r-m); background:color-mix(in srgb, var(--b-thought) 22%, var(--surface)); }
.sy-read-changes > p { margin:0 0 var(--s-2); color:var(--ink); font:800 13px/1.3 var(--f-ui); }
.sy-read-changes ul { margin:0; padding:0 0 0 var(--s-5); display:grid; gap:var(--s-1); color:var(--ink); font:500 13px/1.45 var(--f-ui); }
.sy-read-changes li.is-date, .sy-read-changes li.is-grading { font-weight:700; }
.sy-read-changes small { color:var(--ink-dim); font:500 12.5px var(--f-ui); }
.sy-class-rev { margin:var(--s-1) 0 0; color:var(--ink); font:700 12px/1.3 var(--f-ui); }
.sy-class-rev::before { content:"↻ "; }
/* The grade calculator: one line per graded part, the answer under it. */
.sy-calc { border:1.5px solid var(--ink); border-radius:var(--r-m); background:var(--surface); }
.sy-calc > summary { display:flex; align-items:baseline; gap:var(--s-3); padding:var(--s-3) var(--s-4); cursor:pointer; list-style:none; color:var(--ink); font:800 14px/1.3 var(--f-ui); }
.sy-calc > summary::-webkit-details-marker { display:none; }
.sy-calc > summary small { color:var(--ink-dim); font:500 12.5px var(--f-ui); }
.sy-calc > summary::after { content:"+"; margin-left:auto; font:700 16px/1 var(--f-ui); }
.sy-calc[open] > summary::after { content:"–"; }
.sy-calc-body { padding:0 var(--s-4) var(--s-4); display:grid; gap:var(--s-4); }
.sy-calc-parts { margin:0; padding:0; list-style:none; display:grid; gap:var(--s-2); }
.sy-calc-parts li { display:grid; grid-template-columns:minmax(0,1fr) minmax(120px,40%); gap:var(--s-3); align-items:center; }
.sy-calc-parts label { display:grid; min-width:0; }
.sy-calc-parts label b { color:var(--ink); font:700 13.5px/1.3 var(--f-ui); }
.sy-calc-parts label small { color:var(--ink-dim); font:500 12px/1.3 var(--f-ui); }
.sy-calc-parts input { box-sizing:border-box; width:100%; min-height:36px; padding:var(--s-1) var(--s-3); border:1.5px solid var(--rule-strong); border-radius:var(--r-s); background:var(--surface-2); color:var(--ink); font:600 14px var(--f-mono); }
.sy-calc-parts input:focus { outline:2px solid var(--focus); outline-offset:1px; border-color:var(--focus); }
.sy-calc-out { padding:var(--s-3) var(--s-4); border-radius:var(--r-m); background:color-mix(in srgb, var(--b-methods) 30%, var(--surface)); }
.sy-calc-now { margin:0; color:var(--ink); font:500 14px/1.4 var(--f-ui); }
.sy-calc-now b { font:800 24px/1 var(--f-display); letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.sy-calc-now span { display:inline-block; padding:0 var(--s-2); border-radius:999px; background:var(--ink); color:var(--surface); font:800 13px/1.6 var(--f-ui); }
.sy-calc-needs { margin:var(--s-2) 0 0; padding:0; list-style:none; display:grid; gap:var(--s-1); color:var(--ink); font:500 13.5px/1.4 var(--f-ui); font-variant-numeric:tabular-nums; }
.sy-calc-needs b { display:inline-block; min-width:2.2em; font-weight:800; }
.sy-calc-needs .is-locked { color:var(--ok); font-weight:700; }
.sy-calc-note { margin:0; color:var(--ink-dim); font:500 13px/1.45 var(--f-ui); }
.sy-calc > summary:focus-visible { outline:3px solid var(--focus); outline-offset:2px; border-radius:var(--r-m); }
@media (max-width:620px) { .sy-read-evidence, .sy-read-changes, .sy-calc { margin-left:var(--s-4); margin-right:var(--s-4); } .sy-calc-parts li { grid-template-columns:1fr; gap:var(--s-1); } .sy-calc > summary small { display:none; } }
/* Where a piece of work is in its life (deadlines-client.js): started, graded; a done row takes its grade. */
.sy-duestate { margin-left:var(--s-1); padding:0 var(--s-2); border-radius:999px; background:var(--b-intro); color:var(--tile-ink); font:700 10.5px/1.6 var(--f-ui); font-style:normal; }
.sy-duestate.is-graded { background:var(--b-methods); }
.sy-duegrade input { width:84px; min-height:32px; padding:0 var(--s-2); border:1.5px solid var(--rule-strong); border-radius:var(--r-s); background:var(--surface); color:var(--ink); font:600 13px var(--f-ui); }
.sy-duegrade input:focus-visible { outline:3px solid var(--focus); outline-offset:1px; }
/* Your plan (planner-client.js): the week in the student's hours, blocks before each date. */
.sy-plan .sy-small { margin:var(--s-2) 0 0; font:400 13px/1.5 var(--f-ui); color:var(--ink-dim); }
.sy-plan-risk { list-style:none; margin:0 0 var(--s-3); padding:0; display:grid; gap:var(--s-2); }
.sy-plan-risk li { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s-2) var(--s-3); padding:var(--s-2) var(--s-3); border:1.5px solid var(--warn); border-radius:var(--r-m); background:var(--surface-2); color:var(--ink); font:500 13px/1.45 var(--f-ui); }
.sy-plan-risk li > span { display:flex; gap:var(--s-2); margin-left:auto; }
.sy-plan-act { min-height:30px; padding:0 var(--s-3); border:1.5px solid var(--ink); border-radius:999px; background:var(--surface); color:var(--ink); font:700 12px var(--f-ui); cursor:pointer; }
.sy-plan-act:hover { background:var(--ink); color:var(--surface); }
.sy-plan-act.is-quiet { border-color:var(--rule-strong); color:var(--ink-dim); }
.sy-plan-rest > .sy-plan-days { margin-top:var(--s-2); }
.sy-plan-days { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:var(--s-2); }
.sy-plan-day { min-width:0; padding:var(--s-2); border:1.5px solid var(--rule); border-radius:var(--r-m); background:var(--surface-2); }
.sy-plan-day.is-today { border-color:var(--ink); background:var(--surface); }
.sy-plan-day.is-off { opacity:.75; }
.sy-plan-when { display:flex; flex-direction:column; margin:0 0 var(--s-2); }
.sy-plan-when b { font:800 13px/1.2 var(--f-ui); color:var(--ink); }
.sy-plan-when small { font:600 11px/1.3 var(--f-ui); color:var(--ink-dim); }
.sy-plan-day ul { list-style:none; margin:0; padding:0; display:grid; gap:var(--s-1); }
.sy-plan-block { display:grid; gap:var(--s-1); padding:var(--s-1) var(--s-2); border-radius:var(--r-s); background:var(--b-elect); color:var(--tile-ink); }
.sy-plan-block:nth-child(2n) { background:var(--b-thought); } .sy-plan-block:nth-child(3n) { background:var(--b-intro); }
.sy-plan-block b { display:block; font:700 12px/1.3 var(--f-ui); overflow-wrap:anywhere; }
.sy-plan-block small { display:block; font:500 11px/1.3 var(--f-ui); }
.sy-plan-did { justify-self:start; min-height:26px; padding:0 var(--s-2); border:1.5px solid var(--tile-ink); border-radius:999px; background:var(--surface); color:var(--ink); font:700 11px var(--f-ui); cursor:pointer; }
.sy-plan-free { margin:0; color:var(--ink-dim); font:600 12px var(--f-ui); }
.sy-plan-hours { display:flex; flex-wrap:wrap; gap:var(--s-2); margin:var(--s-2) 0; }
.sy-plan-hours label { display:grid; gap:var(--s-1); font:700 11.5px var(--f-ui); color:var(--ink-dim); }
.sy-plan-hours input, .sy-plan-effort input { width:72px; min-height:32px; padding:0 var(--s-2); border:1.5px solid var(--rule-strong); border-radius:var(--r-s); background:var(--surface); color:var(--ink); font:600 13px var(--f-ui); }
.sy-plan-hours input[type="time"] { width:auto; }
.sy-plan-effort { list-style:none; margin:var(--s-2) 0; padding:0; display:grid; gap:var(--s-2); }
.sy-plan-effort li { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:var(--s-2); }
.sy-plan-effort label b { display:block; font:700 13px/1.3 var(--f-ui); color:var(--ink); }
.sy-plan-effort label small, .sy-plan-effort li > span { font:500 12px/1.3 var(--f-ui); color:var(--ink-dim); }
.sy-plan-set input:focus-visible, .sy-plan-act:focus-visible, .sy-plan-did:focus-visible { outline:3px solid var(--focus); outline-offset:1px; }
@media (max-width:900px) { .sy-plan-days { grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); } }
@media (max-width:620px) {
  .sy-plan-days { grid-template-columns:1fr; }
  .sy-plan-day { display:grid; grid-template-columns:84px minmax(0,1fr); gap:var(--s-2); }
  .sy-plan-when { margin:0; }
  .sy-duegrade { grid-column:3; grid-row:1 / span 2; }
  .sy-duegrade input { width:64px; }
}


#cl-account-gate[hidden],#cl-account-profile[hidden],#cl-account-gate [hidden]{display:none!important}
.cl-signed-hint #cl-account-gate{display:none}
#cl-account-gate{position:fixed;z-index:99999;inset:0;overflow:auto;background:var(--ground);color:var(--ink);font-family:var(--f-ui)}
.cl-account-layout{min-height:100%;max-width:1320px;margin:auto;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(380px,.92fr);gap:clamp(28px,5vw,88px);align-items:center;padding:clamp(24px,5vw,76px);box-sizing:border-box}
.cl-account-story{min-width:0;align-self:stretch;display:flex;flex-direction:column;justify-content:space-between;gap:64px;padding:8px 0}
.cl-account-brand{display:inline-flex;align-items:center;gap:12px;width:max-content;color:var(--ink);text-decoration:none}
.cl-account-brand strong{display:block;font:800 22px/1 var(--f-display);letter-spacing:-.025em}
.cl-account-brand small{display:block;margin-top:5px;color:var(--ink-faint);font:600 9px/1 var(--f-mono);letter-spacing:.18em;text-transform:uppercase}
.cl-account-storybody{max-width:590px}
.cl-account-kicker,.cl-account-stepno,.cl-account-formkicker{font:700 11px/1.3 var(--f-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}
.cl-account-story h1{margin:18px 0 18px;font:800 clamp(44px,5.5vw,76px)/.98 var(--f-display);letter-spacing:-.045em;text-wrap:balance}
.cl-account-storybody>p:last-child{max-width:490px;margin:0;color:var(--ink-dim);font:400 clamp(16px,1.5vw,19px)/1.55 var(--f-ui)}
.cl-account-route{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;list-style:none;margin:0;padding:0}
.cl-account-route::before{content:"";position:absolute;top:12px;left:12px;right:calc(33.33% - 12px);height:3px;border-radius:99px;background:var(--road)}
.cl-account-route li{position:relative;min-width:0;padding:33px 12px 0 0;display:grid;gap:10px}
.cl-account-route li::before{content:"";position:absolute;top:4px;left:4px;width:17px;height:17px;box-sizing:border-box;border:4px solid var(--surface);border-radius:50%;background:var(--ink);box-shadow:0 0 0 1px var(--rule-strong)}
.cl-account-route li:nth-child(2)::before{background:var(--k-4)}
.cl-account-route li:nth-child(3)::before{background:var(--k-1)}
.cl-account-route b{display:block;font:700 clamp(13px,1.2vw,16px)/1.25 var(--f-ui)}
.cl-account-entry{width:100%;max-width:490px;justify-self:end}
.cl-account-card{background:var(--surface);border:1px solid var(--rule);border-radius:var(--r-l);padding:clamp(25px,3.7vw,48px);box-shadow:var(--lift)}
.cl-account-formkicker{margin:0 0 16px}
.cl-account-card h2{margin:0;font:800 clamp(31px,3.2vw,42px)/1.05 var(--f-display);letter-spacing:-.035em}
.cl-account-intro{margin:12px 0 30px;color:var(--ink-dim);font:400 15px/1.55 var(--f-ui)}
.cl-account-card form{display:grid;gap:18px}
.cl-account-card label,#cl-account-profile label{display:grid;gap:8px;font:700 13px/1.3 var(--f-ui);color:var(--ink)}
.cl-account-card input,#cl-account-profile input{box-sizing:border-box;width:100%;min-height:49px;padding:11px 14px;border:1px solid var(--rule-strong);border-radius:var(--r-s);background:var(--ground);color:var(--ink);font:500 15px/1.3 var(--f-ui);outline:none}
.cl-account-card input::placeholder{color:var(--ink-faint)}
.cl-account-card input:focus,#cl-account-profile input:focus{border-color:var(--focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 20%,transparent)}
.cl-account-hint{font:400 12px/1.4 var(--f-ui);color:var(--ink-faint)}
#cl-account-message{min-height:0;margin:0;color:var(--stop);font:600 13px/1.4 var(--f-ui)}
#cl-account-message:empty{display:none}
#cl-account-action,#cl-account-profile button{border:0;border-radius:999px;background:var(--candy);color:var(--ink-on-fill);font:700 15px/1.3 var(--f-ui);cursor:pointer;transition:background .15s ease,transform .15s ease}
#cl-account-action{width:100%;min-height:50px;padding:12px 22px;margin-top:2px}
#cl-account-action:hover,#cl-account-profile button:hover{background:var(--candy-hover)}
#cl-account-action:active,#cl-account-profile button:active{transform:translateY(1px);background:var(--candy-press)}
#cl-account-action:disabled,#cl-account-profile button:disabled{opacity:.55;cursor:wait}
#cl-account-action:focus-visible,#cl-account-toggle:focus-visible,#cl-account-profile button:focus-visible,#cl-account-profile summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.cl-account-switch{border-top:1px solid var(--rule);margin-top:27px;padding-top:20px;text-align:center}
.cl-account-card .cl-link{border:0;background:none;color:var(--ink);font:700 13px/1.4 var(--f-ui);text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:5px}
.cl-account-card .cl-link:hover{color:var(--candy-hover)}
.cl-account-foot{margin:18px 0 0;text-align:center;color:var(--ink-faint);font:500 11px/1.5 var(--f-mono)}
#cl-account-profile{position:fixed;z-index:1000;right:16px;bottom:16px;width:min(310px,calc(100vw - 32px));box-sizing:border-box;background:var(--surface);color:var(--ink);border:1px solid var(--rule);border-radius:var(--r-l);padding:14px 17px;box-shadow:var(--lift);font:13px/1.5 var(--f-ui)}
#cl-account-profile summary{cursor:pointer;font-weight:700}
#cl-account-profile:not([open]){width:auto;padding:8px 16px;border-radius:999px}
#cl-account-profile p{overflow-wrap:anywhere;color:var(--ink-dim)}
#cl-account-profile label{margin:15px 0}
#cl-account-profile button{font-size:12px;padding:9px 14px;margin:0 6px 2px 0}
.cl-account-foot a,.cl-account-privacy a{color:inherit;text-decoration:underline;text-underline-offset:3px}
/* Invite a friend: a small candy card in the account panel. */
.cl-account-invite{margin-top:var(--s-4);padding:var(--s-3);border-radius:var(--r-m);background:var(--b-thought);color:var(--tile-ink)}
.cl-account-invite p{margin:0 0 var(--s-2);font:500 13px/1.45 var(--f-ui)}
.cl-account-invite small{display:block;margin-top:var(--s-2);font:600 12px var(--f-ui)}
#cl-account-profile #cl-invite-copy{background:var(--tile-ink);color:var(--b-thought);border:0}
.cl-account-delete{margin-top:var(--s-4);padding-top:var(--s-3);border-top:1px solid var(--rule)}
#cl-account-profile #cl-account-delete{background:transparent;color:var(--ink);border:1px solid var(--rule-strong)}
#cl-account-profile #cl-account-delete:hover{background:var(--surface-2)}
.cl-account-hello{margin:0;color:var(--ink)!important;font:800 18px/1.2 var(--f-display)}
.cl-avatar{display:none}
.cl-bar .cl-avatar-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.cl-bar #cl-account-profile,.cl-bar #cl-account-profile:not([open]){position:relative;right:auto;bottom:auto;z-index:auto;flex:none;width:auto;padding:0;border:0;border-radius:50%;background:none;box-shadow:none}
.cl-bar #cl-account-profile>summary{list-style:none;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--b-thought);color:var(--tile-ink);border:1px solid var(--rule);font:800 16px/1 var(--f-display)}
.cl-bar #cl-account-profile>summary::-webkit-details-marker{display:none}
.cl-bar #cl-account-profile>summary:hover{border-color:var(--ink-faint)}
.cl-bar .cl-avatar{display:block}
.cl-bar .cl-account-panel{position:absolute;top:calc(100% + 10px);right:0;width:min(310px,calc(100vw - 32px));box-sizing:border-box;background:var(--raise);color:var(--ink);border:1px solid var(--rule);border-radius:var(--r-l);padding:16px 18px;box-shadow:var(--lift),inset 0 1px 0 var(--edge);font:13px/1.5 var(--f-ui);animation:cl-pop .2s cubic-bezier(.2,.8,.2,1) both}
@keyframes cl-pop{from{opacity:0;transform:translateY(-6px)}}
@media(max-width:850px){.cl-account-layout{grid-template-columns:1fr;gap:30px;max-width:600px;align-content:center}.cl-account-story{gap:22px}.cl-account-story h1{font-size:clamp(36px,8vw,52px);margin:13px 0 10px}.cl-account-storybody>p:last-child{font-size:15px}.cl-account-route li{padding-top:29px;gap:4px}.cl-account-entry{max-width:none;justify-self:stretch}}
@media(max-width:520px){.cl-account-layout{padding:22px 16px 36px;gap:22px;align-content:start}.cl-account-brand strong{font-size:19px}.cl-account-story{gap:14px}.cl-account-story h1{font-size:32px;line-height:1.02;margin:9px 0 0}.cl-account-storybody>p:last-child{margin-top:10px;font-size:15px;line-height:1.5}.cl-account-route{display:none}.cl-account-card{padding:25px 22px}.cl-account-intro{margin-bottom:24px}}
@media(max-height:660px) and (min-width:851px){.cl-account-story{gap:32px}.cl-account-layout{padding-top:28px;padding-bottom:28px}}
/* Continue with Google: a quiet outlined button above the email form, and its place in My account. */
.cl-google{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:50px;margin:0 0 4px;padding:12px 22px;border:1.5px solid var(--ink);border-radius:999px;background:var(--surface);color:var(--ink);font:700 15px/1.3 var(--f-ui);text-decoration:none;transition:background .15s ease,transform .15s ease}
.cl-google:hover{background:var(--surface-2)}
.cl-google:active{transform:translateY(1px)}
.cl-google:focus-visible,.cl-google-link:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.cl-google[hidden],.cl-or[hidden],.cl-google-link[hidden],.cl-google-state[hidden]{display:none}
.cl-google-g{display:grid;place-items:center;width:24px;height:24px;border-radius:999px;background:var(--ink);color:var(--surface);font:800 13px/1 var(--f-ui)}
.cl-or{display:flex;align-items:center;gap:10px;margin:12px 0 10px;color:var(--ink-dim);font:600 12px/1.2 var(--f-ui)}
.cl-or::before,.cl-or::after{content:"";flex:1;height:1px;background:var(--rule)}
.cl-google-state{margin:2px 0 6px;color:var(--ink-dim);font:600 12.5px/1.4 var(--f-ui)}
.cl-google-link{display:inline-block;margin:2px 0 8px;color:var(--ink);font:700 13px/1.4 var(--f-ui);text-decoration:underline;text-underline-offset:3px}
#cl-account-profile #cl-account-delete[hidden],#cl-delete-pin-label[hidden]{display:none}
/* Google first: the Google button is the way in; email and PIN wait behind a link. */
.cl-google-first #cl-account-form,.cl-google-first .cl-account-switch{display:none}
.cl-google-first .cl-google{min-height:54px;margin-top:6px;border-color:var(--candy);background:var(--candy);color:var(--ink-on-fill)}
.cl-google-first .cl-google:hover{background:var(--candy-hover);border-color:var(--candy-hover)}
.cl-google-first .cl-google .cl-google-g{background:var(--ink-on-fill);color:var(--candy)}
.cl-pin-open{display:block;margin:14px auto 0}
.cl-pin-open[hidden]{display:none}
.cl-account-card .cl-pin-open{border:0;background:none;color:var(--ink-dim);font:700 13px/1.4 var(--f-ui);text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:6px}
.cl-account-card .cl-pin-open:hover{color:var(--ink)}
.cl-account-card .cl-pin-open:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
/* The one-time nudge to add Google sign-in: in the page's flow, never over Create. */
.cl-nudge{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;max-width:min(1080px,calc(100% - 32px));margin:14px auto 0;padding:12px 16px;border:1px solid var(--rule);border-radius:var(--r-l);background:var(--surface);box-shadow:var(--lift)}
.cl-nudge[hidden]{display:none}
.cl-link-pin{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin:0 0 8px}
.cl-link-pin label{flex:1;min-width:160px}
.cl-nudge .cl-link-pin label{display:grid;gap:6px;color:var(--ink);font:700 13px/1.3 var(--f-ui)}
.cl-nudge .cl-link-pin input{box-sizing:border-box;width:100%;min-height:38px;padding:8px 12px;border:1px solid var(--rule-strong);border-radius:var(--r-s);background:var(--ground);color:var(--ink);font:500 15px/1.3 var(--f-ui)}
.cl-link-pin button{min-height:38px;padding:0 16px;border:0;border-radius:999px;background:var(--candy);color:var(--ink-on-fill);font:700 13px var(--f-ui);cursor:pointer}
.cl-nudge p{flex:1;min-width:200px;margin:0;color:var(--ink-dim);font:500 14px/1.45 var(--f-ui)}
.cl-nudge p b{color:var(--ink)}
.cl-nudge-go{display:inline-flex;align-items:center;min-height:38px;padding:0 16px;border-radius:999px;background:var(--candy);color:var(--ink-on-fill);font:700 13px var(--f-ui);text-decoration:none;white-space:nowrap}
.cl-nudge-go:hover{background:var(--candy-hover)}
.cl-nudge-off{min-height:38px;padding:0 12px;border:0;border-radius:999px;background:none;color:var(--ink-dim);font:700 13px var(--f-ui);cursor:pointer}
.cl-nudge-off:hover{color:var(--ink);background:var(--surface-2)}
.cl-nudge-go:focus-visible,.cl-nudge-off:focus-visible{outline:3px solid var(--focus);outline-offset:3px}


.sy-cal { position:relative; margin:var(--s-5) 0 0; padding:var(--s-5); border:2px dashed var(--rule-strong); border-radius:var(--r-l); background:var(--surface-2); }
.sy-cal.is-on { border:2px solid var(--ink); background:var(--surface); }
.sy-cal.is-drop { border-color:var(--ink); background:var(--raise); outline:3px dashed var(--ink); outline-offset:4px; }
.sy-cal .sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.sy-cal-top { display:flex; align-items:flex-start; gap:var(--s-4); }
.sy-cal-top > div:first-of-type { flex:1; min-width:0; }
.sy-cal-top h3 { margin:0 0 var(--s-1); font:800 20px/1.15 var(--f-display); letter-spacing:-.02em; color:var(--ink); }
.sy-cal-top p { margin:0; color:var(--ink-dim); font:500 14px/1.45 var(--f-ui); }
.sy-cal-src { display:block; margin-top:var(--s-1); color:var(--ink-faint); font:600 12px/1.3 var(--f-mono); }
.sy-cal-glyph { flex:none; width:40px; height:40px; padding:6px; border-radius:var(--r-m); background:var(--b-elect); fill:none; stroke:var(--tile-ink); stroke-width:2.2; stroke-linecap:round; }
.sy-cal-glyph circle { fill:var(--tile-ink); stroke:none; }
.sy-cal-form { display:flex; gap:var(--s-2); margin-top:var(--s-4); }
.sy-cal-field { position:relative; flex:1; min-width:0; }
.sy-cal-field input { width:100%; min-height:46px; padding:0 var(--s-4); border:1.5px solid var(--ink); border-radius:999px; background:var(--surface); color:var(--ink); font:600 14px var(--f-ui); }
.sy-cal-field input::placeholder { color:var(--ink-faint); }
.sy-cal-seen { position:absolute; right:var(--s-2); top:50%; transform:translateY(-50%); max-width:50%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:var(--s-1) var(--s-3); border-radius:999px; background:var(--b-methods); color:var(--tile-ink); font:700 12px/1.2 var(--f-ui); pointer-events:none; }
.sy-cal-seen:empty { display:none; }
.sy-cal-go { min-height:46px; padding:0 var(--s-5); border:0; border-radius:999px; background:var(--ink); color:var(--surface); font:800 14px var(--f-ui); cursor:pointer; white-space:nowrap; }
.sy-cal-go:disabled { cursor:progress; }
.sy-cal-file { display:inline-flex; align-items:center; gap:var(--s-2); margin-top:var(--s-3); color:var(--ink-dim); font:600 13px var(--f-ui); cursor:pointer; }
.sy-cal-file input { position:absolute; width:1px; height:1px; opacity:0; }
.sy-cal-file span { text-decoration:underline; text-underline-offset:3px; }
.sy-cal-file:focus-within span { outline:2px solid var(--focus); outline-offset:2px; border-radius:var(--r-s); }
.sy-cal-where { margin-top:var(--s-4); }
.sy-cal-where-q { margin:0 0 var(--s-2); color:var(--ink-faint); font:700 11px/1 var(--f-mono); letter-spacing:.12em; text-transform:uppercase; }
.sy-cal-chips { display:flex; flex-wrap:wrap; gap:var(--s-2); }
.sy-cal-chip { min-height:32px; padding:0 var(--s-3); border:1.5px solid var(--rule-strong); border-radius:999px; background:var(--surface); color:var(--ink); font:700 12.5px var(--f-ui); cursor:pointer; }
.sy-cal-chip[aria-pressed="true"] { border-color:var(--ink); background:var(--ink); color:var(--surface); }
.sy-cal-steps { margin:var(--s-3) 0 0; padding:var(--s-3) var(--s-4) var(--s-3) var(--s-6); border-radius:var(--r-m); background:var(--surface); color:var(--ink); font:500 13.5px/1.55 var(--f-ui); }
.sy-cal-fine { margin:var(--s-4) 0 0; color:var(--ink-faint); font:500 12px/1.45 var(--f-ui); }
.sy-cal-note { margin:var(--s-3) 0 0; color:var(--ink-dim); font:600 13px/1.45 var(--f-ui); }
.sy-cal-note.is-warn { padding:var(--s-2) var(--s-3); border-radius:var(--r-m); background:var(--surface-3); color:var(--ink); }
.sy-cal-actions { display:flex; gap:var(--s-2); flex:none; }
.sy-cal-actions button { min-height:34px; padding:0 var(--s-4); border:1.5px solid var(--ink); border-radius:999px; background:var(--surface); color:var(--ink); font:700 12.5px var(--f-ui); cursor:pointer; }
.sy-cal-actions button:hover { background:var(--ink); color:var(--surface); }
.sy-cal-courses { margin-top:var(--s-4); }
.sy-cal-courses summary { cursor:pointer; color:var(--ink); font:700 13px var(--f-ui); }
.sy-cal-courses ul { margin:var(--s-3) 0 0; padding:0; list-style:none; display:grid; gap:var(--s-2); }
.sy-cal-courses li { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s-2) var(--s-3); padding:var(--s-2) var(--s-3); border-radius:var(--r-m); background:var(--surface-2); }
.sy-cal-courses li.is-asked { outline:2px solid var(--focus); outline-offset:2px; }
.sy-cal-course { display:grid; flex:1; min-width:140px; }
.sy-cal-course b { font:700 14px/1.3 var(--f-ui); color:var(--ink); }
.sy-cal-course small { color:var(--ink-dim); font:600 12px var(--f-ui); }
.sy-cal-matched { color:var(--ink-dim); font:italic 600 12px var(--f-ui); }
.sy-cal-courses select { min-height:34px; max-width:100%; padding:0 var(--s-3); border:1.5px solid var(--ink); border-radius:999px; background:var(--surface); color:var(--ink); font:600 13px var(--f-ui); }
@media (prefers-reduced-motion: no-preference) {
  .sy-cal.is-busy::after { content:""; position:absolute; left:var(--s-5); right:var(--s-5); bottom:-2px; height:4px; border-radius:999px;
    background:repeating-linear-gradient(-45deg, var(--b-intro) 0 10px, var(--b-methods) 10px 20px, var(--b-elect) 20px 30px); background-size:42px 100%; animation:sy-cal-read 0.9s linear infinite; }
  .sy-cal.is-on { animation:sy-cal-in var(--dur-slow) var(--ease-pop) both; }
}
@keyframes sy-cal-read { to { background-position:42px 0; } }
@keyframes sy-cal-in { from { transform:scale(.98); opacity:.6; } to { transform:none; opacity:1; } }
@media (max-width:620px) {
  .sy-cal { padding:var(--s-4); }
  .sy-cal-form { flex-direction:column; }
  .sy-cal-top { flex-wrap:wrap; }
  .sy-cal-actions { width:100%; }
  .sy-cal-seen { position:static; transform:none; display:inline-block; max-width:100%; margin-top:var(--s-2); }
}

.sy-cal-clear { position:absolute; right:var(--s-2); top:50%; transform:translateY(-50%); display:grid; place-items:center; width:30px; height:30px; padding:0; border:0; border-radius:999px; background:var(--surface-2); color:var(--ink); font:700 16px/1 var(--f-ui); cursor:pointer; }
.sy-cal-clear[hidden] { display:none; }
.sy-cal-field:has(.sy-cal-clear:not([hidden])) .sy-cal-seen { right:calc(var(--s-2) + 36px); }
.sy-cal-field:has(.sy-cal-clear:not([hidden])) input { padding-right:calc(var(--s-4) + 30px); }
.sy-cal-stop { background:var(--surface); color:var(--ink); border:1.5px solid var(--ink); }
/* Google Classroom: the calendar card's sibling, one line until connected. */
.sy-gc { margin-top:var(--s-3); }
.sy-gc.is-compact { padding:var(--s-4) var(--s-5); border-style:solid; border-width:1px; border-color:var(--rule); background:var(--surface); }
.sy-gc.is-compact .sy-cal-top { align-items:center; }
.sy-gc.is-compact .sy-cal-top h3 { font-size:17px; }
.sy-gc-glyph { background:var(--b-methods); }
.sy-gc-go { display:inline-flex; align-items:center; min-height:40px; padding:0 var(--s-4); border-radius:999px; background:var(--ink); color:var(--surface); font:800 13px var(--f-ui); text-decoration:none; white-space:nowrap; }
.sy-gc-go:hover { background:var(--ink); color:var(--surface); text-decoration:underline; text-underline-offset:3px; }
.sy-gc-go:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
/* My classes with nothing in yet: Google Classroom is the first of the two doors (hill-client.js). */
.sy-hill.is-empty > .sy-gc.is-compact { padding:var(--s-6); border:2px solid var(--ink); background:var(--surface); }
.sy-hill.is-empty > .sy-gc.is-compact .sy-cal-top { flex-wrap:wrap; align-items:flex-start; }
.sy-hill.is-empty > .sy-gc.is-compact .sy-cal-top h3 { font-size:22px; }
.sy-hill.is-empty > .sy-gc .sy-cal-actions { flex-basis:100%; }
.sy-hill .sy-gc-go { text-decoration:none; }
