/* fold kit
   The page is a process sheet for one machine. It uses one ground (sheet silver), hairline rules and
   the drawings' own ink. Ink is the part and the plan through it. Flame blue is for what you can
   press and where you go next. Laser red means a fault and nothing else; amber means "confirm".
   The type is IBM Plex Sans for words; Plex Mono only for values and ids.
   Sizes: 12 · 13 · 14 · 15 · 18 · 24 · 44. */

@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url(fonts/IBMPlexSans-var.woff2) format("woff2"); }
@font-face { font-family: "Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexSans-400i.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-400.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-500.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/IBMPlexMono-600.woff2) format("woff2"); }

:root {
  --bg: #F2F3F5;          /* sheet silver */
  --surface: #FFFFFF;     /* paper: drawings, the form */
  --sunk: #E8EAED;
  --rule: #DADDE1;
  --rule-2: #C3C8CE;
  --ink: #111418;
  --ink-2: #444C56;
  --ink-3: #646D78;
  --blue: #2350E0;        /* flame */
  --blue-ink: #2350E0;
  --blue-tint: #E7ECFC;
  --red: #D42B1F;         /* laser */
  --red-ink: #BF2419;
  --red-tint: #FBEAE8;
  --amber: #C27A0E;
  --amber-ink: #965800;
  --amber-tint: #F7EEDD;
  --on-accent: #FFFFFF;
  --on-ink: #FFFFFF;
  --tag-red: #C72A1F;
  --tag-amber: #E0A43A;

  /* the drawings */
  --sheet: #C5CCD4;
  --sheet-edge: #4F5A66;
  --sheet-section: var(--ink);
  --zone: var(--ink);
  --zone-soft: #A9B2BC;
  --hatch: #A7B0BA;
  --tool-fill: var(--surface);
  --tool-line: #3B4450;
  --accent: var(--blue);
  --contact: var(--red);
  --grid: rgba(17, 20, 24, .045);
  --plate: var(--surface);

  --sans: "Plex Sans", "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 2px;
  --gutter: 40px;
  --head: 240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1013; --surface: #15181C; --sunk: #1C2025; --rule: #262B31; --rule-2: #363C44;
    --ink: #E9EBEE; --ink-2: #B0B7BF; --ink-3: #858E99;
    --blue: #6F8DFF; --blue-ink: #8AA2FF; --blue-tint: #18213D;
    --red: #F2493E; --red-ink: #FF7A71; --red-tint: #371513;
    --amber: #E3A23C; --amber-ink: #F0B55A; --amber-tint: #30240F; --on-accent: #0E1013; --on-ink: #0E1013;
    --tag-red: #B3261C; --tag-amber: #E3A23C;
    --sheet: #5B6672; --sheet-edge: #AEB7C2; --zone-soft: #6E7985; --hatch: #3C444E; --tool-line: #9AA3AD;
    --grid: rgba(255, 255, 255, .035);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1013; --surface: #15181C; --sunk: #1C2025; --rule: #262B31; --rule-2: #363C44;
  --ink: #E9EBEE; --ink-2: #B0B7BF; --ink-3: #858E99;
  --blue: #6F8DFF; --blue-ink: #8AA2FF; --blue-tint: #18213D;
  --red: #F2493E; --red-ink: #FF7A71; --red-tint: #371513;
  --amber: #E3A23C; --amber-ink: #F0B55A; --amber-tint: #30240F; --on-accent: #0E1013; --on-ink: #0E1013;
  --tag-red: #B3261C; --tag-amber: #E3A23C;
  --sheet: #5B6672; --sheet-edge: #AEB7C2; --zone-soft: #6E7985; --hatch: #3C444E; --tool-line: #9AA3AD;
  --grid: rgba(255, 255, 255, .035);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
main { flex: 1 0 auto; width: 100%; }
::selection { background: var(--blue-tint); color: var(--ink); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a.vh:focus-visible { position: fixed !important; left: 16px; top: 10px; width: auto; height: auto; clip-path: none; padding: 8px 12px; z-index: 100;
  background: var(--surface); border: 1px solid var(--ink); color: var(--ink); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lbl { font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: .01em; }
.soft { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.bad { color: var(--red-ink); }
.warn { color: var(--amber-ink); }
.good { color: var(--blue-ink); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 900px) { :root { --gutter: 24px; } }
@media (max-width: 600px) { :root { --gutter: 16px; } }

/* ---------------------------------------------------------------- top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: stretch; height: 56px; gap: 36px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 22px; height: 22px; flex: none; }
.nav { display: flex; gap: 26px; }
.nav a { display: flex; align-items: center; color: var(--ink-2); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; padding-top: 2px; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.machine { margin-left: auto; display: flex; align-items: center; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 900px) { .machine { display: none; } }
@media (max-width: 600px) { .top-in { gap: 18px; } .nav { gap: 16px; } .brand span { display: none; } }

/* ---------------------------------------------------------------- buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid var(--rule-2); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: border-color .12s, background-color .12s, color .12s; }
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--blue) 88%, var(--ink)); border-color: transparent; }
.btn.big { min-height: 48px; font-size: 15px; padding: 0 22px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--sunk); border-color: var(--rule); color: var(--ink-3); cursor: not-allowed; }
.btn .arr { font-family: var(--mono); font-weight: 400; }
.btn small { font-weight: 400; color: var(--ink-3); }
.link { color: var(--blue-ink); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.bend-link { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--rule-2); padding: 0 1px; }
.bend-link:hover { color: var(--blue-ink); border-bottom-color: var(--blue); }

/* ---------------------------------------------------------------- home */
.home { padding: 56px 0 72px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); grid-template-areas: "intro form" "spec form";
  column-gap: 64px; align-items: start; }
.hero .intro { grid-area: intro; }
.hero .form { grid-area: form; }
.hero .cellspec { grid-area: spec; }
@media (max-width: 1000px) { .hero { grid-template-columns: 1fr; grid-template-areas: "intro" "form" "spec"; row-gap: 28px; } }
.hero h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -.025em; max-width: 14ch; }
.hero .lead { margin-top: 18px; font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 50ch; }
@media (max-width: 600px) { .home { padding-top: 32px; } .hero .lead { font-size: 15px; margin-top: 12px; } }
.cellspec { margin: 36px 0 0; display: grid; grid-template-columns: max-content 1fr; border-top: 1px solid var(--rule); max-width: 560px; }
@media (max-width: 1000px) { .cellspec { margin-top: 12px; } }
.cellspec dt, .cellspec dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.cellspec dt { color: var(--ink-3); padding-right: 28px; }
.cellspec dd small { display: block; color: var(--ink-3); font-size: 13px; }

.form { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 28px; }
@media (max-width: 600px) { .form { padding: 20px 16px; } }
.step + .step { margin-top: 26px; }
.step-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.step-h .n { font: 500 12px var(--mono); color: var(--ink-3); }
.step-h h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.step-h .aside { margin-left: auto; font-size: 13px; color: var(--ink-3); }

.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px;
  min-height: 196px; padding: 22px; border: 1px dashed var(--ink-3); border-radius: var(--r); background: var(--bg); cursor: pointer;
  transition: border-color .12s, background-color .12s; }
@media (max-width: 600px) { .drop { min-height: 150px; } .drop svg.art { display: none; } }
.drop:hover { border-color: var(--ink); }
.drop:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.drop svg.art { width: 132px; height: 72px; color: var(--ink-3); margin-bottom: 8px; }
.drop .d-title { font-size: 15px; font-weight: 600; }
.drop .d-sub { font-size: 13px; color: var(--ink-3); }
.drop .d-sub u { color: var(--blue-ink); text-decoration: none; font-weight: 500; }
.drop.over { border-style: solid; border-color: var(--blue); background: var(--blue-tint); }
.drop.is-bad { border-style: solid; border-color: var(--red); background: var(--red-tint); }
.drag-veil { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 78%, transparent); display: grid; place-items: center; pointer-events: none; }
.drag-veil span { border: 1.5px solid var(--blue); background: var(--surface); padding: 22px 32px; font-size: 18px; font-weight: 600; border-radius: var(--r); }
.file { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--ink); border-radius: var(--r); background: var(--surface); }
.file svg { width: 30px; height: 36px; color: var(--ink-2); }
.file .f-name { font-weight: 500; overflow-wrap: anywhere; }
.file .f-meta { font-size: 13px; color: var(--ink-3); }
.file .f-meta .ok { color: var(--ink); font-weight: 500; }
.file .f-meta .no { color: var(--red-ink); font-weight: 500; }
.file.is-bad { border-color: var(--red); }
.file .f-acts { display: flex; gap: 16px; font-size: 13px; }
@media (max-width: 600px) { .file { grid-template-columns: auto 1fr; } .file .f-acts { grid-column: 1 / -1; } }
.msg { margin-top: 10px; font-size: 13px; line-height: 1.5; }
.msg.bad { color: var(--red-ink); }

