/* ==========================================================================
   BAUHAUS ATELIER — visual system for the practice tracker
   Classic modernism: signal red, cobalt and ochre in solid blocks on warm
   white, one geometric sans (Jost), and a shape for each discipline:
   square = Architecture, circle = Interiors, triangle = Execution.
   The red is the studio accent and follows the premium branding colour.
   ========================================================================== */

:root {
  --paper: #f1ece2;
  --paper-deep: #e7e0d2;
  --board: #ebe5d9;
  --sheet: #fbf8f2;
  --ink: #1a1a1a;
  --ink-2: #4a463f;
  --ink-3: #857f74;
  --rule: #cfc8ba;
  --corner: #1a1a1a;
  --shadow: 26, 26, 26;
  --red: #c8372d;
  --blue: #1f4e9e;
  --ochre: #e3a91b;
  --on-color: #ffffff;
  --accent: var(--brand-accent, #c8372d);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --d-architecture: var(--red);
  --d-interiors: var(--ochre);
  --d-execution: var(--blue);

  --serif: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', Arial, sans-serif;
  --sans: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', Arial, sans-serif;
  --mono: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1520px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151412; --paper-deep: #1d1c19; --board: #191816; --sheet: #22211e;
    --ink: #efe9dd; --ink-2: #c3bcae; --ink-3: #8d877b; --rule: #37342f; --corner: #efe9dd; --shadow: 0, 0, 0;
    --red: #e0503f; --blue: #4f7fd0; --ochre: #eab53a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151412; --paper-deep: #1d1c19; --board: #191816; --sheet: #22211e;
  --ink: #efe9dd; --ink-2: #c3bcae; --ink-3: #8d877b; --rule: #37342f; --corner: #efe9dd; --shadow: 0, 0, 0;
  --red: #e0503f; --blue: #4f7fd0; --ochre: #eab53a;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 15.5px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
/* Paper grain: a faint fibre texture over everything. */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 2000; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .09 0 0 0 0 .07 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; opacity: .06; } }
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .06; }

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 3000; }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
.label { font: 500 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.display {
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 400;
  font-size: clamp(3.4rem, 10.5vw, 10.5rem); line-height: .86; letter-spacing: -.035em;
}
.display em, .display-2 em { font-style: italic; letter-spacing: -.02em; }
.display-2 { font-family: var(--serif); font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: .92; letter-spacing: -.03em; }
.display-3 { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1; letter-spacing: -.02em; }
.stop { color: var(--accent); }
.num { font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; font-weight: 400; letter-spacing: -.02em; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); margin-right: 8px; vertical-align: .08em; flex: none; }
.d-architecture { background: var(--d-architecture); }
.d-interiors { background: var(--d-interiors); }
.d-execution { background: var(--d-execution); }
.hint { font-size: 13px; color: var(--ink-2); }
.note { font-size: 13px; color: var(--ink-3); max-width: 72ch; margin-top: 32px; padding-left: 14px; border-left: 1px solid var(--ink-3); }
.empty-line { font: italic 1.6rem var(--serif); color: var(--ink-3); padding-block: 80px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 500 14px/1 var(--sans); padding: 13px 18px; border: 1px solid var(--ink); border-radius: 0;
  text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-quiet { background: none; border: 0; padding: 6px 0; font: 500 13px var(--sans); color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.link {
  background: none; border: 0; padding: 0; font: 500 14px var(--sans); color: var(--ink); cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--accent); text-underline-offset: 5px;
}
.link:hover { color: var(--accent); }

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 14px var(--gutter); background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--ink);
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; min-width: 0; }
.wm-mark { width: 22px; height: 22px; border: 1.5px solid var(--ink); position: relative; flex: none; }
.wm-mark::after { content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); right: -5px; top: -5px; }
.wm-name { font: italic 400 1.45rem/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.firm-logo { max-height: 34px; max-width: 180px; object-fit: contain; }
.primary-nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.primary-nav a {
  display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none;
  font: 500 12.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  padding: 8px 0; border-bottom: 2px solid transparent;
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.primary-nav .folio { font: italic 400 15px var(--serif); letter-spacing: 0; text-transform: none; color: var(--accent); }
.primary-nav sup { font: 500 10px var(--mono); letter-spacing: 0; color: var(--ink-3); }
.masthead-end { justify-self: end; display: flex; align-items: center; gap: 22px; }
.masthead-end time { font: 12px var(--mono); color: var(--ink-3); letter-spacing: .06em; }

main { padding-inline: var(--gutter); max-width: var(--max); margin-inline: auto; outline: none; min-height: 60vh; }

/* ---------- page heads (index & planner) ---------- */
.index-head, .planner-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px);
  padding-top: clamp(20px, 3vw, 36px); padding-bottom: clamp(28px, 4vw, 52px);
}
.running {
  grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px;
  font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 12px; border-bottom: 1px solid var(--rule); margin-bottom: clamp(28px, 5vw, 64px);
}
.index-head .display, .planner-head .display { grid-column: 1 / 9; }
.index-aside { grid-column: 9 / -1; align-self: end; display: grid; gap: 22px; justify-items: start; padding-bottom: .6rem; }
.index-aside p { font-size: 16px; color: var(--ink-2); max-width: 34ch; }
.planner-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.filter { display: flex; flex-wrap: wrap; gap: 6px 30px; border-block: 1px solid var(--ink); padding-block: 12px; margin-bottom: clamp(32px, 4vw, 56px); }
.filter button {
  background: none; border: 0; padding: 4px 0; font: 500 15px var(--sans); color: var(--ink-3);
  display: inline-flex; align-items: center; border-bottom: 2px solid transparent;
}
.filter button:hover { color: var(--ink); }
.filter button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.filter sup { font: 10px var(--mono); margin-left: 5px; color: var(--ink-3); align-self: flex-start; }

