/* FEATURE V1: site stylesheet.
   Projection (dark) is the screen. House lights ([data-theme="lights"]) is one button away;
   print is always paper. Order: fonts, tokens, base, the frame system, header, actions, home,
   generic reels, footer, article, legal, 404, breakpoints, motion, print, unshown states.
   Every value is listed in §3. Components read role tokens only. */


/* Self-hosted (every OpenType feature kept), §0.5: */

/* 2. Tokens: the block of §3.7, unchanged */
:root {
  /* Projection: raw values */
  --masking: #14120F; --projected: #1D1B18; --screen: #ECE5D8;
  --dim: #B3AA9C; --exit: #958D80; --frame-line: #3A3631; --gate: #7C7468;
  --streak: #86B0E2; --tungsten: #E3B25C;
  /* Paper and House lights: raw values */
  --print-black: #171512; --grey: #4D4740; --tertiary-paper: #625B53; --rule-paper: #C9C2B6;
  --edge-paper: #7F776C; --streak-deep: #2A5FA3;   --warning-paper: #85570A;
  --lights-ground: #E3DFD7; --lights-panel: #F4F1EB;
  /* Security underprint (lines only) and photograph endpoints */
  
  /* Roles: components read only these (Projection is the default) */
  --ground: var(--masking); --panel: var(--projected); --ink: var(--screen);
  --ink-2: var(--dim); --ink-3: var(--exit); --rule: var(--frame-line); --edge: var(--gate);
  --accent: var(--streak); --error: var(--ink); --success: var(--ink); --warning: var(--tungsten);
  color-scheme: dark;

  /* Type: squeezed, desqueezed, spoken, code */
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --ui: "Sofia Sans", "Helvetica Neue", Arial, sans-serif;
  --text: var(--ui);
  --mono: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --t-small: 0.9375rem; --t-ui: 1.0625rem; --t-body: 1.25rem; --t-lede: 1.5rem;
  --t-h3: 1.5rem; --t-h2: 2.25rem;
  --t-sub: clamp(1.25rem, 1.55vw, 1.5rem);
  --t-inter: clamp(1.75rem, 3.4vw, 3.25rem);
  --t-title: clamp(3rem, 6.6vw, 6.5rem);
  --measure: 29em;

  /* Space and grid */
  --safe: max(16px, 5vw); --cols: 12; --gutter: 24px;
  --col: calc((100vw - 2 * var(--safe) - (var(--cols) - 1) * var(--gutter)) / var(--cols));
  --edge-x: calc(var(--safe) + var(--col) + var(--gutter));
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --cut: clamp(112px, 13vw, 192px);
  --scope: 2.39; --flat: 1.85; --strip: 4.78; --vertical: 0.5625;

  /* Motion */
  --t-hover: 120ms; --t-house: 600ms; --ease: cubic-bezier(0.2, 0, 0, 1);
}
/* House lights: the room lit, the screen still the brightest surface */
:root[data-theme="lights"] {
  --ground: var(--lights-ground); --panel: var(--lights-panel); --ink: var(--print-black);
  --ink-2: var(--grey); --ink-3: var(--tertiary-paper); --rule: var(--rule-paper); --edge: var(--edge-paper);
  --accent: var(--streak-deep); --error: var(--ink); --success: var(--ink);
  --warning: var(--warning-paper);
  color-scheme: light;
}
@media (max-width: 1023px) { :root { --cols: 8; --gutter: 20px; } }
@media (max-width: 767px) {
  :root { --cols: 4; --gutter: 16px; --t-body: 1.1875rem; --t-lede: 1.3125rem; --t-h2: 1.75rem; --t-h3: 1.375rem; }
}

/* Icon images (tick and chevron) for each scheme */
:root {
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%2314120F' stroke-width='2.5' stroke-linecap='square'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23ECE5D8' stroke-width='1.5' stroke-linecap='square'/%3E%3C/svg%3E");
}
:root[data-theme="lights"] {
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23F4F1EB' stroke-width='2.5' stroke-linecap='square'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23171512' stroke-width='1.5' stroke-linecap='square'/%3E%3C/svg%3E");
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 var(--t-body)/1.6 var(--text);
  font-optical-sizing: auto; font-variant-numeric: oldstyle-nums proportional-nums; font-kerning: normal;
  transition: background-color var(--t-house) var(--ease), color var(--t-house) var(--ease);
}
main { display: block; }
img { display: block; max-width: 100%; height: auto; }
p, ul, ol, dl, table, figure, blockquote, pre, form, h1, h2, h3 { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
p, li, dd, figcaption { text-wrap: pretty; }
strong, b { font-weight: 640; }
small { font-size: inherit; }          /* the 15 px floor: small never shrinks text */
sup { font-size: var(--t-small); line-height: 0; vertical-align: 0.5em; }   /* 15 px: the footnote numeral (§3.2) */
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: var(--ink-3); text-underline-offset: 0.2em; transition: text-decoration-color var(--t-hover) var(--ease); }
a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--ground); }
.skip-link { position: absolute; left: var(--safe); top: -120px; z-index: 10; padding: 12px 18px; background: var(--ink); color: var(--ground); font: 600 var(--t-ui)/1 var(--ui); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Capitals have three jobs and no others (L5): the title card, the slug, the billing name. */
.title-card, .slug, .billing { text-transform: uppercase; }

/* 4. The frame system
   .screen      a full-bleed band, the screen in the room: Projected, corner marks, content hung low left
   .card        an inset frame with nothing projected: Projected plus four corner marks
   .lit         the screen with the projector on and no film: a field of ink (the 404) */
.card {
  --m: var(--edge); --l: 20px; --w: 1px;
  background:
    linear-gradient(var(--m), var(--m)) top left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--m), var(--m)) top left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) top right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--m), var(--m)) top right / var(--w) var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom right / var(--w) var(--l) no-repeat,
    var(--panel);
}
.screen {
  position: relative;
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter);
  align-content: end;
  min-height: calc(100vw / var(--scope));
  padding: var(--s7) var(--safe) clamp(40px, 4.4vw, 72px);
  background: var(--panel);
}
/* Projected black sits at 1.09:1 on the masking, so alone it reads as a faint slab; four corner
   marks at the title-safe line say "this is the frame" on any display, in both schemes. */
.screen::before {
  content: ""; position: absolute; inset: var(--s5) var(--safe); pointer-events: none;
  --m: var(--edge); --l: 20px; --w: 1px;
  background:
    linear-gradient(var(--m), var(--m)) top left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--m), var(--m)) top left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) top right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--m), var(--m)) top right / var(--w) var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom right / var(--w) var(--l) no-repeat;
}
.title-card {
  font: 200 var(--t-title)/0.94 var(--display);
  letter-spacing: 0.035em;
  color: var(--ink);
}