.choices { display: grid; gap: 6px; }
.choice { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; border: 1px solid var(--rule); border-radius: var(--r);
  cursor: pointer; background: var(--surface); transition: border-color .12s; }
.choice:hover { border-color: var(--ink-3); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .rad { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink-3); display: grid; place-items: center; }
.choice:has(input:checked) { border-color: var(--ink); }
.choice:has(input:checked) .rad { border-color: var(--ink); }
.choice:has(input:checked) .rad::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.choice:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.choice .c-name { font-size: 14px; font-weight: 500; }
.choice .c-name small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; }
.choice .c-name small.warn { color: var(--amber-ink); }
.choice .c-tag { font: 400 12px var(--mono); color: var(--ink-3); text-align: right; }

.qty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--surface); height: 40px; }
.stepper.is-bad { border-color: var(--red); }
.stepper button { width: 40px; font-size: 18px; color: var(--ink-2); }
.stepper button:hover { color: var(--ink); background: var(--sunk); }
.stepper input { width: 84px; border: 0; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); background: transparent; text-align: center;
  font: 500 15px var(--mono); -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty .hint { font-size: 13px; color: var(--ink-3); max-width: 30ch; }
.qty-msg { margin-top: 8px; font-size: 13px; color: var(--red-ink); }
.go-row { margin-top: 28px; }
.go-row .btn { width: 100%; }
.go-row .hint { margin-top: 10px; font-size: 13px; color: var(--ink-3); text-align: center; min-height: 1.4em; }
.progress-line { height: 2px; background: var(--rule); margin-top: 12px; overflow: hidden; }
.progress-line i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }

