:root {
  color-scheme: light dark;
  --paper: #f6f3e9; --panel: #fdfbf2; --ink: #252920; --muted: #545b4b; --line: #b1b2a1;
  --board: #e6e7d7; --grid: #c9ccba; --sage: #666d4b; --accent: #ad540d; --gold: #ffbd45; --focus: #09598e;
  --serif: Georgia, 'Times New Roman', serif; --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-family: system-ui, sans-serif; background: var(--paper); color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #20241e; --panel: #2b3028; --ink: #f4f0dc; --muted: #c3c8b5; --line: #676f60; --board: #303a31; --grid: #434e42; --sage: #b8c69b; --accent: #ffc26e; --focus: #95d2ff; }
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
body { border-top: 4px solid var(--ink); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: fixed; top: -10rem; left: 1rem; z-index: 2; padding: .8rem; background: var(--panel); }
.skip:focus { top: .75rem; }
.frame { width: min(1200px, calc(100% - clamp(32px, 9vw, 144px))); margin-inline: auto; }
.masthead, .section-bar, .collection-header, .footer, .record-links, .drawing-tools, .inspect, .footer nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.masthead { padding-block: 14px; border-bottom: 1px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 720; font-size: .94rem; }
.brand span { color: var(--muted); font-weight: 450; }
.join { font-size: .83rem; font-weight: 600; text-decoration: none; }
.join span, .record-links a span { color: var(--accent); }
.join:hover, .record-links a:hover { text-decoration: underline; }
.intro { display: grid; grid-template-columns: 1fr minmax(0,.72fr); align-items: center; gap: 5%; padding: clamp(21px, 2.6vw, 38px) 0; }
.kicker, .serial, .scale-label, figcaption, .card-header, .inspect, .ruler, .metric dt, .card-metrics { font: 600 .72rem/1.4 var(--mono); }
.kicker, .serial, .scale-label, .card-header, .metric dt { letter-spacing: .09em; text-transform: uppercase; }
.kicker, .serial, .scale-label, .metric dt { color: var(--muted); }
.kicker { display: flex; align-items: center; gap: 9px; }
.kicker i { width: 14px; height: 9px; transform: skewX(-30deg); background: var(--gold); border: 1px solid #453719; }
h1, h2, h3, .deck { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(4rem, 8.1vw, 7.45rem); letter-spacing: -.09em; line-height: .96; margin: 10px 0; }
h1 span { color: var(--accent); }
.deck { font-size: clamp(1.45rem, 2.3vw, 2.15rem); letter-spacing: -.04em; }
.lede { max-width: 47ch; color: var(--muted); line-height: 1.5; margin-top: 8px; }
.frontispiece { justify-self: end; width: min(100%, 380px); }
.frontispiece img { width: 100%; height: auto; display: block; border: 1px solid var(--ink); }
figcaption { display: flex; gap: 12px; padding-top: 5px; font-size: .65rem; color: var(--muted); }
figcaption span { text-transform: uppercase; }
.status { padding: 24px; background: var(--board); border-block: 1px solid var(--line); font-family: var(--mono); }
.status.loading::before { content: ''; display: inline-block; margin-right: .7rem; width: .7rem; height: .7rem; background: var(--sage); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .35; } }
.viewer { border: 1px solid var(--ink); background: var(--panel); }
.section-bar { background: #30372f; color: #f5f1df; padding: 10px 17px; }
.section-bar .kicker, .section-bar .serial { color: inherit; }
.workbench { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.drawing-area, .thumbnail { background-color: var(--board); background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px),linear-gradient(to bottom, var(--grid) 1px, transparent 1px); background-size: 16px 16px; }
.drawing-area { display: grid; grid-template-rows: auto 1fr auto; border-right: 1px solid var(--ink); }
.drawing-tools { padding: 10px 16px 0; }
.drawing-tools button, .inspect select, .record-links button { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; font-size: .8rem; padding: 7px 12px; }
.drawing-tools button[aria-pressed=true], .record-links button:hover { background: var(--ink); color: var(--panel); }
.drawing-window { overflow: auto; align-content: center; padding: 16px 22px 20px; }
#strip-content { width: min(100%, var(--fit-width)); margin-inline: auto; }
.magnified #strip-content { width: max(155%,var(--fit-width)); }
#strip-art svg { width: 100%; display: block; overflow: visible; filter: drop-shadow(2px 3px 0 #242a2425); }
.strip { fill: var(--panel); stroke: #30342d; }
polygon, .strip { stroke: #292d27; stroke-width: 1.5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
#strip-art polygon { cursor: pointer; }
#strip-art polygon:is(:hover,.selected) { fill: var(--gold); stroke-width: 2.4px; }
.ruler { margin-top: 7px; padding-top: 7px; display: flex; justify-content: space-between; color: var(--muted); font-size: .68rem; background: repeating-linear-gradient(90deg,var(--muted) 0 1px,transparent 1px 4%) top/100% 4px no-repeat; border-top: 1px solid var(--muted); }
.inspect { justify-content: flex-start; flex-wrap: wrap; padding: 9px 16px; background: var(--panel); border-top: 1px solid var(--line); gap: 8px; }
.inspect select { padding: 5px; font: inherit; }
.inspect output { color: var(--muted); }
.record { padding: clamp(18px,2.6vw,38px); align-self: center; }
.record h2 { font-size: clamp(1.9rem,3vw,3.1rem); letter-spacing: -.055em; line-height: 1.05; margin-block: 8px; }
.byline, .card p { color: var(--muted); font-size: .87rem; }
.metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; border-block: 1px solid var(--line); margin: 17px 0; padding-block: 13px; }
.metric dt { font-size: .64rem; }
.metric dd { font: 500 1.35rem/1.35 var(--serif); font-variant-numeric: tabular-nums; }
.record-links { justify-content: flex-start; gap: 20px; }
.record-links a, .footer { font-size: .8rem; }
#copy-status:not(:empty) { display: block; margin-top: 6px; font-size: .8rem; } #manual-link { max-width:100%; }
.collection { margin-top: 38px; }
.collection-header { border-bottom: 1px solid var(--ink); padding-bottom: 11px; }
.collection h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); letter-spacing: -.05em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 14px; padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; background: var(--panel); border: 1px solid var(--line); }
.card:hover, .card[aria-current=true] { border-color: var(--ink); }
.card[aria-current=true] .card-header { box-shadow: inset 4px 0 var(--gold); }
.card-header, .card-metrics { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 9px 12px; }
.card-header { font-size: .65rem; }
.thumbnail { padding: 12px 18px; display: grid; place-items: center; border-block: 1px solid var(--line); }
.thumbnail svg { display: block; width: 100%; height: 60px; overflow: visible; }
.card-footer { padding: 12px; flex: 1; } .card h3 { font-size: 1.35rem; line-height: 1.1; letter-spacing: -.04em; margin-bottom: 5px; }
.card-metrics { font-size: .69rem; border-top: 1px solid var(--line); color: var(--muted); }
.admission { display: flex; align-items: baseline; gap: 12px; max-width: 76ch; margin: 28px 0; font-size: .91rem; color: var(--muted); line-height: 1.55; }
.check { color: var(--sage); font-weight: 800; } .admission strong { color: var(--ink); }
.footer { border-top: 1px solid var(--ink); padding-block: 18px; color: var(--muted); flex-wrap: wrap; }
.footer nav { flex-wrap: wrap; }
@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr .55fr; gap: 14px; }.workbench { grid-template-columns: 1fr; }
  .drawing-area { border-right: 0; border-bottom: 1px solid var(--ink); }.metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .masthead { gap: 8px; }.brand { display: grid; grid-template-columns: auto 1fr; gap: 0 6px; font-size: .78rem; }.brand img { grid-row: span 2; }.brand span { font-size: .68rem; }
  .join { font-size: .73rem; max-width: 17ch; text-align: right; }
  .intro { grid-template-columns: 1fr; position: relative; padding-block: 22px; }.intro-copy { z-index: 1; }.intro-copy .kicker { font-size: .64rem; }
  .frontispiece { position: absolute; right: 0; top: 52px; width: 27%; }.frontispiece img { height: auto; }.frontispiece figcaption { display: none; }
  h1 { font-size: clamp(3rem, 17vw, 5.4rem); width: 68%; }.deck { margin-top: 10px; }.lede { font-size: .9rem; }
  .drawing-window { padding: 16px 16px 12px; }.drawing-tools { padding: 8px 12px 0; }.section-bar { padding-inline: 12px; flex-wrap: wrap; }.inspect { padding: 8px 12px; }
  .record { padding: 16px; }.collection { margin-top: 28px; }.collection-header { align-items: baseline; flex-wrap: wrap; }.footer nav { justify-content: flex-start; }
}
@media (max-width: 24em) { .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { .status.loading::before { animation: none; } }
