/* =====================================================================
   App styles — Direction A "לוח הכרטיסים".
   Colours/sizes come from tokens.css only. RTL: logical properties (inline-start = right).
   Sections: base · type · buttons · inputs · chips/pills · A objects (plate, stamp, hazard, fuel card)
             · integrity · shell · generic blocks · tables · dialogs/sheets · toast · auth · responsive
   ===================================================================== */

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: var(--ink); text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: color-mix(in srgb, var(--amber) 45%, transparent); color: var(--ink); }

:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-small); }
.caption { font-size: var(--fs-caption); }
.eyebrow { font: 600 11px/1.2 var(--font-sans); letter-spacing: .08em; color: var(--ink-3); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
kbd, .kbd {
  font: 500 11px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px;
  background: rgba(0, 0, 0, .12); box-shadow: 0 -1px 0 rgba(0, 0, 0, .18) inset; color: inherit;
}

/* ---------------------------------------------------------------- type */
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font: 700 var(--fs-h1)/1.05 var(--font-display); letter-spacing: .01em; }
h2 { font-size: 17px; font-weight: var(--fw-semibold); }
h3 { font-size: var(--fs-body); font-weight: var(--fw-semibold); }
/* display headings: every "plate" title in the app */
.card__head h2, .page-head h2, .page-head h1, .modal__head h2, .plate__title, .display {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2-display); line-height: 1.05; letter-spacing: .01em;
}
.page-head h2, .page-head h1 { font-size: 36px; }
p { margin: 0 0 .5em; }
p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 40px; padding: 0 var(--sp-4);
  border: 0; border-radius: var(--radius-ctl);
  background: var(--plate); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 1px 0 var(--plate-hi) inset, 0 1px 2px rgba(0, 0, 0, .05);
  font: inherit; font-size: 14px; font-weight: var(--fw-semibold); line-height: 1.1; white-space: nowrap;
  cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: transform .14s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s;
}
.btn:hover { background: var(--plate-2); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg.icon { width: 18px; height: 18px; }

/* primary = amber (the A signature action) */
.btn--primary, .btn--amber {
  background: var(--amber); color: var(--amber-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 -2px 0 rgba(0, 0, 0, .14) inset, 0 2px 6px -2px rgba(150, 100, 0, .55);
}
.btn--primary:hover, .btn--amber:hover { background: var(--amber-2); }
.btn--ink { background: var(--ink); color: var(--bg); box-shadow: 0 -2px 0 rgba(0, 0, 0, .25) inset; }
.btn--ink:hover { background: color-mix(in srgb, var(--ink) 88%, var(--bg)); }
.btn--signal { background: var(--signal); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 -2px 0 rgba(0, 0, 0, .18) inset, 0 3px 8px -3px rgba(180, 50, 0, .6); }
.btn--signal:hover { background: var(--signal-2); }
.btn--danger { color: var(--signal-ink); background: var(--signal-bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--signal) 40%, transparent) inset; }
.btn--danger:hover { background: color-mix(in srgb, var(--signal) 20%, var(--plate)); }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--plate-2); }
.btn--sm { min-height: 34px; padding: 0 var(--sp-3); font-size: var(--fs-small); border-radius: 7px; }
.btn--sm svg.icon { width: 16px; height: 16px; }
.btn--block { width: 100%; }
.btn--scan { height: 40px; padding: 0 14px 0 12px; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: var(--radius-ctl);
  background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--plate-2); color: var(--ink); }
.icon-btn svg.icon { width: 19px; height: 19px; }

/* ---------------------------------------------------------------- inputs */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field__label { font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--ink-2); }
.input, .select {
  min-height: var(--touch-min); width: 100%; padding: 0 var(--sp-3);
  border: 0; border-radius: var(--radius-ctl);
  background: var(--plate-2); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 1px 2px rgba(0, 0, 0, .04) inset;
  font: inherit; font-size: 14.5px;
  transition: box-shadow .15s, background-color .15s;
}
textarea.input { padding-block: 10px; line-height: 1.5; }
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover, .select:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 32%, transparent) inset; }
.input:focus, .select:focus, .input:focus-visible, .select:focus-visible {
  outline: none; border-radius: var(--radius-ctl); background-color: var(--plate); box-shadow: 0 0 0 2px var(--amber) inset, 0 0 0 4px color-mix(in srgb, var(--amber) 22%, transparent);
}
.input[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--signal) inset; }
.input.mono { letter-spacing: .02em; }
.select {
  appearance: none; -webkit-appearance: none; padding-inline-end: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A827B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-size: 16px 16px; background-repeat: no-repeat; background-position: left 11px top 50%;
}
.select option { background: var(--plate); color: var(--ink); }
.input-wrap { position: relative; }
/* physical left: the app is always RTL, and some inputs are dir=ltr (numbers, passwords) */
.input-wrap .input { padding-left: 44px; }
.input-wrap .input-btn { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); }
.check { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-small); color: var(--ink-2); cursor: pointer; min-height: var(--touch-min); }
.check input, input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }
.check input { width: 18px; height: 18px; }