/* ---------- plates (the gallery) ---------- */
.plates {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px); row-gap: clamp(40px, 5vw, 76px);
}
.plate { grid-column: span var(--span, 4); text-decoration: none; color: inherit; display: block; animation: rise .7s var(--ease) both; }
.plate:nth-child(n+2) { animation-delay: .04s; } .plate:nth-child(n+3) { animation-delay: .08s; } .plate:nth-child(n+4) { animation-delay: .12s; }
.plate:nth-child(n+5) { animation-delay: .16s; } .plate:nth-child(n+6) { animation-delay: .2s; } .plate:nth-child(n+7) { animation-delay: .24s; }
.plate figure { margin: 0; }
.plate-img { height: clamp(220px, 29vw, 470px); overflow: hidden; background: var(--paper-deep); position: relative; }
.plate-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.86) contrast(1.02); transition: transform 1s var(--ease), filter .6s; }
.plate:hover .plate-img img, .plate:focus-visible .plate-img img { transform: scale(1.035); filter: none; }
.plate:focus-visible { outline-offset: 6px; }
.plate figcaption {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 14px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ink);
}
.plate-code { font: 500 12px var(--mono); letter-spacing: .06em; color: var(--accent); }
.plate-name { font: 400 clamp(1.25rem, 1.8vw, 1.6rem)/1.1 var(--serif); letter-spacing: -.01em; min-width: 0; }
.plate:hover .plate-name { font-style: italic; }
.plate-disc { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; display: inline-flex; align-items: center; }
.plate-disc .dot { width: 6px; height: 6px; margin-right: 6px; }
@keyframes rise { from { opacity: .001; transform: translateY(16px); } }

/* ---------- chapter (project page) ---------- */
.chapter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 16px; border-bottom: 1px solid var(--rule);
}
.back { font: 500 14px var(--sans); text-decoration: none; }
.back:hover { color: var(--accent); }
.chapter-running { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.chapter-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.opener { padding-block: clamp(40px, 7vw, 100px) clamp(28px, 4vw, 48px); }
.opener-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: clamp(18px, 3vw, 34px); }
.opener-meta .code { font: 500 13px var(--mono); letter-spacing: .08em; border: 1px solid var(--ink); padding: 6px 10px; }
.opener-meta .disc { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; display: inline-flex; align-items: center; color: var(--ink-2); }
.chapter-title { font-size: clamp(3.2rem, 9.5vw, 9.8rem); max-width: 13ch; overflow-wrap: anywhere; hyphens: auto; }
.opener-sub { font: italic 400 clamp(1.2rem, 2vw, 1.6rem)/1.3 var(--serif); color: var(--ink-2); margin-top: 22px; }
.opener-sub span { color: var(--ink-3); font-style: normal; }

.stage-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 72px); }
.stage-scale button {
  position: relative; background: none; border: 0; border-top: 2px solid var(--rule); text-align: left;
  padding: 18px 12px 4px 0; display: grid; gap: 2px; color: var(--ink-3); transition: color .2s;
}
.stage-scale .tick { position: absolute; top: -8px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--rule); transition: all .25s var(--ease); }
.stage-scale .n { font: 500 11px var(--mono); letter-spacing: .1em; }
.stage-scale .s { font: 500 15px var(--sans); }
.stage-scale button:hover { color: var(--ink); }
.stage-scale button.passed { border-top-color: var(--ink); color: var(--ink-2); }
.stage-scale button.passed .tick { background: var(--ink); border-color: var(--ink); }
.stage-scale button[aria-checked="true"] { color: var(--ink); }
.stage-scale button[aria-checked="true"] .tick { background: var(--accent); border-color: var(--accent); transform: scale(1.35); box-shadow: 0 0 0 5px var(--accent-soft); }
.stage-scale button[aria-checked="true"] .s { font-weight: 600; }

.contents {
  display: flex; overflow-x: auto; scrollbar-width: none; border-block: 1px solid var(--ink);
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 20; background: var(--paper);
}
.contents::-webkit-scrollbar { display: none; }
.contents button {
  flex: none; background: none; border: 0; padding: 16px 28px 16px 0; font: 500 15px var(--sans); color: var(--ink-3);
  display: inline-flex; align-items: baseline; gap: 8px; box-shadow: inset 0 -3px 0 transparent; transition: color .2s, box-shadow .2s;
}
.contents button + button { padding-left: 4px; }
.contents .n { font: 400 11px var(--mono); }
.contents sup { font: 500 10px var(--mono); color: var(--accent); }
.contents button:hover { color: var(--ink); }
.contents button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.contents button[aria-selected="true"] .n { color: var(--accent); }

#panel { padding-block: clamp(36px, 5vw, 64px) 0; outline: none; animation: fade .45s var(--ease) both; }
@keyframes fade { from { opacity: .001; transform: translateY(8px); } }

/* overview */
.cover-plate { margin: 0; }
.cover-img { aspect-ratio: 21 / 9; max-height: 72vh; width: 100%; overflow: hidden; background: var(--paper-deep); }
.cover-img img { width: 100%; height: 100%; object-fit: cover; }
.cover-plate figcaption, .ref-grid figcaption {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 10px;
  font: 500 10.5px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.cover-plate figcaption a { color: var(--ink-2); }

.overview-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); margin-top: clamp(48px, 7vw, 88px); }
.brief { grid-column: 1 / 8; display: grid; gap: 22px; justify-items: start; }
.dropcap { font: 400 clamp(1.3rem, 2vw, 1.75rem)/1.45 var(--serif); max-width: 34ch; }
.dropcap::first-letter { float: left; font-size: 4.6em; line-height: .78; padding: .06em .08em 0 0; color: var(--accent); font-style: normal; }
.dropcap.is-empty { color: var(--ink-3); font-style: italic; }
.dropcap.is-empty::first-letter { float: none; font-size: inherit; color: inherit; padding: 0; font-style: italic; }
.facts { grid-column: 9 / -1; margin: 0; align-self: start; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding-block: 13px; border-top: 1px solid var(--rule); }
.facts div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt { font: 500 10.5px/2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 0; font-size: 15px; display: grid; gap: 4px; justify-items: start; min-width: 0; overflow-wrap: anywhere; }
.facts dd small { font-size: 12.5px; color: var(--ink-3); }
.facts dd .note-quote { font: italic 15px/1.35 var(--serif); color: var(--ink-2); }
.facts dd .link { font-size: 13px; margin-top: 4px; }
.facts dd:has(.dot) { display: flex; align-items: center; }
.facts.compact div { grid-template-columns: 1fr auto; }

