:root {
  --ink: #101113;
  --muted: #65676b;
  --surface: #fff;
  --soft: #f5f2ec;
  --line: #d9d8d4;
  --accent: #007c91;
  --accent-dark: #005a69;
  --danger: #a22732;
  --radius: 12px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { background: var(--surface); }
body { margin: 0; min-width: 320px; line-height: 1.55; overflow-wrap: anywhere; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button, .button, input, select { min-height: 44px; }
select:not([multiple]) { height: 44px; }
select[multiple] { min-height: 8rem; }
input[type="checkbox"] { width: 44px; height: 44px; min-height: 44px; flex: 0 0 44px; }
input, select, textarea { width: 100%; padding: .72rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
:focus-visible { outline: 3px solid #00a5bd; outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; background: #fff; padding: .8rem; }
.skip-link:focus { top: 1rem; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: 1rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); font-weight: 760; text-decoration: none; min-width: 0; }
.site-header nav { display: none; gap: .3rem 1rem; align-items: center; }
.site-header nav.open { display: flex; position: absolute; inset: 4.5rem 1rem auto; padding: 1rem; background: var(--soft); border-radius: var(--radius); flex-direction: column; align-items: stretch; z-index: 2; }
.nav-toggle, .button, button { border: 0; border-radius: 8px; padding: .65rem 1rem; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.nav-toggle, .button.primary { color: #fff; background: var(--accent); }
.button.danger { color: #fff; background: var(--danger); }
.link-button { background: transparent; color: inherit; text-decoration: underline; }
.page-shell { width: min(1180px, 100%); margin: 0 auto; padding: clamp(1.25rem, 4vw, 3rem); }
.vehicle-return { margin-bottom: 1rem; }
.vehicle-return .button { max-width: 100%; }
.page-heading { margin-bottom: 2rem; }
.page-heading-with-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 7vw, 4rem); margin: .25rem 0; }
.eyebrow { color: var(--accent-dark); font-weight: 750; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.card, .auth-card { border-radius: var(--radius); background: var(--soft); padding: clamp(1rem, 3vw, 2rem); }
.vehicle-card { overflow: hidden; padding: 0; }
.vehicle-card-body { padding: clamp(1rem, 3vw, 2rem); }
.vehicle-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr)); gap: 1rem; }
.photo-actions { margin-top: 1rem; }
.photo-dialog { width: min(58rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius); }
.photo-dialog::backdrop { background: rgb(16 17 19 / .72); }
.photo-dialog-image { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 16rem); margin-inline: auto; object-fit: contain; }
.image-preview { display: grid; gap: .75rem; justify-items: start; }
.image-preview img { max-width: min(100%, 32rem); max-height: 24rem; border-radius: var(--radius); object-fit: contain; }
.confirmation-check { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; }
.confirmation-check input, fieldset label input[type="checkbox"] { width: auto; min-width: 44px; }
[data-formset-form] { padding-block: .5rem; border-bottom: 1px solid var(--line); }
.auth-card { max-width: 32rem; margin: 8vh auto; }
.stack { display: grid; gap: 1rem; }
.workshop-search-label { display: block; margin-top: .5rem; font-weight: 650; }
.workshop-search { margin-block: .35rem .65rem; }
.grid { display: grid; gap: 1rem; }
.quick-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.document-filters { margin-bottom: 1rem; align-items: end; }
.document-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); gap: 1rem; }
.document-card { display: grid; align-content: space-between; gap: 1rem; min-width: 0; }
.document-card h2, .document-metadata dd { overflow-wrap: anywhere; }
.document-metadata { display: grid; gap: .7rem; margin: 0; }
.document-metadata div { display: grid; grid-template-columns: minmax(6rem, .4fr) minmax(0, 1fr); gap: .75rem; }
.document-metadata dt { color: var(--muted); font-weight: 700; }
.document-metadata dd { margin: 0; }
.document-actions .button { flex: 1 1 8rem; }
.empty-state { grid-column: 1 / -1; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.muted { color: var(--muted); }
fieldset { min-width: 0; border: 1px solid var(--line); }
.errorlist { color: var(--danger); }
.error-summary, .message.error { border-left: 4px solid var(--danger); background: #fff1f2; padding: 1rem; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem; border-bottom: 1px solid var(--line); text-align: left; }
.status { display: inline-flex; gap: .35rem; align-items: center; padding: .2rem .6rem; border: 1px solid currentColor; border-radius: 999px; }
.status-due { color: var(--danger); }
.status-due_soon { color: #765700; }
.status-not_assessable { color: #4f5860; }
@media (max-width: 420px) {
  .site-header { align-items: flex-start; }
  .wordmark { max-width: 12rem; }
  .page-shell { padding-inline: 1rem; }
}
@media (min-width: 850px) {
  .nav-toggle { display: none; }
  .site-header nav, .site-header nav.open { display: flex; position: static; padding: 0; background: transparent; flex-direction: row; }
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media print {
  .site-header, .nav-toggle, .button, button { display: none !important; }
  .page-shell { width: auto; padding: 0; }
}