/* Reel headings: the number printed in both margins, as a shooting script prints a scene */
main { counter-reset: reel; }
.slug { counter-increment: reel; display: flex; align-items: baseline; margin: 0 0 var(--s7); font: 600 var(--t-h2)/1.05 var(--display); letter-spacing: 0.02em; }
.slug::before, .slug::after { content: counter(reel) / ""; font-weight: 300; color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.slug::before { flex: 0 0 calc((var(--col) + var(--gutter)) * var(--indent, 1)); }
.slug::after { margin-left: auto; padding-left: var(--s5); }

/* 5. Header: the slate */
body > header {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "name nav lights";
  align-items: center; column-gap: var(--s6);
  padding: var(--s4) var(--safe); min-height: 80px;
}
.site-name { grid-area: name; margin: 0; }
.site-name a, a.site-name { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; font: 600 1.25rem/1 var(--display); letter-spacing: 0.04em; text-decoration: none; color: var(--ink); }
.site-name .mark { width: 50px; height: auto; flex: none; }
body > header nav { grid-area: nav; justify-self: end; }
body > header nav, body > header nav ul, body > footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
body > header nav, body > header nav ul { column-gap: var(--s6); }
body > header nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 500 var(--t-ui)/1 var(--ui); letter-spacing: 0.005em; text-decoration: none; color: var(--ink);
  box-shadow: inset 0 -2px 0 transparent; transition: box-shadow var(--t-hover) var(--ease);
}
body > header nav a:hover { box-shadow: inset 0 -2px 0 var(--ink-3); }
body > header nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }   /* "page", or "true" on an article's section */
.lights {
  grid-area: lights; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  background: transparent; color: var(--ink-2); border: 1px solid var(--edge); border-radius: 0;
  font: 500 var(--t-small)/1 var(--ui); cursor: pointer;
}
.lights::before { content: ""; width: 10px; height: 10px; border: 1px solid currentColor; }
.lights[aria-pressed="true"]::before { background: currentColor; }
.lights:hover { color: var(--ink); border-color: var(--ink); }

/* 6. Actions. The submit is lit (ink fill); a pair of routes is a chapter menu: the first is
   the highlighted item (streak bar), the second a plain item. */
.button, button[type="submit"], .consent-actions button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--ground);
  font: 600 var(--t-ui)/1 var(--ui); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  box-shadow: inset 0 0 0 transparent; transition: box-shadow var(--t-hover) var(--ease);
}
.button:hover, button[type="submit"]:hover { box-shadow: inset 0 -4px 0 var(--accent); }
.menu { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s7); row-gap: var(--s2); }
.menu a {
  display: inline-flex; align-items: center; min-height: 48px;
  font: 500 1.25rem/1 var(--ui); letter-spacing: 0; text-decoration: none; color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--ink-3); transition: box-shadow var(--t-hover) var(--ease);
}
.menu a:first-child { font-weight: 600; box-shadow: inset 0 -3px 0 var(--accent); }
.menu a:hover { box-shadow: inset 0 -3px 0 var(--accent); }

/* 7. Home: the first screen */
.intro .screen { min-height: max(calc(100vw / var(--scope)), 480px); }
.intro h1 { grid-column: 2 / 8; grid-row: 1; align-self: end; }
.intro .lede {
  grid-column: 9 / -1; grid-row: 1; align-self: end; max-width: 22em;
  font: 400 var(--t-sub)/1.42 var(--text); color: var(--ink);
  padding-bottom: 0.1em;
}
.intro .kicker { grid-column: 2 / -1; grid-row: 1; align-self: start; margin-bottom: var(--s7); font: 400 var(--t-sub)/1.3 var(--text); color: var(--ink-2); }
.intro .kicker ~ h1, .intro .kicker ~ .lede { grid-row: 2; }
.intro .menu { padding: var(--s6) var(--safe) 0 var(--edge-x); }

/* 8. Reels: every section after the first screen */
main > section:not(.intro) {
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter);
  padding: var(--cut) var(--safe) 0;
}
main > section:not(.intro) > * { grid-column: 2 / -2; }
main > section > .slug { grid-column: 1 / -1; }
main > section:not(.intro) > p { max-width: var(--measure); }
main > section > p + p, main > section > p + ul, main > section > p + ol { margin-top: var(--s5); }
main > section.narrow > * { grid-column: 2 / 9; }             /* forms, legal text, contact */
main > section.narrow > .slug { grid-column: 1 / -1; }
main > section.narrow > table { grid-column: 2 / -2; margin: var(--s3) 0 var(--s2); }
main > section form { grid-column: 2 / 9; margin-top: var(--s6); }
main > section > ol:not(.work-list), .essay > ol { padding: 0; list-style: none; counter-reset: item; }
main > section > ol:not(.work-list) > li, .essay > ol > li { counter-increment: item; position: relative; padding-left: 2.2em; margin-bottom: var(--s3); }
main > section > ol:not(.work-list) > li::before, .essay > ol > li::before { content: counter(item) / ""; position: absolute; left: 0; top: 0.05em; font: 300 1.5rem/1.2 var(--display); color: var(--accent); font-variant-numeric: lining-nums; }

/* Selected work: reel 1, four shots (1A to 1D) */
.work-list { list-style: none; padding: 0; counter-reset: shot; grid-column: 1 / -1 !important; }
.work-list > li { counter-increment: shot; }
.work-list > li + li { margin-top: var(--cut); }
.work-list article { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.work-list article::before { content: "1" counter(shot, upper-alpha) / ""; grid-column: 1; grid-row: 2; font: 300 var(--t-h3)/1.1 var(--display); color: var(--accent); font-variant-numeric: lining-nums; }
.work-list img { grid-column: 1 / -1; grid-row: 1; width: 100%; aspect-ratio: var(--scope); object-fit: cover; margin-bottom: var(--s5); background: var(--panel); }
.work-list h3 { grid-column: 2 / 7; grid-row: 2; font: 600 var(--t-h3)/1.15 var(--ui); letter-spacing: -0.005em; }
.work-list .meta { grid-column: 2 / 7; grid-row: 3; margin-top: var(--s2); font: 400 var(--t-ui)/1.35 var(--ui); color: var(--ink-2); font-variant-numeric: lining-nums proportional-nums; }
.work-list p:not(.meta) { grid-column: 7 / -2; grid-row: 2 / 4; max-width: 26em; }
/* 1A: the wide shot runs edge to edge */
.work-list > li:first-child img { width: calc(100% + 2 * var(--safe)); max-width: none; margin-left: calc(-1 * var(--safe)); }
/* An entry with no picture is an intertitle card */
.work-list article.card { grid-template-columns: 1fr; justify-items: center; align-content: center; text-align: center; width: calc(100% - 2 * (var(--col) + var(--gutter))); margin-inline: auto; aspect-ratio: var(--scope); padding: 5%; }
.work-list article.card::before { grid-column: 1; grid-row: auto; padding-bottom: var(--s4); font-size: 1.25rem; }
.work-list article.card > * { grid-column: 1 !important; grid-row: auto !important; }
.work-list article.card p:not(.meta) { max-width: 24em; margin-top: var(--s5); font: 400 clamp(1.25rem, 2vw, 1.75rem)/1.3 var(--text); }
/* 1C and 1D: medium shots alternating across the axis, the slate bottom-aligned beside the frame */
.work-list > li:nth-child(n+3) article { grid-template-rows: 1fr auto auto auto auto; }
.work-list > li:nth-child(n+3) img { grid-row: 1 / 6; margin-bottom: 0; }
.work-list > li:nth-child(n+3) article::before { grid-row: 2; padding-bottom: var(--s3); }
.work-list > li:nth-child(n+3) h3 { grid-row: 3; }
.work-list > li:nth-child(n+3) .meta { grid-row: 4; }
.work-list > li:nth-child(n+3) p:not(.meta) { grid-row: 5; margin-top: var(--s4); }
.work-list > li:nth-child(odd):nth-child(n+3) img { grid-column: 1 / 9; aspect-ratio: var(--flat); }
.work-list > li:nth-child(odd):nth-child(n+3) article::before, .work-list > li:nth-child(odd):nth-child(n+3) h3, .work-list > li:nth-child(odd):nth-child(n+3) .meta, .work-list > li:nth-child(odd):nth-child(n+3) p:not(.meta) { grid-column: 9 / -1; }
.work-list > li:nth-child(even):nth-child(n+3) img { grid-column: 5 / -1; }
.work-list > li:nth-child(even):nth-child(n+3) article::before, .work-list > li:nth-child(even):nth-child(n+3) h3, .work-list > li:nth-child(even):nth-child(n+3) .meta, .work-list > li:nth-child(even):nth-child(n+3) p:not(.meta) { grid-column: 1 / 5; }

/* Principles: the credits axis. Term right-aligned left of centre, statement right of it. */
.principles { grid-column: 1 / -1 !important; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s7); row-gap: var(--s7); align-items: baseline; }
.principles dt { grid-column: 1; text-align: right; font: 600 1.75rem/1.05 var(--display); letter-spacing: 0.01em; }   /* a term: sentence case (L5) */
.principles dd { grid-column: 2; margin: 0; max-width: 24em; }

