/* Kwik Fleet
   Look: a poured-concrete ground, white sheets, ink-black type, Kwik red kept for the logo and for
   anything overdue. Status colours come off Irish road signs (green, warning amber). Anything that
   comes from the official record carries the blue band of a number plate. One typeface (Archivo),
   squeezed narrow for headings like lettering on a sign, normal width for reading. */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(../vendor/fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(../vendor/fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
  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 {
  --ground: #e6e8e9;
  --ground-2: #d9dcde;
  --sheet: #ffffff;
  --ink: #14171a;
  --ink-2: #4b5158;
  --ink-3: #747b83;
  --line: #d0d4d7;
  --line-2: #e4e6e8;
  --kwik: #d5001c;
  --late: #d5001c;
  --late-bg: #fdecee;
  --soon: #f2b600;
  --soon-ink: #6b4e00;
  --soon-bg: #fff6d6;
  --ok: #00704a;
  --ok-bg: #e2f2eb;
  --official: #003399;
  --asphalt: #2b2f33;
  --r-plate: 4px;
  --r-ctl: 7px;
  --r-sheet: 12px;
  --shadow: 0 1px 0 rgba(20, 23, 26, 0.06), 0 10px 24px -14px rgba(20, 23, 26, 0.28);
  --font: 'Archivo Variable', 'Archivo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --bar-h: 60px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 15.5px/1.5 var(--font); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.02; font-weight: 780; font-stretch: 68%; letter-spacing: -0.005em; }
h2 { font-size: 22px; line-height: 1.15; font-weight: 740; font-stretch: 72%; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 680; font-stretch: 88%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; line-height: 1.45; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--official); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- frame ---------- */
.bar {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  display: flex; align-items: center; gap: 20px; padding: 0 clamp(14px, 3vw, 32px);
  background: var(--sheet); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand span { font-weight: 760; font-stretch: 70%; font-size: 23px; line-height: 1; padding-left: 10px; border-left: 2px solid var(--ink); }
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a {
  display: flex; align-items: center; gap: 8px; height: var(--bar-h); padding: 0 14px; text-decoration: none;
  font-weight: 560; font-stretch: 92%; color: var(--ink-2); border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.nav a svg { width: 19px; height: 19px; flex: none; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--ink); }
.nav .count { background: var(--late); color: #fff; font-size: 12px; font-weight: 700; border-radius: 9px; padding: 0 6px; line-height: 18px; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-text { text-align: right; line-height: 1.2; min-width: 0; }
.who-text b { display: block; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text span { font-size: 13px; color: var(--ink-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; object-fit: cover; }

main:focus { outline: none; }
main { max-width: 1240px; margin: 0 auto; padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 32px) 96px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head p { color: var(--ink-2); margin-top: 6px; max-width: 62ch; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; background: var(--sheet); border-top: 1px solid var(--line);
    justify-content: space-around; padding-bottom: env(safe-area-inset-bottom);
  }
  .nav a { flex-direction: column; gap: 3px; height: 58px; padding: 0 6px; font-size: 12px; flex: 1; justify-content: center; border-bottom: 0; position: relative; }
  .nav a[aria-current='page'] { border-top-color: var(--ink); }
  .nav .count { position: absolute; top: 6px; left: calc(50% + 6px); }
  .who-text { display: none; }
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px;
  border: 1.5px solid var(--ink); border-radius: var(--r-ctl); background: var(--sheet); color: var(--ink);
  font-weight: 620; font-stretch: 92%; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--ground); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-main { background: var(--ink); color: #fff; }
.btn-main:hover { background: #2a2f34; }
.btn-quiet { border-color: transparent; background: transparent; padding-inline: 10px; }
.btn-quiet:hover { background: var(--ground-2); }
.btn-danger { border-color: var(--late); color: var(--late); }
.btn-sm { min-height: 34px; padding: 4px 11px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; cursor: default; }

label.field { display: block; }
label.field > span, .field-label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
label.field small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 4px; }
input[type='text'], input[type='email'], input[type='number'], input[type='date'], input[type='search'], select, textarea {
  width: 100%; min-height: 42px; padding: 8px 11px; background: var(--sheet); border: 1.5px solid #9aa0a6; border-radius: var(--r-ctl);
}
textarea { min-height: 92px; resize: vertical; line-height: 1.45; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--official); outline-offset: 0; border-color: var(--official); }
.form { display: grid; gap: 14px; }
.form-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  min-height: 38px; padding: 5px 13px; border-radius: 19px; border: 1.5px solid var(--line); background: var(--sheet); cursor: pointer;
  font-weight: 560; font-stretch: 92%; display: inline-flex; align-items: center; gap: 7px;
}
.seg button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg button b { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- number plate ---------- */
.plate {
  display: inline-flex; align-items: stretch; vertical-align: middle; background: #f8f8f5; color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-plate); overflow: hidden; line-height: 1; white-space: nowrap;
  font-weight: 780; font-stretch: 84%; letter-spacing: 0.03em; font-variant-numeric: lining-nums;
}
.plate-eu { background: var(--official); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-size: 0.42em; font-weight: 700; letter-spacing: 0; padding: 0 0.32em 0.28em; gap: 0.2em; }
.plate-eu i { width: 0.95em; height: 0.95em; border-radius: 50%; border: 0.16em dotted #ffcc00; }
.plate-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.14em 0.42em 0.16em; }
.plate-county { font-size: 0.3em; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.12em; font-stretch: 100%; }
.plate-sm { font-size: 15px; border-width: 1.5px; }
.plate-sm .plate-county { display: none; }
.plate-sm .plate-main { padding: 0.24em 0.42em; }
.plate-md { font-size: 21px; }
.plate-lg { font-size: clamp(30px, 5vw, 46px); border-width: 3px; border-radius: 6px; }

/* ---------- status ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 4px; font-size: 13px; font-weight: 640; line-height: 1.5; white-space: nowrap; background: var(--ground); }
.tag-late { background: var(--late); color: #fff; }
.tag-soon { background: var(--soon); color: #2b2000; }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-none { background: var(--ground); color: var(--ink-2); }
.tag-line { background: transparent; border: 1.5px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 2px; background: var(--ink-3); flex: none; display: inline-block; }
.dot.late { background: var(--late); } .dot.soon { background: var(--soon); } .dot.ok { background: var(--ok); } .dot.none { background: transparent; border: 1.5px dashed var(--ink-3); }

.sheet { background: var(--sheet); border-radius: var(--r-sheet); box-shadow: var(--shadow); }
.sheet-pad { padding: clamp(16px, 2.2vw, 24px); }
.sheet > h2, .sheet-pad > h2 { margin-bottom: 14px; }
.note { padding: 12px 14px; border-radius: 8px; background: var(--soon-bg); color: var(--soon-ink); border-left: 5px solid var(--soon); }
.note-late { background: var(--late-bg); color: #7a0010; border-left-color: var(--late); }
.note-plain { background: var(--ground); color: var(--ink-2); border-left-color: var(--ink-3); }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ---------- today: the road ahead ---------- */
.road { background: var(--asphalt); color: #fff; border-radius: var(--r-sheet); padding: 18px clamp(14px, 2.4vw, 26px) 14px; margin-bottom: 22px; overflow: hidden; }
.road-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.road-top h2 { color: #fff; }
.road .seg button { background: transparent; color: #cfd3d6; border-color: #555b61; min-height: 32px; padding: 2px 11px; font-size: 14px; }
.road .seg button[aria-pressed='true'] { background: #fff; color: var(--ink); border-color: #fff; }
.lane { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; align-items: end; height: 150px; padding-top: 8px; }
.wk { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 3px; height: 100%; background: none; border: 0; padding: 0; cursor: pointer; min-width: 0; position: relative; }
.wk i { display: block; height: 9px; border-radius: 2px; background: #f4f4f1; flex: none; }
.wk i.soon { background: var(--soon); } .wk i.late { background: #ff4a5f; }
.wk .more { font-size: 11px; line-height: 1; text-align: center; color: #cfd3d6; font-style: normal; height: auto; background: none; }
.wk:hover i, .wk[aria-pressed='true'] i { outline: 2px solid #fff; outline-offset: -1px; }
.wk[aria-pressed='true']::after { content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 3px; background: #fff; }
.wk.behind { margin-right: 10px; }
.centre-line { height: 3px; margin: 10px 0 6px; background: repeating-linear-gradient(90deg, #f4f4f1 0 22px, transparent 22px 40px); opacity: 0.55; }
.lane-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; font-size: 12px; color: #cfd3d6; }
.lane-labels span { white-space: nowrap; overflow: visible; min-width: 0; }
.lane-labels .behind { margin-right: 10px; color: #ff8c99; font-weight: 600; }
.road-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #cfd3d6; margin-top: 12px; }
.road-key span { display: inline-flex; align-items: center; gap: 6px; }
.road-key i { width: 14px; height: 9px; border-radius: 2px; background: #f4f4f1; display: inline-block; }

.cols { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 980px) { .cols { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .rows .row { grid-template-columns: minmax(0, 1fr) auto; }
  .rows .row > .plate, .rows .row > .tag { justify-self: start; }
  .rows .row > .row-main { grid-column: 1 / -1; grid-row: 2; }
  .lane-labels { font-size: 11px; }
  .lane-labels .behind { margin-right: 6px; } .wk.behind { margin-right: 6px; }
}
.stack { display: grid; gap: 22px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-top: 1px solid var(--line-2); }
.rows > li:first-child { border-top: 0; }
.row { display: grid; grid-template-columns: 118px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 11px 4px; text-decoration: none; }
a.row:hover, button.row:hover { background: var(--ground); }
button.row { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; }
.row-main { min-width: 0; }
.row-main b { font-weight: 640; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main span { color: var(--ink-2); font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { text-align: right; white-space: nowrap; }
.row-end b { display: block; font-weight: 680; }
.row-end span { color: var(--ink-2); font-size: 13.5px; }
.row-end .late { color: var(--late); }
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.list-head a { font-weight: 600; font-size: 14px; }

.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.figures div { padding: 4px 12px 4px 0; }
.figures div + div { border-left: 1px solid var(--line-2); padding-left: 14px; }
.figures b { display: block; font-size: 30px; line-height: 1.05; font-weight: 760; font-stretch: 72%; font-variant-numeric: tabular-nums; }
.figures span { font-size: 13.5px; color: var(--ink-2); }

/* ---------- fleet ---------- */
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tools input[type='search'] { max-width: 300px; flex: 1 1 220px; }
.tools select { width: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.card { display: block; text-decoration: none; background: var(--sheet); border-radius: var(--r-sheet); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.card:hover { box-shadow: 0 0 0 2px var(--ink), var(--shadow); }
.card-pic { aspect-ratio: 9 / 5; background: linear-gradient(#f2f3f3, #dfe2e4); display: grid; place-items: center; position: relative; }
.card-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card-flag { position: absolute; top: 10px; left: 10px; }
.card-body { padding: 12px 14px 13px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .driver { color: var(--ink-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pips { display: flex; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.pips span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- vehicle ---------- */
.stage { position: relative; height: clamp(300px, 46vw, 520px); border-radius: var(--r-sheet); overflow: hidden; background: radial-gradient(120% 90% at 50% 8%, #f6f7f7 0%, #e3e6e8 42%, #bfc4c8 100%); }
.stage-view { position: absolute; inset: 0; }
.stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage-id { position: absolute; left: clamp(14px, 2.4vw, 26px); bottom: clamp(14px, 2.4vw, 22px); pointer-events: none; display: grid; gap: 8px; justify-items: start; }
.stage-id h1 { font-size: clamp(24px, 3.6vw, 38px); }
.stage-id p { color: var(--ink-2); }
.stage-hint { position: absolute; right: 14px; top: 12px; font-size: 13px; color: var(--ink-2); background: rgba(255, 255, 255, 0.7); padding: 3px 9px; border-radius: 12px; pointer-events: none; }
.stage-back { position: absolute; left: 12px; top: 12px; }
.stage-flat { display: grid; place-items: center; height: 100%; color: var(--ink-2); padding: 20px; text-align: center; }
@media (max-width: 760px) {
  /* on a phone the vehicle gets the top of the stage to itself and the plate sits underneath */
  .stage { height: auto; }
  .stage-view { position: relative; inset: auto; height: 250px; }
  .stage-id { position: static; padding: 0 16px 18px; }
}

.dates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 22px; }
@media (max-width: 980px) { .dates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .dates { grid-template-columns: 1fr; } }
.date { background: var(--sheet); border-radius: var(--r-sheet); box-shadow: var(--shadow); display: grid; grid-template-columns: 26px minmax(0, 1fr); overflow: hidden; min-height: 118px; }
.date-band { background: var(--ground-2); color: var(--ink-2); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
.date-band span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.date.official .date-band { background: var(--official); color: #fff; }
.date-body { padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.date-body h3 { font-weight: 600; color: var(--ink-2); font-size: 14px; }
.date-body .when { font-size: 25px; line-height: 1.1; font-weight: 760; font-stretch: 74%; font-variant-numeric: tabular-nums; }
.date-body .left { font-weight: 640; }
.date.late .left { color: var(--late); } .date.soon .left { color: var(--soon-ink); } .date.ok .left { color: var(--ok); }
.date.late { box-shadow: inset 0 -4px 0 var(--late), var(--shadow); } .date.soon { box-shadow: inset 0 -4px 0 var(--soon), var(--shadow); }
.date-body .src { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }

dl.facts { display: grid; grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.6fr); margin: 0; }
dl.facts dt, dl.facts dd { padding: 8px 0; border-top: 1px solid var(--line-2); margin: 0; }
dl.facts dt { color: var(--ink-2); }
dl.facts dt:first-of-type, dl.facts dd:first-of-type { border-top: 0; }
dl.facts dd { font-weight: 560; overflow-wrap: anywhere; }
.swatch { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); vertical-align: -1px; margin-right: 6px; }

/* ---------- jobs ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.lanecol { background: var(--ground-2); border-radius: var(--r-sheet); padding: 10px; min-height: 120px; }
.lanecol > h2 { font-size: 17px; padding: 4px 6px 10px; display: flex; justify-content: space-between; }
.lanecol > h2 span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.job { display: block; width: 100%; text-align: left; background: var(--sheet); border: 0; border-radius: 9px; padding: 11px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: 0 1px 0 rgba(20, 23, 26, 0.08); border-left: 5px solid var(--line); }
.job:hover { box-shadow: 0 0 0 2px var(--ink); }
.job.urgent { border-left-color: var(--soon); } .job.off_road { border-left-color: var(--late); }
.job-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.job b { display: block; font-weight: 640; line-height: 1.3; }
.job .meta { color: var(--ink-2); font-size: 13.5px; margin-top: 3px; }
@media (max-width: 980px) {
  .board { grid-template-columns: 1fr; }
  .board .lanecol { display: none; }
  .board .lanecol.on { display: block; }
}
.board-tabs { display: none; margin-bottom: 12px; }
@media (max-width: 980px) { .board-tabs { display: flex; } }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 6px; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.timeline b { font-weight: 640; }
.timeline span { color: var(--ink-2); font-size: 13.5px; }
.timeline p { margin-top: 2px; white-space: pre-wrap; }

/* ---------- check a reg ---------- */
.plate-entry { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin-bottom: 22px; }
.plate-box { display: flex; align-items: stretch; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; background: #f8f8f5; flex: 0 1 430px; min-width: 0; }
.plate-box .plate-eu { font-size: 15px; padding: 0 9px 8px; }
.plate-box input { border: 0; background: transparent; min-height: 66px; font-size: clamp(28px, 6vw, 40px); font-weight: 780; font-stretch: 84%; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 14px; border-radius: 0; min-width: 0; }
.plate-box input::placeholder { color: #b9bdc0; }
.plate-box input:focus-visible { outline: 0; }
.plate-box:focus-within { outline: 3px solid var(--official); outline-offset: 2px; }
.plate-entry .btn { min-height: 72px; padding-inline: 26px; font-size: 18px; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 620; font-stretch: 92%; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--ink); }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 6px 10px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t td select { min-height: 36px; padding: 4px 8px; width: auto; }
.scroll-x { overflow-x: auto; }
.rule { border-top: 1px solid var(--line-2); padding: 18px 0; display: grid; gap: 14px; }
.rule:first-of-type { border-top: 0; padding-top: 0; }
.rule-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--ground); border-radius: 15px; padding: 3px 5px 3px 11px; font-weight: 600; font-size: 14px; }
.chip button { border: 0; background: none; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; line-height: 1; font-size: 16px; color: var(--ink-2); }
.chip button:hover { background: var(--line); color: var(--ink); }
.chips input { width: 92px; min-height: 34px; padding: 4px 8px; }
.people-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.switch i { width: 46px; height: 26px; border-radius: 13px; background: #9aa0a6; position: relative; flex: none; transition: background 0.15s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--official); outline-offset: 2px; }
.progress { height: 10px; border-radius: 5px; background: var(--ground-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--official); width: 0; transition: width 0.3s; }

/* ---------- dialog + toast ---------- */
dialog { border: 0; padding: 0; border-radius: 14px; width: min(640px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5); color: var(--ink); }
dialog::backdrop { background: rgba(20, 23, 26, 0.55); }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.dlg-body { padding: 16px 22px 8px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 22px 20px; position: sticky; bottom: 0; background: var(--sheet); }
.x { border: 0; background: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 24px; line-height: 1; color: var(--ink-2); flex: none; }
.x:hover { background: var(--ground); color: var(--ink); }
.err { color: var(--late); font-weight: 600; }
#toasts { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 9px; font-weight: 560; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5); }
.toast.bad { background: var(--late); }

/* ---------- sign in ---------- */
.door { min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.4fr); background: var(--sheet); }
.door-side { padding: clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 560px; }
.door-side img { height: 44px; width: auto; align-self: flex-start; }
.door-side h1 { font-size: clamp(44px, 7vw, 76px); }
.door-side p { color: var(--ink-2); font-size: 17px; max-width: 40ch; }
.door-stage { position: relative; background: radial-gradient(120% 90% at 50% 8%, #fafafa 0%, #e9ebec 45%, #c9cdd0 100%); min-height: 300px; }
.door-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.door-dev { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .door { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .door-stage { min-height: 280px; order: -1; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .bar, .nav, .head-actions, #toasts { display: none !important; } body { background: #fff; } }
