/* PreShift — the inspection clipboard.
   Manila stock, form white, pen black, caution yellow. Ruled tables, a rubber stamp,
   and Overpass (an open take on Highway Gothic) for everything that is printed.
   One self-hosted variable font, no third-party request. */

@font-face {
  font-family: "Overpass";
  src: url("/overpass-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* paper */
  --paper: #f1eee3;
  --panel: #fffdf6;
  --band: #fbf8ec;
  /* ink */
  --ink: #15170f;
  --ink-2: #34362a;
  --muted: #5c5c4c;
  --line: #dcd6bf;
  --line-strong: #15170f;
  /* caution */
  --hi-vis: #ffd400;
  --hi-vis-ink: #15170f;
  --hi-vis-deep: #6b5000;
  --hi-vis-wash: #fff3bd;
  /* stamps */
  --ok: #10562f;
  --ok-bg: #e2efe4;
  --ok-edge: #a5c9b1;
  --warn: #6b4800;
  --warn-bg: #fbeecb;
  --warn-edge: #d6b56c;
  --bad: #9b1c1c;
  --bad-bg: #f8e4e0;
  --bad-edge: #dfaea7;
  --muted-bg: #e7e3d3;
  --radius: 3px;
  --sans: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  font-synthesis-weight: none;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { background: var(--hi-vis); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible, .check-choices label:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .45em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: 1.95rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .86rem; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.stat-value, .price-tag, table.grid td { font-variant-numeric: tabular-nums; }

/* Labels, headings on cards and table heads are printed form lettering: caps, spaced, 600. */
.card > h2, .form-h, table.grid th, .stat-label, .eyebrow, .footer-heading {
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .13em;
}

/* ---------------------------------------------------------------- caution tape */

.tape {
  height: 6px;
  background: repeating-linear-gradient(45deg, var(--hi-vis) 0 9px, var(--ink) 9px 18px);
}

/* ---------------------------------------------------------------- chrome */

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 11px 22px;
  background: var(--hi-vis);
  color: var(--hi-vis-ink);
  border-bottom: 2px solid var(--ink);
}
.topbar a:focus-visible, .topbar button:focus-visible { outline-color: var(--ink); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand:hover { background: none; text-decoration: underline; }
.brand-mark { width: 22px; height: 22px; color: var(--ink); }
.nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 600; }
.nav a:hover { background: none; text-decoration: underline; text-decoration-thickness: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who { color: var(--ink); font-size: .84rem; font-weight: 600; }
.topbar .link { background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

.demo-banner {
  background: var(--ink);
  color: var(--hi-vis);
  padding: 9px 22px;
  font-size: .9rem;
  border-bottom: 2px solid var(--hi-vis);
}
.demo-banner a { color: var(--hi-vis); }
.demo-banner a:hover { background: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 26px 22px 60px; }

.footer {
  padding: 22px;
  color: var(--muted);
  font-size: .86rem;
  display: grid;
  gap: 8px;
  max-width: 1120px;
  margin: 0 auto;
}
.footer strong { color: var(--ink); font-weight: 800; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-entity { color: var(--muted); font-size: .8rem; }

/* ---------------------------------------------------------------- pieces */

.card {
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}
.card > :last-child { margin-bottom: 0; }
.card-tight { padding: 14px; }
.card > h2, .card .form-h {
  display: inline-block;
  margin: 0 0 14px;
  padding-bottom: 2px;
  box-shadow: inset 0 -0.45em var(--hi-vis);
}
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
.spread { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--ink); border-radius: var(--radius); padding: 12px 14px 13px; }
.stat-label { color: var(--muted); display: block; margin-bottom: 6px; }
.stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-hint { color: var(--muted); font-size: .8rem; }

/* Stamped marks: squared off, printed, mono — never a soft SaaS chip. */
.pill, .sev {
  display: inline-block;
  padding: 1px 7px 2px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  border: 1px solid;
}
.pill-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-edge); }
.pill-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-edge); }
.pill-bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-edge); }
.pill-muted { background: var(--muted-bg); color: var(--muted); border-color: #c3bda6; }
.sev-critical { background: var(--bad); color: #fff; border-color: var(--bad); }
.sev-major { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-edge); }
.sev-minor { background: var(--muted-bg); color: var(--muted); border-color: #c3bda6; }

/* Buttons: black box, caution lettering. Hover flips the tape. */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--hi-vis);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 9px 15px;
  font: 600 1rem/1.3 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--hi-vis); color: var(--ink); }