/* Tables: an edit decision list */
table { border-collapse: collapse; width: 100%; font: 400 var(--t-ui)/1.4 var(--ui); font-variant-numeric: lining-nums tabular-nums; }
caption { caption-side: top; text-align: left; padding-bottom: var(--s4); font: 400 var(--t-small)/1.4 var(--text); color: var(--ink-2); }
th { text-align: left; font: 600 var(--t-small)/1.2 var(--ui); color: var(--ink-2); padding: 0 var(--s5) var(--s3) 0; border-bottom: 1px solid var(--edge); vertical-align: bottom; }
td { padding: var(--s3) var(--s5) var(--s3) 0; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: normal; }
th:last-child, td:last-child { padding-right: 0; }
td:first-child { font-weight: 600; }                 /* the key column: a reference or a name */
.num { text-align: right; }
td.prose { font: 400 1.125rem/1.45 var(--text); }    /* a cell of sentences */
.ref { white-space: nowrap; }                         /* references never break (§3.2) */


.post-list { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.post-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s2) var(--s6); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.post-list a { display: inline-flex; align-items: center; min-height: 48px; font: 400 clamp(1.375rem, 2.2vw, 1.875rem)/1.2 var(--text); text-decoration: none; }
.post-list a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.post-list time { font: 400 var(--t-ui)/1 var(--ui); color: var(--ink-2); font-variant-numeric: lining-nums proportional-nums; }

/* Forms */
form p { margin-bottom: var(--s5); }
label { display: block; margin-bottom: var(--s2); font: 600 var(--t-ui)/1.3 var(--ui); color: var(--ink); }
form > input + label, form > select + label, form > textarea + label, form > .error-message + label { margin-top: var(--s5); }
form > button { margin-top: var(--s5); }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="search"], select, textarea {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--edge); border-radius: 0;
  font: 400 var(--t-body)/1.4 var(--text);
}
textarea { resize: vertical; min-height: 9em; }
select { appearance: none; padding-right: 48px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 12px center; background-size: 24px 24px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--ink); }
.field-error input, input[aria-invalid="true"] { border: 2px solid var(--error); padding: 11px 13px; }
.error-message { display: flex; gap: 10px; align-items: baseline; margin-top: var(--s2); font: 500 var(--t-ui)/1.35 var(--ui); color: var(--error); }
.error-message::before { content: ""; flex: none; width: 13px; height: 12px; background: currentColor; clip-path: polygon(50% 0, 100% 100%, 0 100%); transform: translateY(1px); }
input[type="checkbox"] { appearance: none; flex: none; width: 24px; height: 24px; margin: 2px 0 0; border: 2px solid var(--edge); background: var(--panel); border-radius: 0; cursor: pointer; }
input[type="checkbox"]:checked { background: var(--ink) var(--check) center / 20px no-repeat; border-color: var(--ink); }
input[type="checkbox"]:disabled { cursor: not-allowed; border-color: var(--ink-3); }
input[type="checkbox"]:disabled:checked { background-color: var(--ink-3); }
.consent { display: grid; grid-template-columns: 24px 1fr; column-gap: var(--s3); align-items: start; }
.consent label { margin: 0; font: 400 var(--t-ui)/1.5 var(--ui); }

/* Figures outside the essay: the lead image bleeds, the credit sits beneath as a subtitle */
main > figure, main > section > figure.scope { grid-column: 1 / -1; margin: var(--cut) 0 0; }
main > section > figure.scope { margin-inline: calc(-1 * var(--safe)); }
main > section:not(.intro) > figure.scope:first-child { margin-top: 0; }   /* the section's padding is the one cut */
figure.scope img { width: 100%; aspect-ratio: var(--scope); object-fit: cover; object-position: var(--focus, 50% 50%); }
figure > .credit, main > figure > figcaption { padding-inline: var(--safe); text-align: center; }

/* Quotations: the intertitle band */
.essay blockquote, main blockquote.intertitle { grid-column: 1 / -1; max-width: none; margin: var(--s8) calc(-1 * var(--safe)); min-height: calc(100vw / var(--strip) * 1.4); display: grid; place-items: center; align-content: center; padding: var(--s8) var(--safe); text-align: center; background: var(--panel); }
.essay blockquote p, main blockquote.intertitle p { max-width: 17em; font: 300 var(--t-inter)/1.25 var(--text); }
blockquote footer, blockquote cite { display: block; margin-top: var(--s5); font: 400 var(--t-ui)/1.4 var(--ui); font-style: normal; color: var(--ink-2); }
blockquote footer .billing { font: 600 1.25rem/1.3 var(--display); letter-spacing: 0.04em; color: var(--ink); }

/* 9. Footer: the end credits */
body > footer {
  margin-top: var(--cut); padding: var(--s8) var(--safe);
  display: flex; flex-direction: column; align-items: center; gap: var(--s3); text-align: center;
  border-top: 1px solid var(--rule);
}
body > footer .mark { width: 96px; height: auto; margin-bottom: var(--s5); }
body > footer p { font: 400 var(--t-ui)/1.5 var(--ui); }
body > footer .billing { font: 600 1.25rem/1.3 var(--display); letter-spacing: 0.05em; }   /* a whole line or a name inside one */
body > footer nav ul { justify-content: center; column-gap: var(--s6); margin-top: var(--s2); }
body > footer a { display: inline-flex; align-items: center; min-height: 44px; font: 500 var(--t-ui)/1 var(--ui); }
body > footer .small { font: 400 var(--t-small)/1.5 var(--text); color: var(--ink-2); }