.refs { margin-top: 88px; }
@media (max-width: 600px) { .refs { margin-top: 56px; } }
.refs-h { display: flex; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.refs-h h2 { font-size: 24px; }
.refs-h p { color: var(--ink-3); font-size: 14px; max-width: 70ch; }
.filters { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
.filters button { color: var(--ink-3); padding: 2px 0; border-bottom: 1.5px solid transparent; }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 24px; }
.tiles::after { content: ""; grid-column: auto / -1; background: var(--bg); }
@media (max-width: 600px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
button.tile { border: 0; text-align: left; font: inherit; cursor: pointer; }
.tile { display: flex; flex-direction: column; background: var(--bg); padding: 16px 16px 18px; color: var(--ink); min-width: 0; transition: background-color .12s; }
@media (max-width: 600px) { .tile { padding: 12px; } .tile .t-for, .tile .t-tests { display: none; } }
.tile:hover { background: var(--surface); text-decoration: none; }
.tile:hover .t-title { text-decoration: underline; text-underline-offset: 3px; }
.tile .t-art { aspect-ratio: 4 / 3; margin: -4px -4px 12px; overflow: hidden; min-height: 0; }
.tile .t-art svg { width: 100%; height: 100%; display: block; }
.tile .t-art.none { display: grid; place-items: center; color: var(--ink-3); font-size: 13px; }
.tile .t-id { font-size: 12px; color: var(--ink-3); }
.tile .t-id b { font: 500 12px var(--mono); color: var(--ink-2); }
.tile .t-title { font-size: 15px; font-weight: 600; margin-top: 2px; }
.tile .t-for { font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.45; }
.tile .t-tests { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }
.tile .t-foot { margin-top: auto; padding-top: 14px; font-size: 13px; }
.tile .t-foot .v { display: block; font-weight: 600; }
.tile .t-foot .x { display: block; color: var(--ink-3); font-size: 12px; margin-top: 1px; }

/* ---------------------------------------------------------------- verdict words */
.v-ok { color: var(--blue-ink); }
.v-cond { color: var(--amber-ink); }
.v-no { color: var(--red-ink); }
.v-err { color: var(--ink); }
.v-mark { font-weight: 600; margin-right: 6px; }

/* ---------------------------------------------------------------- working */
.work { padding: 56px 0 96px; max-width: 880px; }
.work .w-file { font-size: 13px; color: var(--ink-3); }
.work h1 { font-size: 34px; margin-top: 8px; letter-spacing: -.02em; overflow-wrap: anywhere; }
@media (max-width: 600px) { .work { padding-top: 32px; } .work h1 { font-size: 24px; } }
.clock { margin-top: 22px; display: flex; align-items: baseline; gap: 10px; }
.clock .t { font: 500 32px/1 var(--sans); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.clock .u { font-size: 14px; color: var(--ink-3); }
.bar { position: relative; height: 2px; background: var(--rule); margin: 18px 0 8px; overflow: hidden; }
.bar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; background: var(--blue); animation: sweep 1.6s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes sweep { from { left: -30%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .bar::after, .stages li.now .s-name::after { animation: none; left: 0; width: 100%; opacity: .5; } }
.stages { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.stages li { display: grid; grid-template-columns: 64px 200px 1fr 24px; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink-3); }
.stages li .s-t { font: 400 13px var(--mono); }
.stages li .s-name { font-weight: 500; position: relative; }
.stages li .s-d { font-size: 14px; }
.stages li .s-d small { display: block; font-size: 13px; color: var(--ink-3); }
.stages li .s-m { font-family: var(--mono); text-align: right; }
.stages li.done { color: var(--ink-2); }
.stages li.done .s-name { color: var(--ink); }
.stages li.done .s-m { color: var(--ink); }
.stages li.now { color: var(--ink); }
.stages li.now .s-name::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 40px; background: var(--blue);
  animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { width: 12px; } to { width: 64px; } }
@media (max-width: 700px) { .stages li { grid-template-columns: 52px 1fr 20px; } .stages li .s-d { grid-column: 2 / 3; } .stages li .s-m { grid-row: 1; grid-column: 3; } }
.work .note { margin-top: 18px; font-size: 14px; color: var(--ink-3); }
.w-acts { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- notices */
.notice { border: 1px solid var(--rule-2); background: var(--surface); border-radius: var(--r); padding: 20px 22px; }
.notice.is-bad { border-color: color-mix(in srgb, var(--red) 55%, var(--rule)); background: var(--red-tint); }
.notice h2 { font-size: 18px; }
.notice h2:focus { outline: none; }
.notice p { margin-top: 8px; color: var(--ink-2); max-width: 72ch; }
.notice .n-acts { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; }
.notice details { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.notice details pre { white-space: pre-wrap; font: 12px/1.5 var(--mono); margin: 8px 0 0; color: var(--ink-2); }
.page-notice { padding: 56px 0 96px; max-width: 760px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r);
  font-size: 14px; z-index: 50; box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); }

/* ---------------------------------------------------------------- result: the title block */
.rhead { padding: 40px 0 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 460px); gap: 48px; align-items: start; }
@media (max-width: 1000px) { .rhead { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 600px) { .rhead { padding-top: 28px; } }
.r-file { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--ink-3); }
.r-file .mono { font-size: 13px; color: var(--ink-2); }
.rhead h1 { margin-top: 12px; font-size: clamp(30px, 3.8vw, 44px); line-height: 1.08; letter-spacing: -.025em; }
.rhead .lead { margin-top: 14px; font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 66ch; }
@media (max-width: 600px) { .rhead .lead { font-size: 15px; } }
.specs { margin: 26px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 1px; background: var(--rule);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.specs > div { background: var(--bg); padding: 12px 16px 13px; }
.specs dt { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.specs dd { margin: 3px 0 0; font: 400 18px/1.25 var(--mono); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.specs dd small { font-family: var(--sans); font-size: 13px; color: var(--ink-3); letter-spacing: 0; }
@media (max-width: 600px) { .specs { grid-template-columns: 1fr 1fr; } }
.next { margin-top: 22px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: baseline; max-width: 72ch; }
.next .lbl { color: var(--blue-ink); font-weight: 600; font-size: 13px; }
.next p { font-size: 15px; }
.next p + p { grid-column: 2; margin-top: 6px; color: var(--ink-2); }
.r-acts { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.r-art { position: relative; margin: 0; }
.r-art .frame { aspect-ratio: 4 / 3.2; }

/* ---------------------------------------------------------------- result: sections */
.sec { display: grid; grid-template-columns: var(--head) minmax(0, 1fr); gap: 40px; padding: 40px 0 48px; border-top: 1px solid var(--rule); scroll-margin-top: 72px; }
@media (max-width: 1000px) { .sec { grid-template-columns: 1fr; gap: 20px; padding: 32px 0 40px; } }
.sec-h { align-self: start; position: sticky; top: 80px; }
@media (max-width: 1000px) { .sec-h { position: static; } }
.sec-h .n { font: 500 12px var(--mono); color: var(--ink-3); }
.sec-h h2 { font-size: 24px; margin-top: 6px; }
.sec-h p { margin-top: 8px; font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.sec-b { min-width: 0; }
.sub-h { font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.sub-h .faint { font-weight: 400; }

/* drawings: paper with a faint graph, the same frame everywhere */
.frame { position: relative; width: 100%; aspect-ratio: 4 / 3; background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20px 20px, var(--surface);
  border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.frame svg { width: 100%; height: 100%; display: block; color: var(--ink); }
.frame.square { aspect-ratio: 1 / 1; }
.frame.wide { aspect-ratio: 2 / 1; }
.frame.bed { aspect-ratio: auto; min-height: 120px; }
.frame.empty { aspect-ratio: auto; display: grid; place-items: center; min-height: 160px; color: var(--ink-3); font-size: 14px; padding: 24px; text-align: center; }
.frame-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.frame-bar .note { color: var(--ink-2); }
.toggle { display: inline-flex; gap: 16px; font-size: 13px; flex: none; }
.toggle button { color: var(--ink-3); border-bottom: 1.5px solid transparent; padding: 1px 0; }
.toggle button:hover { color: var(--ink); }
.toggle button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }

/* the run */
.run { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 32px; align-items: start; }
@media (max-width: 1200px) { .run { grid-template-columns: 1fr; } }
.run video { width: 100%; display: block; background: #000; border-radius: var(--r); aspect-ratio: 16 / 9; }
.run .placeholder { aspect-ratio: 16 / 9; border: 1px dashed var(--ink-3); border-radius: var(--r); display: grid; place-items: center; text-align: center; padding: 24px; background: var(--bg); }
.run .placeholder p { color: var(--ink-3); font-size: 14px; max-width: 46ch; margin: 10px auto 18px; }
.run-status { font-size: 14px; margin-bottom: 12px; }
.run-status .lbl { display: block; margin-bottom: 2px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 0 14px 8px 0; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.tbl td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl .mono { font-size: 13px; white-space: nowrap; }
.tbl tr.pick { cursor: pointer; }
.tbl tr.pick:hover td { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.tbl tr.sel td { background: var(--sunk); }
.row-btn { font: 600 15px var(--mono); color: var(--ink); text-align: left; }
.tbl tr.sel .row-btn { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
/* a table wider than its box scrolls, and says so with a shadow at the edge */
.tbl-wrap, .seq-wrap { overflow-x: auto;
  background: linear-gradient(90deg, var(--bg) 30%, transparent) left / 24px 100% no-repeat local,
              linear-gradient(-90deg, var(--bg) 30%, transparent) right / 24px 100% no-repeat local,
              radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .14), transparent) left / 10px 100% no-repeat scroll,
              radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .14), transparent) right / 10px 100% no-repeat scroll; }
.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv th { text-align: left; font-weight: 400; color: var(--ink-2); padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); }
.kv td { text-align: right; padding: 9px 0; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.kv th small, .kv td small { color: var(--ink-3); font-size: 12px; font-family: var(--sans); }
.kv.spec3 th { width: 38%; }
.kv.spec3 td { white-space: normal; text-align: left; }
.kv.spec3 td.s { text-align: right; white-space: nowrap; padding-left: 10px; width: 1%; font-family: var(--sans); }
/* on a phone, long tables become stacked rows */
@media (max-width: 600px) {
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .tbl.stack td { border: 0; padding: 2px 0; text-align: left !important; }
  .tbl.stack td[data-l]::before { content: attr(data-l) " "; color: var(--ink-3); font: 400 12px var(--sans); margin-right: 6px; }
}

/* what to do */
.todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 40px; }
.todo-g h3 { font-size: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.todo-g h3 small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-3); margin-top: 2px; letter-spacing: 0; }
.todo-g ol { list-style: none; margin: 0; padding: 0; }
.todo-g li { padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.todo-g li h4 { font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -.005em; }
.todo-g li p { margin-top: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.todo-g li .foot { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-size: 13px; }
.todo-g li .str { font-weight: 500; color: var(--ink-3); }
.todo-g li .str.clears { color: var(--blue-ink); }
.todo-g li .str.confirms { color: var(--amber-ink); }
.todo-g li .str.quality { color: var(--ink-3); }
.todo-g li .bends { display: inline-flex; gap: 8px; }
.todo-g li.top h4::before { content: "Start here"; display: block; font-size: 12px; font-weight: 600; color: var(--blue-ink); margin-bottom: 4px; letter-spacing: 0; }
.todo-none { color: var(--ink-2); }

/* bend order: the matrix. Ink is the plan, an outline forms elsewhere, red can't, amber can't be reached */
.seq-summary { font-size: 15px; line-height: 1.55; max-width: 76ch; margin-bottom: 20px; }
.seq { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.seq th { font-size: 12px; font-weight: 500; color: var(--ink-3); text-align: left; padding: 0 12px 8px; white-space: nowrap; border-bottom: 1px solid var(--rule-2); }
.seq th.corner { padding-left: 0; }
.seq tbody th { padding: 12px 20px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); min-width: 170px; max-width: 280px; background: var(--bg); }
.seq tbody th .b-name { display: block; font: 600 18px/1.2 var(--mono); color: var(--ink); text-align: left; }
.seq tbody th .b-sum { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--ink-3); line-height: 1.45; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.seq tbody th.no .b-name { color: var(--red-ink); }
.seq tbody th.cond .b-name { color: var(--amber-ink); }
.seq tbody tr.sel th .b-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.seq td { padding: 0; border: 2px solid var(--bg); vertical-align: stretch; cursor: pointer; min-width: 128px; height: 1px; }
.seq td .c { display: flex; flex-direction: column; justify-content: center; gap: 1px; height: 100%; min-height: 58px; padding: 9px 12px; }
.seq td .c b { font-weight: 600; }
.seq td.c-ok .c { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2); }
.seq td.c-ok.in-plan .c { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.seq td.c-fail .c { background: var(--red-tint); color: var(--red-ink); }
.seq td.c-handling .c { background: var(--amber-tint); color: var(--amber-ink); }
.seq td.c-done .c { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--rule) 5px 6px), var(--bg); color: var(--ink-3); }
.seq td.c-untried .c { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--rule); }
.seq td:hover .c { box-shadow: inset 0 0 0 1.5px var(--ink); }
.seq td.picked .c { box-shadow: inset 0 0 0 2px var(--blue); }
.seq td:focus-visible { outline: none; }
.seq td:focus-visible .c { box-shadow: inset 0 0 0 2px var(--blue); }
.seq-cell { margin-top: 14px; font-size: 14px; color: var(--ink-2); min-height: 1.5em; max-width: 90ch; }
.legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12px; color: var(--ink-3); }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -1px; }
.legend i.c-plan { background: var(--ink); }
.legend i.c-ok { background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule-2); }
.legend i.c-fail { background: var(--red-tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 40%, transparent); }
.legend i.c-handling { background: var(--amber-tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 45%, transparent); }
.legend i.c-done { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--rule-2) 3px 4px); box-shadow: inset 0 0 0 1px var(--rule); }
@media (max-width: 720px) {
  .seq tbody th { position: sticky; left: 0; z-index: 1; min-width: 132px; max-width: 150px; padding-right: 12px; }
  .seq td { min-width: 112px; }
}