.btn-sm { padding: 6px 11px; font-size: .88rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--hi-vis); color: var(--ink); }
.btn:disabled { background: var(--muted-bg); color: var(--muted); border-color: #c3bda6; cursor: not-allowed; }

.flash { border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; border-left: 6px solid; }
.flash-ok { background: var(--ok-bg); color: #0c4325; border-color: var(--ok); }
.flash-error { background: var(--bad-bg); color: #7a1515; border-color: var(--bad); }
.flash-warn { background: var(--warn-bg); color: #5c3d00; border-color: var(--warn); }

/* ---------------------------------------------------------------- ruled forms */

table.grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--ink);
}
table.grid th, table.grid td { text-align: left; padding: 9px 11px; vertical-align: top; border-right: 1px solid var(--line); }
table.grid th:last-child, table.grid td:last-child { border-right: 0; }
table.grid th {
  color: var(--ink);
  background: var(--hi-vis);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
  font-family: var(--sans);
}
table.grid td { border-bottom: 1px solid var(--line); }
table.grid tbody tr:nth-child(even) { background: var(--band); }
table.grid tbody tr:hover { background: var(--hi-vis-wash); }
table.grid tbody tr:last-child td { border-bottom: 0; }
/* The first cell is the identity column (a unit, a timestamp): never wrap it mid-word. */
table.grid td:first-child { white-space: nowrap; }
.table-card { padding: 0; overflow-x: auto; overflow-y: hidden; }
.table-card > h2, .table-card > .form-h { margin: 16px 18px 12px; }
.table-card > .form-h + p, .table-card > h2 + p { margin-top: 0; }

form.stack { display: grid; gap: 14px; max-width: 560px; }
label.field { display: grid; gap: 5px; font-size: .9rem; font-weight: 600; }
/* Inputs are written on a rule, not floated in a rounded box. */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="file"], select, textarea {
  font: 400 1rem/1.4 var(--sans);
  padding: 7px 9px 6px;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--ink);
  border-radius: 2px 2px 0 0;
  background: var(--panel);
  color: var(--ink);
  width: 100%;
  max-width: 100%;
}
input:focus, select:focus, textarea:focus { background: #fffbe8; border-color: var(--ink); }
textarea { min-height: 82px; resize: vertical; }
.hint { color: var(--muted); font-size: .84rem; font-weight: 400; }

/* checklist — the clipboard in the driver's hand */
.check-group { border: 1px solid var(--ink); border-radius: var(--radius); margin-bottom: 12px; background: var(--panel); }
.check-group > h3 {
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ink);
  background: var(--hi-vis);
  font-size: .74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.check-item { display: grid; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.check-item:nth-child(even) { background: var(--band); }
.check-item:last-child { border-bottom: 0; }
.check-line { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.check-label { flex: 1 1 240px; }
.check-code { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.check-choices { display: flex; gap: 0; }
.check-choices label {
  border: 1px solid var(--ink);
  border-left-width: 0;
  padding: 7px 12px;
  font: 600 .86rem/1.2 var(--sans);
  cursor: pointer;
  background: var(--panel);
  user-select: none;
}
.check-choices label:first-child { border-left-width: 1px; border-radius: 2px 0 0 2px; }
.check-choices label:last-child { border-radius: 0 2px 2px 0; }
.check-choices input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-choices input:checked + span { font-weight: 700; }
/* Selected answer: fill plus an inset frame, so the choice is not carried by colour alone. */
.check-choices label:has(input:checked) {
  background: var(--hi-vis);
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--ink);
}
.check-choices label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 1px; }
.check-choices label.fail:has(input:checked) { background: var(--bad); color: #fff; border-color: var(--bad); }
.check-detail { display: none; gap: 8px; }
.check-detail.on { display: grid; }
.photo-chip { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--muted); }
.photo-chip img { width: 46px; height: 46px; object-fit: cover; border-radius: 2px; border: 1px solid var(--ink); }

/* queue */
.queue-item { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.queue-item:first-child { padding-top: 0; }
.queue-item:last-child { border-bottom: 0; }
.queue-meta { color: var(--muted); font-size: .82rem; }
.sync-trace { font-family: var(--mono); font-size: .78rem; color: var(--ink-2); display: grid; gap: 3px; }

.bar { height: 8px; background: var(--muted-bg); border: 1px solid var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--hi-vis); }

/* ---------------------------------------------------------------- the stamp */

.stamp {
  position: relative;
  display: inline-grid;
  justify-items: center;
  gap: 1px;
  transform: rotate(-5deg);
  border: 2px solid currentColor;
  border-radius: 3px;
  padding: 6px 12px 7px;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: rgba(21, 23, 15, 0.74);
  mix-blend-mode: multiply;
}
.stamp::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid currentColor;
  border-radius: 2px;
  pointer-events: none;
}
.stamp b { font-weight: 700; letter-spacing: .2em; }
.stamp i { font-style: normal; letter-spacing: .1em; font-weight: 400; opacity: .85; }
.stamp-sm { font-size: .62rem; padding: 4px 8px 5px; letter-spacing: .14em; }
.stamp-bad { color: rgba(155, 28, 28, 0.8); }
.stamp-hold { color: rgba(21, 23, 15, 0.5); }

/* ---------------------------------------------------------------- landing */

.hero { padding: 24px 0 10px; }
.hero-split { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.15rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.04; max-width: 26ch; }
.hero .lede { font-size: 1.08rem; color: var(--ink-2); max-width: 60ch; }
.eyebrow {
  display: inline-block;
  background: var(--hi-vis);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 8px 5px;
  margin: 0 0 16px;
}
.price-tag { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; }
.price-tag span { font-size: 1rem; font-weight: 400; color: var(--muted); }

/* The hero's paper: a ruled slip with the stamp on it. */
.slip {
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0 0 16px;
  position: relative;
  overflow: hidden;
}
.slip-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
  background: var(--hi-vis);
  border-bottom: 1px solid var(--ink);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.slip-line { display: flex; gap: 10px; align-items: baseline; padding: 9px 14px 0; font-size: .95rem; }
.slip-line > span:nth-of-type(2) { flex: 1 1 auto; }
.slip-line > span:last-child { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.slip-line .mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--ink);
  position: relative;
  top: 2px;
  font-size: .8rem;
  line-height: 1;
}
.slip-line .mark.on::after { content: "✓"; font-weight: 700; }
.slip-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; padding: 12px 14px 0; flex-wrap: wrap; }
.slip-name { font-family: var(--mono); font-size: .8rem; border-top: 1px solid var(--ink); padding-top: 4px; min-width: 150px; }

