/* The Version 7 drawing sheet, for pages that live outside versions/v7.html.
   Same frame, menu, left column (Detail A and the sheet list) and grid panel as the set mode in v7,
   built statically: the camera is a still drawing and the panel holds the page.
   Rules are copied from versions/v7.html; if v7 changes its tokens or frame, change them here too. */

:root {
  --paper: #efebe2; --card: #f8f5ee; --ink: #1d1b18; --ink-2: #57524a; --rule: #cfc8ba;
  --red: #a3301a; --gold: #d8b35a; --focus: #a3301a; --line: #22406a; --cross: #b39a5c;
  --film: #16140f;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --frame: 14px; --ease: cubic-bezier(.6,0,.2,1);
  color-scheme: light;
}
:root[data-theme="dark"] { --paper: #0c1220; --card: #1a2744; --ink: #f5edd8; --ink-2: #b8b19f; --rule: #2c3a5a; --red: #e8705a; --focus: #e8705a; --line: #a9c4e6; --cross: #8a7a52; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1:focus, h2:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; font-family: var(--mono); font-size: 12px; }
.skip:focus { top: 8px; }

/* the sheet */
.app { position: relative; height: 100vh; height: 100svh; min-height: 540px; overflow: hidden; isolation: isolate; }
.app::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--cross); opacity: .6;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 18.5v11M18.5 24h11' stroke='black' stroke-width='1'/%3E%3C/svg%3E"), radial-gradient(ellipse 70% 65% at 18% 52%, #000 35%, transparent 75%);
  -webkit-mask-size: 48px 48px, 100% 100%; -webkit-mask-repeat: repeat, no-repeat; -webkit-mask-composite: source-in;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 18.5v11M18.5 24h11' stroke='black' stroke-width='1'/%3E%3C/svg%3E"), radial-gradient(ellipse 70% 65% at 18% 52%, #000 35%, transparent 75%);
  mask-size: 48px 48px, 100% 100%; mask-repeat: repeat, no-repeat; mask-composite: intersect; }
.border { position: absolute; inset: var(--frame); border: 1px solid var(--ink); pointer-events: none; z-index: 1; opacity: .7; }
.border::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--rule); }
.zones { position: absolute; display: flex; justify-content: space-around; font-family: var(--mono); font-size: 9px; color: var(--ink-2); letter-spacing: .1em; pointer-events: none; z-index: 1; }
.zones.top { top: calc(var(--frame) - 12px); left: var(--frame); right: var(--frame); }
.zones.bot { bottom: calc(var(--frame) - 13px); left: var(--frame); right: var(--frame); }
.zones.left, .zones.right { flex-direction: column; top: var(--frame); bottom: var(--frame); }
.zones.left { left: 2px; } .zones.right { right: 2px; }
.ui { position: absolute; inset: calc(var(--frame) + 6px); z-index: 2; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: var(--s3) var(--s5) var(--s4); }

/* menu */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); }
.wordmark { font-family: var(--serif); font-size: 30px; line-height: 1; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .tbtn { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 2px; color: var(--ink); background: none; border: 0; cursor: pointer; }
.nav a:hover, .tbtn:hover { color: var(--red); }
/* the theme switch reads as a control, not a menu item: a pill with a half-filled contrast mark, set apart from the links */
.tbtn { min-height: 34px; padding: 0 12px 0 10px; margin-left: var(--s3); gap: 7px; border: 1px solid var(--ink); border-radius: 999px; align-self: center; }
.tbtn::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 1px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); flex: none; }
.tbtn:hover { background: var(--ink); color: var(--paper); }
.nav a[aria-current="true"] { color: var(--red); box-shadow: inset 0 -2px 0 var(--red); }
html:not(.js) .tbtn { display: none; }

