:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f5f5f3;
  --ink: #111111;
  --muted: #555552;
  --dim: #666663;
  --line: #ddddda;
  --line-strong: #b8b8b3;
  --max: 1080px;
  --t-micro: 11px;
  --t-small: 13px;
  --t-summary: 14px;
  --t-body: 15px;
  --t-lead: 16px;
  --t-h3: 17px;
  --t-h2: 20px;
  --t-h1: 28px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.42;
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
code, pre, .path, .project-week, .project-kicker, .tool-label, .project-board-head, .role-tag, .micro-label, .prompt-spec, .prompt-beats time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
code { color: var(--ink); }

.skip-link {
  background: var(--ink);
  color: var(--bg);
  left: 8px;
  padding: 5px 8px;
  position: fixed;
  top: -50px;
  z-index: 100;
}
.skip-link:focus { top: 8px; }
.visually-hidden {
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

/* One quiet shelf frame shared by every page. */
.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 max(14px, calc((100vw - var(--max)) / 2));
}
.wordmark {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav { align-items: center; display: flex; gap: 18px; }
.site-header nav a, .text-button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 6px 0;
  text-decoration: none;
}
.site-header nav a:hover, .site-header nav a[aria-current="page"], .text-button:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] { text-decoration: underline; }

.page-shell {
  margin: 0 auto;
  padding: 18px 0 42px;
  width: min(calc(100% - 28px), var(--max));
}
.page-shell > p:first-child { margin: 0 0 5px; }
.utility-title {
  align-items: end;
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 0 0 10px;
}
.utility-title h1 {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 0;
}
.utility-title p { color: var(--muted); font-size: 12px; margin: 3px 0 0; }
.quiet, .loading { color: var(--muted); }

