@font-face {
  font-family: "Case Notes Archivo";
  src: url("assets/archivo-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --cn-ink: #081b1d;
  --cn-sheet: #f5f1e8;
  --cn-fg: #f7f7f2;
  --cn-muted: #b7c3bf;
  --cn-rule: #536968;
  --cn-coral: #ff8e7d;
  --cn-sans: "Case Notes Archivo", "Helvetica Neue", Arial, sans-serif;
  --cn-serif: Georgia, "Times New Roman", serif;
  font-family: var(--cn-sans);
  background: var(--cn-ink);
  color: var(--cn-fg);
  font-synthesis: none;
}
/* Match the homepage's paper section around the moving source documents. */
:root.film-embedded {
  color-scheme: light;
  --cn-fg: var(--cn-ink);
  --cn-muted: #485a59;
  --cn-rule: #8d9891;
  --film-surface: var(--cn-sheet);
  --film-print-ink: var(--cn-ink);
  --film-focus: #904031;
  --seek-track: #738178;
  background: var(--film-surface);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, p { margin: 0; }
button, input { font: inherit; }
a { color: inherit; }
.cn-film { display: none; }
.film-ready .cn-film {
  --film-gutter: clamp(30px, 3.9vw, 82px);
  display: grid;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 540px;
  grid-template-rows: clamp(62px, 9.7vh, 101px) minmax(0, 1fr) clamp(82px, 13.2vh, 109px) auto;
  background: var(--film-surface, radial-gradient(ellipse at 78% 43%, #1e3939 0%, #10292b 29%, transparent 64%) #081b1d);
}
.cn-film:fullscreen { height: 100%; }
.film-ready .static-film { display: none; }
.static-film { padding: clamp(26px, 6vw, 100px); max-width: 900px; line-height: 1.5; }
.static-film h2 { font-size: clamp(32px, 4vw, 68px); line-height: 1; }
.static-film p { margin-block: 1em; }

.film-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-inline: var(--film-gutter); border-bottom: 1px solid #47605e;
}
.film-name { font-size: clamp(14px, 1.17vw, 22px); font-weight: 615; letter-spacing: -.02em; }
.film-era, .answer-label, .file-entry > span {
  text-transform: uppercase; font-size: clamp(10px, .75vw, 13px); letter-spacing: .13em; font-weight: 620; color: var(--cn-muted);
}

.film-desk { display: grid; grid-template-columns: 44% 56%; min-height: 0; position: relative; }
.answer-set {
  padding: clamp(18px, 4.6vh, 55px) 0 clamp(13px, 2.8vh, 28px) var(--film-gutter);
  min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.question-block { width: 100%; }
.question-block h1 {
  font-size: clamp(37px, min(4.2vw, 8.4vh), 89px); line-height: .99; font-weight: 700;
  letter-spacing: -.052em; max-width: 16ch; text-wrap: balance;
}
.question-block h1 span { white-space: nowrap; }
.answer-file { display: grid; width: 100%; flex: 0 0 auto; margin-top: clamp(16px, 3.3vh, 42px); }
.answer-sheet { position: relative; }
.answer-file[data-state="empty"] :is(.answer-count, .answer-detail, .estimate-hardware, .answer-label i) { visibility: hidden; }
.answer-file:not([data-state="empty"]) .blank-line { display: none; }
.answer-label { display: flex; align-items: center; gap: 9px; margin-bottom: .55em; }
.answer-label i { width: 14px; height: 1px; background: #8caaa1; }
.answer-count { font: 510 clamp(30px, min(3.55vw, 7vh), 73px)/1.14 var(--cn-sans); min-height: 1.14em; letter-spacing: -.055em; }
.answer-count mark, .file-entry mark { color: inherit; background: transparent; padding-inline: .035em; box-decoration-break: clone; }
.answer-sheet p { font-size: clamp(15px, 1.45vw, 28px); letter-spacing: -.026em; margin-top: .12em; }
.answer-detail > span:first-child, .file-entry i { color: #a4b6b0; padding-inline: .08em; font-style: normal; }
.blank-line { position: absolute; width: min(86%, 25ch); height: 1px; margin-top: 10px; background: linear-gradient(90deg, #849995 58%, transparent); transform-origin: left; }
.footnote-file { width: 100%; height: clamp(34px, 6.4vh, 62px); margin-top: clamp(9px, 1.8vh, 18px); position: relative; flex: 0 0 auto; }
.file-entry { position: absolute; inset: 0 auto auto 0; display: grid; gap: 4px; padding: 3px 0 2px 12px; border-left: 1px solid #7e9490; }
.file-entry[hidden] { display: none; }
.file-entry > span { font-size: clamp(9px, .7vw, 12px); }
.file-entry p { font-size: clamp(13px, 1.18vw, 22px); line-height: 1.25; }
.file-entry[data-state="history"] p { color: #c3cec8; }
.film-caption { min-height: 1.25em; margin-top: clamp(8px, 2vh, 23px); font: italic clamp(15px, 1.24vw, 23px)/1.25 var(--cn-serif); color: #d9ded5; }
.cn-film[data-captions="off"] .film-caption { visibility: hidden; }
.evidence-set { min-width: 0; min-height: 0; position: relative; }
.evidence-thread { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; opacity: 0; }
.evidence-thread path { stroke: var(--cn-coral); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.evidence-thread circle { fill: var(--cn-coral); }
.film-embedded :is(.film-caption, .ev-future-title, .file-entry[data-state="history"] p, .file-entry i, .answer-detail > span:first-child) {
  color: var(--cn-muted);
}
.film-embedded .film-head { border-color: var(--cn-rule); }
.paper-conveyor { min-width: 0; position: relative; overflow: hidden; }
.cn-film :is(button, a, input):focus-visible { outline: 2px solid var(--cn-coral); outline-offset: 3px; }
@media (min-aspect-ratio: 25/10) and (min-width: 1000px) {
  .answer-set { padding-block: 12px; }
  .answer-file { margin-top: 14px; }
}

/* A direct link can open inside a narrow desktop preview pane. Letterbox
   the desktop composition there, retaining its camera and paper positions. */
@media (max-width: 950px) {
  .film-ready body { min-height: 100dvh; display: grid; align-content: center; overflow-x: clip; }
  /* Reserve the original picture area. Controls below it stay at device scale. */
  .film-ready .cn-film {
    width: 1000px;
    height: auto;
    grid-template-rows: 62px 418px 82px auto;
    zoom: var(--desktop-fit);
  }
}
