/* Roadmela (Vehicle Check) — hi-vis field kit: safety yellow, asphalt black, signal green/red. */
:root {
  --ink: #1c1f22;
  --ink-2: #2b3035;
  --muted: #4d575e;
  --bg: #e7e9ea;
  --panel: #ffffff;
  --line: #c3c9cd;
  --line-soft: #dde1e3;
  --yellow: #ffd100;
  --yellow-soft: #fff4bf;
  --pass: #137339;
  --pass-soft: #e2f2e7;
  --issue: #c41f1b;
  --issue-soft: #fdebe9;
  --na: #59646b;
  --na-soft: #eceff1;
  --ui: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --cond: "Avenir Next Condensed", "DIN Condensed", "Roboto Condensed", "Arial Narrow", "Avenir Next", system-ui, sans-serif;
  --num: "DIN Alternate", "Avenir Next", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--ui); }
a { color: var(--ink); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--yellow); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r); }
.skip:focus { top: 10px; }
[hidden] { display: none !important; }
/* First paint: the board, history and guide are drawn by the page script from the saved draft. Until it has run they
   stay invisible (their space is kept), so nothing jumps when the real checklist appears; the head script
   reveals them after 4 s even if the scripts fail. Returning users (.vc-own) never see the example note. */
.vc-js:not(.vc-ready) main > :not(.intro), .vc-js:not(.vc-ready) .foot, .vc-js:not(.vc-ready) .dock { visibility: hidden; }
.vc-own .example-note { display: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--yellow); color: var(--ink); }
.bar-in { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 56px; }
.brand { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; text-decoration: none; font: 700 21px/1 var(--cond); letter-spacing: .01em; text-transform: uppercase; margin-right: auto; }
.brand small { font: 600 12px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: #4a3f00; }
.brand-mark { width: 18px; height: 18px; align-self: center; background: repeating-linear-gradient(-45deg, var(--ink) 0 4px, var(--yellow) 4px 8px); border: 2px solid var(--ink); border-radius: 3px; }
.bar-progress { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.bar-progress strong { font: 700 22px/1 var(--num); font-variant-numeric: tabular-nums; }
.bar-progress span { font-size: 13px; font-weight: 600; }
.bar-btn { min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); background: transparent; border-radius: var(--r); font-weight: 700; cursor: pointer; }
.bar-btn:hover { background: var(--ink); color: var(--yellow); }
.strip { display: flex; gap: 2px; height: 10px; padding: 0 16px 0; background: var(--ink); max-width: none; }
.strip i { flex: 1; background: #464d53; }
.strip i.s-pass { background: #37b866; }
.strip i.s-issue { background: #ff4b3e; }
.strip i.s-na { background: #9aa4ab; }

/* ---------- intro ---------- */
main { max-width: 1440px; margin: 0 auto; padding: 0 16px; }
.intro { display: grid; gap: 14px; padding: 22px 0 18px; }
.intro h1 { font: 700 clamp(30px, 6vw, 46px)/1.02 var(--cond); text-transform: uppercase; letter-spacing: .005em; }
.intro p { margin: 8px 0 0; max-width: 62ch; font-size: 16px; color: var(--ink-2); }
.example-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--panel); border: 2px dashed var(--ink); border-radius: var(--r); padding: 12px 14px; }
.example-note p { margin: 0; flex: 1 1 260px; font-size: 15px; }
.tag { background: var(--ink); color: var(--yellow); font: 700 13px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; padding: 6px 8px; border-radius: 4px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 16px; border: 2px solid var(--ink); background: var(--panel); border-radius: var(--r); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--yellow-soft); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: var(--yellow); }
.btn-yellow { background: var(--yellow); }
.btn-yellow:hover { background: #ffdf45; }
.btn-ghost { border-color: var(--line); font-weight: 600; }
.btn-ghost:hover { border-color: var(--ink); background: var(--panel); }
.btn-big { width: 100%; min-height: 54px; font-size: 17px; }
.link-btn { background: none; border: 0; padding: 6px 4px; min-height: 40px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input, .photo-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-btn:focus-within, .photo-btn:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--yellow); }

/* ---------- board layout (mobile first: one column, ordered for thumb use) ---------- */
.board { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); max-width: 760px; margin: 0 auto; }
.col { display: contents; }
.area-status { order: 1; } .area-details { order: 2; } .area-nav { order: 3; } .area-list { order: 4; } .area-finish { order: 5; } .area-actions { order: 6; }
.intro, .history, .guide { max-width: 760px; margin-left: auto; margin-right: auto; }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sec-head h2, .finish h2, .actions h2 { font: 700 20px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .02em; }

/* details */
.details { background: var(--panel); border-radius: var(--r); padding: 14px 16px 16px; border-top: 4px solid var(--ink); }
.details-line { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.details-line b { color: var(--ink); }
.details-body { margin-top: 12px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f { display: grid; align-content: start; gap: 5px; font-size: 14px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.f em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-left: 4px; }
.f-wide { grid-column: 1 / -1; }
.f input[type="date"], .f input[type="time"] { min-width: 0; }
.f input, .f select, .f textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 46px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; padding: 9px 11px; font-size: 16px; font-weight: 500; color: var(--ink); }
.f textarea { resize: vertical; min-height: 64px; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--ink); }
.f-inline { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.tmpl { border: 0; padding: 0; margin: 16px 0 0; }
.tmpl legend { font-weight: 700; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.tmpl-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tmpl-opt { position: relative; }
.tmpl-opt input { position: absolute; opacity: 0; inset: 0; }
.tmpl-opt span { display: grid; gap: 2px; min-height: 56px; padding: 8px 10px; border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; background: #fff; }
.tmpl-opt b { font-size: 15px; line-height: 1.2; }
.tmpl-opt small { font-size: 13px; color: var(--muted); }
.tmpl-opt input:checked + span { border-color: var(--ink); background: var(--yellow-soft); box-shadow: inset 0 -4px 0 var(--yellow); }
.tmpl-opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.last-report { margin: 12px 0 0; padding: 10px 12px; background: var(--na-soft); border-radius: var(--r); font-size: 15px; }

/* section nav: horizontal chips on mobile */
.groupnav { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.groupnav::-webkit-scrollbar { display: none; }
.nav-title { display: none; }
.groupnav ul { list-style: none; display: flex; gap: 8px; margin: 0; padding: 2px 0 4px; }
.groupnav a { display: flex; align-items: center; gap: 8px; white-space: nowrap; min-height: 42px; padding: 0 12px; border-radius: 999px; background: var(--panel); border: 2px solid var(--line); text-decoration: none; font-weight: 600; font-size: 15px; }
.groupnav a b { font: 700 14px/1 var(--num); font-variant-numeric: tabular-nums; color: var(--muted); }
.groupnav a.done { border-color: var(--pass); }
.groupnav a.done b { color: var(--pass); }
.groupnav a.has-issue { border-color: var(--issue); }
.groupnav a.has-issue b { color: var(--issue); }

/* ---------- checklist ---------- */
.checklist { display: grid; gap: 12px; outline: none; }
.group { background: var(--panel); border-radius: var(--r); overflow: hidden; scroll-margin-top: 80px; }
.group-h { font-size: inherit; }
.group-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; background: var(--ink); color: #fff; }
.group-toggle { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 12px 8px 16px; min-height: 52px; background: transparent; color: #fff; border: 0; cursor: pointer; text-align: left; }
.g-allpass { margin-right: 10px; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r); background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.g-allpass span { font-family: var(--num); margin-left: 4px; background: var(--ink); color: var(--yellow); border-radius: 3px; padding: 1px 5px; }
.g-allpass:focus-visible { outline-color: #fff; }
.g-name { font: 700 22px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.g-name::before { content: ""; width: 10px; height: 10px; border-right: 3px solid var(--yellow); border-bottom: 3px solid var(--yellow); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.group-toggle[aria-expanded="false"] .g-name::before { transform: rotate(-45deg); }
.g-meta { display: flex; align-items: center; gap: 10px; }
.g-count { font: 700 18px/1 var(--num); font-variant-numeric: tabular-nums; }
.g-def { background: var(--issue); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 8px; border-radius: 4px; }
.g-bar { grid-column: 1 / -1; height: 6px; background: #464d53; }
.g-bar i { display: block; height: 100%; background: var(--yellow); }
.g-done .g-bar i { background: #37b866; }
.group-body { padding: 4px 0 12px; }
.pass-rest { margin: 10px 16px 0; width: calc(100% - 32px); }

.item { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); border-left: 6px solid transparent; scroll-margin-top: 90px; scroll-margin-bottom: 90px; }
.item.s-pass { border-left-color: var(--pass); }
.item.s-issue { border-left-color: var(--issue); background: var(--issue-soft); }
.item.s-na { border-left-color: var(--na); }
.item-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.item-title { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.refs { display: inline-flex; gap: 4px; }
.num { font: 700 14px/1 var(--num); color: var(--muted); font-variant-numeric: tabular-nums; }
.name { font-size: 17px; font-weight: 600; line-height: 1.3; }
.ref { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }
.custom-name { flex: 1 1 200px; min-height: 44px; border: 2px solid var(--line); border-radius: var(--r); padding: 6px 10px; font-size: 16px; }
.remove { min-width: 44px; min-height: 44px; border: 2px solid var(--line); background: #fff; border-radius: var(--r); font-size: 22px; line-height: 1; cursor: pointer; }
.seg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.r { min-height: 54px; border: 2px solid var(--line); background: #fff; border-radius: var(--r); font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; touch-action: manipulation; }
.r span { font-size: 18px; line-height: 1; }
.r:hover { border-color: var(--ink); }
.r-pass[aria-pressed="true"] { background: var(--pass); border-color: var(--pass); color: #fff; }
.r-issue[aria-pressed="true"] { background: var(--issue); border-color: var(--issue); color: #fff; }
.r-na[aria-pressed="true"] { background: var(--na); border-color: var(--na); color: #fff; }
.defect-fields { display: grid; gap: 12px; margin-top: 12px; }
.defect-fields .f textarea { border-color: #e2a8a3; }
.sev { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.sev legend { font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.sev-opt { position: relative; }
.sev-opt input { position: absolute; opacity: 0; inset: 0; }
.sev-opt span { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; font-weight: 600; cursor: pointer; }
.sev-opt span::before { content: ""; width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 50%; flex: none; background: #fff; }
.sev-opt input:checked + span::before { background: var(--ink); box-shadow: inset 0 0 0 3px #fff; }
.sev-opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.sev-3 input:checked + span { background: var(--issue); border-color: var(--issue); color: #fff; }
.sev-3 input:checked + span::before { border-color: #fff; background: #fff; box-shadow: inset 0 0 0 3px var(--issue); }
.sev-2 input:checked + span { background: var(--yellow); border-color: var(--ink); }
.sev-1 input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.sev-1 input:checked + span::before { border-color: #fff; background: #fff; box-shadow: inset 0 0 0 3px var(--ink); }
.photos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.thumb { position: relative; margin: 0; width: 86px; height: 86px; border-radius: var(--r); overflow: hidden; border: 2px solid var(--line); background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-x { position: absolute; top: 2px; right: 2px; width: 32px; height: 32px; border: 0; border-radius: 4px; background: rgba(28, 31, 34, .85); color: #fff; font-size: 20px; cursor: pointer; }
.photo-btn { position: relative; overflow: hidden; height: 86px; min-width: 96px; background: #fff; }
.add-custom { width: 100%; }

/* ---------- status / defects ---------- */
.status { display: grid; gap: 0; border-radius: var(--r); overflow: hidden; background: var(--panel); }
.verdict { padding: 14px 16px 12px; border: 3px solid var(--ink); border-radius: var(--r) var(--r) 0 0; background: #fff; }
.v-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.v-label { margin: 2px 0 0; font: 700 30px/1.05 var(--cond); text-transform: uppercase; }
.v-detail { margin: 6px 0 0; font-size: 15px; }
.v-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 0; }
.v-counts div { border-top: 2px solid currentColor; padding-top: 4px; }
.v-counts dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.v-counts dd { margin: 0; font: 700 22px/1.1 var(--num); font-variant-numeric: tabular-nums; }
.v-stop { background: var(--issue); border-color: var(--issue); color: #fff; }
.v-hold { background: var(--yellow); }
.v-logged { background: var(--ink); color: #fff; }
.v-logged .v-label { color: var(--yellow); }
.v-released, .v-clear { background: var(--pass); border-color: var(--pass); color: #fff; }
.defects:empty { display: none; }
.defects { border: 3px solid var(--ink); border-top: 0; border-radius: 0 0 var(--r) var(--r); }
.verdict:has(+ .defects:empty) { border-radius: var(--r); }
.defects-h { display: flex; align-items: center; gap: 8px; padding: 10px 16px 4px; font: 700 18px/1 var(--cond); text-transform: uppercase; }
.defects-h span { background: var(--issue); color: #fff; font: 700 14px/1 var(--num); padding: 4px 7px; border-radius: 4px; }
.defects ol { list-style: none; margin: 0; padding: 4px 0 6px; }
.def a { display: grid; gap: 2px; padding: 10px 16px 10px 14px; border-left: 6px solid var(--ink); margin: 0 0 4px; text-decoration: none; }
.def a:hover { background: var(--na-soft); }
.def-3 a { border-left-color: var(--issue); }
.def-2 a { border-left-color: var(--yellow); }
.def-sev { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.def-3 .def-sev { color: var(--issue); }
.def strong { font-size: 16px; }
.def-note { font-size: 15px; color: var(--ink-2); }
.def-note em { color: var(--issue); font-weight: 700; }
.def-grp { font-size: 13px; color: var(--muted); }

/* ---------- finish & actions ---------- */
.finish, .actions { background: var(--panel); border-radius: var(--r); padding: 16px; display: grid; gap: 14px; }
.sign { display: grid; gap: 14px; }
.sign-block { border-top: 2px solid var(--ink); padding-top: 10px; }
.sign-block h3 { font-size: 17px; }
.sign-name { margin: 10px 0 0; padding: 12px 0 4px; border-bottom: 2px solid var(--ink); font-weight: 700; min-height: 44px; font-size: 17px; }
.fields.repair-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.repair-fields .f-wide { grid-column: 1 / -1; }
.radios { border: 0; padding: 0; margin: 10px 0 12px; display: grid; gap: 4px; }
.radio, .check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 15px; cursor: pointer; }
.radio input, .check input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts { display: grid; gap: 6px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.saved { margin: 0; font-size: 14px; color: var(--muted); min-height: 21px; }
.error { margin: 0; background: var(--issue-soft); border-left: 6px solid var(--issue); padding: 10px 12px; font-weight: 700; color: #7d100d; }

/* ---------- history & guide ---------- */
.history { margin-top: 28px; background: var(--panel); border-radius: var(--r); padding: 16px; }
.history-tools { margin: 0; display: flex; flex-wrap: wrap; gap: 0 8px; }
.history-tools .btn { margin-top: 10px; }
.backup-status { overflow-wrap: anywhere; }
.backup-status.is-error, #restore-error { color: #7d100d; font-weight: 700; }
.restore-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.restore-dialog p { font-size: 16px; }
.restore-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 18px 0; }
.restore-summary dt { font-weight: 700; }
.restore-summary dd { margin: 0; overflow-wrap: anywhere; }
.restore-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.history-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; }
.h { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 0 12px 12px; border-top: 1px solid var(--line-soft); border-left: 6px solid var(--ink); margin-bottom: 6px; }
.h-stop { border-left-color: var(--issue); } .h-hold { border-left-color: var(--yellow); } .h-clear, .h-released { border-left-color: var(--pass); } .h-progress { border-left-color: var(--line); }
.h-main strong { font-size: 17px; margin-right: 8px; }
.h-main span, .h-state span { font-size: 14px; color: var(--muted); }
.h-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.h-state .h-chip { background: var(--na-soft); color: var(--ink); font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.h-act { display: flex; gap: 8px; }
.h-act .btn { min-height: 42px; }
.guide { margin-top: 28px; padding: 4px 0 32px; }
.guide h2 { font: 700 24px/1.1 var(--cond); text-transform: uppercase; }
.guide h3 { font-size: 17px; margin-bottom: 6px; }
.guide-grid { display: grid; gap: 18px; margin-top: 14px; }
.guide-grid > div { border-top: 3px solid var(--ink); padding-top: 10px; }
.guide p { margin: 0; font-size: 15px; }
.notice { margin-top: 18px !important; background: var(--yellow-soft); border-left: 6px solid var(--yellow); padding: 12px 14px; }
.faq { margin-top: 16px; display: grid; gap: 8px; }
.faq details { background: var(--panel); border-radius: var(--r); padding: 0 14px; }
.faq summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.faq details p { padding-bottom: 12px; }

/* ---------- dock (phones / tablets) ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: 2fr 3fr; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--ink); }
.dock-btn { min-height: 52px; border-radius: var(--r); border: 2px solid #5a6268; background: transparent; color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.dock-btn.has { border-color: var(--issue); }
.dock-n { background: var(--issue); padding: 2px 8px; border-radius: 4px; font-family: var(--num); }
.dock-main { background: var(--yellow); color: var(--ink); border-color: var(--yellow); flex-direction: column; gap: 0; line-height: 1.1; }
.dock-main span { font-size: 13px; font-weight: 600; }
.dock-btn:focus-visible { outline-color: #fff; }
body { padding-bottom: 84px; }

/* new inspection dialog */
.new-dialog { border: 0; border-radius: var(--r); padding: 20px; width: min(520px, calc(100% - 32px)); border-top: 8px solid var(--yellow); }
.new-dialog::backdrop { background: rgba(28, 31, 34, .6); }
.new-dialog h2 { font: 700 26px/1.1 var(--cond); text-transform: uppercase; }
.new-opts { display: grid; gap: 8px; margin: 14px 0; }
.new-opt { display: grid; gap: 2px; text-align: left; min-height: 64px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; }
.new-opt b { font-size: 18px; }
.new-opt span { font-size: 14px; color: var(--muted); }
.new-opt:hover { border-color: var(--ink); background: var(--yellow-soft); }

/* footer */
.foot { background: var(--ink); color: #d7dcdf; margin-top: 12px; }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 18px 16px; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; font-size: 14px; }
.foot nav { display: flex; gap: 6px; }
.foot a { color: #fff; font-weight: 700; display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; }
.foot a:focus-visible { outline-color: #fff; }

/* ---------- wider screens ---------- */
@media (max-width: 440px) {
  .brand small { display: none; }
  .brand { font-size: 19px; }
  .bar-progress span { display: none; }
  .intro h1 { font-size: 28px; }
  .intro p { font-size: 15px; }
}
@media (min-width: 600px) {
  .fields { grid-template-columns: repeat(4, 1fr); }
  .f-wide { grid-column: span 2; }
  .sign { grid-template-columns: 1fr 1fr; }
  .h { grid-template-columns: 1.2fr 1.4fr auto; align-items: center; }
  .guide-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  main { padding: 0 24px; }
  .bar-in, .foot-in { padding-left: 24px; padding-right: 24px; }
  .strip { padding: 0 24px; }
  .intro { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); align-items: end; max-width: none; padding: 28px 0 22px; }
  .board { max-width: none; grid-template-columns: 290px minmax(0, 1fr) 360px; align-items: start; gap: 20px; }
  .col { display: grid; gap: 14px; }
  .col-left, .col-right { position: sticky; top: 82px; max-height: calc(100vh - 96px); overflow-y: auto; scrollbar-width: thin; padding: 2px; }
  .history, .guide { max-width: none; margin-left: 0; margin-right: 0; }
  .history { margin-left: 310px; margin-right: 380px; }
  .guide { margin-left: 310px; margin-right: 380px; }
  .details .fields { grid-template-columns: 1fr 1fr; }
  .details .f-wide, .details .f-date, .details .f-loc { grid-column: 1 / -1; }
  .tmpl-opts { grid-template-columns: 1fr; }
  .tmpl-opt span { grid-template-columns: 1fr auto; align-items: center; min-height: 46px; }
  .sign { grid-template-columns: 1fr; }
  .groupnav { margin: 0; padding: 12px 0 8px; background: var(--panel); border-radius: var(--r); overflow: visible; }
  .nav-title { display: block; margin: 0 16px 6px; font: 700 18px/1 var(--cond); text-transform: uppercase; }
  .groupnav ul { flex-direction: column; gap: 0; padding: 0; }
  .groupnav a { border-radius: 0; border: 0; border-left: 6px solid transparent; justify-content: space-between; min-height: 44px; padding: 0 16px 0 10px; background: none; }
  .groupnav a:hover { background: var(--yellow-soft); }
  .groupnav a.done { border-left-color: var(--pass); }
  .groupnav a.has-issue { border-left-color: var(--issue); }
  .dock { display: none; }
  body { padding-bottom: 0; }
  .h { grid-template-columns: 1fr 1.3fr auto; }
  .item { padding: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}


/* ---------- 2026-10-24: start screen, compact rows, one-at-a-time mode ---------- */
.vc-start .example-note { display: none; }
.vc-js.vc-start .board, .vc-js.vc-start:not(.vc-has-history) .history, .vc-js.vc-start .dock { display: none; }
.vc-js.vc-start body { padding-bottom: 0; }
.vc-start .bar-progress, .vc-start #new-btn { visibility: hidden; }
.vc-start .strip i { background: #464d53; }
.start { display: none; }
.vc-start .start { display: grid; gap: 14px; background: var(--panel); border-radius: var(--r); border-top: 6px solid var(--yellow); padding: 18px 16px; box-shadow: 0 1px 0 var(--line); }
.start h2 { font: 700 24px/1.1 var(--cond); text-transform: uppercase; }
.start-types { border: 0; padding: 0; margin: 0; }
.start-types legend { font-weight: 700; font-size: 14px; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.start-opts { display: grid; gap: 8px; }
.start-opt { position: relative; }
.start-opt input { position: absolute; opacity: 0; inset: 0; }
.start-opt span { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; min-height: 54px; padding: 8px 14px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; }
.start-opt b { font-size: 17px; }
.start-opt small { font-size: 13px; color: var(--muted); text-align: right; }
.start-opt input:checked + span { border-color: var(--ink); background: var(--yellow-soft); box-shadow: inset 6px 0 0 var(--yellow); }
.start-opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.start-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.start-go { display: grid; gap: 4px; justify-items: center; }
.start .hint { margin: 0; text-align: center; }

.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.view-switch { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: #fff; }
.view-btn { min-height: 40px; padding: 0 14px; border: 0; background: transparent; font-weight: 700; font-size: 14px; cursor: pointer; }
.view-btn[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.refs-toggle { min-height: 40px; font-size: 14px; }
.refs { display: none; }
.show-refs .refs { display: inline-flex; }

/* compact rows: name and the three answers on one line */
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 8px 12px 8px 12px; }
.item-head { margin: 0; align-items: center; }
.item .seg { grid-template-columns: repeat(3, 46px); gap: 4px; }
.item .num { display: none; }
.legend { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.legend b { color: var(--ink); }
.is-step ~ .legend, .list-tools:has(+ .is-step) .legend { display: none; }
.item .r { min-height: 48px; padding: 0; font-size: 15px; }
.item .r span[aria-hidden] { font-size: 20px; }
.item .r-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.item .defect-fields { grid-column: 1 / -1; margin-top: 4px; }
.name { font-size: 16px; }
@media (min-width: 600px) {
  .legend { display: none; }
  .item .num { display: inline; }
  .item .seg { grid-template-columns: repeat(3, 84px); gap: 6px; }
  .item .r { gap: 6px; }
  .item .r-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .item .r span[aria-hidden] { font-size: 17px; }
}

/* one at a time */
.checklist.is-step { display: block; scroll-margin-top: 76px; }
.step-card { background: var(--panel); border-radius: var(--r); overflow: hidden; border-top: 6px solid var(--ink); }
.step-top { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px 6px; font-weight: 700; }
.step-group { font: 700 20px/1.1 var(--cond); text-transform: uppercase; }
.step-pos { font: 700 15px/1.4 var(--num); color: var(--muted); font-variant-numeric: tabular-nums; }
.step-bar { height: 6px; background: var(--line-soft); }
.step-bar i { display: block; height: 100%; background: var(--yellow); }
.is-step .item { display: block; padding: 18px 16px 10px; border-bottom: 0; }
.is-step .item-head { margin-bottom: 14px; }
.is-step .item .num { display: inline; }
.is-step .name { font-size: 22px; line-height: 1.25; font-weight: 700; }
.is-step .item .seg { grid-template-columns: 1fr; gap: 10px; }
.is-step .item .r { min-height: 64px; font-size: 19px; gap: 10px; justify-content: flex-start; padding: 0 18px; }
.is-step .item .r-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.step-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 16px 14px; }
.step-left { text-align: center; font-size: 14px; color: var(--muted); font-weight: 600; }
.step-card .pass-rest { margin: 0 16px 16px; width: calc(100% - 32px); }
@media (min-width: 600px) {
  .is-step .item .seg { grid-template-columns: repeat(3, 1fr); }
  .is-step .item .r { justify-content: center; }
}
@media (max-width: 380px) {
  .start-fields { grid-template-columns: 1fr; }
  .item .seg { grid-template-columns: repeat(3, 44px); gap: 4px; }
  .item .r { min-height: 44px; }
}

/* ---------- print ---------- */
.print-sheet { display: none; }
@media print {
  body { background: #fff; padding: 0; font-size: 10pt; }
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block; color: #000; font: 9.5pt/1.35 "Helvetica Neue", Helvetica, Arial, sans-serif; width: 100%; max-width: 100%; overflow: hidden; }
  .p-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 2.5pt solid #000; padding-bottom: 6pt; }
  .p-top small, .p-meta small, .p-notes small, .p-sign small { display: block; font-size: 7.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #444; }
  .p-top h1 { font-size: 19pt; margin-top: 2pt; }
  .p-flag { background: #ffd100; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-weight: 700; text-transform: uppercase; font-size: 9pt; padding: 4pt 8pt; white-space: nowrap; }
  .p-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6pt 12pt; margin: 8pt 0; }
  .p-meta > div:last-child { grid-column: 1 / -1; }
  .p-meta strong { display: block; border-bottom: .6pt solid #999; min-height: 15pt; font-size: 10pt; overflow-wrap: anywhere; }
  .p-help { margin: 4pt 0 8pt; font-size: 9pt; }
  .p-verdict { display: grid; gap: 2pt; padding: 6pt 8pt; border: 1.5pt solid #000; margin: 6pt 0; break-inside: avoid; }
  .p-verdict strong { font-size: 12pt; text-transform: uppercase; }
  .p-stop { border-color: #c41f1b; border-width: 2.5pt; }
  .p-counts { font-weight: 700; }
  .p-defects { break-inside: avoid; }
  .p-defects h2, .p-photos h2 { font-size: 10pt; text-transform: uppercase; margin: 8pt 0 3pt; }
  .p-defects ol { margin: 0; padding-left: 16pt; }
  .p-defects li { margin-bottom: 3pt; overflow-wrap: anywhere; }
  .p-defects p { margin: 0; }
  .p-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 8pt; }
  .p-table th, .p-table td { border-bottom: .5pt solid #aaa; padding: 3pt 4pt; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
  .p-table thead th { background: #1c1f22; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 7.5pt; text-transform: uppercase; }
  .p-table thead { display: table-header-group; }
  .p-table tr { break-inside: avoid; }
  .p-group th { background: #ececec; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 8pt; text-transform: uppercase; }
  .p-def td { font-weight: 700; }
  .p-boxes { white-space: nowrap; font-size: 7.5pt; }
  .p-boxes i { display: inline-block; width: 7pt; height: 7pt; border: .8pt solid #000; margin: 0 2pt 0 4pt; vertical-align: -1pt; }
  .p-boxes i:first-child { margin-left: 0; }
  .p-notes { margin-top: 8pt; break-inside: avoid; }
  .p-notes p { border: .6pt solid #999; min-height: 34pt; margin: 2pt 0 0; padding: 4pt; overflow-wrap: anywhere; }
  .p-sign { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12pt; margin-top: 10pt; break-inside: avoid; }
  .p-sign > div { display: flex; flex-direction: column; }
  .p-sign p { margin: 3pt 0; font-size: 8.5pt; }
  .p-line { margin-top: auto; border-bottom: .9pt solid #000; min-height: 26pt; padding-top: 12pt; font-weight: 700; overflow-wrap: anywhere; }
  .p-sign span { font-size: 7.5pt; color: #444; }
  .p-box { display: inline-block; width: 9pt; height: 9pt; border: .8pt solid #000; text-align: center; line-height: 8pt; font-size: 8pt; margin-right: 3pt; }
  .p-small { color: #444; overflow-wrap: anywhere; }
  .p-photos { break-before: auto; }
  .p-photos h2 { break-after: avoid; }
  .p-photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8pt; }
  .p-photo-grid figure { margin: 0; break-inside: avoid; }
  .p-photo-grid img { box-sizing: border-box; width: 100%; max-height: 2.8in; object-fit: contain; border: .5pt solid #aaa; display: block; }
  .p-photo-grid figcaption { font-size: 8pt; margin-top: 2pt; overflow-wrap: anywhere; }
  .p-foot { margin-top: 10pt; font-size: 7.5pt; color: #444; border-top: .5pt solid #999; padding-top: 4pt; }
}

/* ---------- about / privacy ---------- */
.page { padding-bottom: 0; }
.page .bar-btn { display: inline-flex; align-items: center; text-decoration: none; }
.doc { max-width: 720px; margin: 0 auto; padding: 28px 16px 48px; }
.doc h1 { font: 700 clamp(30px, 6vw, 42px)/1.05 var(--cond); text-transform: uppercase; margin: 12px 0 14px; }
.doc h2 { font: 700 22px/1.15 var(--cond); text-transform: uppercase; margin: 26px 0 8px; border-top: 3px solid var(--ink); padding-top: 10px; }
.doc p, .doc li { font-size: 16px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc .tag { display: inline-block; }