/* Pickup shelf project list. */
.board-tools { align-items: center; display: flex; gap: 9px; min-height: 27px; }
.tool-label { color: var(--dim); font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filter {
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  padding: 1px 0;
}
.filter:hover, .filter.is-active { border-color: var(--ink); color: var(--ink); }
.project-board-head, .project-row {
  display: grid;
  gap: 9px;
  grid-template-columns: 66px minmax(260px, 1fr) minmax(260px, 350px) 130px;
}
.project-board-head {
  border-bottom: 1px solid var(--line-strong);
  color: var(--dim);
  font-size: 9px;
  letter-spacing: .055em;
  padding: 4px 0;
  text-transform: uppercase;
}
.project-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  min-height: 60px;
  padding: 9px 0;
}
.project-week { color: var(--muted); font-size: 10px; text-transform: lowercase; }
.project-name { font-size: 15px; font-weight: 650; line-height: 1.15; margin: 0; }
.project-name a { text-decoration: none; }
.project-name a:hover { text-decoration: underline; }
.project-summary {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  color: var(--muted);
  display: -webkit-box;
  font-size: 11px;
  line-height: 1.32;
  margin: 2px 0 0;
  overflow: hidden;
}
.pickup-note { color: var(--muted); font-size: 11px; line-height: 1.3; }
.availability { align-items: end; display: flex; flex-direction: column; font-size: 11px; line-height: 1.2; text-align: right; }
.availability small { color: var(--muted); font-size: 9px; margin-top: 2px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.availability[data-status="unclaimed"] > span { font-weight: 650; }
.mobile-label { display: none; }
.status-line { align-items: baseline; display: flex; gap: 4px; min-width: 0; }
.status-value, .readiness { font-size: 10px; }
.status-owner {
  color: var(--muted);
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-material { color: var(--dim); display: block; font-size: 9px; margin: 3px 0 0; white-space: nowrap; }
.row-open { color: var(--muted); font-size: 9px; text-decoration: none; }
.row-open:hover { color: var(--ink); text-decoration: underline; }
.utility-note {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  margin: 18px 0 0;
  padding-top: 10px;
}
.utility-note strong { color: var(--ink); font-weight: 600; }

/* Project pickup sheet. */
.back-link { color: var(--muted); font-size: 9px; }
.project-header { padding: 0 0 5px; }
.project-title-row { align-items: start; display: flex; gap: 14px; justify-content: space-between; }
.project-kicker {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .04em;
  margin: 0 0 2px;
  text-transform: uppercase;
}
.project-header h1 {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1;
  margin: 0;
}
.agent-packet-link {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 9px;
  margin-top: 2px;
}
.agent-packet-link:hover { color: var(--ink); }
.project-summary-long {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.32;
  margin: 3px 0 5px;
  max-width: 760px;
}
.current-state {
  align-items: baseline;
  border-top: 1px solid var(--line-strong);
  display: grid;
  gap: 8px;
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 4px 0;
}
.current-state > span, .review-brief span, .watch-line > span {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.current-state strong { font-size: 10px; font-weight: 600; }
.current-state small { color: var(--muted); font-size: 9px; }
.watch-line {
  border-bottom: 1px solid var(--line-strong);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 4px 0;
}
.watch-line p { font-size: 9px; margin: 0; }
.review-brief {
  border-bottom: 1px solid var(--line-strong);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.review-brief > div {
  display: grid;
  gap: 7px;
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 4px 8px 4px 0;
}
.review-brief > div + div { border-left: 1px solid var(--line); padding-left: 8px; }
.review-brief p { font-size: 9px; line-height: 1.3; margin: 0; }

.review-section, .audio-section { border-bottom: 1px solid var(--line-strong); padding: 6px 0 7px; }
.section-title-row { align-items: baseline; display: flex; gap: 10px; justify-content: space-between; }
.section-title-row h2, .audio-section h2 { font-size: 11px; font-weight: 650; margin: 0; }
.section-title-row > div > p, .section-title-row > p, .audio-section header p {
  color: var(--dim);
  font-size: 8px;
  margin: 1px 0 0;
}

/* Images read as a contact sheet, not large cards. */
.board-gallery {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  margin-top: 5px;
}
.board-card { margin: 0; min-width: 0; }
.board-image {
  aspect-ratio: 4 / 3;
  background: var(--panel);
  border: 1px solid var(--line);
  display: block;
  overflow: hidden;
}
.board-image img { height: 100%; object-fit: contain; width: 100%; }
.board-card figcaption { align-items: start; display: flex; gap: 3px; justify-content: space-between; padding-top: 2px; }
.board-card figcaption > span { font-size: 8px; font-weight: 550; line-height: 1.18; }
.board-card figcaption small { color: var(--dim); font-size: 6px; line-height: 1.2; }
.board-copy { padding: 3px 0 0; }
.board-top { align-items: start; display: flex; gap: 4px; justify-content: space-between; }
.board-card h3 { font-size: 8px; font-weight: 600; line-height: 1.2; margin: 0; }
.role-tag {
  border: 1px solid var(--line-strong);
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 6px;
  line-height: 1;
  padding: 2px 3px;
  text-transform: lowercase;
  white-space: nowrap;
}
.role-tag[data-role="hold"] { border-style: dashed; color: var(--dim); }
.role-tag[data-role="pass"] { color: var(--ink); }
.board-details { margin-top: 1px; }
.board-details summary, .path-details summary { color: var(--dim); cursor: pointer; font-size: 7px; }
.board-details p { color: var(--muted); font-size: 8px; line-height: 1.3; margin: 3px 0; }

/* Audio pickup rows, ready for the forthcoming render hooks. */
.audio-list {
  margin-top: 5px;
}
.audio-picker { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.audio-picker button { background: var(--bg); border: 1px solid var(--line-strong); color: var(--muted); cursor: pointer; font-size: 8px; padding: 2px 5px; }
.audio-picker button.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.audio-item {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 240px);
  min-width: 0;
  padding: 4px 0;
}
.audio-item h3 { font-size: 9px; font-weight: 600; margin: 0; }
.audio-item > span { font-size: 9px; font-weight: 550; }
.audio-item p { color: var(--muted); font-size: 8px; margin: 1px 0 0; }
.audio-item a { font-size: 8px; }
.audio-item audio { height: 26px; max-width: 100%; width: 100%; }
.audio-warning { color: var(--muted); font-size: 8px; margin: 3px 0 0; }

/* Acts are compact rows. Exact prompts remain closed. */
.prompt-plans { margin-top: 4px; }
.prompt-card {
  align-items: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px 9px;
  grid-template-columns: 120px minmax(0, 1fr) 62px;
  min-width: 0;
  padding: 5px 0;
}
.prompt-card-head { display: flex; gap: 7px; grid-column: 1; grid-row: 1; justify-content: space-between; min-width: 0; }
.prompt-card h3 { font-size: 10px; font-weight: 650; margin: 0; }
.prompt-card-head p { color: var(--muted); font-size: 8px; margin: 1px 0 0; text-transform: capitalize; }
.prompt-spec { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 7px; gap: 2px 7px; margin-top: 3px; }
.act-description { color: var(--muted); font-size: 7px; grid-column: 1; margin: 0; }
.act-arc { align-items: start; display: flex; font-size: 8px; gap: 6px; grid-column: 2; grid-row: 1 / span 2; line-height: 1.3; min-width: 0; }
.act-arc span { min-width: 0; }
.act-arc b { color: var(--dim); flex: 0 0 auto; font-weight: 400; }
.prompt-beats { list-style: none; margin: 0; padding: 0; }
.prompt-beats li { display: grid; gap: 6px; grid-template-columns: 54px minmax(0, 1fr); }
.prompt-beats li + li { margin-top: 2px; }
.prompt-beats time { color: var(--dim); font-size: 7px; }
.prompt-beats span { color: var(--muted); font-size: 8px; line-height: 1.28; }
.more-beats { color: var(--dim); font-size: 7px; margin: 1px 0 0 60px; }
.full-prompt { grid-column: 3; grid-row: 1; margin: 0; padding: 0; text-align: right; }
.full-prompt summary { color: var(--muted); cursor: pointer; font-size: 8px; list-style: none; }
.full-prompt summary::after { color: var(--dim); content: " +"; }
.full-prompt[open] summary::after { content: " −"; }
.full-prompt[open] { border-top: 1px solid var(--line); grid-column: 1 / -1; grid-row: auto; margin-top: 3px; padding-top: 3px; text-align: left; }
.full-prompt pre {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 8px;
  line-height: 1.45;
  margin: 4px 0;
  max-height: 400px;
  overflow: auto;
  padding: 7px;
  white-space: pre-wrap;
}
.full-prompt > a { color: var(--muted); font-size: 8px; }

.production-note-list { border-top: 1px solid var(--line); margin-top: 4px; }
.production-note { display: grid; gap: 10px; grid-template-columns: 180px minmax(0, 1fr); padding: 4px 0; }
.production-note + .production-note { border-top: 1px solid var(--line); }
.production-note > div { display: flex; flex-direction: column; }
.production-note > div span { font-size: 8px; font-weight: 650; text-transform: capitalize; }
.production-note > div small { color: var(--dim); font-size: 7px; }
.production-note p, .empty-note { color: var(--muted); font-size: 8px; margin: 0; white-space: pre-wrap; }
.empty-note { margin-top: 4px; }

/* Operational information stays present but visually recedes. */
.production-details, .status-panel { border-bottom: 1px solid var(--line); margin: 0; }
.production-details > summary, .status-panel > summary {
  align-items: baseline;
  cursor: pointer;
  display: flex;
  gap: 9px;
  justify-content: space-between;
  list-style: none;
  min-height: 28px;
  padding: 6px 0 5px;
}
.production-details > summary > span, .status-panel > summary > span:first-child { font-size: 9px; font-weight: 500; }
.production-details > summary small, .status-summary { color: var(--dim); font-size: 8px; font-weight: 400; }
.production-details > summary::after, .status-panel > summary::after { color: var(--dim); content: "+"; font-size: 9px; }
.production-details[open] > summary::after, .status-panel[open] > summary::after { content: "−"; }
.production-details-body, .status-panel-body { border-top: 1px solid var(--line); padding: 6px 0 9px; }
.production-notes-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-section { min-width: 0; padding: 5px 0 7px; }
.content-section > h2, .agent-context h2 { font-size: 9px; font-weight: 650; margin: 0 0 3px; }
.content-section ul, .content-section ol {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
  margin: 0;
  padding-left: 13px;
}
.content-section li + li { margin-top: 2px; }
.agent-context { border-top: 1px solid var(--line); padding: 6px 0 0; }
.agent-context p { color: var(--muted); font-size: 8px; margin: 2px 0 0; }
.path { color: var(--dim); font-size: 7px; overflow-wrap: anywhere; }

.status-summary { margin-left: auto; }
.status-form { align-items: end; display: grid; gap: 5px; grid-template-columns: 120px 155px minmax(200px, 1fr) 52px; }
.field label { color: var(--dim); display: block; font-size: 8px; margin-bottom: 1px; }
.field input, .field select {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  height: 26px;
  min-width: 0;
  padding: 3px 5px;
  width: 100%;
}
.status-form button, .login-form button {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--bg);
  cursor: pointer;
  height: 26px;
  padding: 3px 7px;
}
.status-form button:hover, .login-form button:hover { background: #333333; }
.status-form button:disabled { cursor: wait; opacity: .45; }
.form-message { color: var(--dim); font-size: 8px; margin: 2px 0 0; min-height: 1em; }
.form-message.is-error { color: #8b2424; }

.file-groups { border-top: 1px solid var(--line); }
.file-group { border-bottom: 1px solid var(--line); }
.file-group > summary {
  cursor: pointer;
  display: flex;
  font-size: 8px;
  gap: 8px;
  justify-content: space-between;
  list-style: none;
  padding: 3px 0;
}
.file-group > summary span:last-child { color: var(--dim); }
.download-list { list-style: none !important; padding: 0 !important; }
.download-item { border-top: 1px solid var(--line); display: grid; gap: 1px; padding: 4px 0; }
.download-item a, .download-item > span:first-child { font-size: 8px; font-weight: 550; }
.download-meta { color: var(--dim); font-size: 7px; overflow-wrap: anywhere; }
.download-item audio { height: 26px; max-width: 100%; width: 100%; }
.path-details { margin-top: 1px; }
.path-details .path { display: block; margin-top: 2px; }

/* Character contact sheets. */
.references-page { max-width: var(--max); }
.reference-rules { border-bottom: 1px solid var(--line-strong); padding: 5px 0; }
.reference-rules p { color: var(--muted); font-size: 9px; margin: 0; }
.reference-rules strong { color: var(--ink); font-weight: 650; }
.reference-group:not(details) { border-bottom: 1px solid var(--line-strong); padding: 6px 0 7px; }
.reference-group h2 { font-size: 10px; font-weight: 650; margin: 0; }
.reference-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  margin-top: 4px;
}
.reference-group[data-group="primary"] .reference-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}
.reference-card { margin: 0; min-width: 0; }
.reference-group[data-group="primary"] .reference-card {
  display: block;
}
.reference-image {
  aspect-ratio: 1 / 1;
  background: var(--panel);
  border: 1px solid var(--line);
  display: block;
  overflow: hidden;
}
.reference-image img { height: 100%; object-fit: contain; width: 100%; }
.reference-image-missing { align-items: center; color: var(--dim); display: flex; font-size: 7px; justify-content: center; }
.reference-card figcaption { font-size: 8px; font-weight: 550; line-height: 1.2; padding-top: 2px; }
.reference-copy { padding-top: 2px; }
.reference-group[data-group="primary"] .reference-copy { padding-top: 0; }
.reference-title h3 { font-size: 9px; font-weight: 650; line-height: 1.2; margin: 0; }
.reference-copy > p { color: var(--muted); font-size: 8px; line-height: 1.3; margin: 2px 0 0; }
.reference-details { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 2px; }
.reference-details summary { color: var(--dim); cursor: pointer; font-size: 7px; }
.reference-details p { color: var(--muted); font-size: 7px; margin: 2px 0; }
.reference-details span, .reference-details > a { display: block; font-size: 7px; margin-top: 2px; }
.reference-drawer { border-bottom: 1px solid var(--line); }
.reference-drawer > summary {
  align-items: baseline;
  cursor: pointer;
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr auto auto;
  list-style: none;
  padding: 5px 0;
}
.reference-drawer > summary span { font-size: 9px; font-weight: 550; }
.reference-drawer > summary small { color: var(--dim); font-size: 8px; }
.reference-drawer > summary::after { color: var(--dim); content: "+"; }
.reference-drawer[open] > summary::after { content: "−"; }
.reference-drawer > .reference-grid { border-top: 1px solid var(--line); margin: 0; padding: 6px 0 7px; }

/* Agent reference shelf. */
.handbook { max-width: 900px; }
.handbook-nav {
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  flex-wrap: wrap;
  gap: 3px 11px;
  padding: 4px 0;
}
.handbook-nav a { color: var(--muted); font-size: 8px; }
.handbook-intro { border-bottom: 1px solid var(--line-strong); padding: 6px 0 7px; scroll-margin-top: 6px; }
.handbook-intro h2 { font-size: 10px; font-weight: 650; margin: 0; }
.warning { border-left: 1px solid var(--line-strong); font-size: 8px; margin: 4px 0 6px; padding-left: 6px; }
.rules-grid { display: grid; gap: 5px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rules-grid h3, .handbook-body h3 { font-size: 9px; font-weight: 650; margin: 4px 0 2px; }
.rules-grid h3:first-letter { text-transform: uppercase; }
.rules-grid ul, .handbook-body ul, .handbook-body ol { color: var(--muted); font-size: 8px; margin: 0; padding-left: 12px; }
.rules-grid li + li, .handbook-body li + li { margin-top: 2px; }
.handbook-section { border-bottom: 1px solid var(--line); scroll-margin-top: 6px; }
.handbook-section > summary {
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 165px 1fr auto;
  list-style: none;
  padding: 5px 0;
}
.handbook-section > summary span { font-size: 9px; font-weight: 550; }
.handbook-section > summary small { color: var(--dim); font-size: 8px; font-weight: 400; }
.handbook-section > summary::after { color: var(--dim); content: "+"; }
.handbook-section[open] > summary::after { content: "−"; }
.handbook-body { border-top: 1px solid var(--line); padding: 5px 0 8px 175px; }
.handbook-body p, .handbook-body dd { color: var(--muted); font-size: 8px; }
.handbook-body dl { margin: 0; }
.handbook-body dl div { border-top: 1px solid var(--line); padding: 3px 0; }
.handbook-body dt { margin: 0; }
.handbook-body dd { margin: 1px 0 0; }
.micro-label { color: var(--dim); font-size: 7px; text-transform: uppercase; }
.code-panel { background: var(--panel); border: 1px solid var(--line); overflow-x: auto; padding: 5px; }
.code-panel pre { color: var(--ink); font-size: 7px; line-height: 1.45; margin: 0; white-space: pre-wrap; }

/* Login and shared details. */
.login-page { align-items: center; display: flex; min-height: 100vh; }
.login-shell { margin: 0 auto; max-width: 330px; padding: 18px; width: 100%; }
.login-shell h1 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; margin: 18px 0 2px; }
.login-shell > p { color: var(--muted); font-size: 9px; }
.login-form { margin-top: 10px; }
.login-form label { color: var(--dim); display: block; font-size: 8px; margin-bottom: 2px; }
.login-row { display: grid; grid-template-columns: 1fr 52px; }
.login-form input { background: var(--bg); border: 1px solid var(--line-strong); color: var(--ink); min-width: 0; padding: 4px 5px; }

details > summary::-webkit-details-marker { display: none; }
footer {
  border-top: 1px solid var(--line);
  color: var(--dim);
  display: flex;
  font-size: 7px;
  gap: 12px;
  justify-content: space-between;
  padding: 6px max(14px, calc((100vw - var(--max)) / 2));
}
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

@media (max-width: 900px) {
  .project-board-head, .project-row {
    gap: 8px;
    grid-template-columns: 48px minmax(190px, 1fr) minmax(190px, 260px) 108px;
  }
}

@media (max-width: 700px) {
  .page-shell { padding-top: 9px; width: min(calc(100% - 20px), var(--max)); }
  .project-board-head { display: none; }
  .project-row {
    align-items: start;
    gap: 2px 7px;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 5px 0;
  }
  .project-row > div:nth-child(2) { grid-column: 2; }
  .project-row > .pickup-note { grid-column: 2 / -1; grid-row: 2; }
  .project-row > .availability { grid-column: 3; grid-row: 1; }
  .project-row .project-summary, .project-row .mobile-label { display: none; }
  .review-brief { grid-template-columns: 1fr; }
  .review-brief > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .board-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .audio-list, .production-notes-grid, .rules-grid { grid-template-columns: 1fr; }
  .prompt-card { grid-template-columns: 105px minmax(0, 1fr) 60px; }
  .status-form { grid-template-columns: 1fr 1fr; }
  .status-form .field:nth-child(3) { grid-column: 1 / -1; }
  .status-form button { width: 52px; }
  .handbook-section > summary { gap: 8px; grid-template-columns: 120px 1fr auto; }
  .handbook-body { padding-left: 0; }
}

@media (max-width: 500px) {
  .site-header { gap: 9px; padding-inline: 10px; }
  .wordmark { font-size: 9px; }
  .site-header nav { gap: 9px; }
  .site-header nav a, .text-button { font-size: 8px; }
  .utility-title { align-items: start; }
  .project-title-row { gap: 8px; }
  .project-header h1 { font-size: 21px; }
  .current-state { grid-template-columns: 47px minmax(0, 1fr); }
  .watch-line { grid-template-columns: 47px minmax(0, 1fr); }
  .review-brief > div { grid-template-columns: 47px minmax(0, 1fr); }
  .board-gallery { gap: 4px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .audio-item { grid-template-columns: 1fr; }
  .production-note { gap: 2px; grid-template-columns: 1fr; }
  .prompt-card { grid-template-columns: 76px minmax(0, 1fr) 54px; }
  .prompt-card-head { margin-bottom: 0; }
  .act-arc { display: block; }
  .act-arc b { display: block; line-height: 1; }
  .prompt-beats li { grid-template-columns: 48px minmax(0, 1fr); }
  .more-beats { margin-left: 54px; }
  .full-prompt { margin-top: 3px; }
  .production-details > summary small { display: none; }
  .status-form { grid-template-columns: 1fr; }
  .status-form .field:nth-child(3) { grid-column: auto; }
  .reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reference-group[data-group="primary"] .reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .handbook-section > summary { grid-template-columns: 1fr auto; }
  .handbook-section > summary small { display: none; }
  footer { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/*
  Authoritative human scale: a calm production binder, not a SaaS dashboard.
  The technical packet stays collapsed, but nothing human-facing drops below 11px.
*/
body {
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: auto;
}
.site-header {
  min-height: 56px;
  padding: 0 max(var(--s4), calc((100vw - var(--max)) / 2));
}
.wordmark { font-size: var(--t-body); font-weight: 700; }
.site-header nav { gap: var(--s5); }
.site-header nav a, .text-button { font-size: 14px; padding: var(--s3) 0; }
.page-shell {
  padding: var(--s5) 0 var(--s6);
  width: min(calc(100% - 32px), var(--max));
}
.page-shell > p:first-child { margin-bottom: var(--s2); }
.utility-title { padding-bottom: var(--s3); }
.utility-title h1 {
  font-size: var(--t-h1);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.1;
}
.utility-title p { font-size: var(--t-body); margin-top: var(--s1); }
#sync-state { font-size: 14px; }

.project-board-head, .project-row {
  gap: var(--s5);
  grid-template-columns: 88px minmax(0, 1fr) minmax(240px, 300px) 104px;
}
.project-board-head {
  font-size: var(--t-micro);
  padding: var(--s2) 0;
}
.project-row {
  min-height: 0;
  padding: var(--s2) 0;
}
.project-week { font-size: var(--t-small); }
.project-name { font-size: var(--t-lead); font-weight: 600; line-height: 1.25; }
.project-summary {
  -webkit-line-clamp: 2;
  font-size: var(--t-summary);
  line-height: 1.35;
  margin-top: var(--s1);
  max-width: 62ch;
}
.project-material { font-size: var(--t-micro); margin-top: var(--s1); }
.pickup-note { color: var(--ink); font-size: var(--t-body); line-height: 1.4; }
.availability { font-size: var(--t-body); font-weight: 600; }
.availability small { font-size: var(--t-small); font-weight: 400; margin-top: var(--s1); }
.utility-note { font-size: var(--t-small); margin-top: var(--s5); padding-top: var(--s3); }

.back-link, .agent-packet-link { font-size: var(--t-small); }
.project-header { padding-bottom: var(--s3); }
.project-kicker {
  font-size: var(--t-micro);
  letter-spacing: .06em;
  margin-bottom: var(--s1);
}
.project-header h1 { font-size: var(--t-h1); font-weight: 700; line-height: 1.1; }
.project-summary-long {
  font-size: var(--t-body);
  line-height: 1.5;
  margin: var(--s2) 0 var(--s4);
  max-width: 68ch;
}
.current-state, .watch-line {
  gap: var(--s4);
  grid-template-columns: 96px minmax(0, 1fr);
  padding: var(--s3) 0;
}
.current-state > span, .watch-line > span {
  font-size: var(--t-micro);
  letter-spacing: .06em;
}
.current-state strong { font-size: var(--t-lead); font-weight: 600; }
.watch-line p { font-size: var(--t-body); line-height: 1.45; }

.review-section, .audio-section { padding: var(--s5) 0; }
.section-title-row h2, .audio-section h2 {
  font-size: var(--t-h2);
  font-weight: 600;
}
.section-title-row > div > p, .section-title-row > p, .audio-section header p {
  font-size: var(--t-small);
  margin-top: var(--s1);
}

.board-gallery {
  gap: var(--s3);
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-top: var(--s3);
}
.board-card figcaption { gap: var(--s2); padding-top: var(--s2); }
.board-card figcaption > span {
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.3;
}
.board-card figcaption small { font-size: var(--t-micro); }
.role-tag { font-size: var(--t-micro); padding: 2px var(--s1); }

.audio-list { margin-top: var(--s3); }
.audio-picker { gap: var(--s2); margin-bottom: var(--s2); }
.audio-picker button {
  font-size: var(--t-small);
  min-height: 32px;
  padding: var(--s1) var(--s2);
}
.audio-item {
  gap: var(--s2);
  grid-template-columns: 1fr;
  padding: var(--s3) 0;
}
.audio-item h3, .audio-item > span { font-size: var(--t-body); font-weight: 600; }
.audio-item p, .audio-item a { font-size: var(--t-small); }
.audio-item audio { height: 40px; max-width: 460px; }
.audio-warning { font-size: var(--t-small); margin-top: var(--s2); }

.prompt-plans { margin-top: var(--s2); }
.prompt-card {
  gap: var(--s2) var(--s4);
  grid-template-columns: 150px minmax(0, 1fr) 96px;
  padding: var(--s3) 0;
}
.prompt-card h3 { font-size: var(--t-lead); font-weight: 600; }
.prompt-spec { font-size: var(--t-small); gap: var(--s1) var(--s2); margin-top: var(--s1); }
.act-description { font-size: var(--t-small); }
.act-arc { font-size: var(--t-body); gap: var(--s3); line-height: 1.45; }
.full-prompt summary, .full-prompt > a { font-size: var(--t-small); }
.full-prompt pre {
  font-size: var(--t-small);
  line-height: 1.5;
  padding: var(--s3);
}

.production-note-list { margin-top: var(--s2); }
.production-note {
  gap: var(--s4);
  grid-template-columns: 200px minmax(0, 1fr);
  padding: var(--s3) 0;
}
.production-note > div span { font-size: var(--t-small); font-weight: 600; }
.production-note > div small { font-size: var(--t-micro); }
.production-note p, .empty-note { font-size: var(--t-body); line-height: 1.45; }
.empty-note { margin-top: var(--s2); }

.production-details > summary, .status-panel > summary {
  min-height: 44px;
  padding: var(--s3) 0;
}
.production-details > summary > span, .status-panel > summary > span:first-child {
  font-size: var(--t-body);
  font-weight: 400;
}
.production-details > summary small, .status-summary { font-size: var(--t-small); }
.production-details > summary::after, .status-panel > summary::after { font-size: var(--t-body); }
.production-details-body, .status-panel-body { padding: var(--s3) 0 var(--s4); }
.content-section { padding: var(--s2) 0 var(--s3); }
.content-section > h2, .agent-context h2 {
  font-size: var(--t-h3);
  font-weight: 600;
  margin-bottom: var(--s2);
}
.content-section ul, .content-section ol, .agent-context p {
  font-size: var(--t-body);
  line-height: 1.5;
}
.content-section ul, .content-section ol { padding-left: var(--s4); }
.content-section li + li { margin-top: var(--s2); }
.path, .path-details summary, .download-meta { font-size: var(--t-small); }
.file-group > summary {
  font-size: var(--t-body);
  min-height: 44px;
  padding: var(--s3) 0;
}
.download-item { padding: var(--s2) 0; }
.download-item a, .download-item > span:first-child { font-size: var(--t-body); }
.field label, .form-message { font-size: var(--t-small); }
.field input, .field select, .status-form button, .login-form button {
  font-size: 16px;
  height: 40px;
  padding: var(--s2) var(--s3);
}

.reference-rules { padding: var(--s3) 0; }
.reference-rules p { font-size: var(--t-body); }
.reference-group:not(details) { padding: var(--s5) 0; }
.reference-group h2 { font-size: var(--t-h2); font-weight: 600; }
.reference-grid,
.reference-group[data-group="primary"] .reference-grid {
  gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin-top: var(--s3);
}
.reference-image { aspect-ratio: 4 / 5; }
.reference-image-missing { font-size: var(--t-small); }
.reference-card figcaption {
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.3;
  padding-top: var(--s2);
}

.handbook-nav { gap: var(--s2) var(--s4); padding: var(--s2) 0; }
.handbook-nav a { font-size: 14px; }
.handbook-intro { padding: var(--s3) 0 var(--s4); }
.handbook-intro h2 { font-size: var(--t-h2); font-weight: 600; }
.warning, .rules-grid ul, .handbook-body ul, .handbook-body ol,
.handbook-body p, .handbook-body dd { font-size: var(--t-body); line-height: 1.5; }
.rules-grid h3, .handbook-body h3 { font-size: var(--t-h3); font-weight: 600; }
.handbook-section > summary {
  font-size: var(--t-body);
  min-height: 44px;
  padding: var(--s3) 0;
}
.handbook-section > summary span { font-size: var(--t-body); font-weight: 600; }
.handbook-section > summary small { font-size: var(--t-small); }
.handbook-body { padding-top: var(--s3); padding-bottom: var(--s4); }
.micro-label { font-size: var(--t-micro); }
.code-panel { padding: var(--s3); }
.code-panel pre { font-size: var(--t-small); line-height: 1.5; }

.login-shell { max-width: 420px; padding: var(--s5); }
.login-shell h1 { font-size: var(--t-h1); }
.login-shell > p, .login-form label { font-size: var(--t-small); }
.login-row { gap: var(--s2); grid-template-columns: 1fr auto; }
footer {
  font-size: 12px;
  padding: var(--s4) max(var(--s4), calc((100vw - var(--max)) / 2));
}

@media (max-width: 1024px) {
  .project-board-head, .project-row {
    gap: var(--s4);
    grid-template-columns: 76px minmax(0, 1fr) minmax(200px, 260px) 96px;
  }
  .board-gallery { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .reference-grid,
  .reference-group[data-group="primary"] .reference-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell { padding-top: var(--s4); width: min(calc(100% - 32px), var(--max)); }
  .project-board-head { display: none; }
  .project-row {
    align-items: start;
    gap: var(--s1) var(--s3);
    grid-template-columns: 64px minmax(0, 1fr) auto;
    min-height: 0;
    padding: var(--s3) 0;
  }
  .project-row .project-summary { display: -webkit-box; -webkit-line-clamp: 2; }
  .project-row > .pickup-note { grid-column: 2 / -1; grid-row: 2; margin-top: var(--s2); }
  .project-row > .availability { grid-column: 3; grid-row: 1; }
  .board-gallery,
  .reference-grid,
  .reference-group[data-group="primary"] .reference-grid {
    gap: var(--s3);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .current-state, .watch-line { gap: var(--s1); grid-template-columns: 1fr; }
  .prompt-card { gap: var(--s2); grid-template-columns: 1fr; }
  .prompt-card-head, .act-description, .act-arc, .full-prompt {
    grid-column: 1;
    grid-row: auto;
  }
  .full-prompt { margin-top: var(--s1); text-align: left; }
  .production-note, .production-notes-grid, .rules-grid, .status-form { grid-template-columns: 1fr; }
  .status-form .field:nth-child(3) { grid-column: auto; }
  .handbook-body { padding-left: 0; }
}

@media (max-width: 480px) {
  .utility-title h1, .project-header h1 { font-size: 24px; }
  .site-header { gap: var(--s3); padding-inline: var(--s4); }
  .wordmark { font-size: var(--t-small); }
  .site-header nav { gap: var(--s3); }
  .site-header nav a, .text-button { font-size: 12px; padding: var(--s3) 0; }
  .board-gallery,
  .reference-grid,
  .reference-group[data-group="primary"] .reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