/* segmented control (the prototype's .choice) */
.seg {
  display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 10px;
  background: var(--plate-2); box-shadow: 0 0 0 1px var(--line) inset;
}
.seg button {
  min-height: 38px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent;
  font: inherit; font-weight: var(--fw-medium); color: var(--ink-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background-color .15s, color .15s, box-shadow .15s, transform .15s var(--spring);
}
.seg button:hover { color: var(--ink); background: color-mix(in srgb, var(--plate) 60%, transparent); }
.seg button:active { transform: scale(.96); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.seg button[data-fuel="diesel"][aria-pressed="true"] { background: linear-gradient(180deg, var(--card-d-top), var(--card-d-bot)); color: #ECE6D7; box-shadow: inset 0 -3px 0 var(--amber), 0 1px 2px rgba(0, 0, 0, .25); }
.seg button[data-fuel="petrol"][aria-pressed="true"] { background: linear-gradient(180deg, var(--card-p-top), var(--card-p-bot)); color: #F2FFF8; box-shadow: inset 0 -3px 0 var(--mint), 0 1px 2px rgba(0, 0, 0, .25); }

/* ---------------------------------------------------------------- swatches, chips, pills, badges */
/* mini card swatch: body colour + band colour — the fuel type at a glance */
.sw { width: 14px; height: 9px; border-radius: 2px; flex: none; display: inline-block; vertical-align: middle; }
.sw--diesel, .sw.d { background: linear-gradient(180deg, var(--card-d-top) 0 62%, var(--amber) 62%); }
.sw--petrol, .sw.p { background: linear-gradient(180deg, #14A574 0 62%, var(--mint) 62%); }
.sw--empty { background: linear-gradient(180deg, #8E9590 0 62%, #C9CCC6 62%); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 7px 2px 6px;
  border-radius: var(--radius-tag); background: var(--plate); color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  font-size: 12.5px; font-weight: var(--fw-medium); line-height: 1.2; white-space: nowrap; text-decoration: none;
  transition: background-color .15s, box-shadow .15s, transform .15s var(--spring);
}
.chip .sw { width: 11px; height: 7px; }
.chip .mono { font-size: 12px; font-weight: var(--fw-medium); color: var(--ink); letter-spacing: .01em; }
.chip .mono .pre { color: var(--ink-3); }
.chip .letter { display: none; }
.chip svg.icon { width: 14px; height: 14px; }
.chip--unknown { color: var(--signal-ink); background: var(--signal-bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--signal) 35%, transparent) inset; }
a.chip:hover { background: var(--plate-2); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 35%, transparent) inset; transform: translateY(-1px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 8px;
  border-radius: var(--radius-tag); font-size: 11.5px; font-weight: var(--fw-semibold); line-height: 1.2; white-space: nowrap;
  background: var(--plate-2); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line) inset;
}
.pill svg.icon { width: 13px; height: 13px; }
.pill--ok { background: var(--ok-bg); color: var(--ok-c); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok-c) 22%, transparent) inset; }
.pill--warn { background: var(--amber-bg); color: var(--amber-text); box-shadow: 0 0 0 1px color-mix(in srgb, var(--amber) 30%, transparent) inset; }
.pill--warn-strong { background: var(--amber); color: var(--amber-ink); box-shadow: 0 -1px 0 rgba(0, 0, 0, .12) inset; }
.pill--bad { background: var(--signal); color: #fff; box-shadow: none; }
.pill--neutral { background: transparent; color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.pill--muted { background: var(--plate-2); color: var(--ink-3); }
.pill--info { background: var(--plate-2); color: var(--ink); }
.pill--role { background: var(--plate-2); color: var(--ink-2); }
.pill--role-admin { background: var(--ink); color: var(--bg); box-shadow: none; }
.pill--role-editor { background: var(--amber-bg); color: var(--amber-text); }
.pill--role-disabled { background: var(--signal-bg); color: var(--signal-ink); }
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: var(--radius-tag); background: var(--plate-2); color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line) inset;
  font: 600 12.5px/1 var(--font-mono);
}
.badge--signal { background: var(--signal); color: #fff; box-shadow: none; border-radius: 12px; }
.split .d { color: var(--diesel); font-weight: var(--fw-semibold); }
.split .p { color: var(--petrol); font-weight: var(--fw-semibold); }
.age { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.dot--warn { background: var(--warn); }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-c); flex: none; animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok-c) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------------------------------------------------------------- A objects: plate (bolted zone) */
.plate { position: relative; background: var(--plate); border-radius: var(--radius-card); box-shadow: var(--shadow-plate); min-width: 0; }
.plate--screws::before {
  content: ""; position: absolute; inset: 7px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 3px 3px, var(--screw) 0 2px, transparent 2.6px) top right / 6px 6px no-repeat,
    radial-gradient(circle at 3px 3px, var(--screw) 0 2px, transparent 2.6px) top left / 6px 6px no-repeat,
    radial-gradient(circle at 3px 3px, var(--screw) 0 2px, transparent 2.6px) bottom right / 6px 6px no-repeat,
    radial-gradient(circle at 3px 3px, var(--screw) 0 2px, transparent 2.6px) bottom left / 6px 6px no-repeat;
}
.plate__head { display: flex; align-items: center; gap: 8px; min-height: 30px; flex-wrap: wrap; }
.plate__title { font-size: 25px; white-space: nowrap; }
.plate__count { font: 600 13px/1 var(--font-mono); color: var(--ink-2); background: var(--plate-2); box-shadow: 0 0 0 1px var(--line) inset; border-radius: 5px; padding: 4px 6px; }
.plate__aside { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.plate__body { position: relative; z-index: 1; }
.tag { font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 4px; white-space: nowrap; line-height: 1.2; }
.tag--wait { background: var(--amber-bg); color: var(--amber-text); }
.tag--late { background: var(--signal); color: #fff; }
.tag--self { background: var(--plate-2); color: var(--ink-3); box-shadow: 0 0 0 1px var(--line) inset; }

/* ---------------------------------------------------------------- A objects: rubber stamp */
.stamp {
  --c: var(--ok-c);
  display: inline-flex; align-items: center; gap: 6px; color: var(--c); flex: none;
  font: 700 34px/1 var(--font-display); letter-spacing: .04em; padding: 5px 12px 2px;
  border: 2.5px solid var(--c); border-radius: 6px; transform: rotate(-5deg);
  box-shadow: 0 0 0 2px var(--plate), 0 0 0 3.5px color-mix(in srgb, var(--c) 55%, transparent);
  -webkit-mask: radial-gradient(circle at 20% 30%, #000 0 60%, rgba(0, 0, 0, .82) 61%), repeating-linear-gradient(115deg, #000 0 3px, rgba(0, 0, 0, .86) 3px 4px);
  mask: radial-gradient(circle at 20% 30%, #000 0 60%, rgba(0, 0, 0, .82) 61%), repeating-linear-gradient(115deg, #000 0 3px, rgba(0, 0, 0, .86) 3px 4px);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  user-select: none;
}
.stamp--bad { --c: var(--signal); }
.stamp--sm { font-size: 22px; padding: 3px 8px 1px; border-width: 2px; box-shadow: 0 0 0 1.5px var(--plate), 0 0 0 2.5px color-mix(in srgb, var(--c) 55%, transparent); }
.stamp.thump { animation: thump .55s var(--spring); }
@keyframes thump { 0% { transform: rotate(-5deg) scale(1.5); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-5deg) scale(1); } }

/* ---------------------------------------------------------------- A objects: hazard tape */
.hazard { position: relative; }
.hazard::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; pointer-events: none; z-index: 2;
  border-radius: inherit; border-end-start-radius: 0; border-end-end-radius: 0;
  background: repeating-linear-gradient(-45deg, var(--signal) 0 8px, #1a1a1a 8px 16px);
}
.hazard--soft::after { height: 4px; background: repeating-linear-gradient(-45deg, var(--signal) 0 7px, transparent 7px 14px); opacity: .85; }
.hazard-tape { display: block; height: 6px; border-radius: 2px; background: repeating-linear-gradient(-45deg, var(--signal) 0 8px, #1a1a1a 8px 16px); }

/* ---------------------------------------------------------------- A objects: the fuel card (plastic) */
.fcard {
  --b: calc(var(--cw) * .2);
  container-type: inline-size;
  position: relative; display: block; flex: none; width: var(--cw); height: var(--ch);
  border-radius: calc(var(--cw) * .105); overflow: hidden; font-size: var(--b); text-align: center;
  color: #ECE6D7; user-select: none;
}
.fcard--xs { --cw: 28px; --ch: 44px; }
.fcard--sm { --cw: 46px; --ch: 73px; }
.fcard--md { --cw: 76px; --ch: 120px; }
.fcard--lg { --cw: 118px; --ch: 187px; }
.fcard--punched {
  -webkit-mask: radial-gradient(circle at 50% calc(var(--cw) * .138), transparent 0 calc(var(--cw) * .068), #000 calc(var(--cw) * .076));
  mask: radial-gradient(circle at 50% calc(var(--cw) * .138), transparent 0 calc(var(--cw) * .068), #000 calc(var(--cw) * .076));
}
.fcard--diesel {
  background:
    linear-gradient(158deg, rgba(255, 255, 255, .17) 0%, rgba(255, 255, 255, 0) 36%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 2.5px),
    linear-gradient(180deg, var(--card-d-top) 0%, var(--card-d-bot) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.fcard--petrol {
  color: #F2FFF8;
  background:
    radial-gradient(120% 55% at 25% 0%, rgba(255, 255, 255, .34), transparent 62%),
    linear-gradient(158deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, var(--card-p-top) 0%, var(--card-p-bot) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 -12px 18px -10px rgba(0, 40, 25, .45);
}
.fcard__chip {
  position: absolute; top: 24%; inset-inline-start: 15%; width: 24%; height: 13%; border-radius: 2.5px;
  background:
    linear-gradient(90deg, transparent 32%, rgba(90, 70, 20, .35) 32% 36%, transparent 36% 64%, rgba(90, 70, 20, .35) 64% 68%, transparent 68%),
    linear-gradient(0deg, transparent 45%, rgba(90, 70, 20, .35) 45% 55%, transparent 55%),
    linear-gradient(135deg, #F3DF9A, #C3A452 55%, #E2CB80);
  box-shadow: inset 0 0 0 .5px rgba(80, 60, 10, .4);
}
.fcard__cap { position: absolute; top: 25%; inset-inline-end: 12%; font: 600 .5em/1 var(--font-sans); opacity: .72; letter-spacing: .02em; }
.fcard__num { position: absolute; inset-inline: 0; top: 44%; display: flex; flex-direction: column; align-items: center; gap: .12em; direction: ltr; }
.fcard__num small { font: 500 .5em/1 var(--font-mono); letter-spacing: .06em; opacity: .62; }
.fcard__num b { font: 600 1.22em/1 var(--font-mono); letter-spacing: .05em; text-shadow: 0 -1px 0 rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .22); }
.fcard--petrol .fcard__num b { text-shadow: 0 -1px 0 rgba(0, 50, 30, .45), 0 1px 0 rgba(255, 255, 255, .3); }
.fcard__band { position: absolute; inset: auto 0 0; height: 21%; display: grid; place-items: center; font: 700 .66em/1 var(--font-sans); letter-spacing: .04em; white-space: nowrap; overflow: hidden; }
.fcard--diesel .fcard__band { background: linear-gradient(180deg, #FFBE1F, #E39E00); color: #2B1E00; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.fcard--petrol .fcard__band { background: linear-gradient(180deg, #DDF7E8, #BDEBD2); color: #08573B; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
/* empty (drained) card: hatched, number still readable */
.fcard--empty::before { content: ""; position: absolute; inset: 0 0 21% 0; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .16) 0 2px, transparent 2px 6px), rgba(128, 134, 129, .62); }
.fcard--empty.fcard--petrol::before { background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .16) 0 2px, transparent 2px 6px), rgba(120, 138, 129, .66); }
.fcard--empty .fcard__band { background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .07) 0 3px, transparent 3px 6px), linear-gradient(180deg, #FFBE1F, #E39E00); }
.fcard--empty.fcard--petrol .fcard__band { background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .06) 0 3px, transparent 3px 6px), linear-gradient(180deg, #DDF7E8, #BDEBD2); }
.fcard--empty .fcard__chip { opacity: .55; }
.fcard > span { z-index: 1; }
/* small cards drop the fine print, keep the number */
@container (max-width: 56px) {
  .fcard__cap, .fcard__num small { display: none; }
  .fcard__num { top: 47%; }
  .fcard__num b { font-size: 12px; letter-spacing: .02em; }
  .fcard__chip { top: 23%; inset-inline-start: 35%; width: 30%; height: 12%; }
  .fcard__band { font-size: 0; height: 17%; }
}
@container (max-width: 32px) {
  .fcard__num, .fcard__chip { display: none; }
  .fcard__band { height: 30%; }
}
/* the pin it hangs from */
.pin {
  position: absolute; top: calc(var(--cw) * .08); left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; z-index: 3; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff 0 1px, #D3D8D2 1.6px, #8A928C 4.5px);
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .45);
}

/* ---------------------------------------------------------------- integrity (header chip + 18-slot bar) */
.integrity {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; height: 34px; padding: 0 6px 0 10px;
  border-radius: 7px; background: var(--head-2); color: var(--head-ink-2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05) inset; text-decoration: none; white-space: nowrap;
  font-size: 12.5px; transition: background-color .15s;
}
a.integrity:hover { background: var(--head-3); }
.integrity__round { color: var(--head-ink-2); max-width: 16ch; overflow: hidden; text-overflow: ellipsis; }
.integrity__label { display: inline-flex; align-items: center; gap: 5px; font: 600 13px/1 var(--font-mono); color: var(--head-ink); direction: rtl; }
.integrity__label .sw { width: 10px; height: 7px; }
.integrity__label .op { color: var(--head-ink-2); font-weight: 400; }
.integrity__label .d, .integrity__label .p { display: inline-flex; align-items: center; gap: 4px; }
.integrity .pill { min-height: 22px; }
.integrity .pill--ok { background: rgba(175, 208, 127, .14); color: #B9DA8A; box-shadow: none; }
.integrity .pill--bad { background: var(--signal); color: #fff; }
.integrity.is-bad { box-shadow: 0 0 0 1px color-mix(in srgb, var(--signal) 70%, transparent) inset; }
.integrity.muted { color: var(--head-ink-2); padding: 0 12px; }

.segbar { display: inline-flex; gap: 2px; align-items: flex-end; direction: rtl; min-width: 0; }
.segbar__b { width: 6px; height: 10px; border-radius: 1.5px; flex: none; background: var(--plate-3); }
.segbar__b--diesel { background: linear-gradient(180deg, #4A5156 0 64%, var(--amber) 64%); }
.segbar__b--petrol { background: linear-gradient(180deg, #15A877 0 64%, var(--mint) 64%); }
.segbar__b--transit { opacity: .45; }
.segbar__b--missing { background: transparent; box-shadow: 0 0 0 1.5px var(--signal) inset; }
.segbar__b--extra { box-shadow: 0 0 0 1.5px var(--signal); }
.segbar__gap { width: 4px; flex: none; }
.segbar--lg { gap: 3px; }
.segbar--lg .segbar__b { width: 11px; height: 17px; border-radius: 2px; }

/* ---------------------------------------------------------------- shell */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 18px; padding: 0 28px;
  background: var(--head); color: var(--head-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--head-ink); text-decoration: none; flex: none; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name { font: 700 30px/1 var(--font-display); letter-spacing: .01em; white-space: nowrap; padding-top: 3px; }
.topbar__title { font-size: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; padding-top: 3px; }
.topbar__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.topbar .icon-btn { color: var(--head-ink-2); }
.topbar .icon-btn:hover { background: var(--head-2); color: var(--head-ink); }
.topbar .btn--scan kbd { background: rgba(0, 0, 0, .14); }
.user-chip {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 6px; border: 0; border-radius: 8px;
  background: transparent; color: var(--head-ink); font: inherit; cursor: pointer; text-align: start; text-decoration: none; transition: background-color .15s; min-width: 0;
}
.user-chip:hover { background: var(--head-2); }
.user-chip__meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-chip__meta b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16ch; }
.user-chip__meta span { font-size: 11px; color: var(--head-ink-2); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: #3A4237; color: var(--amber); font: 700 14px/1 var(--font-sans);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: block; }
  :root:not([data-theme="light"]) .theme-moon { display: none; }
}

/* desktop nav strip (second rail of the gunmetal header) */
.nav {
  display: flex; align-items: stretch; gap: 2px; height: var(--navstrip-h); padding: 0 22px;
  background: var(--head-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 2px 0 rgba(0, 0, 0, .06);
  overflow-x: auto; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 0 11px; flex: none;
  color: var(--head-ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.nav a svg.icon { width: 16px; height: 16px; opacity: .8; }
.nav a:hover { color: var(--head-ink); background: rgba(255, 255, 255, .04); }
.nav a[aria-current="page"] { color: var(--head-ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; inset: auto 8px 0; height: 2.5px; border-radius: 2px 2px 0 0; background: var(--amber); }
.nav a[aria-current="page"] svg.icon { color: var(--amber); opacity: 1; }
.nav a:focus-visible { outline-offset: -3px; }
.nav .lock { opacity: .55; }
.nav .lock svg.icon { width: 12px; height: 12px; }
.nav__sep { width: 1px; margin: 11px 8px; background: rgba(255, 255, 255, .09); flex: none; }

.view { flex: 1; width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 22px 28px 28px; }
.view:focus { outline: none; }
.syncline {
  display: flex; align-items: center; justify-content: center; gap: 7px; padding: 6px 16px 18px;
  color: var(--ink-3); font-size: 11.5px;
}
.syncline .dot { width: 7px; height: 7px; background: var(--ok-c); animation: pulse 2.4s infinite; }
.tabbar { display: none; }

/* ---------------------------------------------------------------- generic blocks */
.card { position: relative; background: var(--plate); border-radius: var(--radius-card); box-shadow: var(--shadow-plate); padding: 16px 18px; min-width: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2) 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card__head > :first-child { margin-inline-end: auto; }
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.full { grid-column: 1 / -1; }
.page-head { display: flex; align-items: flex-end; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); font-size: var(--fs-small); }

.banner {
  position: relative; overflow: hidden; display: flex; gap: 12px; align-items: center;
  padding: 11px 14px; border-radius: 9px; background: var(--plate-2); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line) inset;
}
.banner > svg.icon {
  width: 34px; height: 34px; padding: 8px; border-radius: 8px; flex: none; align-self: flex-start;
  background: var(--plate); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line) inset;
}
.banner > div { min-width: 0; flex: 1 1 auto; }
.banner .small { color: var(--ink-2); }
.banner__title { font-weight: var(--fw-semibold); line-height: 1.35; }
.banner--ok { background: var(--ok-bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok-c) 20%, transparent) inset; }
.banner--ok > svg.icon { background: var(--ok-c); color: var(--plate); box-shadow: none; }
.banner--ok .banner__title { color: var(--ok-c); }
.banner--warn { background: var(--amber-bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--amber) 32%, transparent) inset; }
.banner--warn > svg.icon { background: var(--amber); color: var(--amber-ink); box-shadow: none; }
.banner--warn .banner__title { color: var(--amber-text); }
.banner--bad { background: var(--signal-bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--signal) 32%, transparent) inset; padding-top: 14px; }
.banner--bad::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: repeating-linear-gradient(-45deg, var(--signal) 0 7px, transparent 7px 14px); opacity: .85; }
.banner--bad > svg.icon { background: var(--signal); color: #fff; box-shadow: none; }
.banner--bad .banner__title { color: var(--signal-ink); }
.banner--info > svg.icon { color: var(--ink-2); }
.banner .btn { margin-inline-start: auto; flex: none; }
.banner .row { gap: 6px; }

.empty {
  padding: 18px 14px; text-align: center; color: var(--ink-3); font-size: var(--fs-small);
  border: 1.5px dashed var(--line-2); border-radius: 8px;
}
.loading { padding: 40px 16px; text-align: center; color: var(--ink-3); display: flex; align-items: center; justify-content: center; gap: 10px; }
.loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { position: relative; padding: 16px 16px 14px; border-radius: 9px; background: var(--signal-bg); color: var(--signal-ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--signal) 32%, transparent) inset; overflow: hidden; }
.error-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: repeating-linear-gradient(-45deg, var(--signal) 0 7px, transparent 7px 14px); }
.form-error { color: var(--signal-ink); background: var(--signal-bg); border-radius: var(--radius-ctl); padding: 9px 12px; font-size: var(--fs-small); box-shadow: 0 0 0 1px color-mix(in srgb, var(--signal) 30%, transparent) inset; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 11px 0; border-top: 1px solid var(--line); display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list > li:last-child { padding-bottom: 0; }

/* tiles (used by the audit result) */
.tile { padding: 12px 16px; }
.tile__num { font: 700 44px/.9 var(--font-display); }
.tile__label { color: var(--ink-2); font-size: var(--fs-small); font-weight: var(--fw-medium); margin-top: 4px; }
.tile__split { font-size: var(--fs-caption); margin-top: 2px; }
.tile--warn { box-shadow: var(--shadow-plate), inset 0 3px 0 var(--amber); }
.tile--warn .tile__num { color: var(--amber-text); }
.tile--bad { box-shadow: var(--shadow-plate), inset 0 3px 0 var(--signal); }
.tile--bad .tile__num { color: var(--signal); }
.tile--warn-strong { box-shadow: var(--shadow-plate), inset 0 3px 0 var(--amber); background: linear-gradient(var(--amber-bg), var(--plate) 60%); }
.trip__title { font-weight: var(--fw-semibold); }
.sumline { margin-top: var(--sp-3); font-size: var(--fs-small); color: var(--ink-2); }
.sumline b { color: var(--ink); }

/* placeholder + timeline */
.placeholder { text-align: center; padding: var(--sp-7) var(--sp-4); }
.placeholder .big-icon { width: 56px; height: 56px; color: var(--ink-3); }
.placeholder h2 { font: 700 30px/1.1 var(--font-display); margin-top: 8px; }
.placeholder p { max-width: 560px; margin: var(--sp-3) auto 0; color: var(--ink-2); }
.placeholder ul { text-align: start; max-width: 560px; margin: var(--sp-3) auto 0; color: var(--ink-2); padding-inline-start: 20px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 22px var(--sp-4) 0; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 5px; top: 8px; bottom: -4px; width: 1px; background: var(--line-2); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; inset-inline-start: 0; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 3px var(--plate); }
.timeline li.t-warn::after { background: var(--amber); }
.timeline li.t-ok::after { background: var(--ok-c); }

/* ---------------------------------------------------------------- toolbar + tables */
.toolbar { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-3); }
.toolbar .search { flex: 1 1 240px; }
.toolbar .select { width: auto; min-width: 150px; }
.table-wrap { background: var(--plate); border-radius: var(--radius-card); box-shadow: var(--shadow-plate); overflow: hidden; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: start; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 11.5px; letter-spacing: .04em; color: var(--ink-3); font-weight: var(--fw-semibold); background: var(--plate-2); white-space: nowrap; }
.table tbody tr { cursor: pointer; transition: background-color .12s; }
.table tbody tr:hover { background: var(--plate-2); }
.table tbody tr:focus-visible { outline: 2.5px solid var(--focus); outline-offset: -2.5px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.is-warn { background: color-mix(in srgb, var(--amber) 8%, var(--plate)); }
.table tr.is-warn:hover { background: color-mix(in srgb, var(--amber) 14%, var(--plate)); }
.table .num { font-family: var(--font-mono); font-weight: var(--fw-medium); direction: ltr; unicode-bidi: isolate; }
.count-line { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: var(--sp-2); }

/* ---------------------------------------------------------------- dialogs (native) + sheet() */
dialog.modal {
  border: 0; padding: 0; color: var(--ink); background: var(--plate);
  width: min(560px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: min(88vh, 820px);
  border-radius: var(--radius-sheet); box-shadow: var(--shadow-pop); overflow: auto; overscroll-behavior: contain;
}
dialog.modal[open] { animation: sheetPop .42s var(--spring); }
dialog.modal::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fadeIn .25s var(--ease); }
dialog.modal.is-closing { animation: sheetOut .22s var(--ease) forwards; }
dialog.modal.is-closing::backdrop { animation: fadeOut .22s var(--ease) forwards; }
@keyframes sheetPop { from { opacity: 0; transform: translateY(28px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(24px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal__head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 12px 18px; background: var(--plate); border-bottom: 1px solid var(--line);
}
.modal__head h2 { font-size: 28px; flex: 1; min-width: 0; }
.modal__head .btn--ghost { margin-inline-start: auto; }
.modal__crumb { font-size: 12.5px; color: var(--ink-3); }
.modal__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.modal__foot { position: sticky; bottom: 0; padding: 12px 18px 16px; display: flex; gap: var(--sp-2); justify-content: flex-start; flex-wrap: wrap; background: var(--plate); border-top: 1px solid var(--line); }
.modal__foot .btn { min-height: 44px; padding: 0 20px; }
.sheet__grab { display: none; }
progress { width: 100%; height: 8px; accent-color: var(--amber); border-radius: 4px; overflow: hidden; }

/* ---------------------------------------------------------------- toast */
.toasts {
  position: fixed; z-index: 80; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px);
  padding: 11px 16px 11px 14px; border-radius: 10px; background: var(--head); color: var(--head-ink);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  font-size: 13.5px; animation: toastIn .45s var(--spring);
}
.toasts .toast { position: static; transform: none; pointer-events: auto; }
.toast svg.icon { width: 18px; height: 18px; color: #B9DA8A; }
.toast--bad { background: var(--signal); color: #fff; }
.toast--bad svg.icon { color: #fff; }
.toast__badge { color: #B9DA8A; font: 600 12px/1 var(--font-mono); direction: ltr; white-space: nowrap; padding: 4px 7px; border-radius: 5px; background: rgba(185, 218, 138, .12); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; translate: 0 16px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes toastOut { to { opacity: 0; translate: 0 8px; } }

/* ---------------------------------------------------------------- skeleton */
.sk { position: relative; overflow: hidden; display: block; background: var(--plate-2); border-radius: 6px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--plate) 75%, transparent), transparent); animation: shimmer 1.1s infinite; }
@keyframes shimmer { to { transform: translateX(-100%); } }

/* ---------------------------------------------------------------- login + no access */
.auth-page {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--sp-5) var(--sp-4); gap: var(--sp-4);
  background-color: var(--board);
  background-image: radial-gradient(circle at 50% 50%, var(--hole) 0 1.7px, transparent 2.3px);
  background-size: 16px 16px; background-position: 8px 8px;
}

/* ---------------------------------------------------------------- responsive */
@media (min-width: 900px) {
  /* desktop: the nav strip shows where you are; the page title stays for screen readers */
  .topbar__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }
}
@media (max-width: 1240px) {
  .integrity__round { display: none; }
}
@media (max-width: 1100px) {
  .topbar { gap: 12px; padding: 0 18px; }
  .topbar .btn--scan kbd { display: none; }
  .user-chip__meta { display: none; }
  .view { padding: 18px 20px 24px; }
  .nav { padding: 0 14px; }
}
@media (max-width: 899px) {
  :root { --topbar-h: 54px; }
  .topbar { height: var(--topbar-h); padding: 0 12px 0 10px; gap: 8px; }
  .brand__name { display: none; }
  .brand__mark { width: 28px; height: 28px; }
  .topbar__title { font-size: 25px; flex: 0 1 auto; }
  .topbar .btn--scan { display: none; } /* scan lives in the tab bar on phones */
  .topbar .icon-btn { width: 36px; height: 36px; }
  .user-chip { padding: 0 2px; height: 36px; }
  .integrity { height: 30px; gap: 7px; padding: 0 5px 0 8px; }
  .integrity .segbar { display: none; }
  .nav { display: none; }
  .view { padding: 14px 16px 20px; }
  .syncline { padding-bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); }
  .toast, .toasts { bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); }

  /* phone bottom nav, with the raised amber scan button in the centre */
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end;
    position: fixed; z-index: 40; inset-inline: 0; bottom: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
    background: var(--head); color: var(--head-ink-2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 -6px 20px -10px rgba(0, 0, 0, .4);
  }
  .tabbar a, .tabbar button {
    height: 60px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: inherit; text-decoration: none; font: inherit; font-size: 11px; font-weight: 500; background: none; border: 0; cursor: pointer;
    border-radius: 10px; -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg.icon { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--head-ink); }
  .tabbar [aria-current="page"] svg.icon { color: var(--amber); }
  .tabbar .tab-scan { position: relative; height: var(--tabbar-h); justify-content: flex-end; padding-bottom: 8px; color: var(--head-ink); font-weight: 600; }
  .tabbar .tab-scan .ring {
    position: absolute; top: -22px; left: 50%; margin-left: -32px; width: 64px; height: 64px; border-radius: 50%;
    display: grid; place-items: center; background: var(--amber); color: var(--amber-ink);
    box-shadow: 0 0 0 5px var(--head), 0 -1px 0 5px rgba(255, 255, 255, .04), 0 8px 18px -4px rgba(0, 0, 0, .5), inset 0 -3px 0 rgba(0, 0, 0, .15), inset 0 1px 0 rgba(255, 255, 255, .5);
    transition: transform .2s var(--spring);
  }
  .tabbar .tab-scan:active .ring { transform: scale(.93); }
  .tabbar .tab-scan .ring svg.icon { width: 27px; height: 27px; stroke-width: 2; }

  /* dialogs become bottom sheets */
  dialog.modal {
    margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92vh; max-height: 92dvh;
    border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom);
  }
  dialog.modal[open] { animation: sheetUp .45s var(--spring); }
  dialog.modal.is-closing { animation: sheetDown .25s var(--ease) forwards; }
  dialog.modal::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; }
  .modal__head { padding: 8px 10px 10px 16px; }
  .modal__body { padding: 14px 16px; }
  .modal__foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .modal__foot .btn { flex: 1; }

  /* table -> stacked rows */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--sp-2); padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { padding: 0; border: 0; }
  .table td.c-num { grid-column: 1; font-size: 16px; }
  .table td.c-type { grid-column: 2; grid-row: 1; justify-self: end; }
  .table td.c-state { grid-column: 2; grid-row: 2; justify-self: end; }
  .table td.c-upd { grid-column: 1 / -1; font-size: var(--fs-caption); color: var(--ink-3); }
  .toolbar .select { flex: 1 1 140px; }
  .page-head h2, .page-head h1 { font-size: 32px; }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@media (max-width: 420px) {
  .integrity__label .sw { display: none; }
  .integrity .pill { padding: 2px 6px; }
}
@media (max-width: 370px) {
  .integrity .pill span, .integrity .pill { font-size: 0; gap: 0; padding: 2px 4px; }
  .integrity .pill svg.icon { width: 14px; height: 14px; }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
