/* TrayMarq — quiet luxury for a clinical instrument.
   Two colours: ink on warm paper, with the TrayMarq teal used sparingly. Pass/fail colours only where they mean something.
   Type: Geist (UI), Instrument Serif (one display line per screen), Geist Mono (codes, times).
   Structure: hairline rules instead of boxes; generous space; tiny tracked labels.
   Motion: slow and quiet — line icons draw themselves, results stamp in, the clock breathes. Off for reduced motion. */
:root {
  --paper: #f4f1ea; --paper-2: #ece8de; --surface: #faf8f3;
  --ink: #0f1a18; --ink-2: #535e5a; --ink-3: #8a938f;
  --line: rgba(15, 26, 24, .12); --line-2: rgba(15, 26, 24, .22);
  --teal: #018a87; --accent: #01706d; --accent-ink: #f4fbf8; --accent-soft: #dcebe8; --brand-teal: #018a87;
  --pass: #1f6f47; --pass-soft: #e2efe6; --fail: #a8261f; --fail-soft: #f6e4e0; --wait: #8f5b12; --wait-soft: #f3e8d4;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --display: var(--sans); --body: var(--sans);
  --r: 6px; --tap: 52px;
  --ease: cubic-bezier(.22, .8, .2, 1); --slow: cubic-bezier(.65, 0, .25, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-soft); }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(28px, 3.6vw, 40px); }