.trust { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.quote { border: 1px solid var(--line); border-left: 4px solid var(--hi-vis); background: var(--panel); padding: 10px 12px; color: var(--ink-2); font-size: .93rem; }
.quote cite { display: block; color: var(--muted); font-style: normal; font-family: var(--mono); font-size: .74rem; margin-top: 6px; text-transform: uppercase; letter-spacing: .08em; }
.screenshot { margin: 0; }
.screenshot img { width: 100%; height: auto; border: 1px solid var(--ink); border-radius: var(--radius); display: block; }
.screenshot figcaption { color: var(--muted); font-size: .86rem; margin-top: 7px; }
section { margin: 36px 0; }
section > h2 { display: inline-block; padding-bottom: 2px; box-shadow: inset 0 -0.4em var(--hi-vis); margin-bottom: .7em; }
ul.checks { list-style: none; padding: 0; display: grid; gap: 9px; }
ul.checks li { padding-left: 26px; position: relative; }
ul.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ink);
  font-size: .74rem;
  font-weight: 700;
  text-align: center;
  line-height: 15px;
}
.legal { max-width: 72ch; }
.legal h2 { margin-top: 1.6em; }

/* ---------------------------------------------------------------- driver app (phone-first) */

.drive-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.offline-note { font-size: .86rem; color: var(--muted); }
.sig-pad { border: 1px dashed var(--ink); border-radius: var(--radius); background: var(--panel); touch-action: none; width: 100%; height: 150px; }
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  background: var(--ink);
  color: var(--hi-vis);
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: .9rem;
  z-index: 40;
  max-width: 92vw;
}

@media (max-width: 860px) {
  .hero-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .topbar { gap: 8px 12px; padding: 9px 12px; }
  .nav { gap: 12px; }
  .nav a { font-size: .84rem; }
  .who { display: none; }
  .demo-banner { padding: 8px 12px; font-size: .84rem; }
  .wrap { padding: 18px 14px 48px; }
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.85rem; }
  table.grid thead { display: none; }
  table.grid, table.grid tbody, table.grid tr, table.grid td { display: block; width: 100%; }
  table.grid { border: 0; }
  table.grid tr { border: 1px solid var(--ink); border-radius: var(--radius); margin-bottom: 10px; background: var(--panel); }
  table.grid tr:nth-child(even) { background: var(--band); }
  table.grid td { border: 0; padding: 3px 12px; }
  table.grid td:first-child { padding-top: 8px; }
  table.grid td:last-child { padding-bottom: 8px; }
  table.grid td::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-family: var(--mono);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    display: inline-block;
    min-width: 96px;
  }
}