/* 10. Article (the essay) */
.essay { --indent: 3; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); padding: 0 var(--safe); }
.essay > * { grid-column: 4 / 10; max-width: var(--measure); }
.essay-header { grid-column: 1 / -1 !important; max-width: none !important; margin: 0 calc(-1 * var(--safe)) var(--cut); display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); padding: 0 var(--safe); }
.essay-header > * { grid-column: 1 / -1; }
.essay-header .screen { margin: 0 calc(-1 * var(--safe)); grid-template-rows: 1fr auto; }
.essay-header .kicker { grid-column: 4 / -1; grid-row: 1; align-self: start; font: 400 var(--t-sub)/1.3 var(--text); color: var(--ink-2); }
.essay-header h1 { grid-column: 4 / -1; grid-row: 2; padding-top: var(--s7); }
.essay-header .dek { grid-column: 4 / 11; margin-top: var(--s6); font-size: var(--t-lede); line-height: 1.45; max-width: 30em; }
.byline { grid-column: 4 / 11; margin-top: var(--s5); font: 400 var(--t-ui)/1.5 var(--ui); color: var(--ink-2); font-variant-numeric: lining-nums proportional-nums; }
.byline .billing { font: 600 1.25rem/1 var(--display); letter-spacing: 0.04em; color: var(--ink); }
.byline .ref { font-weight: 600; color: var(--ink); }
.essay > h2.slug { grid-column: 1 / -1; max-width: none; margin-top: var(--cut); }
.essay > .essay-header + h2.slug, .essay > .essay-header + figure { margin-top: 0; }   /* the header's margin is the one cut */
.essay > p, .essay > ol, .essay > ul, .essay > pre, .essay > aside { margin-bottom: var(--s5); }
.essay h3 { margin: var(--s7) 0 var(--s4); font: 600 var(--t-h3)/1.2 var(--ui); }
.essay sup a { font-family: var(--ui); font-weight: 600; padding: 0 0.1em; text-decoration-color: var(--ink-2); font-variant-numeric: lining-nums; }
pre { overflow-x: auto; padding: var(--s5); background: var(--panel); border: 1px solid var(--rule); font: 400 0.9375rem/1.5 var(--mono); color: var(--ink); max-width: none; }
.essay > pre { max-width: none; }   /* the column's width, not the 29em measure */

/* Figures in the essay: the frame, then the subtitle */
.essay figure { grid-column: 1 / -1; max-width: none; margin: var(--s8) 0; }
.essay figure img { width: 100%; }
.essay figure.scope { margin-inline: calc(-1 * var(--safe)); }
.essay figure.pillarbox .plate, figure.pillarbox .plate { position: relative; width: 100%; background: var(--panel); aspect-ratio: var(--flat); }
.essay figure.pillarbox img, figure.pillarbox img { position: absolute; inset: 0; margin: auto; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
figcaption { max-width: 18em; margin: var(--s4) auto 0; text-align: center; text-wrap: balance; font: 400 1.125rem/1.5 var(--text); color: var(--ink); }   /* at most 42 characters a line, measured (L11) */
.credit { display: block; margin-top: var(--s2); font: 400 var(--t-small)/1.4 var(--ui); font-style: normal; color: var(--ink-2); }

.essay table { grid-column: 3 / 11; max-width: none; margin: var(--s7) 0; }
.essay td:last-child { font: 400 var(--t-ui)/1.45 var(--text); font-size: 1.125rem; }
.note { padding: var(--s5) 0; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); font-size: 1.125rem; margin-top: var(--s7); }
.footnotes { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--rule); }
.footnotes h2 { margin: 0 0 var(--s4); font: 600 var(--t-ui)/1 var(--ui); color: var(--ink-2); }
.footnotes ol { list-style: none; padding-left: 0; counter-reset: note; font-size: 1.0625rem; line-height: 1.55; color: var(--ink-2); }
.footnotes li { counter-increment: note; position: relative; padding-left: 1.6em; margin-bottom: var(--s2); }
.footnotes li::before { content: counter(note) / ""; position: absolute; left: 0; top: 0.12em; font: 600 var(--t-small)/1.75 var(--ui); color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.footnotes a[aria-label] { display: inline-block; min-width: 24px; text-align: center; text-decoration: none; }

/* 11. Legal and other utility pages: a Strip-ratio title card */
.legal-head { margin-bottom: 0; }
.legal-head .screen { min-height: calc(100vw / var(--strip)); }
.legal-head h1 { grid-column: 2 / -1; }
main > .lede { margin: var(--s6) var(--safe) 0 var(--edge-x); max-width: 31em; font-size: var(--t-lede); line-height: 1.45; }
.toc { margin: var(--s7) var(--safe) 0 var(--edge-x); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: var(--s6); counter-reset: chapter; }
.toc li { counter-increment: chapter; display: flex; align-items: baseline; gap: 10px; }
.toc li::before { content: counter(chapter) / ""; font: 300 1.25rem/1 var(--display); color: var(--accent); font-variant-numeric: lining-nums; }
.toc a { display: inline-flex; align-items: center; min-height: 52px; font: 500 var(--t-ui)/1 var(--ui); text-decoration: none; }
.toc a:hover { box-shadow: inset 0 -2px 0 var(--accent); }
main > section h3 { margin: var(--s6) 0 var(--s3); font: 600 1.25rem/1.2 var(--ui); }
section ul:not(.post-list):not(.work-list):not(.menu) { padding-left: 1.2em; }
section ul:not(.post-list):not(.work-list):not(.menu) li { margin-bottom: var(--s2); }
address { font-style: normal; line-height: 1.6; }
.consent-form fieldset { margin: var(--s5) 0 0; padding: var(--s5); border: 1px solid var(--edge); }
.consent-form legend { padding: 0 var(--s2); font: 600 var(--t-ui)/1 var(--ui); }
.consent-form fieldset p { display: grid; grid-template-columns: 24px 1fr; column-gap: var(--s3); margin: var(--s4) 0 0; }
.consent-form fieldset label { margin: 0; }
.hint { display: block; margin-top: var(--s1); font: 400 1.0625rem/1.45 var(--text); color: var(--ink-2); }
.consent-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
/* Reject and Accept carry identical weight: same outline, same size, same type */
.consent-actions button { background: transparent; color: var(--ink); border: 1px solid var(--ink); min-width: 11em; }
.consent-actions button:hover { box-shadow: inset 0 -4px 0 var(--accent); }

/* 12. 404: the projector is on and the reel is missing */
.not-found { padding: 0; }
.not-found .code { display: flex; align-items: flex-end; min-height: calc(100vw / var(--scope) * 0.82); padding: var(--s5) var(--safe) var(--s5) var(--edge-x); background: var(--ink); color: var(--ground); font: 600 var(--t-ui)/1 var(--ui); font-variant-numeric: lining-nums; }
.not-found h1 { margin: var(--s7) var(--safe) 0 var(--edge-x); }
.not-found > p:not(.code) { margin: var(--s5) var(--safe) 0 var(--edge-x); max-width: 31em; font-size: var(--t-lede); line-height: 1.45; }
.not-found ul { list-style: none; padding: 0; margin: var(--s6) var(--safe) 0 var(--edge-x); display: flex; flex-wrap: wrap; column-gap: var(--s6); border-top: 1px solid var(--rule); }
.not-found ul a { display: inline-flex; align-items: center; min-height: 56px; font: 500 1.25rem/1 var(--ui); }

/* 13. Breakpoints */
@media (max-width: 1023px) {
  main > section:not(.intro) > *, main > section.narrow > *, main > section.narrow > table, main > section form { grid-column: 1 / -1; }
  .intro h1, .intro .kicker { grid-column: 2 / -1; }
  .intro .lede { grid-column: 2 / -1; grid-row: 2; margin-top: var(--s5); max-width: 30em; }
  .intro .kicker ~ .lede { grid-row: 3; }
  .work-list article::before { grid-column: 1; }
  .work-list h3, .work-list .meta { grid-column: 2 / 5; }
  .work-list p:not(.meta) { grid-column: 5 / -1; }
  .work-list > li:nth-child(n+3) article { grid-template-rows: none; }
  .work-list > li:nth-child(n+3) img { grid-column: 1 / -1 !important; grid-row: 1; margin-bottom: var(--s5); }
  .work-list > li:nth-child(n+3) article::before { grid-column: 1 !important; grid-row: 2; padding: 0; }
  .work-list > li:nth-child(n+3) h3 { grid-column: 2 / 5 !important; grid-row: 2; }
  .work-list > li:nth-child(n+3) .meta { grid-column: 2 / 5 !important; grid-row: 3; margin: var(--s2) 0 0; }
  .work-list > li:nth-child(n+3) p:not(.meta) { grid-column: 5 / -1 !important; grid-row: 2 / 4; margin-top: 0; }
  .work-list article.card { width: 100%; }
  .essay { --indent: 1; }
  .essay > * { grid-column: 2 / -2; }
  .essay-header .kicker, .essay-header h1, .essay-header .dek, .byline { grid-column: 2 / -1; }
  .essay table { grid-column: 1 / -1; }
}
/* 1024 to 1279: columns 4 to 9 fall under 29em, so the essay edge moves to column 3 (L12) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .essay { --indent: 2; }
  .essay > * { grid-column: 3 / 11; }
  .essay-header .kicker, .essay-header h1 { grid-column: 3 / -1; }
  .essay-header .dek, .byline { grid-column: 3 / 11; }
}
@media (max-width: 767px) {
  .post-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .post-list a { min-height: 44px; align-items: flex-end; }
  body > header { grid-template-columns: 1fr auto; grid-template-areas: "name lights" "nav nav"; row-gap: var(--s2); }
  body > header nav { justify-self: start; }
  body > header nav, body > header nav ul { column-gap: var(--s5); }
  .site-name .mark { width: 48px; }   /* the Scope mark's minimum (L1, B.6) */
  .screen { min-height: calc((100vw) / 1.0); padding-top: var(--s6); }
  .intro .screen { min-height: 0; padding-top: 96px; }
  .intro h1, .intro .lede, .intro .kicker { grid-column: 1 / -1; }
  .intro .menu { padding-left: var(--safe); column-gap: var(--s6); }
  .essay-header .screen { min-height: calc(100vw / 1.1); }
  .essay-header .kicker, .essay-header h1, .essay-header .dek, .byline { grid-column: 1 / -1; }
  .legal-head .screen { min-height: calc(100vw / var(--flat)); }
  .legal-head h1 { grid-column: 1 / -1; }
  main > .lede, .toc, .not-found h1, .not-found > p:not(.code), .not-found ul { margin-left: var(--safe); }
  .not-found .code { padding-left: var(--safe); min-height: calc(100vw / var(--flat)); }
  .slug::before { flex-basis: 2ch; margin-right: var(--s3); }
  .screen::before { inset: var(--s4) var(--safe); --l: 16px; }
  .work-list article::before { grid-column: 1 / -1 !important; grid-row: auto; padding: 0 0 var(--s2); }
  .work-list h3, .work-list .meta, .work-list p:not(.meta),
  .work-list > li:nth-child(n) h3, .work-list > li:nth-child(n) .meta, .work-list > li:nth-child(n) p:not(.meta) { grid-column: 1 / -1 !important; grid-row: auto; }
  .work-list > li:nth-child(n) p:not(.meta) { margin-top: var(--s3); }
  .work-list img, .work-list > li:first-child img, figure.scope img { aspect-ratio: var(--flat); }
  .work-list article.card { aspect-ratio: auto; padding: 14% 7%; }
  .principles { grid-template-columns: 1fr; row-gap: var(--s2); }
  .principles dt { text-align: left; margin-top: var(--s5); font-size: 1.5rem; }
  .principles dd { grid-column: 1; }
  th, td { padding-right: var(--s3); }
  .essay > * { grid-column: 1 / -1; }
  figure.pillarbox .plate { aspect-ratio: auto; background: none; }
  figure.pillarbox img { position: static; width: 100%; height: auto; }
  .essay blockquote, main blockquote.intertitle { min-height: 0; padding: var(--s8) var(--safe); }
  /* Tables become records: each row a short stack, each cell labelled from its column head */
  table.records, table.records tbody, table.records tr, table.records td, table.records caption { display: block; }
  .essay table.records { overflow: visible; }
  table.records thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.records tr { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
  table.records tbody tr:first-child { border-top: 1px solid var(--edge); }
  table.records td { border: 0; padding: 2px 0; display: grid; grid-template-columns: 7.5rem 1fr; column-gap: var(--s3); align-items: baseline; text-align: left; }
  table.records td::before { content: attr(data-label); font: 500 var(--t-small)/1.4 var(--ui); color: var(--ink-2); }
  table.records td:first-child { font-weight: 600; }
  .toc ul { display: grid; grid-template-columns: 1fr; }
}

/* 14. Motion preferences: cuts only */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; scroll-behavior: auto !important; }
}