.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: clamp(48px, 7vw, 88px); }
.figures > * {
  background: none; border: 0; text-align: left; padding: 22px 24px 26px; display: grid; gap: 12px; align-content: start;
  border-right: 1px solid var(--rule); color: var(--ink);
}
.figures > *:first-child { padding-left: 0; }
.figures > *:last-child { border-right: 0; }
.figures button { transition: background .2s; }
.figures button:hover { background: var(--accent-soft); }
.figures .num { font-size: clamp(2.6rem, 5.4vw, 4.8rem); line-height: .95; }
.figures .num small { font-style: italic; font-size: .5em; margin-left: 4px; }
.bar { display: block; height: 3px; background: var(--rule); width: 100%; max-width: 260px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.received { display: grid; gap: 10px; margin-top: 8px; }
.received .bar { max-width: none; }

.overview-foot { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: clamp(16px, 2vw, 28px); margin-top: clamp(48px, 7vw, 88px); }
.next-up { background: var(--sheet); padding: clamp(22px, 3vw, 34px); display: grid; gap: 12px; align-content: start; box-shadow: 0 1px 0 rgba(var(--shadow), .06), 0 10px 30px -18px rgba(var(--shadow), .35); }
.next-up h2 { margin-bottom: 8px; }
.chapter-link {
  background: none; border: 1px solid var(--ink); text-align: left; color: var(--ink);
  padding: clamp(22px, 3vw, 34px); display: grid; gap: 10px; align-content: start; transition: background .25s, color .25s;
}
.chapter-link .n { font: italic 400 2.6rem/1 var(--serif); color: var(--accent); }
.chapter-link:hover { background: var(--ink); color: var(--paper); }
.chapter-link:hover .label, .chapter-link:hover .hint { color: color-mix(in srgb, var(--paper) 70%, transparent); }

.check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; cursor: pointer; padding-block: 6px; }
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 2px 0 0; border: 1.5px solid var(--ink); flex: none; display: grid; place-items: center; cursor: pointer; background: transparent; }
.check input::after { content: ''; width: 8px; height: 8px; background: var(--accent); transform: scale(0); transition: transform .15s var(--ease); }
.check input:checked::after { transform: scale(1); }
.check input:checked + span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--accent); }

/* sections */
.section-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); row-gap: 18px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-intro .label { grid-column: 1 / -1; }
.section-intro h2 { grid-column: 1 / 9; }
.section-intro p { grid-column: 9 / -1; align-self: end; color: var(--ink-2); font-size: 16px; max-width: 36ch; }
.section-intro .link { grid-column: 9 / -1; justify-self: start; }

.attachments, .samples { margin-top: 40px; }
.attachments > .label, .samples > .label { display: block; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding-block: 16px; border-bottom: 1px solid var(--rule); }
.row h3 { font: 500 16px/1.3 var(--sans); overflow-wrap: anywhere; }
.row small { font: 11px var(--mono); color: var(--ink-3); letter-spacing: .03em; }
.row-main { display: grid; gap: 4px; min-width: 0; }
.ext { font: 500 10px var(--mono); letter-spacing: .08em; border: 1px solid var(--ink); text-align: center; padding: 6px 0; }
.row.sample { color: var(--ink-2); }
.row.sample .ext { border-style: dashed; border-color: var(--ink-3); color: var(--ink-3); }
.tag { font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); border: 1px dashed var(--ink-3); padding: 4px 8px; }
.row select { border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 6px 2px; font-size: 13px; }

.drop-zone {
  width: 100%; margin-top: 24px; background: transparent; border: 1.5px dashed var(--ink-3); color: var(--ink);
  padding: clamp(20px, 3vw, 30px); display: flex; align-items: center; gap: 22px; text-align: left; transition: all .2s;
}
.drop-zone:hover:not(:disabled), .drop-zone.over { border-style: solid; border-color: var(--accent); background: var(--sheet); }
.drop-zone:disabled { opacity: .45; cursor: not-allowed; }
.dz-plus { font: 300 3rem/1 var(--serif); color: var(--accent); }
.dz-text { display: grid; gap: 4px; }
.dz-text strong { font: 500 16px var(--sans); }
.dz-text small { color: var(--ink-3); font-size: 13px; }

.ref-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: clamp(16px, 2vw, 28px); margin-top: 22px; }
.ref-grid figure { margin: 0; }
.ref-grid a { text-decoration: none; display: block; }
.ref-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-deep); }
.ref-grid figure:first-child img { aspect-ratio: auto; height: 100%; max-height: none; }
.ref-grid figure:first-child { display: grid; grid-template-rows: 1fr auto; }

