:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #111820;
  --ink-2: #2c3644;
  --muted: #57616f;
  --line: #d8dee6;
  --line-strong: #b9c2cd;
  --brand: #17324d;
  --brand-ink: #ffffff;
  --accent: #f2a20c;
  --accent-ink: #221703;
  --ok: #17693b;
  --ok-bg: #e6f4ec;
  --warn: #8a5200;
  --warn-bg: #fdf1dc;
  --bad: #a01f1f;
  --bad-bg: #fbe9e9;
  --muted-bg: #eef1f5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(17, 24, 32, 0.06), 0 8px 24px -18px rgba(17, 24, 32, 0.45);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
}

a { color: #14406b; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.9rem; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; letter-spacing: -0.01em; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .86rem; }
code, .mono { font-family: var(--mono); font-size: .88em; }

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

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 22px;
  background: var(--brand);
  color: var(--brand-ink);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-mark { width: 22px; height: 22px; color: var(--accent); }
.nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav a { color: #d9e3ee; text-decoration: none; font-size: .93rem; }
.nav a:hover { color: #fff; text-decoration: underline; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who { color: #c8d5e3; font-size: .86rem; }
.topbar .link { background: none; border: 0; color: #d9e3ee; cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

.demo-banner {
  background: var(--warn-bg);
  color: #4a2c00;
  border-bottom: 1px solid #eabf7c;
  padding: 9px 22px;
  font-size: .9rem;
}
.demo-banner a { color: #4a2c00; }

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

.footer {
  border-top: 1px solid var(--line);
  padding: 22px;
  color: var(--muted);
  font-size: .86rem;
  display: grid;
  gap: 8px;
  max-width: 1120px;
  margin: 0 auto;
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-entity { color: var(--muted); font-size: .8rem; }

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card > :last-child { margin-bottom: 0; }
.card-tight { padding: 14px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; 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(--line); border-radius: var(--radius); padding: 13px 15px; }
.stat-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-hint { color: var(--muted); font-size: .8rem; }

.pill, .sev {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 650;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill-ok { background: var(--ok-bg); color: var(--ok); border-color: #b7dfc9; }
.pill-warn { background: var(--warn-bg); color: var(--warn); border-color: #eccb90; }
.pill-bad { background: var(--bad-bg); color: var(--bad); border-color: #efbdbd; }
.pill-muted { background: var(--muted-bg); color: var(--muted); border-color: var(--line); }
.sev-critical { background: var(--bad); color: #fff; }
.sev-major { background: var(--warn-bg); color: var(--warn); border-color: #e0b374; }
.sev-minor { background: var(--muted-bg); color: var(--muted); border-color: var(--line); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid #d98f06;
  border-radius: 8px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #ffb422; }
.btn-sm { padding: 6px 12px; font-size: .88rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--muted-bg); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.flash { border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; }
.flash-ok { background: var(--ok-bg); color: #10492a; border: 1px solid #b7dfc9; }
.flash-error { background: var(--bad-bg); color: #7b1616; border: 1px solid #efbdbd; }
.flash-warn { background: var(--warn-bg); color: #6a3f00; border: 1px solid #eccb90; }

table.grid { width: 100%; border-collapse: collapse; background: var(--panel); }
table.grid th, table.grid td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafbfc; white-space: nowrap; }
/* 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.grid tbody tr:hover { background: #fafbfc; }
.table-card { padding: 0; overflow: hidden; }

form.stack { display: grid; gap: 12px; max-width: 560px; }
label.field { display: grid; gap: 5px; font-size: .9rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="file"], select, textarea {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  max-width: 100%;
}
textarea { min-height: 82px; resize: vertical; }
.hint { color: var(--muted); font-size: .84rem; font-weight: 400; }

/* checklist */
.check-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: var(--panel); }
.check-group > h3 { margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; font-size: .95rem; }
.check-item { display: grid; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.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: .78rem; color: var(--muted); }
.check-choices { display: flex; gap: 6px; }
.check-choices label {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: .86rem;
  cursor: pointer;
  background: #fff;
  user-select: none;
}
.check-choices input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-choices input:checked + span { font-weight: 700; }
.check-choices label:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #eef3f9; }
.check-choices label.fail:has(input:checked) { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); background: var(--bad-bg); }
.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: 6px; border: 1px solid var(--line); }

/* queue */
.queue-item { display: grid; gap: 4px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.queue-item:last-child { border-bottom: 0; }
.queue-meta { color: var(--muted); font-size: .84rem; }
.sync-trace { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); display: grid; gap: 3px; }

.bar { height: 8px; background: var(--muted-bg); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); }

/* landing */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: clamp(1.8rem, 4.6vw, 2.7rem); max-width: 22ch; }
.hero .lede { font-size: 1.1rem; color: var(--ink-2); max-width: 58ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .76rem; color: var(--muted); font-weight: 700; }
.price-tag { font-size: 2.4rem; font-weight: 750; letter-spacing: -0.03em; }
.price-tag span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.trust { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.quote { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--ink-2); font-size: .93rem; }
.quote cite { display: block; color: var(--muted); font-style: normal; font-size: .82rem; margin-top: 4px; }
.screenshot { margin: 0; }
.screenshot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.screenshot figcaption { color: var(--muted); font-size: .86rem; margin-top: 7px; }
section { margin: 34px 0; }
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: 4px; top: 8px; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); }

/* 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(--line-strong); border-radius: 8px; background: #fff; touch-action: none; width: 100%; height: 150px; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; background: var(--ink); color: #fff;
  padding: 11px 16px; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow); z-index: 40; max-width: 92vw;
}

@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 10px 14px; }
  .wrap { padding: 18px 14px 48px; }
  h1 { font-size: 1.55rem; }
  table.grid thead { display: none; }
  table.grid, table.grid tbody, table.grid tr, table.grid td { display: block; width: 100%; }
  table.grid tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.grid td { border: 0; padding: 3px 12px; }
  table.grid td::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    display: inline-block;
    min-width: 96px;
  }
}