/* left column + grid panel, ruled into one table */
.main { display: grid; grid-template-columns: minmax(260px, 4fr) minmax(0, 8fr); grid-template-rows: minmax(0, 1fr); min-height: 0; }
.setcol { display: grid; grid-template-rows: minmax(0, 1fr) auto; border: 1px solid var(--ink); background: color-mix(in srgb, var(--card) 55%, transparent); min-height: 0; }
.camslot { position: relative; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-bottom: 1px solid var(--ink); }
.dv-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 8px 12px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.dv-head b { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.dv-view { position: relative; min-height: 0; overflow: hidden; display: block; text-decoration: none; }
.dv-view { background: #f4f1e8; }
:root[data-theme="dark"] .dv-view { background: #131e34; }
/* contain, not cover: a wide or tall slot must never crop the part callout off the drawing */
.dv-view img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.dv-view .dk { display: none; }
:root[data-theme="dark"] .dv-view .lt { display: none; }
:root[data-theme="dark"] .dv-view .dk { display: block; }
.dv-view .back { position: absolute; left: 12px; bottom: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; background: var(--card); border: 1px solid var(--ink); padding: 6px 9px; }
.dv-view:hover .back { background: var(--ink); color: var(--paper); }
.dv-legend { list-style: none; margin: 0; padding: 6px 12px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 4px 14px; min-height: 34px; align-items: center; }
.dv-legend li { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.dv-legend i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: var(--card); display: grid; place-items: center; font-size: 9px; }
.sheets { list-style: none; margin: 0; padding: 0; }
.sheets a { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: var(--s2); align-items: center; min-height: 40px; padding: 4px 12px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.sheets li:last-child a { border-bottom: 0; }
.sheets a span:first-child { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.sheets a b { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.1; }
.sheets a i { font-style: normal; display: flex; gap: 3px; }
.sheets a i span { font-family: var(--mono); font-size: 9px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); color: var(--line); display: grid; place-items: center; }
.sheets a:hover b { color: var(--red); }
.sheets a[aria-current="true"] { background: var(--card); box-shadow: inset 3px 0 0 var(--red); }
.sheets a[aria-current="true"] b { color: var(--red); }
.panel { position: relative; border: 1px solid var(--ink); border-left: 0; background: color-mix(in srgb, var(--paper) 88%, transparent); overflow-y: auto; overscroll-behavior: contain; padding: var(--s5) clamp(20px, 3vw, 44px) var(--s6); min-height: 0; }
.panel:focus-visible { outline-offset: -4px; }

/* sheet head, buttons: same as v7 sheets */
.sheet-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s5); align-items: end; padding-bottom: var(--s4); border-bottom: 2px solid var(--ink); }
.sheet-no { grid-column: 1 / -1; display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; }
.sheet-no b { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .14em; color: var(--red); }
.btns { display: flex; gap: var(--s2); flex-wrap: wrap; }
.btn { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: var(--s2); padding: 0 var(--s4); border: 1px solid var(--ink); border-radius: 2px; background: transparent; color: var(--ink); }
.btn:hover, .btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--red); border-color: var(--red); }
.next { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: var(--s4); margin-top: var(--s4); }

/* no JavaScript, or a short window: let the page scroll normally */
@media (max-height: 560px) {
  body { overflow: auto; } .app { height: auto; overflow: visible; } .ui { position: static; } .panel { overflow: visible; }
}

