:root {
  --bench: #e3e6eb;
  --card: #f6f7f9;
  --ink: #171a1f;
  --muted: #5c6570;
  --line: #c5ccd4;
  --red: #9d1c1c;
  --green: #0c6a4c;
  --amber: #8d5b10;
  --slate: #3a4654;
  --link: #184a86;
  --focus: #184a86;
  color-scheme: light;
  font-family: "Schibsted Grotesk", "Avenir Next", sans-serif;
  color: var(--ink);
  background: var(--bench);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
button {
  background: var(--ink);
  color: white;
  border: 0;
  border-radius: 4px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
img { max-width: 100%; height: auto; }

.top {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  padding: 0.85rem 1.25rem;
  background: var(--ink);
  color: #f4f5f7;
}
.brand {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: white;
  text-decoration: none;
}
.brand-note { margin: 0; color: #c5ccd4; font-size: 0.92rem; flex: 1; }
.top nav { display: flex; gap: 1rem; }
.top a { color: white; }
main { padding: 1.25rem; max-width: 1180px; margin: 0 auto; }

.panel, .controls, .spread, .human, .login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}
.controls, .filters, .run-pick { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.settings, .upload, .human { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
input, select, textarea {
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.4rem 0.5rem;
  min-width: 6rem;
}
input[name="model"] { min-width: 18rem; }
.run-pick select { min-width: min(42rem, 100%); }
textarea { min-width: 16rem; }
.notes { flex: 1; }

table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.id, .id-large { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; }
.id-large { font-size: 1.4rem; margin: 0; }
.reason { max-width: 42rem; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.chip, .stamp {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chip { display: inline-block; padding: 0.1rem 0.4rem; border: 1px solid currentColor; }
.stamp {
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 3px double currentColor;
  transform: rotate(-2deg);
  font-size: 1.35rem;
}
.FULL { color: var(--green); }
.PARTIAL { color: var(--red); }
.NONE { color: var(--slate); }
.NEEDS_REVIEW { color: var(--amber); }
.stamps { display: flex; gap: 0.8rem; align-items: center; }
.vehicle-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin: 0.5rem 0 1rem; }
.reason-block { font-size: 1.05rem; max-width: 46rem; }
.meta, .hint, .lede, .eyebrow { color: var(--muted); }
.back { margin-top: 0; }

.spread { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr); gap: 1rem; margin: 1rem 0; }
figure { margin: 0; }
figcaption, .note { color: var(--muted); font-size: 0.85rem; }
.entry { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.entry.late { background: #fdecec; padding-left: 0.5rem; }
.entry.missed { background: #f4efe4; }
.entry.low { box-shadow: inset 3px 0 0 var(--amber); }
.entry header { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }
.entry h2, .section { font-size: 1rem; margin: 0; }
.entry dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; margin: 0.4rem 0; }
.entry dt { color: var(--muted); font-size: 0.75rem; }
.entry dd { margin: 0; }
.entry form { display: flex; gap: 0.35rem; }
.entry button { background: white; color: var(--ink); border: 1px solid var(--line); }
.entry button.on { background: var(--ink); color: white; }
.conf { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.conf.high { color: var(--green); }
.conf.medium, .conf.low { color: var(--amber); }
.title-read { font-weight: 600; }

.banner, .progress { background: #fff6e8; border: 1px solid #e4c98a; padding: 0.6rem 0.8rem; border-radius: 6px; }
.empty { color: var(--muted); }
.report-head h1 { font-family: "Barlow Condensed", sans-serif; font-size: 2.4rem; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 0; }
.panel { margin: 1rem 0; }
.panel h2 { margin-top: 0; font-size: 1.05rem; }
.links { display: flex; gap: 1rem; }

.login-body { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(26rem, calc(100% - 2rem)); display: grid; gap: 0.75rem; }
.login-card h1 { font-family: "Barlow Condensed", sans-serif; font-size: 2.6rem; text-transform: uppercase; margin: 0; letter-spacing: 0.03em; }
.login-card label { display: grid; }
.check { grid-auto-flow: column; justify-content: start; align-items: center; color: var(--ink); }

@media (max-width: 800px) {
  .top { flex-wrap: wrap; }
  .spread, .vehicle-head, .entry dl { grid-template-columns: 1fr; display: grid; }
  .vehicle-head { align-items: start; }
  .stamp { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .stamp { transform: none; }
}