/* bends and sections: the table and the drawing side by side, the causes under the table */
.evidence { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "list draw" "causes draw"; gap: 0 32px; align-items: start; }
.ev-list { grid-area: list; }
.causes { grid-area: causes; margin-top: 32px; }
.ev-draw { grid-area: draw; position: sticky; top: 80px; scroll-margin-top: 72px; }
.ev-draw:focus { outline: none; }
@media (max-width: 1200px) {
  .evidence { grid-template-columns: 1fr; grid-template-areas: "list" "draw" "causes"; }
  .ev-draw { position: static; margin-top: 24px; }
}
.ev-draw .frame.wide { margin-top: 12px; }
.bend-tbl .st { font-size: 13px; font-weight: 500; }
.bend-tbl .tool { display: block; font-size: 12px; color: var(--ink-3); font-family: var(--mono); white-space: nowrap; }
.cause { display: grid; grid-template-columns: 72px 1fr; gap: 0 12px; padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.cause:first-of-type { border-top: 1px solid var(--rule-2); }
.cause .sev { font-size: 12px; font-weight: 600; padding-top: 2px; }
.cause .sev.fail { color: var(--red-ink); }
.cause .sev.cond, .cause .sev.warn { color: var(--amber-ink); }
.cause h4 { font-size: 15px; font-weight: 600; }
.cause .count { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.cause .bends { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.cause p { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.cause .nums { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--ink-3); }
.cause .nums b { color: var(--ink); font: 500 13px var(--mono); }
.cause .cases { margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; }
.cause .cases li { padding: 3px 0; color: var(--ink-2); }
.cause .cases li b { font-family: var(--mono); font-weight: 600; color: var(--ink); margin-right: 6px; }
.cause .cases li .st { color: var(--ink-3); margin-right: 6px; }
details.more { margin-top: 12px; font-size: 13px; }
details.more > summary { cursor: pointer; color: var(--blue-ink); font-weight: 500; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; font-family: var(--mono); }
details.more[open] > summary::before { content: "− "; }
details.more .tbl { margin-top: 10px; font-size: 13px; }
.tried .neg { color: var(--red-ink); } .tried .pos { color: var(--ink); }
.tried tr.pre td { color: var(--ink-3); }

/* plan */
.timebar { display: flex; height: 12px; gap: 2px; margin-top: 4px; }
.timebar span { display: block; min-width: 3px; }
.tb-press { background: var(--ink); }
.tb-inout { background: var(--ink-3); }
.tb-robot { background: var(--sheet-edge); opacity: .55; }
.tb-regrip { background: repeating-linear-gradient(135deg, var(--ink-3) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--ink-3); }
.tb-load { background: var(--rule-2); }
.timelegend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.timelegend i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: 0; }
.timelegend .v { color: var(--ink-3); margin-left: 6px; }
.plan-block + .plan-block { margin-top: 36px; }

/* purchase */
.buy { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.buy .frame { aspect-ratio: 1 / 1; }
.buy h4 { margin-top: 10px; font-size: 15px; }
.buy p { font-size: 13px; color: var(--ink-3); }

/* assumptions: groups in two columns */
.assume { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px 40px; }
.assume section h3 { font-size: 13px; font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid var(--rule-2); }
.assume ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.assume li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.assume li .mono { font-size: 13px; color: var(--ink-2); white-space: nowrap; }

/* sources */
.src { font-size: 12px; font-weight: 500; white-space: nowrap; font-family: var(--sans); }
.src.s-measured, .src.s-drawing, .src.s-catalog { color: var(--ink-2); }
.src.s-declared, .src.s-control-screen { color: var(--amber-ink); }
.src.s-policy { color: var(--ink-3); }

/* ---------------------------------------------------------------- tools, history */
.page { padding: 48px 0 96px; }
@media (max-width: 600px) { .page { padding-top: 32px; } }
.page-h { max-width: 76ch; }
.page-h h1 { font-size: 34px; letter-spacing: -.02em; }
@media (max-width: 600px) { .page-h h1 { font-size: 24px; } }
.page-h p { margin-top: 12px; color: var(--ink-2); font-size: 15px; }
.page-h .data { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 14px; color: var(--ink-2); }
.page-h .data b { color: var(--ink); }
.rack { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px 28px; margin-top: 28px; }
@media (max-width: 600px) { .rack { grid-template-columns: 1fr 1fr; gap: 24px 14px; } .rack .kv, .rack .srcline { display: none; } .rack .frame { aspect-ratio: 4 / 3; } }
.rack .frame { aspect-ratio: 1 / 1; }
.rack h3 { margin-top: 12px; font: 600 15px var(--mono); }
.rack h3 small { font-family: var(--sans); font-weight: 400; color: var(--ink-3); font-size: 13px; margin-left: 6px; }
.rack .srcline { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.rack .kv { margin-top: 10px; }
.rack-h { margin-top: 64px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.rack-h h2 { font-size: 24px; }
.rack-h p { margin-top: 6px; color: var(--ink-3); font-size: 14px; max-width: 76ch; }
.hist { margin-top: 28px; }
.hist td:first-child { white-space: nowrap; font-weight: 600; font-size: 13px; }
.hist .h-file { font-weight: 500; }
.hist .h-head { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; max-width: 80ch; }
.hist .when { white-space: nowrap; color: var(--ink-3); font-size: 13px; }
.hist .tag { font-size: 12px; color: var(--ink-3); margin-left: 8px; }
.empty-state { margin-top: 28px; padding: 32px 0; border-top: 1px solid var(--rule); color: var(--ink-2); }

footer.foot { border-top: 1px solid var(--rule); margin-top: 24px; flex: none; }
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 24px; padding-top: 18px; padding-bottom: 28px; font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- inside the drawings */
svg .dim { fill: var(--ink-3); font-family: var(--mono); }
svg .dim.strong { fill: var(--ink); font-weight: 500; }
svg .callout { fill: var(--blue-ink); font-family: var(--mono); font-weight: 600; }
svg .callout.bad { fill: var(--red-ink); }
svg .bed-t { fill: var(--ink); font-family: var(--sans); font-weight: 600; }
svg .plate { fill: var(--plate); fill-opacity: .92; }
svg .btag rect { fill: var(--ink); }
svg .btag .btag-t { fill: var(--surface); font-family: var(--mono); font-weight: 600; }
svg .btag.no rect { fill: var(--tag-red); }
svg .btag.no .btag-t { fill: #fff; }
svg .btag.cond rect { fill: var(--tag-amber); }
svg .btag.cond .btag-t { fill: #111418; }
svg .btag { cursor: pointer; }
svg .btag:focus-visible { outline: none; }
svg .btag:focus-visible rect { stroke: var(--blue); stroke-width: 2px; paint-order: stroke; }

/* ---------------------------------------------------------------- print: the result as a process sheet */
@media print {
  :root { --bg: #fff; }
  body { font-size: 11pt; }
  .top, footer.foot, .r-acts, .toggle, #sec-run, .toast, .drag-veil, .w-acts, details.more > summary::before { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .rhead { padding-top: 0; grid-template-columns: 1fr 38%; }
  .sec { grid-template-columns: 160px 1fr; break-inside: avoid-page; padding: 20px 0; }
  .sec-h { position: static; }
  .frame, .tbl, .todo-g li, .cause, .seq { break-inside: avoid; }
  .ev-draw { position: static; }
  a { color: inherit; }
}