/* 15. Print: house lights up, everything on paper (#FFFFFF here is unprinted paper, not a ground) */
@media print {
  :root { --ground: #FFFFFF; --panel: #FFFFFF; --ink: #171512; --ink-2: #4D4740; --ink-3: #625B53; --rule: #C9C2B6; --edge: #7F776C; --accent: #2A5FA3; --error: var(--ink); color-scheme: light; }
  @page { size: letter; margin: 0.75in 0.75in 0.9in; }
  html, body { background: #FFFFFF; color: #171512; font-size: 10.5pt; }
  body { transition: none; }
  .skip-link, .lights, body > header nav, .menu, form, .toc, body > footer .mark { display: none !important; }
  main > section:not(.intro), .essay { padding-top: 24pt; }
  .screen { min-height: 0; padding: 0 0 12pt; border-bottom: 0.5pt solid #171512; }
  .title-card { font-size: 40pt; }
  .card, .essay blockquote, main blockquote.intertitle { background: none; border: 0.5pt solid #7F776C; aspect-ratio: auto; padding: 18pt; min-height: 0; }
  .screen::before { display: none; }
  img, figure, tr, blockquote { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  body > footer { margin-top: 24pt; padding: 12pt 0 0; }
}

/* 16. States the language defines that a page may not show (§5.1) */
.button[aria-disabled="true"], button:disabled { background: transparent; color: var(--ink-3); border-color: var(--ink-3); cursor: not-allowed; box-shadow: none; }
input:disabled, select:disabled, textarea:disabled { color: var(--ink-3); border-style: dashed; cursor: not-allowed; }
.success-message { display: flex; gap: 10px; align-items: baseline; margin-top: var(--s2); font: 500 var(--t-ui)/1.35 var(--ui); color: var(--success); }
.success-message::before { content: ""; flex: none; width: 12px; height: 12px; background: currentColor; }
.warning-message { display: flex; gap: 10px; align-items: baseline; margin-top: var(--s2); font: 500 var(--t-ui)/1.35 var(--ui); color: var(--warning); }
.warning-message::before { content: ""; flex: none; width: 13px; height: 12px; background: currentColor; transform: translateY(1px);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 12'%3E%3Cpath d='M6.5 1.2L12 11.2H1z' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 12'%3E%3Cpath d='M6.5 1.2L12 11.2H1z' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat; }   /* an outlined triangle */
.loading { aspect-ratio: var(--scope); background: var(--panel); display: flex; align-items: flex-end; padding: 2% 2.4%; font: 500 var(--t-ui)/1 var(--ui); color: var(--ink-2); }

/* 17. Restyle additions for this site (§0.4, §5.1): each built from A.1's own parts, named in notes.md */
/* Shot labels carry their reel: 2A to 2G when the work list is reel 2 (L7) */
.work-list article::before { content: counter(reel) counter(shot, upper-alpha) / ""; }
/* A work list with no pictures: each shot is its slate (label, title, meta) on the reading edge and its text
   beside it, the way 1C and 1D set text beside a frame; the shots are still separated by the cut */
@media (min-width: 768px) {
  .work-list.no-frames > li:nth-child(n) > article { grid-template-rows: none; }
  .work-list.no-frames > li:nth-child(n) > article::before { grid-column: 1; grid-row: 1; padding: 0; }
  .work-list.no-frames > li:nth-child(n) > article > h3 { grid-column: 2 / 7; grid-row: 1; }
  .work-list.no-frames > li:nth-child(n) > article > .meta { grid-column: 2 / 7; grid-row: 2; margin: var(--s2) 0 0; }
  .work-list.no-frames > li:nth-child(n) > article > p:not(.meta) { grid-column: 7 / -2; grid-row: 1 / 4; margin: 0; }
  .work-list.no-frames > li:nth-child(n) > article > p.more { grid-row: 4; margin-top: var(--s4); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .work-list.no-frames > li:nth-child(n) > article > h3, .work-list.no-frames > li:nth-child(n) > article > .meta { grid-column: 2 / 5 !important; }
  .work-list.no-frames > li:nth-child(n) > article > p:not(.meta) { grid-column: 5 / -1 !important; }
}
@media (max-width: 767px) {
  .work-list.no-frames article { display: flex; flex-direction: column; }
}
/* A case study's meta line: the work list's .meta, set under a slug */
main > section > p.meta { font: 400 var(--t-ui)/1.5 var(--ui); color: var(--ink-2); font-variant-numeric: lining-nums proportional-nums; }
/* Photographs after the lead: inside the safe margins on the reading edge, Scope (Flat under 768 px by
   <picture>), the caption centred beneath as a subtitle (L11) */
main > section > figure.shot, main > section > figure.pillarbox { grid-column: 2 / -2; margin: var(--s8) 0; }
figure.shot img { width: 100%; height: auto; }

.essay td:last-child:not(.prose) { font: 400 var(--t-ui)/1.4 var(--ui); font-variant-numeric: lining-nums tabular-nums; }
.work-list.no-frames h3 { margin: 0; }
/* A table between paragraphs keeps a group's distance from them (§3.3: 48 px inside a reel) */
main > section > p + table, main > section > table + p { margin-top: var(--s7); }
/* A number never breaks from its unit, its range or its "of N" (§3.2) */
.nb { white-space: nowrap; }
/* 1024 to 1279: columns 2 to 8 fall under 29em, so legal prose takes column 9 as well (L12, as the essay does) */
@media (min-width: 1024px) and (max-width: 1279px) {
  main > section.narrow > p, main > section.narrow > h3, main > section.narrow > ul { grid-column: 2 / 10; }
}
picture { display: block; }
@media (max-width: 1023px) {
  main > section > figure.shot, main > section > figure.pillarbox { grid-column: 1 / -1; }
}
/* V4 TICKER: append to styles-v4.css (V1's stylesheet through v4base.py, C.3.6). Needs the Ticker cut and Commit Mono (C.3.5). */
@font-face { font-family: "Sofia Sans Ticker"; src: url("fonts/sofia-sans-ticker-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sofia Sans Ticker"; src: url("fonts/sofia-sans-ticker-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Sofia Sans Ticker"; src: url("fonts/sofia-sans-ticker-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sofia Sans Extra Condensed Ticker"; src: url("fonts/sofia-sans-extra-condensed-ticker-200.woff2") format("woff2"); font-weight: 200; font-display: swap; }
@font-face { font-family: "Sofia Sans Extra Condensed Ticker"; src: url("fonts/sofia-sans-extra-condensed-ticker-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Sofia Sans Extra Condensed Ticker"; src: url("fonts/sofia-sans-extra-condensed-ticker-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Commit Mono"; src: url("fonts/commit-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* 1. Tokens: hue is direction; every V1 accent job goes to Screen; two computed steps */
:root {
  --lit: #24221F;   /* k 0.0128, 1.18:1 on Masking: the lit frame */
  --data: #CCC6BB;  /* k 0.7185, 11.01:1: body and data text */
  --up: #86B0E2; --down: #E3B25C;
  --accent: var(--ink); --error: var(--ink); --success: var(--ink); --warning: var(--ink);
  --inv-bg: #ECE5D8; --inv-ink: #14120F; --inv-2: #4D4740; --inv-edge: #7F776C; --inv-up: #2A5FA3; --inv-down: #85570A;
  --ui: "Sofia Sans Ticker", "Sofia Sans", "Helvetica Neue", Arial, sans-serif;
  --display: "Sofia Sans Extra Condensed Ticker", "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --text: var(--ui);
  --mono: "Commit Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --t-body: 1.0625rem; --measure: 27em; --t-title: 3.625rem; --t-h2: 1.125rem;
  --fs-data: 0.875rem; --fs-label: 0.78125rem;
  --cell: calc(var(--fs-data) * 0.587); --fs-engine: calc(var(--cell) / 0.6);
  --pad: 24px; --t-house: 0ms;
}
:root[data-theme="lights"] {
  --lit: #FFFFFF; --data: #171512; --up: #2A5FA3; --down: #85570A;
  --accent: var(--ink); --error: var(--ink); --success: var(--ink); --warning: var(--ink);
  --inv-bg: #171512; --inv-ink: #ECE5D8; --inv-2: #B3AA9C; --inv-edge: #7C7468; --inv-up: #86B0E2; --inv-down: #E3B25C;
}

/* 2. Base: one sans voice, tabular figures, brightness for emphasis */
body { font: 400 var(--t-body)/1.55 var(--text); color: var(--data); font-variant-numeric: tabular-nums lining-nums; transition: none; }
h1, h2, h3, strong, b { color: var(--ink); }
em, i, cite, blockquote, figcaption, footer .small { font-style: normal; }
em, i, cite { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
a:hover { text-decoration-color: var(--ink); }
code, pre, kbd, samp, .engine { font-family: var(--mono); font-variant-ligatures: none; }
pre { background: none; }   /* D2: no filled rectangle; the 1 px rule stays */
sup { font-size: var(--fs-label); }
.num { text-align: right !important; white-space: nowrap; }
.is-up { color: var(--up); } .is-down { color: var(--down); } .is-flat { color: var(--ink-2); }
.inverse .is-up { color: var(--inv-up); } .inverse .is-down { color: var(--inv-down); }
.slug::before, .slug::after, ol > li::before, .footnotes li::before { color: var(--ink-2); }

/* 3. Top bar and status line */
body > header { min-height: 44px; padding-block: 0; border-bottom: 1px solid var(--rule); }
body > header nav a { font-size: 0.875rem; }
body > header nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--ink); }
body > header nav a:hover { box-shadow: none; background: var(--panel); }
.site-name .billing { font: 600 1.25rem/1 var(--display); letter-spacing: 0.05em; color: var(--ink); }
body > footer { margin-top: 0; min-height: 44px; padding: 0 var(--safe); flex-flow: row wrap; align-items: center;
  justify-content: flex-start; gap: 0 24px; text-align: left; }
body > footer::before { content: none; }
body > footer p, body > footer a { font: 400 var(--fs-label)/1.3 var(--ui); color: var(--ink-2); }
body > footer a { display: inline-flex; align-items: center; min-height: 44px; }
body > footer .billing { font: 600 0.875rem/1.3 var(--display); letter-spacing: 0.05em; color: var(--ink-2); }

/* 4. Title-card row and the lit frame (one per view) */
.tc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 22em) auto; column-gap: var(--pad);
  align-items: end; padding: var(--pad) var(--safe) 12px; }
.tc-row::before, .tc-row::after { content: "1" / ""; align-self: start; font: 300 1.0625rem/1 var(--display); color: var(--ink-2); }
.tc-row > p { max-width: 22em; }
.tc-title .kicker { margin: 0 0 8px; font: 400 0.875rem/1.3 var(--ui); color: var(--ink-2); }
.title-card { margin: 0; font-size: var(--t-title); }
.tc-num { font: 200 var(--t-title)/0.86 var(--display); color: var(--ink); }
.tc-chg { font: 300 1.625rem/1 var(--display); }
.lit-frame { position: relative; container-type: inline-size; aspect-ratio: 2.39; margin: 0 var(--safe); background: var(--lit);
  display: grid; align-content: end; padding: 5%; }
.lit-frame > img, .lit-frame > picture, .lit-frame > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lit-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; --m: var(--edge); --l: min(18px, 3cqi);
  background: linear-gradient(var(--m), var(--m)) top left / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) top left / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) top right / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) top right / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom left / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) bottom left / 1px var(--l) no-repeat,
    linear-gradient(var(--m), var(--m)) bottom right / var(--l) 1px no-repeat, linear-gradient(var(--m), var(--m)) bottom right / 1px var(--l) no-repeat; }
.lit-frame:has(> img, > picture)::after { inset: -6px; }   /* on a photograph the marks sit 6 px outside its corners */
.lit-frame + p, .lit-frame + figcaption { max-width: 18em; margin: 8px auto 0; text-align: center; font-size: 0.9375rem; color: var(--data); }
.lit-frame + :is(p, figcaption) :is(small, .credit) { display: block; font-size: var(--fs-label); color: var(--ink-2); }
.passage { max-width: 24em; font: 400 clamp(1.375rem, 2vw, 1.75rem)/1.35 var(--ui); color: var(--ink); }

/* 5. The room: panels divided by hairlines, never filled; slug between panel numbers */
/* each panel casts a 1 px --rule into the gap on its right and bottom; the room clips the outer edges.
   Spans in a row add up to 12; a short row leaves unlit room, never a filled block. Panel 1 is the .tc-row */
.room { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1px; margin: var(--pad) var(--safe) 0;
  border-top: 1px solid var(--rule); overflow: hidden; counter-reset: reel 1; }
.panel { grid-column: span var(--span, 12); min-width: 0; padding: 0 var(--pad) var(--pad); background: var(--ground);
  box-shadow: 1px 1px 0 var(--rule); }
.panel[data-span="4"] { --span: 4; } .panel[data-span="6"] { --span: 6; } .panel[data-span="8"] { --span: 8; }
.panel:focus-visible { outline-offset: -2px; }
.panel > .slug { display: flex; align-items: center; gap: 10px; height: 36px; margin: 0 calc(-1 * var(--pad)) var(--pad);
  padding: 0 12px; border-bottom: 1px solid var(--rule); font: 600 var(--t-h2)/1 var(--display); letter-spacing: 0.03em; }
.panel > .slug::before, .panel > .slug::after { flex: 0 0 auto; min-width: var(--cell); padding: 0; font: 300 1.0625rem/1 var(--display); }
.panel > .slug::after { margin-left: auto; text-align: right; }
.panel > :is(p, ol, ul, form) { max-width: var(--measure); }
.panel > * + :not(.slug) { margin-top: 16px; }
.panel > ol { list-style: none; padding: 0; counter-reset: item; }   /* direct lists only: the footnotes keep their counter */
.panel > ol > li { counter-increment: item; position: relative; padding-left: 2.2em; margin-bottom: 8px; }
.panel > ol > li::before { content: counter(item) / ""; position: absolute; left: 0; font: 300 1.25rem/1.2 var(--display); }
.room .panel blockquote { margin: var(--pad) 0 0; padding: 0; background: none; text-align: left; min-height: 0; display: block;
  place-items: normal; align-content: normal; max-width: 30em; }
.room .panel blockquote p { max-width: none; font: 400 1.375rem/1.4 var(--ui); color: var(--ink); }
.panel blockquote footer { display: block; margin: 12px 0 0; padding: 0; border: 0; text-align: left; font-size: var(--fs-label); color: var(--ink-2); }
.panel blockquote footer::before { content: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .panel[data-span="6"] { --span: 12; } }   /* six columns measure 55 characters here (L12) */
@media (max-width: 1023px) { .room { grid-template-columns: repeat(8, minmax(0, 1fr)); } .panel:not([data-span="4"]) { --span: 8; } }
@media (max-width: 767px) { :root { --pad: 16px; --t-title: 3.25rem; } .room { grid-template-columns: 1fr; } .panel { --span: 1 !important; }
  .tc-row { grid-template-columns: minmax(0, 1fr); row-gap: 12px; } .tc-row::before, .tc-row::after { content: none; } .lit-frame { aspect-ratio: 1.85; } }

/* 6. Tables: tabular, right-aligned figures, hairline rows, heavier total */
.panel table { width: 100%; border-collapse: collapse; }
.panel th, .panel td { padding: 5px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline;
  font: 400 var(--fs-data)/1.4 var(--ui); color: var(--data); }
.panel thead th { font-size: var(--fs-label); font-weight: 500; color: var(--ink-2); }
.panel tbody th, .panel tbody td:first-child { font-weight: 600; color: var(--ink); }
.panel tfoot :is(th, td) { border-top: 1px solid var(--edge); font-weight: 600; color: var(--ink); }
@media (max-width: 767px) { .panel table.records td.num { text-align: left !important; } }

/* 7. Forms: wells cut to the masking; errors hold (inverse !, double border, a sentence) */
.panel label { margin: 12px 0 4px; font: 400 var(--fs-label)/1.3 var(--ui); color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="number"], select, textarea { min-height: 40px; padding: 8px 10px;
  background-color: var(--ground); font: 400 0.9375rem/1.4 var(--ui); color: var(--ink); }
:root[data-theme="lights"] :is(input, select, textarea) { background-color: #FFFFFF; }
:is(input, select, textarea):focus-visible { outline-color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.field-error input, :is(input, select, textarea)[aria-invalid="true"] { border: 3px double var(--ink); padding: 6px 8px; }
.error-message { font: 400 0.8125rem/1.35 var(--ui); color: var(--ink); }
.error-message::before { content: "!"; width: 18px; height: 18px; display: inline-grid; place-items: center; clip-path: none; transform: none;
  background: var(--inv-bg); color: var(--inv-ink); font: 600 0.8125rem/1 var(--ui); }
.button, button[type="submit"] { min-height: 44px; border: 0; background: var(--inv-bg); color: var(--inv-ink); font: 600 0.9375rem/1 var(--ui); }
.button:hover, button[type="submit"]:hover { box-shadow: none; background: var(--data); }
:root[data-theme="lights"] :is(.button, button[type="submit"]):hover { background: var(--ink-2); }

/* 8. The inverse patch, the stamp, the run seal */
.inverse { background: var(--inv-bg); color: var(--inv-ink); }
.inverse :focus-visible { outline-color: var(--inv-ink); outline-offset: -5px; }
.stamp { background: var(--inv-bg); color: var(--inv-ink); font: 600 0.75rem/1 var(--ui); letter-spacing: 0.04em; padding: 6px 8px 5px; white-space: nowrap; }
.runseal { width: max-content; max-width: none; margin: 0; padding: 0; border: 0; background: none; overflow: visible; white-space: pre;
  font: 400 var(--fs-engine)/1 var(--mono); letter-spacing: 0; color: var(--ink-2); font-variant-ligatures: none; }
.runseal .f { color: var(--edge); } .runseal .m { color: var(--ink); }
.runseal + p { max-width: none; margin-top: 8px; font-size: 0.75rem; color: var(--ink-2); }
.runseal + p .engine { white-space: nowrap; }

/* 9. House lights pressed, links, the status line's panel links */
.lights[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-ink); border-color: var(--inv-bg); }
a { text-decoration-color: var(--data); }
a:hover { text-decoration-color: var(--ink); text-decoration-thickness: 2px; }
body > footer nav.panels { display: flex; }
body > footer nav.panels a { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; text-decoration: none;
  font: 300 1.0625rem/1 var(--display); color: var(--ink-2); }
body > footer nav.panels a:hover { background: var(--panel); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0ms !important; } }

/* 10. This site's V4 restyle (§8.4.5 5.1, §0.4): V1's own parts in V4's tokens, each named in notes.md */
/* Panel 1: the lede and its routes right of the H1 (About); the lit frame holds the key passage or the 404's title */
.tc-row::after { grid-column: -2; }   /* the closing number stays at the right margin when the lede column is empty */
.tc-lede { max-width: 22em; }
.tc-lede .menu { margin-top: 12px; }
figure.lead { margin: 0; }
.lit-frame > .passage { margin: 0; }
.lit-frame.centred { align-content: center; justify-items: center; text-align: center; }
.lit-frame.centred > .title-card { font-size: var(--t-title); }
.lit-frame + .frame-foot { max-width: none; margin: 8px var(--safe) 0; text-align: left; font: 400 var(--fs-data)/1.4 var(--ui); color: var(--ink-2); }
.frame-foot .billing { font: 600 var(--fs-data)/1 var(--display); letter-spacing: 0.04em; color: var(--ink); }
figure.lead figcaption, .panel figcaption { max-width: 18em; margin: 8px auto 0; padding-inline: 0; text-align: center; font: 400 0.9375rem/1.5 var(--ui); color: var(--data); }
.credit { font-size: var(--fs-label); color: var(--ink-2); }
.panel:not(:has(> .slug)) { padding-top: var(--pad); }   /* the room's opening panel: no header, the same inset */
body > footer .small { font: 400 var(--fs-label)/1.3 var(--ui); color: var(--ink-2); }
/* Inside panels: sub-heads, meta lines, captions, the principles and the work list as plain lists */
.panel h3 { margin: 24px 0 0; font: 600 var(--t-body)/1.3 var(--ui); color: var(--ink); }
.panel > p.meta, .work-list .meta { font: 400 var(--fs-data)/1.4 var(--ui); color: var(--ink-2); }
.panel caption { padding: 0 0 8px; font: 400 var(--fs-data)/1.4 var(--ui); color: var(--ink-2); }
.panel > :is(table, figure, blockquote, dl) + :not(.slug), .panel > * + :is(table, figure) { margin-top: 24px; }
.panel .principles { display: block; max-width: var(--measure); }
.panel .principles dt { margin: 16px 0 4px; text-align: left; font: 600 1.25rem/1.1 var(--display); color: var(--ink); }
.panel .principles dt:first-child { margin-top: 0; }
.panel .principles dd { max-width: none; }
.panel .work-list > li + li { margin-top: 0; }
.panel .work-list > li { margin-bottom: 24px; }
.panel .work-list > li::before { top: 0.1em; }
.panel .work-list.no-frames article { display: block; }
.panel .work-list article::before { content: none; }
.panel .work-list :is(h3, p) { margin: 0; max-width: var(--measure); }
.panel .work-list .meta { margin-top: 4px; }
.panel .work-list p:not(.meta) { margin-top: 8px; }
.panel figure.shot, .panel figure.pillarbox { margin-bottom: 0; }
.panel figure.pillarbox .plate { background: none; }
.panel > .runseal { margin-top: 32px; }
.runseal-cap .engine { font-size: 1em; }
/* Print: paper tokens for V4's own roles (§8.4.3); no status line, no hairline room */
@media print {
  :root { --lit: #FFFFFF; --data: #171512; --up: #2A5FA3; --down: #85570A; --inv-bg: #171512; --inv-ink: #FFFFFF; --pad: 0px; }
  body > footer nav.panels { display: none; }
  .room { display: block; border: 0; margin: 0; }
  .panel { box-shadow: none; padding: 0 0 18pt; break-inside: auto; }
  .lit-frame { -webkit-print-color-adjust: exact; print-color-adjust: exact; }   /* without it Chrome drops the frame and its text from the PDF; the fill is white on paper */
  .lit-frame::after { --m: #171512; --l: 14pt; }
}
/* 404: V1's not-found offsets give way to the frame and the panel */
.not-found .lit-frame h1 { margin: 0; }
.not-found .panel > :is(p, ul) { margin: 16px 0 0; }
.not-found .panel > p:first-child { margin-top: 0; }
/* Phones: the status line's panel links wrap (it never truncates, §8.4.5 5.12); the hidden head of a record table keeps V1's wrap */
body > footer nav.panels { flex-wrap: wrap; }
@media (max-width: 767px) { .panel table.records thead .num { white-space: normal; } }
.panel > .menu { max-width: none; }   /* the two routes on one line where they fit */
/* 11. Final site edits: the About photographs and a one-screen 404 */
/* Photographs: two Scope landscapes stacked beside the 9:16 portrait, sized so the three end near one line */
.panel .gallery { display: grid; grid-template-columns: minmax(0, 1.86fr) minmax(0, 1fr); column-gap: 24px; align-items: start; margin-top: 24px; }
.gallery figure { margin: 0; }
.gallery .stack figure + figure { margin-top: 24px; }
.gallery img { width: 100%; height: auto; }
.gallery .portrait img { aspect-ratio: 9 / 16; object-fit: cover; }
@media (max-width: 1279px) { .panel .gallery { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); } }
@media (max-width: 1023px) { .panel .gallery { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
@media (max-width: 767px) { .panel .gallery { grid-template-columns: minmax(0, 1fr); row-gap: 24px; } }
/* 404: the frame, the title, one line and the routes in one screen */
.not-found .lit-frame .code { position: absolute; top: 12px; left: 16px; min-height: 0; padding: 0; background: none; font: 400 var(--fs-label)/1 var(--ui); color: var(--ink-2); }
.not-found .lit-frame { margin-top: 12px; }
.not-found .room { margin-top: 12px; }
.not-found .panel { padding-block: 12px; }
.not-found .panel > ul { margin-top: 8px; padding: 0; column-gap: 24px; border-top: 0; }
.not-found .panel > ul a { min-height: 44px; font-size: 1.0625rem; }