@media (max-width: 1100px) {
  .sheet-head { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --frame: 6px; }
  .zones { display: none; }
  .ui { padding: var(--s2) var(--s3) var(--s3); }
  .nav a { display: none; }
  .wordmark { font-size: 26px; }
  .main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); row-gap: var(--s2); }
  .setcol { grid-template-rows: none; grid-template-columns: 96px minmax(0, 1fr); height: 96px; border: 0; border-bottom: 1px solid var(--ink); background: none; }
  .camslot { border-bottom: 0; border-right: 1px solid var(--rule); grid-template-rows: minmax(0, 1fr); }
  .dv-head, .dv-legend, .dv-view .back { display: none; }
  .panel { border: 0; padding: var(--s4) var(--s1) var(--s5); }
  .sheets { display: flex; overflow-x: auto; align-items: stretch; border-left: 1px solid var(--rule); scrollbar-width: none; }
  .sheets li { flex: none; }
  .sheets a { grid-template-columns: none; grid-template-rows: auto auto; min-width: 74px; height: 96px; padding: 10px 8px; border-bottom: 0; border-right: 1px solid var(--rule); align-content: center; justify-items: start; }
  .sheets a b { font-size: 17px; }
  .sheets a i { display: none; }
  .sheets a[aria-current="true"] { box-shadow: inset 0 -3px 0 var(--red); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Phones: tap Detail A to grow it to about twice the size, pushing the page down. While it's big,
   "Back to the set" shows and the minus shrinks it; scrolling the page shrinks it too. */
.grow { display: none; }
@media (max-width: 760px) {
  .camslot { position: relative; }
  .grow { display: block; position: absolute; inset: 0; z-index: 2; background: none; border: 0; padding: 0; cursor: zoom-in; }
  .grow::after { content: "+"; position: absolute; right: 5px; bottom: 5px; width: 20px; height: 20px; display: grid; place-items: center; font: 500 13px/1 var(--mono); color: var(--ink); background: var(--card); border: 1px solid var(--ink); }
  .setcol { transition: height .35s var(--ease); }
  body.cam-big .setcol { height: 272px; grid-template-columns: minmax(0, 1fr); grid-template-rows: 200px 72px; }
  body.cam-big .camslot { border-right: 0; border-bottom: 1px solid var(--rule); }
  body.cam-big .dv-view img { object-fit: contain; }
  body.cam-big .dv-view .back { display: block; }
  body.cam-big .grow { inset: auto 0 0 auto; width: 44px; height: 44px; cursor: zoom-out; }
  body.cam-big .grow::after { content: "-"; }
  body.cam-big .sheets { border-left: 0; }
  body.cam-big .sheets a { height: 72px; }
}

/* "Where to next": every inner page ends by pointing somewhere useful */
.keep { border-top: 1px solid var(--ink); margin-top: var(--s5); padding-top: var(--s3); }
.keep > .label { display: block; margin-bottom: var(--s2); }
.keep ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s2); }
.keep a { display: grid; gap: 4px; min-height: 44px; height: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--ink); background: var(--card); color: var(--ink); text-decoration: none; }
.keep a b { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.15; }
.keep a span { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.keep a:hover b, .keep a:focus-visible b { color: var(--red); }
.keep a:hover { border-color: var(--red); }

/* "In 30 seconds" strip at the top of a case file */
.tldr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 20px 0 0; border: 1px solid var(--ink); background: var(--card); }
.tldr div { padding: 12px 14px; border-left: 1px solid var(--rule); }
.tldr div:first-child { border-left: 0; }
.tldr dt { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.tldr dd { margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; }
@media (max-width: 760px) { .tldr { grid-template-columns: minmax(0, 1fr); } .tldr div { border-left: 0; border-top: 1px solid var(--rule); } .tldr div:first-child { border-top: 0; } }

/* Review fixes: 44px theme target, and a hint that the sheet tabs scroll on phones */
.tbtn { position: relative; }
.tbtn::after { content: ""; position: absolute; inset: -6px -2px; }
@media (max-width: 760px) {
  .sheets { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .sheets.at-end { -webkit-mask-image: none; mask-image: none; }
}
/* Wide tables in the guides: say that they scroll */
.scroll-cue, .legacy p.scroll-cue { display: none; font: 400 10px/1.4 var(--mono) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin: 6px 0 !important; max-width: none; }
@media (max-width: 760px) { .scroll-cue, .legacy p.scroll-cue { display: block; } }

/* Detail A, live: the home page's camera in an iframe, the still underneath until it's ready */
.dv-view.live { position: relative; overflow: hidden; }
.dv-view.live iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; opacity: 0; transition: opacity .45s ease; }
.dv-view.live.ready iframe { opacity: 1; }
.dv-view.live.ready img { visibility: hidden; }
.dv-view.live .back { z-index: 2; }
@media (max-width: 760px) { body:not(.cam-big) .dv-view.live iframe { pointer-events: none; } }
@media (prefers-reduced-motion: reduce) { .dv-view.live iframe { transition: none; } }
/* Same small-cross field and corner ticks as the home page's Detail A */
.dv-view.live { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 9v6M9 12h6' stroke='%23b39a5c' stroke-width='.7'/%3E%3C/svg%3E"); }
.dv-view.live::before, .dv-view.live::after { content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--ink); z-index: 1; pointer-events: none; }
.dv-view.live::before { left: 8px; top: 8px; border-width: 1px 0 0 1px; }
.dv-view.live::after { right: 8px; bottom: 8px; border-width: 0 1px 1px 0; }