h2 { font-size: 21px; }
h3 { font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin: 30px 0 14px; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.eyebrow { font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; }
.eyebrow span { margin: 0 .7em; color: var(--line-2); }
.mono, .code { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
.muted { color: var(--ink-3); }
.hint { color: var(--ink-2); font-size: 14.5px; }
.empty { color: var(--ink-3); padding: 6px 0; font-size: 15px; }

/* controls */
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { min-height: var(--tap); padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); max-width: 100%; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(1, 138, 135, .14); outline: none; }
textarea { min-height: 0; width: 100%; resize: vertical; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
label small { font-weight: 400; color: var(--ink-3); }
label.inline { display: inline-flex; align-items: center; gap: 10px; }
button { position: relative; min-height: var(--tap); padding: 0 22px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; cursor: pointer; font-weight: 500;
  transition: background .2s, border-color .2s, color .2s, transform .15s var(--ease); -webkit-tap-highlight-color: transparent; }
button:hover:not(:disabled) { border-color: var(--ink); }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .35; cursor: not-allowed; }
button.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
button.primary:hover:not(:disabled) { background: #1e2c29; }
button.danger { background: var(--fail); border-color: var(--fail); color: #fff; }
button.ghost { border-color: transparent; color: var(--ink-2); }
button.ghost:hover:not(:disabled) { color: var(--ink); border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
button.big { min-height: 60px; font-size: 16.5px; padding: 0 32px; }
button.icon { min-height: 38px; width: 38px; padding: 0; border-radius: 50%; color: var(--ink-3); border-color: transparent; }
button.icon:hover { color: var(--fail); }
button.wide { width: 100%; }

/* brand + top bar */
.brand .logo { display: block; height: 22px; width: auto; }
.logo-big { margin-bottom: 26px; }
.logo-big .logo { display: block; height: 40px; width: auto; }
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 16px max(28px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.where { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; flex-wrap: wrap; }
.clinic { font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.place::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.here select { min-height: 36px; padding: 6px 30px 6px 12px; font-size: 13px; border-radius: 999px; }
.live { display: inline-flex; align-items: center; gap: 10px; font: 300 17px/1 var(--mono); color: var(--ink); letter-spacing: .02em; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: breathe 3.2s ease-in-out infinite; flex: none; }
@keyframes breathe { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
.me { display: inline-flex; align-items: center; gap: 12px; }
.me .avatar { width: 34px; height: 34px; font-size: 12px; }
.me b { font-weight: 500; font-size: 14px; }
.signout { min-height: 36px; border-radius: 999px; padding: 0 16px; font-size: 13px; }
.banner { margin: 0; padding: 9px 28px; font: 500 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.banner.train { color: var(--accent); background: transparent; }
.banner.warn { color: var(--wait); background: var(--wait-soft); }
.tabs { display: flex; flex-wrap: wrap; gap: 2px 26px; padding: 22px 28px 0; max-width: 1280px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.tabs button { min-height: 44px; padding: 0; border: 0; border-radius: 0; color: var(--ink-3); font-size: 14px; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--slow); }
.tabs button.active { color: var(--ink); }
.tabs button.active::after { transform: scaleX(1); }
.tabs button:hover:not(:disabled) { color: var(--ink); }
.view { max-width: 1280px; margin: 0 auto; padding: 30px 28px 56px; animation: rise .7s var(--ease) both; }
.foot { max-width: 1280px; margin: 0 auto; padding: 0 28px 32px; color: var(--ink-3); font-size: 12px; letter-spacing: .02em; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* surfaces: ruled sections, not boxes */
.card { padding: 26px 0 28px; margin: 0; border-top: 1px solid var(--line); background: transparent; }
.card:first-child { border-top: 0; padding-top: 4px; }
.card > h2 { font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 20px; }
.card.step > h2, .step h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.02em; text-transform: none; color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 16px; }
.row.spread { justify-content: space-between; align-items: center; }
.row.center { justify-content: center; }
.row .grow { flex: 1; min-width: 200px; }
.row .grow input { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 input, .grid2 select { width: 100%; }
.card > label { margin-bottom: 16px; }
.card > label input, .card > label textarea { width: 100%; }
.card > label select { width: 100%; max-width: 260px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; align-items: start; }
.split.wide-left { grid-template-columns: 1.2fr 1fr; }
.split > .card:first-child { border-top: 1px solid var(--line); padding-top: 26px; }

/* gate screens */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.gate-card { width: min(560px, 100%); animation: rise .8s var(--ease) both; }
.gate h1 { font-size: clamp(30px, 4vw, 44px); }
.lede { color: var(--ink-2); font-size: 17px; line-height: 1.6; max-width: 46ch; }
.notice { background: var(--wait-soft); color: var(--wait); padding: 12px 14px; border-radius: var(--r); }
.choices { display: grid; margin-top: 30px; border-top: 1px solid var(--line); }
.choice { display: grid; gap: 6px; text-align: left; padding: 22px 34px 22px 0; min-height: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.choice::after { content: "→"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--ink-3); transition: transform .4s var(--ease), color .2s; }
.choice:hover:not(:disabled)::after { transform: translate(6px, -50%); color: var(--ink); }
.choice b { font: 400 26px/1.15 var(--serif); font-style: italic; }
.choice span { color: var(--ink-2); font-size: 15px; }
.form { display: grid; gap: 16px; margin-top: 10px; }
.form label input { width: 100%; }

/* ---------- start screen ---------- */
.start { max-width: 1120px; margin: 0 auto; min-height: calc(100vh - 120px); padding: clamp(28px, 6vh, 72px) 28px 48px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px 80px; align-items: center; text-align: left; }
.start-intro { animation: rise 1s var(--ease) both; }
.start h1 { font-size: clamp(52px, 7vw, 96px); line-height: .95; margin: 0 0 18px; letter-spacing: -0.03em; }
.start h1 em { display: inline-block; }
.start-sub { font-size: 17px; color: var(--ink-2); margin: 0 0 42px; }
.start-clock { display: block; font: 200 clamp(44px, 6vw, 76px)/1 var(--mono); letter-spacing: -0.02em; color: var(--ink); padding-top: 22px; border-top: 1px solid var(--line); max-width: 360px; }
.start-pin { width: 100%; max-width: 400px; justify-self: end; animation: rise 1s .12s var(--ease) both; }
.pin-note { display: flex; justify-content: space-between; margin: 16px 2px 0; font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.dots { display: flex; justify-content: center; gap: 16px; margin: 0 0 26px; height: 16px; align-items: center; }
.dots i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--ink-2); transition: background .25s, border-color .25s, transform .3s var(--ease); }
.dots i.on { background: var(--ink); border-color: var(--ink); animation: pop .35s var(--ease); }
.dots i.admin { width: 7px; height: 7px; }
.dots i.admin.on { background: var(--teal); border-color: var(--teal); }
@keyframes pop { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* keypad: large light numerals in a hairline grid */
.pinpad { max-width: none; margin-bottom: 6px; }
.pinpad label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.keys button { min-height: 76px; border: 0; border-radius: 0; background: var(--paper); font: 300 30px/1 var(--sans); color: var(--ink); overflow: hidden; }
.keys button::before { content: ""; position: absolute; inset: 50% auto auto 50%; width: 120%; aspect-ratio: 1; border-radius: 50%; background: var(--accent-soft); transform: translate(-50%, -50%) scale(0); opacity: 0; transition: transform .5s var(--ease), opacity .6s; z-index: 0; }
.keys button:active::before { transform: translate(-50%, -50%) scale(1); opacity: 1; transition: transform 0s, opacity 0s; }
.keys button:hover:not(:disabled) { background: var(--surface); }
.keys button:active:not(:disabled) { transform: none; }
.keys button { isolation: isolate; }
.keys button[data-pin-key="Delete"] { font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.keys button[data-pin-key="Enter"] { background: var(--ink); color: var(--paper); font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.keys button[data-pin-key="Enter"]:hover { background: #1e2c29; }

/* signing dialog */
dialog { border: 0; border-radius: 4px; padding: 30px; width: min(420px, calc(100% - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 40px 100px rgba(15, 26, 24, .28); }
dialog[open] { animation: rise .45s var(--ease) both; }
dialog::backdrop { background: rgba(15, 26, 24, .38); backdrop-filter: blur(6px); }
.pin-sheet h2 { font: 400 28px/1.15 var(--serif); font-style: italic; margin-bottom: 6px; }
.pin-sheet p { color: var(--ink-2); font-size: 14.5px; margin-bottom: 22px; }
.who { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.who > div { flex: 1; }
.avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-teal); color: #fff; font: 500 16px/1 var(--sans); letter-spacing: .04em; flex: none; }
.avatar.admin { background: var(--ink); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.person { display: grid; justify-items: center; gap: 10px; padding: 16px 8px; min-height: 0; }
.pname { font-size: 14px; text-align: center; }

/* ---------- animated line icons (drawn with pathLength="1") ---------- */
.ico { width: 46px; height: 46px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ico [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s var(--slow) forwards; }
.ico [pathLength]:nth-child(2) { animation-delay: .15s; } .ico [pathLength]:nth-child(3) { animation-delay: .3s; } .ico [pathLength]:nth-child(4) { animation-delay: .45s; } .ico [pathLength]:nth-child(5) { animation-delay: .6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ico .hand { transform-origin: 24px 24px; transition: transform 1.2s var(--slow); }
.job:hover .ico .hand { transform: rotate(300deg); }
.ico .accent { stroke: var(--teal); }
.ico .bubble { stroke: var(--teal); opacity: 0; }
.job:hover .ico .bubble { animation: bubble 1.6s ease-in infinite; }
.job:hover .ico .bubble + .bubble { animation-delay: .5s; }
@keyframes bubble { 0% { opacity: 0; transform: translateY(6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.job:hover .ico .check { animation: redraw 1s var(--slow); }
@keyframes redraw { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
.ico .sweep { stroke: var(--teal); animation: sweep 2.6s ease-in-out infinite; }
@keyframes sweep { 0%, 100% { transform: translateY(-8px); } 50% { transform: translateY(8px); } }

/* ---------- sterilization room: the jobs ---------- */
.jobs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 4px; border-top: 1px solid var(--line); counter-reset: job; }
.jobs.three { grid-template-columns: repeat(3, 1fr); }
.job { position: relative; display: grid; align-content: start; gap: 12px; text-align: left; min-height: 330px; padding: 34px 34px 64px 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; counter-increment: job; animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.job + .job { padding-left: 34px; }
.job:last-child { border-right: 0; }
.job::before { content: "0" counter(job); position: absolute; top: 34px; right: 34px; font: 300 13px/1 var(--mono); color: var(--ink-3); }
.job:last-child::before { right: 0; }
.job .ico { margin-bottom: 22px; }
.job-k { font: 500 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.job b { font: 400 clamp(30px, 3vw, 40px)/1.02 var(--serif); font-style: italic; letter-spacing: -0.015em; }
.job > span:not(.job-k) { color: var(--ink-2); font-size: 15px; max-width: 30ch; }
.job .go { position: absolute; left: 0; bottom: 30px; font: 500 11px/1 var(--sans); font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.job + .job .go { left: 34px; }
.job .go::after { content: ""; display: inline-block; width: 22px; height: 1px; background: currentColor; margin-left: 10px; vertical-align: middle; transition: width .5s var(--slow); }
.job:hover:not(:disabled) { border-color: var(--line); background: linear-gradient(to bottom, var(--surface), transparent); }
.job:hover .go::after { width: 44px; }
.job:active:not(:disabled) { transform: none; }
.live-count { display: inline-flex; align-items: center; gap: 9px; font: 500 14px/1.4 var(--sans); font-style: normal; letter-spacing: 0; color: var(--wait); }
.live-count .pulse { background: var(--wait); }

/* sterilizer status strip */
.mstrip { display: flex; flex-wrap: wrap; gap: 6px 34px; margin: 0 0 22px; }
.mchip { display: inline-flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--ink-2); animation: rise .6s var(--ease) both; }
.mchip b { font: 500 12px/1 var(--mono); color: var(--ink); letter-spacing: .04em; }
.mchip small { color: var(--ink-3); }
.mchip .dotm { width: 7px; height: 7px; border-radius: 50%; background: var(--pass); align-self: center; }
.mchip.warn .dotm { background: var(--wait); animation: breathe 2s ease-in-out infinite; }
.mchip.bad .dotm { background: var(--fail); animation: breathe 1.4s ease-in-out infinite; }
.mchip.bad { color: var(--fail); }
.st { display: inline-block; font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; border: 1px solid currentColor; color: var(--pass); }
.st.warn { color: var(--wait); } .st.bad { color: var(--fail); }

/* stepper */
.stepper { --progress: 0; list-style: none; display: flex; justify-content: space-between; position: relative; margin: 0 0 8px; padding: 0; }
.stepper::before, .stepper::after { content: ""; position: absolute; top: 13px; left: 13px; right: 13px; height: 1px; background: var(--line-2); }
.stepper::after { background: var(--ink); transform: scaleX(var(--progress)); transform-origin: left; transition: transform .9s var(--slow); }
.stepper li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; font: 500 10.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); flex: 1; text-align: center; }
.stepper li:first-child { justify-items: start; text-align: left; }
.stepper li:last-child { justify-items: end; text-align: right; }
.stepper span { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line-2); font: 400 12px/1 var(--mono); letter-spacing: 0; transition: all .5s var(--ease); }
.stepper li.now { color: var(--ink); }
.stepper li.now span { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--line-2); }
.stepper li.done span { background: var(--teal); border-color: var(--teal); color: #fff; }
.step { animation: slide .6s var(--ease) both; padding: 30px 0 0; border-top: 0; }
@keyframes slide { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.nav-row { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }

/* load step 1 */
.items { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--line); }
.items li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.items select { flex: 1; min-width: 200px; }
.items input { flex: 1; min-width: 180px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.qty button { border: 0; border-radius: 0; min-height: 46px; width: 50px; padding: 0; font: 300 22px/1 var(--sans); }
.qty output { min-width: 40px; text-align: center; font: 400 18px/1 var(--mono); }
.total { font: 400 15px/1 var(--mono); color: var(--ink-2); }
.tag { font: 500 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; color: var(--wait); border: 1px solid currentColor; }
.redo { margin-top: 26px; padding: 0; }
.redo summary { cursor: pointer; font-size: 14px; color: var(--ink-2); list-style: none; }
.redo summary::before { content: "+"; display: inline-block; width: 18px; color: var(--ink-3); transition: transform .3s; }
.redo[open] summary::before { transform: rotate(45deg); }
.redo .row input { flex: 1; min-width: 200px; font-family: var(--mono); text-transform: uppercase; }

/* load step 2 */
.machines { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; }
.machine { display: grid; gap: 7px; justify-items: start; padding: 14px 24px; min-height: 66px; font: 400 17px/1 var(--mono); }
.machine small { font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: .65; }
.machine.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cycle input { width: 100%; max-width: 440px; min-height: 76px; font: 300 38px/1 var(--mono); letter-spacing: .04em; border-width: 0 0 1px; border-radius: 0; background: transparent; padding-left: 0; }
.cycle input:focus { box-shadow: none; border-color: var(--teal); }
.holdbox { margin-top: 26px; padding: 18px 0 0; border-top: 1px solid var(--line); }
.toggle { min-height: 54px; text-align: left; padding: 0 18px; }
.toggle::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 12px; vertical-align: -3px; border-radius: 3px; border: 1px solid var(--ink-2); transition: background .2s; }
.toggle.on { border-color: var(--ink); }
.toggle.on::before { background: var(--teal); border-color: var(--teal); box-shadow: inset 0 0 0 3px var(--paper); }

/* load step 3 */
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 22px 0; border-top: 1px solid var(--line); }
.summary dt, .summary dd { padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.summary dt { font: 500 10.5px/1.9 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); padding-right: 40px; }
.summary dd { font-size: 16px; }

/* after-cycle + tests */
.pick-list { display: grid; margin-top: 18px; border-top: 1px solid var(--line); }
.pick { display: grid; gap: 5px; text-align: left; padding: 20px 40px 20px 0; min-height: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.pick::after { content: "→"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--ink-3); transition: transform .4s var(--ease); }
.pick:hover:not(:disabled)::after { transform: translate(6px, -50%); color: var(--ink); }
.pick.on { background: var(--surface); }
.pick b { font-size: 17px; font-weight: 500; }
.pick span { color: var(--ink-2); }
.pick small { color: var(--ink-3); font-size: 13px; }
.verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.verdicts.three { grid-template-columns: repeat(3, 1fr); }
.verdict-btn { display: grid; gap: 10px; justify-items: start; align-content: start; text-align: left; min-height: 200px; padding: 26px; font: 300 30px/1 var(--sans); }
.verdict-btn b { font: 400 28px/1.05 var(--serif); font-style: italic; color: var(--ink); }
.verdict-btn span { font: 400 14px/1.45 var(--sans); color: var(--ink-2); }
.verdict-btn.pass { color: var(--pass); } .verdict-btn.fail { color: var(--fail); } .verdict-btn.plain { color: var(--teal); }
.verdict-btn.pass:hover:not(:disabled), .verdict-btn.on.pass { background: var(--pass-soft); border-color: var(--pass); }
.verdict-btn.fail:hover:not(:disabled), .verdict-btn.on.fail { background: var(--fail-soft); border-color: var(--fail); }
.fails { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 20px; }
.fail-opt { min-height: 62px; text-align: left; }
.fail-opt.on { background: var(--fail-soft); border-color: var(--fail); color: var(--fail); }
.fail-opt.on::before { content: "✕  "; }
.warn-text { color: var(--wait); }

/* finished panels with drawn check / cross */
.done-panel { text-align: center; padding: 70px 24px 60px; animation: rise .6s var(--ease) both; }
.done-panel h2 { font: 400 clamp(34px, 4vw, 48px)/1.05 var(--serif); font-style: italic; }
.done-panel p { color: var(--ink-2); font-size: 16.5px; max-width: 46ch; margin: 0 auto 10px; }
.tick { width: 88px; height: 88px; margin: 0 auto 26px; display: grid; place-items: center; font-size: 0; }
.mark { width: 88px; height: 88px; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mark circle { stroke: currentColor; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s var(--slow) forwards; }
.mark path { stroke: currentColor; stroke-width: 2.2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .6s .7s var(--slow) forwards; }
.done-panel .tick, .verdict.ok .stamp { color: var(--pass); }
.done-panel.bad .tick, .verdict.bad .stamp { color: var(--fail); }

/* OP scanning */
.scanner { display: flex; gap: 28px; align-items: flex-start; padding: 34px; border-radius: 4px; background: var(--ink); color: var(--paper); }
.scanner > .ico { width: 58px; height: 58px; stroke: var(--paper); flex: none; }
.scan-main { flex: 1; min-width: 0; }
.scanner h1 { color: var(--paper); font: 400 clamp(34px, 4vw, 48px)/1 var(--serif); font-style: italic; margin-bottom: 10px; }
.scanner .hint { color: rgba(244, 241, 234, .66); }
.scanner .hint b { color: var(--paper); font-weight: 500; }
.scan-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
.scan { flex: 1; min-width: 220px; min-height: 66px; font: 300 24px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: transparent; border: 0; border-bottom: 1px solid rgba(244, 241, 234, .3); border-radius: 0; color: var(--paper); padding-left: 0; }
.scan:focus { border-color: var(--teal); box-shadow: none; }
.scan::placeholder { color: rgba(244, 241, 234, .38); text-transform: none; letter-spacing: 0; }
.scanner .inline { color: rgba(244, 241, 234, .7); }
.scanner select { background: transparent; color: var(--paper); border-color: rgba(244, 241, 234, .3); }
.scanner button.primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.scanner button.cam { color: var(--paper); border-color: rgba(244, 241, 234, .3); }
.damaged-btn { margin-top: 14px; color: rgba(244, 241, 234, .6); padding: 0; min-height: 34px; font-size: 13.5px; border: 0; }
.damaged-btn:hover:not(:disabled) { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.damaged-btn + .damaged-btn { margin-left: 16px; }
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 6px 26px; align-items: center; margin-top: 22px; padding: 30px 0; border-top: 2px solid; border-bottom: 1px solid var(--line); animation: rise .45s var(--ease) both; }
.verdict.ok { border-top-color: var(--pass); }
.verdict.bad { border-top-color: var(--fail); animation: rise .4s var(--ease) both, shake .5s .15s; }
.verdict .stamp { width: 76px; height: 76px; display: grid; place-items: center; font-size: 0; }
.verdict .stamp .mark { width: 76px; height: 76px; }
.v-k { font: 500 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; margin: 0 0 10px; }
.verdict.ok .v-k { color: var(--pass); } .verdict.bad .v-k { color: var(--fail); }
.verdict h2 { font: 400 clamp(30px, 3.6vw, 42px)/1.05 var(--serif); font-style: italic; margin-bottom: 6px; }
.facts-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.facts-row dt { font: 500 10px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.facts-row dd { margin: 0; font-size: 15px; }
.chart-copy { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 18px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); }
.chart-text { flex: 1; min-width: 240px; margin: 0; font: 400 12.5px/1.6 var(--mono); color: var(--ink-2); }
.damaged-link { grid-column: 1 / -1; justify-self: start; color: var(--fail); padding: 0; min-height: 36px; margin-top: 8px; border: 0; font-size: 13.5px; }
button.cam::before { content: ""; display: inline-block; width: 16px; height: 12px; margin-right: 9px; vertical-align: -1px; border: 1px solid currentColor; border-radius: 3px; background: radial-gradient(circle, currentColor 2px, transparent 2.5px); }
.cam-sheet video { width: 100%; border-radius: 2px; background: #000; aspect-ratio: 4 / 3; object-fit: cover; margin: 8px 0 14px; }

/* admin: today */
.hero { display: grid; gap: 30px; padding: 6px 0 26px; }
.hero h1 { margin: 0; font: 400 clamp(40px, 5vw, 64px)/1 var(--serif); font-style: italic; letter-spacing: -0.02em; }
.figures { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--ink); }
.figures.small { grid-template-columns: repeat(4, 1fr); margin: 20px 0; border-top-color: var(--line); }
.figure { padding: 20px 20px 4px 0; display: grid; gap: 10px; animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.figure + .figure { padding-left: 20px; border-left: 1px solid var(--line); }
.figure strong { font: 200 clamp(38px, 4.4vw, 58px)/1 var(--mono); letter-spacing: -0.04em; }
.figures.small .figure strong { font-size: clamp(28px, 3vw, 38px); }
.figure span { font-size: 12.5px; color: var(--ink-2); }
.figure.warn strong { color: var(--wait); } .figure.bad strong { color: var(--fail); }
.tl-card { padding: 26px 0 22px; }
.tl { position: relative; }
.tl-hours { position: relative; height: 16px; margin: 0 6px; }
.tl-hours span { position: absolute; transform: translateX(-50%); font: 400 11px/1 var(--mono); color: var(--ink-3); }
.tl-track { position: relative; height: 120px; margin: 10px 6px 0; border-bottom: 1px solid var(--ink); background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 14 - 1px), var(--line) calc(100% / 14 - 1px) calc(100% / 14)); }
.tl-load { position: absolute; bottom: 0; transform: translateX(-50%); width: 6px; min-height: 0; height: 70px; padding: 0; border-radius: 3px 3px 0 0; border: 0; background: var(--ink-3); animation: grow .9s var(--slow) both; animation-delay: calc(var(--i, 0) * 80ms); transform-origin: bottom; }
.tl-load span { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); font: 400 10.5px/1 var(--mono); white-space: nowrap; color: var(--ink-2); }
.tl-load.st-ok { background: var(--pass); } .tl-load.st-wait { background: var(--wait); } .tl-load.st-bad { background: var(--fail); }
.tl-load:hover:not(:disabled) { transform: translateX(-50%) scaleX(1.8); }
@keyframes grow { from { transform: translateX(-50%) scaleY(0); } to { transform: translateX(-50%) scaleY(1); } }
.tl-open { position: absolute; bottom: -11px; width: 1px; height: 9px; background: var(--teal); transform: translateX(-50%); }
.tl-now { position: absolute; top: -10px; bottom: -4px; width: 0; border-left: 1px solid var(--teal); }
.tl-now::before { content: ""; position: absolute; top: -3px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: breathe 3s ease-in-out infinite; }
.tl-now em { position: absolute; top: -20px; left: 8px; font: 400 11px/1 var(--mono); font-style: normal; color: var(--teal); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 24px; font-size: 12px; color: var(--ink-2); }
.tl-legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.st-ok { background: var(--pass); } .dot.st-wait { background: var(--wait); } .dot.st-bad { background: var(--fail); }
.tick-key { width: 1px; height: 10px; background: var(--teal); display: inline-block; }
.attention { list-style: none; padding: 0; margin: 0; }
.attention li > button { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; width: 100%; min-height: 0; padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left; font-weight: 400; font-size: 15px; }
.attention li > button:hover:not(:disabled) { background: var(--surface); }
.attention .flag { width: 7px; height: 7px; border-radius: 50%; }
.attention .warn .flag { background: var(--wait); }
.attention .bad .flag { background: var(--fail); animation: breathe 1.6s ease-in-out infinite; }
.attention small { color: var(--ink-3); white-space: nowrap; font-size: 12px; }
.all-clear { font: 400 26px/1.2 var(--serif); font-style: italic; color: var(--pass); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: 96px 1fr 32px; gap: 14px; align-items: center; font-size: 13.5px; }
.bars .bar { height: 2px; background: var(--line); overflow: visible; }
.bars .bar i { display: block; height: 2px; width: calc(var(--w) * 100%); background: var(--ink); animation: fill 1.1s var(--slow) both; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bars b { text-align: right; font: 400 13px/1 var(--mono); }

/* lists and tables */
.item-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; font: 500 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--ink-2); }
.st-wait.badge { color: var(--wait); border-color: currentColor; }
.st-ok.badge { color: var(--pass); border-color: currentColor; }
.st-bad.badge { color: var(--fail); border-color: currentColor; }
.openings { list-style: none; padding: 0; margin: 0; }
.openings li { display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); animation: rise .5s var(--ease) both; }
.openings li:first-child { border-top: 0; }
.openings time { font: 300 22px/1 var(--mono); }
.openings .muted { font-size: 13px; }
.openings li.voided { opacity: .5; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding: 12px 10px 12px 0; border-bottom: 1px solid var(--ink); }
td { padding: 14px 10px 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
td .avatar { width: 30px; height: 30px; font-size: 11px; display: inline-grid; vertical-align: middle; margin-right: 8px; }
td.actions { text-align: right; white-space: nowrap; }
td.actions button { margin-left: 6px; min-height: 38px; padding: 0 14px; font-size: 13.5px; }
table.loads tbody tr { cursor: pointer; transition: background .2s; }
table.loads tr:hover td { background: var(--surface); }
table.loads tr.sel td { background: var(--accent-soft); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 14px 0; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 10px/1.9 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding-right: 26px; }
.facts dd { font-size: 14.5px; }
.history { padding-left: 18px; font-size: 13.5px; }
.history li { margin-bottom: 8px; }
.history time { color: var(--ink-3); font-family: var(--mono); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; border: 1px solid var(--line-2); border-radius: 999px; font: 400 14px/1 var(--mono); }
.plain { padding-left: 18px; }
.plain li { margin-bottom: 8px; }
.reveal { border-top: 2px solid var(--teal); padding: 18px 0; margin-bottom: 14px; display: grid; gap: 8px; justify-items: start; animation: rise .45s var(--ease) both; }
.pin-show { font: 300 46px/1 var(--mono); letter-spacing: .24em; color: var(--accent); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; align-items: start; }
.admin-grid > .card:nth-child(2) { border-top: 0; padding-top: 4px; }
.room-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.room-list li { display: flex; gap: 6px; align-items: center; }
.room-list input { flex: 1; min-width: 0; }
.kit-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.kit-list li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.kit-list li > input { flex: 1; min-width: 160px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--ink-2); margin: 10px 0; font-size: 14px; }
label.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--teal); }
.machine-admin { list-style: none; padding: 0; margin: 0; }
.machine-admin li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.machine-admin .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.machine-admin .actions input { min-height: 38px; width: 180px; }
.machine-admin .actions button { min-height: 38px; font-size: 13.5px; padding: 0 14px; }
.pin-edit { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.pin-edit #pinEdit { width: 120px; min-height: 38px; font: 400 18px/1 var(--mono); letter-spacing: .3em; text-align: center; }
.pin-edit input::placeholder, #adStaffPin::placeholder { letter-spacing: 0; font: 400 14px/1 var(--sans); }
.pin-edit #seName { width: 180px; min-height: 38px; }
.pin-edit .initials { width: 70px; min-height: 38px; text-transform: uppercase; }
.pin-edit button { min-height: 38px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; max-width: min(560px, calc(100% - 32px)); padding: 15px 22px; border-radius: 3px; background: var(--ink); color: var(--paper); font-size: 14.5px; transition: opacity .35s, transform .45s var(--ease); z-index: 50; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--fail); }

#labels { display: none; }

@media (max-width: 960px) {
  .start { grid-template-columns: 1fr; text-align: center; gap: 34px; min-height: 0; }
  .start-pin { justify-self: center; }
  .start-clock { margin: 0 auto; }
  .start-sub { margin-bottom: 26px; }
}
@media (max-width: 860px) {
  .jobs, .jobs.three, .verdicts, .verdicts.three, .split, .split.wide-left, .admin-grid { grid-template-columns: 1fr; }
  .job, .job + .job { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 0 60px; min-height: 0; }
  .job::before, .job:last-child::before { right: 0; }
  .job .go, .job + .job .go { left: 0; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure, .figure + .figure { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
  .admin-grid > .card:nth-child(2) { border-top: 1px solid var(--line); padding-top: 26px; }
}
@media (max-width: 600px) {
  .top { padding: 14px 18px; gap: 10px 16px; }
  .view, .tabs { padding-left: 18px; padding-right: 18px; }
  .grid2, .fails { grid-template-columns: 1fr; }
  .scanner { flex-direction: column; padding: 24px; }
  .verdict { grid-template-columns: 1fr; }
  .openings li { grid-template-columns: 64px 1fr; }
  .openings li button { grid-column: 1 / -1; }
  .facts, .summary { grid-template-columns: 1fr; }
  .stepper li { font-size: 9px; letter-spacing: .1em; }
  .live { display: none; }
  .me b { display: none; }
  .brand .logo { height: 19px; }
  .keys button { min-height: 66px; }
  .start h1 { font-size: 52px; }
  .admin-grid .table-wrap tr { display: grid; grid-template-columns: 1fr auto; }
  .admin-grid .table-wrap td.actions { grid-column: 1 / -1; text-align: left; padding-top: 0; white-space: normal; }
  .admin-grid .table-wrap td.actions button:first-child { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .ico [pathLength], .mark circle, .mark path { stroke-dashoffset: 0 !important; }
}

/* 2.5" × 1.25" pouch labels (63.5 × 31.75 mm), one label per page for roll printers */
@media print {
  @page { size: 63.5mm 31.75mm; margin: 0; }
  body { background: #fff; }
  body > *:not(#labels) { display: none !important; }
  #labels { display: block !important; }
  .label { width: 63.5mm; height: 31.75mm; padding: 2mm 2.4mm; overflow: hidden; break-after: page; display: grid; grid-template-columns: 21mm 1fr; column-gap: 2.6mm; align-items: center; font: 7pt/1 Arial, Helvetica, sans-serif; color: #000; font-variant-numeric: tabular-nums; }
  .label:last-child { break-after: auto; }
  .label > svg { width: 21mm; height: 21mm; display: block; }
  .label .lt { display: flex; flex-direction: column; justify-content: center; gap: .55mm; min-width: 0; }
  .label .lt > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
  .label .lt-top { display: flex !important; align-items: center; justify-content: space-between; gap: 1mm; margin-bottom: .5mm; }
  .label .lt-tags { display: inline-flex; align-items: center; gap: .8mm; }
  .label .lbl-logo { height: 2.5mm; width: auto; display: block; }
  .label .lbl-who, .label .lbl-tag { font: 700 5.6pt/1 Arial, sans-serif; border: .2mm solid #000; border-radius: .6mm; padding: .4mm .8mm; letter-spacing: .05em; }
  .label .lbl-tag { background: #000; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .label .lt-kit { font-weight: 700; font-size: 8pt; }
  .label .lt-exp { font-weight: 700; }
  .label .lt-code { font-weight: 700; letter-spacing: .04em; margin-top: .3mm; }
}