.fee-total { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.fee-total .num { font-size: clamp(2.8rem, 7vw, 6.4rem); line-height: 1; }
.table-wrap { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; margin-top: 12px; min-width: 520px; }
.ledger th { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ledger td { padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 16px; font-variant-numeric: tabular-nums; }
.ledger td .n { font: 11px var(--mono); color: var(--ink-3); margin-right: 16px; }
.ledger .r { text-align: right; }
.ledger tfoot td { border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 600; }
.share { display: inline-block; width: 120px; height: 3px; background: var(--rule); margin-right: 14px; vertical-align: middle; }
.share i { display: block; height: 100%; background: var(--accent); }
.figures-3 { margin-top: 0; }

/* ---------- sheets (dialogs) ---------- */
.sheet {
  border: 0; padding: 0; background: var(--sheet); color: var(--ink);
  width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  box-shadow: 0 30px 80px -20px rgba(var(--shadow), .55), 0 2px 6px rgba(var(--shadow), .15);
}
.sheet.wide { width: min(940px, calc(100vw - 24px)); }
.sheet[open] { animation: sheet-in .35s var(--ease); }
.sheet::backdrop { background: rgba(18, 17, 15, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes sheet-in { from { opacity: .001; transform: translateY(18px) rotate(-.4deg); } }
.sheet-inner { padding: clamp(20px, 4vw, 44px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.close { background: none; border: 0; font: 300 30px/1 var(--serif); width: 38px; height: 38px; display: grid; place-items: center; margin-right: -8px; }
.close:hover { color: var(--accent); }
.sheet .display-2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 26px 0 8px; overflow-wrap: anywhere; }
.sheet .lede { color: var(--ink-2); font-size: 16px; }
.sheet form > label, .sheet .form-row > label, .brand-fields > label { display: grid; gap: 8px; font: 500 13px var(--sans); color: var(--ink-2); margin-top: 20px; }
.sheet input:not([type=checkbox]):not([type=color]):not([type=file]), .sheet select, .sheet textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 10px 0; font: 400 16px var(--sans); color: var(--ink);
}
.sheet textarea { resize: vertical; line-height: 1.5; }
.sheet input:focus, .sheet select:focus, .sheet textarea:focus { outline: none; border-bottom: 2px solid var(--accent); padding-bottom: 9px; }
.sheet input[type=file] { font-size: 14px; color: var(--ink-2); }
.sheet small { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.form-error { color: var(--accent); font-size: 14px; min-height: 1.4em; margin-top: 16px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); }
.selected-files p { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-bottom: 1px dashed var(--rule); font-size: 14px; }
.selected-files p span { overflow-wrap: anywhere; }

.switch { display: flex !important; align-items: center; gap: 14px; margin-top: 26px !important; cursor: pointer; color: var(--ink) !important; font-size: 15px !important; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 46px; height: 26px; border: 1.5px solid var(--ink); border-radius: 13px; position: relative; flex: none; transition: all .2s; }
.switch-track::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); top: 3.5px; left: 4px; transition: transform .25s var(--ease), background .2s; }
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(19px); background: #fff; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch small { display: block; }
.brand-fields { border: 0; padding: 0; margin: 0; min-width: 0; transition: opacity .2s; }
.brand-fields:disabled { opacity: .4; }
.color-field { display: flex; align-items: center; gap: 12px; }
.color-field input { width: 46px; height: 34px; border: 1px solid var(--ink); padding: 2px; background: none; cursor: pointer; }
.color-field output { font: 13px var(--mono); color: var(--ink-2); }
.brand-fields .check { margin-top: 18px; }
.brand-preview { margin-top: 22px; padding: 22px; background: var(--paper); border: 1px solid var(--rule); display: flex; align-items: center; gap: 18px; }
.bp-name { font: italic 400 1.9rem/1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.bp-rule { flex: 1; height: 1px; background: var(--ink); }
.bp-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.backup { padding: clamp(20px, 4vw, 44px); background: var(--paper-deep); border-top: 1px solid var(--ink); display: grid; gap: 14px; }
.backup p { color: var(--ink-2); max-width: 64ch; font-size: 14px; }
.backup-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.confirm-restore { border: 1px solid var(--accent); padding: 16px; display: grid; gap: 12px; background: var(--sheet); }

.paper-doc { background: var(--paper); border: 1px solid var(--rule); padding: clamp(24px, 5vw, 56px); margin-top: 24px; box-shadow: 0 16px 40px -24px rgba(var(--shadow), .5); }
.paper-doc h3 { font: 400 1.6rem var(--serif); margin: 22px 0 8px; }
.paper-doc p { max-width: 60ch; color: var(--ink-2); }
.paper-doc hr { border: 0; border-top: 1px solid var(--rule); margin: 26px 0; }
.paper-doc .doc-for { color: var(--ink); line-height: 1.7; }
.toc { font: italic 1.3rem/1.8 var(--serif); padding-left: 1.4em; }
.toc li::marker { font: 12px var(--mono); color: var(--accent); }
.file-title { margin: 22px 0 18px; overflow-wrap: anywhere; }
.sheet iframe { width: 100%; height: 68vh; border: 1px solid var(--rule); background: #fff; }
.file-image { max-height: 68vh; margin-inline: auto; object-fit: contain; }

/* ---------- toast & colophon ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 1500;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px);
  background: var(--ink); color: var(--paper); padding: 13px 20px; font: 500 14px var(--sans);
  box-shadow: 0 14px 30px -12px rgba(var(--shadow), .5); transition: all .3s var(--ease);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.colophon {
  max-width: var(--max); margin: clamp(80px, 10vw, 140px) auto 0; padding: 36px var(--gutter) 56px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; border-top: 1px solid var(--ink);
}
.colophon > div { display: grid; gap: 8px; align-content: start; justify-items: start; }
.colophon p { font-size: 13px; color: var(--ink-2); max-width: 32ch; }
.colophon-name { display: flex !important; align-items: center; gap: 12px; }
.colophon-name span { font: italic 400 2rem/1 var(--serif); }
.colophon-name img { max-height: 42px; max-width: 140px; object-fit: contain; }
.colophon .link { font-size: 13px; }
body[data-page="planner"] .colophon { margin-top: 48px; }

/* ==========================================================================
   PLANNER — the weekly pinboard
   ========================================================================== */
.planner-ruler, .planner-foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-block: 12px;
}
.planner-ruler { border-top: 1px solid var(--ink); }
.board {
  position: relative; height: calc(100dvh - 128px); min-height: 480px; overflow-y: auto; overscroll-behavior: contain;
  border-block: 1px solid var(--ink); background-color: var(--board);
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
.lane { display: grid; grid-template-columns: clamp(150px, 15vw, 220px) minmax(0, 1fr); border-bottom: 1px solid var(--rule); transition: background .2s; }
.lane-date { background: var(--paper); border-right: 1px solid var(--rule); padding: 22px 20px; display: flex; flex-direction: column; gap: 4px; }
.lane-day { font: 400 clamp(3rem, 5vw, 4.6rem)/.85 var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.03em; margin: 10px 0 6px; }
.lane-name { font: 600 15px var(--sans); }
.lane-range { font: 11px var(--mono); color: var(--ink-2); letter-spacing: .02em; }
.lane-meta { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: auto; padding-top: 14px; }
.lane-current .lane-date { background: var(--ink); color: var(--paper); border-right-color: var(--ink); }
.lane-current .lane-date .label { color: var(--accent); }
.lane-current .lane-range, .lane-current .lane-meta { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.lane-current .lane-day::after { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: .9em; }
.lane-ahead .lane-date { background: color-mix(in srgb, var(--paper) 60%, transparent); }
.lane-ahead .lane-day { font-style: italic; color: var(--ink-2); }
.lane-unscheduled .lane-date { background: var(--paper-deep); }
.lane-unscheduled .lane-day { color: var(--ink-3); }
.lane-rail { display: flex; gap: 24px; padding: 26px 24px 30px; overflow-x: auto; align-items: flex-start; min-height: 290px; }
.lane.drop-target { background: var(--accent-soft); }
.lane.drop-target .lane-rail { outline: 2px dashed var(--accent); outline-offset: -10px; }

.pcard {
  --tilt: -.35deg;
  flex: 0 0 214px; display: flex; flex-direction: column; text-align: left; position: relative;
  background: var(--sheet); color: var(--ink); border: 0; padding: 12px 12px 14px; cursor: grab;
  transform: rotate(var(--tilt));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(var(--shadow), .08),
    0 1px 1px rgba(var(--shadow), .08), 0 8px 18px -10px rgba(var(--shadow), .45);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s;
  touch-action: pan-x pan-y; -webkit-user-select: none; user-select: none;
}
.pcard:nth-child(3n+2) { --tilt: .45deg; }
.pcard:nth-child(3n) { --tilt: -.15deg; }
.pcard:hover { transform: translateY(-3px) rotate(0); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 3px rgba(var(--shadow), .1), 0 18px 28px -14px rgba(var(--shadow), .5); }
.pcard.is-current { box-shadow: inset 0 3px 0 var(--accent), 0 1px 1px rgba(var(--shadow), .08), 0 8px 18px -10px rgba(var(--shadow), .45); }
.pcard-top { display: flex; justify-content: space-between; align-items: center; font: 500 11px var(--mono); letter-spacing: .06em; }
.grip { width: 28px; height: 28px; display: grid; place-items: center; margin: -7px -8px -7px 0; cursor: grab; touch-action: none; }
.grip::before { content: ''; width: 10px; height: 16px; background: radial-gradient(circle, var(--ink-3) 1.3px, transparent 1.7px) 0 0 / 5px 5.33px; }
.pcard-img { display: block; position: relative; aspect-ratio: 4 / 3; margin: 10px 0 12px; background: var(--paper-deep); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
/* photo corners, as if tipped into an album */
.pcard-img::before, .pcard-img::after { content: ''; position: absolute; width: 18px; height: 18px; background: var(--corner); opacity: .88; z-index: 1; }
.pcard-img::before { top: -4px; left: -4px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.pcard-img::after { bottom: -4px; right: -4px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.pcard-disc { font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; }
.pcard-disc .dot { width: 7px; height: 7px; margin-right: 7px; }
.pcard-title { font: 400 1.3rem/1.08 var(--serif); letter-spacing: -.01em; margin: 6px 0 10px; overflow-wrap: anywhere; }
.pcard-note { font: italic 400 15px/1.35 var(--serif); color: var(--ink-2); padding-top: 9px; border-top: 1px dashed var(--rule); overflow-wrap: anywhere; }
.pcard-note.is-blank { color: var(--ink-3); }
.pcard-foot { font: 500 9.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }
.pcard.is-source { opacity: .25; transform: none; box-shadow: none; outline: 1.5px dashed var(--ink-3); outline-offset: -1px; }
.pcard.lifted {
  position: fixed; z-index: 1200; margin: 0; pointer-events: none; cursor: grabbing;
  transform: rotate(-2.5deg) scale(1.045); transition: transform .15s var(--ease);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(var(--shadow), .1),
    0 2px 4px rgba(var(--shadow), .12), 0 22px 34px -12px rgba(var(--shadow), .45), 0 48px 70px -24px rgba(var(--shadow), .35);
}
.pcard.landed { animation: land .32s var(--ease); }
@keyframes land { from { transform: rotate(-2deg) scale(1.04); } }
body.moving-card, body.moving-card * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.lane-empty {
  flex: 0 0 214px; min-height: 228px; border: 1.5px dashed var(--rule); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 18px; color: var(--ink-3);
  background: color-mix(in srgb, var(--paper) 50%, transparent);
}
.lane-empty p { font: italic 1.05rem/1.3 var(--serif); color: var(--ink-2); }
.lane-empty small { font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.older-weeks { width: 100%; padding: 24px; background: var(--paper); border: 0; font: 500 14px var(--sans); color: var(--ink-2); }
.older-weeks:hover { color: var(--accent); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .index-head .display, .planner-head .display { grid-column: 1 / -1; }
  .index-aside { grid-column: 1 / -1; margin-top: 28px; grid-auto-flow: column; justify-content: space-between; align-items: end; }
  .overview-foot { grid-template-columns: 1fr 1fr; }
  .next-up { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .masthead { grid-template-columns: 1fr auto; row-gap: 8px; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; }
  .contents { top: calc(env(safe-area-inset-top, 0px) + 104px); }
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plate { grid-column: span 1; }
  .plate:nth-child(3n+1) { grid-column: 1 / -1; }
  .plate-img { height: clamp(200px, 44vw, 420px); }
  .brief, .facts { grid-column: 1 / -1; }
  .facts { margin-top: 36px; }
  .section-intro h2, .section-intro p, .section-intro .link { grid-column: 1 / -1; }
  .colophon { grid-template-columns: 1fr 1fr; }
  .ref-grid { grid-template-columns: 1fr 1fr; }
  .ref-grid figure:first-child { grid-column: 1 / -1; }
  .ref-grid figure:first-child img { aspect-ratio: 16 / 10; height: auto; }
  .board { height: calc(100dvh - 150px); }
}
@media (max-width: 640px) {
  .masthead-end time { display: none; }
  .index-aside { grid-auto-flow: row; justify-content: start; }
  .running span:nth-child(2) { display: none; }
  .plates { grid-template-columns: 1fr; }
  .plate, .plate:nth-child(3n+1) { grid-column: 1 / -1; }
  .plate-img { height: auto; aspect-ratio: 4 / 3; }
  .plate figcaption { grid-template-columns: auto 1fr; }
  .plate-disc { grid-column: 1 / -1; }
  .chapter-running { display: none; }
  .stage-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stage-scale .s { font-size: 12px; }
  .cover-img { aspect-ratio: 4 / 3; }
  .figures { grid-template-columns: 1fr; }
  .figures > * { padding-left: 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .overview-foot { grid-template-columns: 1fr; }
  .row { grid-template-columns: 46px minmax(0, 1fr); row-gap: 10px; }
  .row select, .row .tag { grid-column: 2; justify-self: start; }
  .row .link { grid-column: 2; justify-self: start; }
  .form-row { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: 1fr; }
  .colophon { grid-template-columns: 1fr; }
  .lane { grid-template-columns: 1fr; }
  .lane-date { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; border-right: 0; border-bottom: 1px solid var(--rule); padding: 14px 16px; }
  .lane-date .label { width: 100%; }
  .lane-day { font-size: 2.4rem; margin: 0; }
  .lane-meta { margin: 0; padding: 0; width: 100%; }
  .lane-rail { padding: 20px 16px 24px; gap: 18px; min-height: 0; }
  .pcard, .lane-empty { flex-basis: 184px; }
  .board { height: calc(100dvh - 140px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pcard { transform: none; }
  .pcard.lifted { transform: none; }
}

/* late fixes */
.brand-fields > label.check { display: flex; color: var(--ink); font-size: 14px; }
.sheet .backup { margin: 28px calc(-1 * clamp(20px, 4vw, 44px)) calc(-1 * clamp(20px, 4vw, 44px)); }

/* ==========================================================================
   BAUHAUS LAYER — overrides the shared structure above
   ========================================================================== */
body::before { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stop { display: none; }
.label { font: 600 11px/1.3 var(--sans); letter-spacing: .14em; }

/* discipline shapes (replace the round dots everywhere) */
.dot { width: 12px; height: 12px; border-radius: 0; margin-right: 8px; vertical-align: -.05em; background: var(--ink); }
.dot.d-architecture { background: var(--d-architecture); }
.dot.d-interiors { background: var(--d-interiors); border-radius: 50%; }
.dot.d-execution { background: none; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 12px solid var(--d-execution); }

/* type */
.display { font: 500 clamp(3.2rem, 9.6vw, 9rem)/.86 var(--sans); letter-spacing: -.045em; }
.display b { display: block; font-weight: 700; }
.display em { font-style: normal; }
.display-2 { font: 600 clamp(2.4rem, 5.6vw, 5rem)/.92 var(--sans); letter-spacing: -.04em; }
.display-2 em { font-style: normal; color: var(--accent); }
.display-3 { font: 600 clamp(1.6rem, 2.6vw, 2.2rem)/1 var(--sans); letter-spacing: -.03em; }
.num { font-family: var(--sans); font-weight: 600; letter-spacing: -.035em; }
.note { border-left: 3px solid var(--ochre); color: var(--ink-2); }

/* controls */
.btn { font: 500 14.5px/1 var(--sans); border-width: 2px; padding: 12px 18px; }
.btn-ink:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-quiet { font: 500 14px var(--sans); text-decoration-thickness: 2px; }
.link { text-decoration-thickness: 2px; }

/* masthead */
.masthead { border-bottom-width: 2px; padding-block: 16px; background: color-mix(in srgb, var(--paper) 94%, transparent); }
.wm-mark { width: auto; height: auto; border: 0; display: inline-flex; align-items: flex-end; gap: 4px; }
.wm-mark::after { display: none; }
.wm-mark i { display: block; width: 14px; height: 14px; }
.wm-mark .sq { background: var(--red); }
.wm-mark .ci { background: var(--ochre); border-radius: 50%; }
.wm-mark .tr { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 14px solid var(--blue); }
.wm-name { font: 600 1.2rem/1 var(--sans); letter-spacing: -.01em; }
.primary-nav a { font: 500 15px var(--sans); letter-spacing: 0; text-transform: lowercase; border-bottom-width: 3px; }
.primary-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.primary-nav .folio { display: none; }
.primary-nav sup { font: 600 10px var(--sans); }
.masthead-end time { font: 500 13px var(--sans); letter-spacing: .04em; }

/* page heads */
.running { font: 600 11px var(--sans); letter-spacing: .16em; border-bottom: 2px solid var(--ink); margin-bottom: clamp(26px, 4vw, 52px); }
.index-head .display { grid-column: 1 / 8; align-self: end; }
.comp { grid-column: 9 / -1; justify-self: end; align-self: end; width: 100%; max-width: 440px; aspect-ratio: 3 / 2; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
.comp i { display: block; }
.comp .c1 { background: var(--blue); position: relative; overflow: hidden; }
.comp .c1::after { content: ''; position: absolute; inset: 0; background: var(--ochre); border-radius: 0 0 0 100%; }
.comp .c2 { background: var(--red); border-radius: 50%; }
.comp .c3 { background: var(--ink); }
.comp .c4 { background: var(--ochre); }
.comp .c5 { border: 2px solid var(--ink); border-radius: 100% 0 0 0; }
.comp .c6 { background: var(--blue); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.index-head .index-aside { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; margin-top: 30px; padding: 0; }
.index-aside p { max-width: none; }
.key { display: inline-flex; align-items: center; margin-left: 14px; white-space: nowrap; }
.planner-head .display { grid-column: 1 / 8; }
.planner-head .index-aside { grid-column: 8 / -1; }
.filter { border-block-width: 2px; }
.filter button { font: 500 15px var(--sans); text-transform: lowercase; border-bottom-width: 3px; }
.filter button[aria-pressed="true"] { border-bottom-color: var(--accent); }
.filter sup { font: 600 10px var(--sans); }

/* plates */
.plate-img { border: 2px solid var(--ink); background: var(--sheet); }
.plate-img img { filter: none; }
.plate figcaption { grid-template-columns: auto 1fr auto; align-items: center; border-top: 0; padding-top: 0; margin-top: 12px; gap: 12px; }
.plate figcaption .dot { margin: 0; }
.plate-name { font: 500 clamp(1.15rem, 1.6vw, 1.4rem)/1.15 var(--sans); letter-spacing: -.015em; }
.plate:hover .plate-name { font-style: normal; color: var(--accent); }
.plate-code { font: 600 12px var(--sans); letter-spacing: .12em; color: var(--ink); }

/* chapter */
.chapter-bar { border-bottom: 2px solid var(--ink); }
.chapter-running { font: 600 11px var(--sans); letter-spacing: .16em; }
.opener-meta .code { font: 600 13px var(--sans); letter-spacing: .12em; border-width: 2px; }
.opener-meta .disc { font: 600 11px var(--sans); letter-spacing: .14em; }
.chapter-title { font: 700 clamp(3rem, 8.6vw, 8.4rem)/.88 var(--sans); letter-spacing: -.045em; text-transform: lowercase; max-width: 14ch; }
.opener-sub { font: 400 clamp(1.1rem, 1.6vw, 1.35rem)/1.4 var(--sans); }

.stage-scale { gap: 12px; margin-top: clamp(36px, 5vw, 60px); }
.stage-scale button { border-top: 0; padding: 0; gap: 10px; justify-items: start; }
.stage-scale .tick { position: static; width: 34px; height: 34px; border-radius: 0; border: 2px solid var(--ink); background: transparent; }
.stage-scale button:nth-child(even) .tick { border-radius: 50%; }
.stage-scale .n { display: none; }
.stage-scale .s { font: 500 15px var(--sans); text-transform: lowercase; }
.stage-scale button.passed { color: var(--ink); }
.stage-scale button.passed .tick { background: var(--ink); border-color: var(--ink); }
.stage-scale button[aria-checked="true"] { color: var(--accent); }
.stage-scale button[aria-checked="true"] .tick { background: var(--accent); border-color: var(--accent); transform: none; box-shadow: 6px 6px 0 var(--ochre); }
.stage-scale button[aria-checked="true"] .s { font-weight: 700; }
.stage-scale button:hover .tick { border-color: var(--accent); }

.contents { border-block-width: 2px; top: calc(env(safe-area-inset-top, 0px) + 68px); }
.contents button { font: 500 15px var(--sans); text-transform: lowercase; }
.contents .n { font: 600 11px var(--sans); }
.contents button[aria-selected="true"] { box-shadow: inset 0 -4px 0 var(--accent); }

.cover-img { border: 2px solid var(--ink); background: var(--sheet); }
.cover-plate figcaption, .ref-grid figcaption { font: 600 10.5px/1.5 var(--sans); letter-spacing: .12em; }
.dropcap { font: 400 clamp(1.2rem, 1.8vw, 1.55rem)/1.5 var(--sans); max-width: 38ch; }
.dropcap::first-letter { font-weight: 700; font-size: 4em; line-height: .8; color: var(--accent); }
.facts div { border-top-color: var(--rule); }
.facts dt { font: 600 10.5px/2 var(--sans); letter-spacing: .14em; }
.facts dd .note-quote { font: italic 400 15px/1.4 var(--sans); }
.facts dd:has(.dot) .dot { margin-right: 10px; }

/* figures become solid colour blocks */
.figures { border-top: 0; gap: 0; }
.figures > * { padding: 24px 26px 26px; border-right: 0; color: var(--on-color); }
.figures > *:first-child { padding-left: 26px; }
.figures > *:nth-child(1) { background: var(--blue); }
.figures > *:nth-child(2) { background: var(--red); }
.figures > *:nth-child(3) { background: var(--ochre); color: #1a1a1a; }
.figures .label, .figures .hint { color: inherit; opacity: .85; }
.figures .num { font-size: clamp(2.4rem, 4.8vw, 4.2rem); }
.figures .num small { font-style: normal; }
.figures button:hover { background: var(--ink); }
.figures > *:nth-child(3):is(button):hover { color: var(--paper); }
.figures .bar { background: rgba(255, 255, 255, .3); }
.figures .bar i { background: #fff; }
.received .bar i { background: var(--blue); }

.overview-foot { gap: 20px; }
.next-up { background: var(--sheet); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ochre); }
.chapter-link { border-width: 2px; }
.chapter-link .n { font: 700 2.6rem/1 var(--sans); letter-spacing: -.04em; color: var(--accent); }
.chapter-link:hover .n { color: var(--ochre); }
.check input { border-width: 2px; }
.check input::after { background: var(--accent); width: 10px; height: 10px; }

/* sections & rows */
.section-intro .label { color: var(--accent); }
.attachments > .label, .samples > .label { border-bottom-width: 2px; }
.ext { font: 600 10px var(--sans); letter-spacing: .1em; border-width: 2px; }
.row h3 { font: 500 16px/1.3 var(--sans); }
.row small { font: 500 12px var(--sans); letter-spacing: .02em; }
.tag { font: 600 10px var(--sans); }
.drop-zone { border: 2px dashed var(--ink-3); }
.dz-plus { font: 300 3rem/1 var(--sans); }
.ref-grid img { border: 2px solid var(--ink); }
.fee-total { border-bottom-width: 2px; }
.ledger th { font: 600 10.5px var(--sans); letter-spacing: .14em; }
.ledger td .n { font: 600 11px var(--sans); }
.ledger tfoot td { border-top-width: 2px; }
.share i { background: var(--blue); }

/* sheets */
.sheet { border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--ochre), 0 30px 60px -20px rgba(var(--shadow), .45); }
.sheet[open] { animation: sheet-in-b .3s var(--ease); }
@keyframes sheet-in-b { from { opacity: .001; transform: translateY(14px); } }
.sheet-head { border-bottom-width: 2px; }
.close { font: 300 32px/1 var(--sans); }
.sheet input:not([type=checkbox]):not([type=color]):not([type=file]), .sheet select, .sheet textarea { font-family: var(--sans); }
.bp-name { font: 600 1.7rem/1 var(--sans); letter-spacing: -.02em; }
.bp-rule { height: 2px; }
.color-field output { font: 500 13px var(--sans); }
.paper-doc h3 { font: 600 1.5rem var(--sans); letter-spacing: -.02em; }
.toc { font: 400 1.2rem/1.8 var(--sans); }
.toc li::marker { font: 600 12px var(--sans); }

/* colophon & toast */
.colophon { border-top-width: 2px; }
.colophon-name span { font: 600 1.6rem/1 var(--sans); letter-spacing: -.02em; }
#toast { font: 500 14px var(--sans); border-left: 6px solid var(--ochre); }

/* ---------- planner ---------- */
.planner-ruler, .planner-foot { font: 600 10.5px var(--sans); letter-spacing: .14em; }
.planner-ruler { border-top-width: 2px; }
.board {
  border-block-width: 2px; background-color: var(--board);
  background-image: linear-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
}
.lane { border-bottom: 2px solid var(--ink); }
.lane-date { border-right: 2px solid var(--ink); }
.lane-day { font: 700 clamp(3rem, 5vw, 4.4rem)/.85 var(--sans); letter-spacing: -.05em; }
.lane-name { font: 600 16px var(--sans); text-transform: lowercase; }
.lane-range, .lane-meta { font: 500 12px var(--sans); letter-spacing: .02em; }
.lane-meta { font-weight: 600; letter-spacing: .12em; }
.lane-current .lane-date { background: var(--ochre); color: #1a1a1a; border-right-color: var(--ink); }
.lane-current .lane-date .label { color: #1a1a1a; }
.lane-current .lane-range, .lane-current .lane-meta { color: rgba(26, 26, 26, .75); }
.lane-current .lane-day::after { display: none; }
.lane-ahead .lane-day { font-style: normal; color: var(--ink-3); }
.lane-unscheduled .lane-date { background: var(--paper-deep); }
.lane.drop-target .lane-rail { outline: 3px dashed var(--accent); }

.pcard {
  --tilt: 0deg; border: 2px solid var(--ink); border-top: 10px solid var(--k, var(--ink)); padding: 10px 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 1px rgba(var(--shadow), .08), 0 10px 18px -12px rgba(var(--shadow), .45);
}
.pcard:nth-child(3n+2), .pcard:nth-child(3n) { --tilt: 0deg; }
.pcard:hover { transform: translateY(-3px); box-shadow: 6px 6px 0 var(--k, var(--ink)); }
.pcard.is-current { box-shadow: 0 1px 1px rgba(var(--shadow), .08), 0 10px 18px -12px rgba(var(--shadow), .45); }
.pcard-top { font: 600 11px var(--sans); letter-spacing: .12em; }
.pcard-img { border: 2px solid var(--ink); background: var(--sheet); }
.pcard-img::before, .pcard-img::after { display: none; }
.pcard-disc { font: 600 10px var(--sans); letter-spacing: .12em; text-transform: lowercase; }
.pcard-disc .dot { width: 10px; height: 10px; }
.pcard-disc .dot.d-execution { width: 0; height: 0; border-left-width: 6px; border-right-width: 6px; border-bottom-width: 10px; }
.pcard-title { font: 600 1.12rem/1.15 var(--sans); letter-spacing: -.02em; }
.pcard-note { font: 400 13.5px/1.4 var(--sans); border-top: 2px dotted var(--rule); }
.pcard-foot { font: 600 9.5px var(--sans); letter-spacing: .14em; }
.pcard.is-source { outline: 2px dashed var(--ink-3); }
.pcard.lifted {
  transform: rotate(-2deg) scale(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(var(--shadow), .12),
    0 2px 4px rgba(var(--shadow), .12), 0 24px 36px -14px rgba(var(--shadow), .45), 10px 12px 0 var(--k, var(--ochre));
}
.lane-empty { border: 2px dashed var(--ink-3); }
.lane-empty p { font: 400 1rem/1.35 var(--sans); }
.lane-empty small { font: 600 10px var(--sans); }
.older-weeks { font: 500 15px var(--sans); text-transform: lowercase; }

@media (max-width: 1080px) {
  .index-head .display { grid-column: 1 / 8; }
  .comp { grid-column: 8 / -1; }
  .planner-head .display, .planner-head .index-aside { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .contents { top: calc(env(safe-area-inset-top, 0px) + 108px); }
}
@media (max-width: 640px) {
  .index-head .display { grid-column: 1 / -1; }
  .comp { grid-column: 1 / -1; justify-self: start; max-width: 260px; margin-top: 24px; }
  .index-head .index-aside { grid-auto-flow: row; justify-content: start; }
  .key { margin: 6px 12px 0 0; }
  .figures > *:first-child { padding-left: 22px; }
  .stage-scale .tick { width: 26px; height: 26px; }
  .stage-scale .s { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard, .pcard:hover, .pcard.lifted { transform: none; }
}

/* empty studio */
.welcome { border: 2px solid var(--ink); background: var(--sheet); padding: clamp(24px, 4vw, 48px); display: grid; gap: 16px; justify-items: start; box-shadow: 10px 10px 0 var(--ochre); max-width: 760px; }
.welcome p { color: var(--ink-2); max-width: 56ch; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.masthead-end .btn-quiet + .btn-quiet { margin-left: -6px; }
