:root {
  color-scheme: dark;
  --bg: #14181d;
  --panel: #1f252c;
  --text: #eef1f4;
  --muted: #9aa5b1;
  --line: #333c46;
  --closed: #1f7a4d;
  /* Dark enough for the page's text on it at any size (4.8:1). */
  --not-closed: #a94f1c;
  --unknown: #47515c;
  /* The accent as a line, a mark or a canvas's colour. Filled behind text it is --accent-fill: on #3b82f6 the
     page's text was 3.2:1. */
  --accent: #3b82f6;
  --accent-fill: #2563eb;
  --accent-fill-hover: #1d4ed8;
  --on-accent: #fff;
  --alert: #7f2a2a;
  /* The emergency opening's button under a pointer and under a press: a step lighter than --alert. */
  --alert-hover: #963434;
  /* A button's fill, a step above the panels it can sit on, then under a pointer and under a press. */
  --control: #262d35;
  --control-hover: #2f3741;
  --control-active: #37404b;
  --control-line: #414b57;
  /* A field's border: an empty field is known by it alone, so it is the one line that reaches 3:1 on the page. */
  --field-line: #66727f;
  /* A warning that is not an alarm: the rehearsal's banner, a badge, a call's frame. */
  --warn-bg: #6b5310;
  --warn-text: #ffe9a8;
  --warn-line: #b38a1e;
  /* A refusal: its words on the page, its row, and that row when its number is hovered. */
  --bad-text: #ffb4a8;
  --bad-badge-text: #ffd9d4;
  --refused-bg: #3a2418;
  --refused-hot: #4d2638;
  /* Over a picture: behind a badge or a button. */
  --scrim: rgb(0 0 0 / .65);
  --radius: .5rem;
  --radius-sm: .25rem;
  --radius-lg: .75rem;
  --radius-pill: 1.25rem;
  /* The least a finger needs: 44 px. */
  --tap: 2.75rem;
  --focus: 2px solid var(--text);
  /* The Relecture's line: white, as no mark is. It was the red of an alarm's mark. */
  --now: #fff;
  /* The marks on the Relecture's bands: bright, as each is three pixels wide on a dark band. */
  --mark-passage: #4ade80;
  --mark-refusal: #fb923c;
  --mark-payment: #60a5fa;
  --mark-call: #facc15;
  /* The interphone's call button, apart from the remote open that may follow it: a ring is somebody waiting. */
  --mark-ring: #2dd4bf;
  --mark-alarm: #f87171;
  /* A boom held open: a stretch, drawn as a paler bar under the other marks. */
  --mark-boom: #a78bfa;
  /* Somebody asked for the barrier to move (the app, or a request of Claude's they approved): muted, as it is rare and the boom's stretch says the rest. */
  --mark-command: #94a3b8;
  /* The ticket looked up: none of the others' colours, as its marks sit among theirs. */
  --mark-ticket: #e879f9;
  /* The piece of recording picked to download: no mark's colour, nor the line's. */
  --clip: #22d3ee;
  /* The Synthèse's bars and legends, the same in every block: card, cash, free, and paid where card is not the point. */
  --series-card: var(--mark-payment);
  --series-cash: #fbbf24;
  --series-free: #66727f;
  --series-paid: var(--mark-payment);
  --ok-text: var(--mark-passage);
  /* What a card's usage is, the same colour in every place the Cartes tab says it: the tiles, the companies' figures, a
     row's edge and badge. Read from data-usage. The grey of "never" is too dark for words on a panel: its text is paler. */
  --use-active: var(--mark-passage);
  --use-quiet: #2dd4bf;
  --use-dormant: #fbbf24;
  --use-never: #7b8794;
  --use-never-text: #b9c2cc;
  --use-retired: #f87171;
  /* The height of the Relecture's bands when they are docked at the bottom of the window: the app sets it. */
  --dock: 0px;
  /* The height of the tabs when they are a bar across the bottom of the window: on one column, see the end. */
  --tabbar: 0px;
}

/* What is brought into view (a result, a list, the camera) stops clear of what is fixed at the bottom of the window. */
html { scroll-padding-bottom: calc(var(--dock) + var(--tabbar) + .5rem); }

* { box-sizing: border-box; }

/* The hidden attribute must beat any display set below, or a hidden block (the commands while they're off) still shows. */
[hidden] { display: none !important; }

/* At a car park with no barrier for the gateway to read, the page says so on its root, and what is about a barrier goes. */
html[data-barrier="off"] [data-barrier-only] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* The browser's own size, not 16 px: someone who set a larger one keeps it. */
  font: 100%/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* A phone's width for signing in and for the offline page. Held wide, a phone or a tablet keeps clear of its rounded corners. */
main {
  max-width: 28rem;
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

/* Signed in, the app takes the room there is: see the wide screens at the end. Its last lines stay above the dock. */
main.app { max-width: 60rem; padding-bottom: calc(max(1.5rem, env(safe-area-inset-bottom)) + var(--dock) + var(--tabbar)); }

header { margin-bottom: 1rem; }
/* In the app the title and what it is of share a line where they fit: the room is the camera's. */
main.app .brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .75rem; }
h1 { margin: 0; font-size: 1.25rem; }
.sub { margin: .25rem 0; color: var(--muted); font-size: .875rem; }

.notice {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  background: var(--alert);
}

.position {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  min-height: 5.5rem;
  padding: .5rem;
  border-radius: var(--radius-lg);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
}

.position.closed { background: var(--closed); }
.position.notClosed { background: var(--not-closed); }
.position.unknown { background: var(--unknown); }

/* A boom drawn from its state (gates.js decides, paintBoom in app.js draws): the arm at --arm, 0deg flat to 90deg up,
   set on the drawing by the page; half-raised and faded when the state isn't known. Only attributes change, so the arm
   travels from where it was: a lane's in the 2.3 s the real one takes (measured), starting softly and braking long
   into the stop as the drive does, then settling a little at 0 or 90 (data-settle, set by paintBoom); the sas boom's,
   read every two seconds, steadily from one reading to the next, with no settle (the readings are its motion). Its
   first drawing (data-still) is put there at once. */
.boom-icon {
  --arm: 45deg;
  /* The lanes' own model (the user's pictures): a white cabinet, a cranked slate bracket, a white arm banded in red
     with a white foam strip under it. */
  --boom-cabinet: #eef0f2;
  --boom-cabinet-side: #c5cbd2;
  --boom-boss: #d9dee4;
  --boom-boss-line: #a9b2bc;
  --boom-bracket: #46586f;
  --boom-bracket-light: #7489a6;
  --boom-bracket-dark: #2a3647;
  --boom-hub: #2f3d50;
  --boom-hubcap: #8ea0b6;
  --boom-cap: #3a4658;
  --boom-foam: #e3e6ea;
  --boom-white: #f4f4f5;
  --boom-red: #dc2626;
  --boom-blink: #f59e0b;
  width: 7.5rem; height: auto; flex: none;
}
.boom-icon .boom-post { fill: var(--boom-cabinet); }
.boom-icon .boom-side { fill: var(--boom-cabinet-side); }
.boom-icon .boom-boss { fill: var(--boom-boss); stroke: var(--boom-boss-line); stroke-width: .6px; vector-effect: non-scaling-stroke; }
.boom-icon .boom-bracket { fill: var(--boom-bracket); }
.boom-icon .boom-bracket-hi { fill: none; stroke: var(--boom-bracket-light); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.boom-icon .boom-bracket-lo { fill: none; stroke: var(--boom-bracket-dark); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.boom-icon .boom-bolt { fill: var(--boom-hubcap); }
.boom-icon .boom-bar { fill: var(--boom-white); stroke: rgba(0, 0, 0, .35); stroke-width: .75px; vector-effect: non-scaling-stroke; }
.boom-icon .boom-stripe { fill: var(--boom-red); }
.boom-icon .boom-shade { fill: rgba(15, 23, 42, .16); }
.boom-icon .boom-foam { fill: var(--boom-foam); stroke: rgba(0, 0, 0, .3); stroke-width: .6px; vector-effect: non-scaling-stroke; }
.boom-icon .boom-cap { fill: var(--boom-cap); }
.boom-icon .boom-hub { fill: var(--boom-hub); }
.boom-icon .boom-hubcap { fill: var(--boom-hubcap); }
.boom-arm, .boom-flex { transform-box: view-box; transform-origin: 21px 57px; }
.boom-arm { transform: rotate(calc(var(--arm) * -1)); }
@media (prefers-reduced-motion: no-preference) {
  .lane-boom .boom-arm { transition: transform 2.3s cubic-bezier(.5, 0, .15, 1); }
  .position .boom-arm { transition: transform 2s linear; }
  /* On its way (a lane's command just sent, the sas boom between up and down): the boss, the hub and the tip cap
     blink amber, the bands staying whole (faded, they made the arm look half there for the whole watch). */
  .boom-icon:is([data-state="opening"], [data-state="closing"], [data-state="moving"]) :is(.boom-boss, .boom-hubcap, .boom-cap) { animation: boom-blink 1s linear infinite; }
  /* The end stop: a lane's arm overshoots a little and settles (±1.4°, 0.75 s), starting as its 2.3 s travel ends. */
  .lane-boom .boom-icon[data-settle] .boom-flex { animation: .75s ease-out 2.25s both; }
  .lane-boom .boom-icon[data-settle="down-a"] .boom-flex { animation-name: boom-settle-down-a; }
  .lane-boom .boom-icon[data-settle="down-b"] .boom-flex { animation-name: boom-settle-down-b; }
  .lane-boom .boom-icon[data-settle="up-a"] .boom-flex { animation-name: boom-settle-up-a; }
  .lane-boom .boom-icon[data-settle="up-b"] .boom-flex { animation-name: boom-settle-up-b; }
}
.boom-icon[data-still] .boom-arm { transition: none; }
/* Lit, then fading back to each part's own colour (the keyframes leave 100% to it), as a beacon does. */
@keyframes boom-blink { 0%, 40% { fill: var(--boom-blink); } }
/* Twice each way, as an animation restarts only when its name changes (paintBoom alternates them). */
@keyframes boom-settle-down-a { 22% { transform: rotate(1.4deg); } 48% { transform: rotate(-.7deg); } 74% { transform: rotate(.3deg); } }
@keyframes boom-settle-down-b { 22% { transform: rotate(1.4deg); } 48% { transform: rotate(-.7deg); } 74% { transform: rotate(.3deg); } }
@keyframes boom-settle-up-a { 22% { transform: rotate(-1.4deg); } 48% { transform: rotate(.7deg); } 74% { transform: rotate(-.3deg); } }
@keyframes boom-settle-up-b { 22% { transform: rotate(-1.4deg); } 48% { transform: rotate(.7deg); } 74% { transform: rotate(-.3deg); } }
.boom-icon:is([data-state="unknown"], [data-state="offline"]) .boom-arm { opacity: .5; }
/* Held open (a lane): the bands turn amber. In an emergency opening (the sas, with its "urgence" badge): the arm turns
   the alert's red with white bands, the real arm's red bands being its everyday look. */
.boom-icon[data-state="held"] .boom-stripe { fill: var(--warn-line); }
.boom-icon[data-state="forced"] .boom-bar { fill: var(--mark-alarm); }
.boom-icon[data-state="forced"] .boom-stripe { fill: var(--boom-white); }
/* The road under the boom and its two loops, A and B: lit when a car is on one, outlined when free, dashed in the
   alert's colour when the controller says a loop is in error, left out when nobody knows. A stroke of a pixel or so
   whatever the drawing's size: a lane's is 24 px wide on a phone. */
.boom-icon .boom-road { fill: var(--muted); opacity: .6; }
.boom-icon .loop { fill: none; stroke: var(--text); stroke-width: 1.25px; vector-effect: non-scaling-stroke; opacity: .7; }
.boom-icon .loop[data-loop="unknown"] { display: none; }
.boom-icon .loop[data-loop="on"] { fill: var(--accent); opacity: 1; }
.boom-icon .loop[data-loop="error"] { stroke: var(--bad-text); stroke-dasharray: 2 2; opacity: 1; }

/* The actions behind a menu, so a tap on a state can't be taken for a command. */
.boom-menu { margin-top: .5rem; }
.boom-menu summary {
  min-height: var(--tap);
  padding: .625rem .75rem;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
  text-align: center;
}
.boom-menu summary { background: var(--control); }
.boom-menu .commands { margin-top: .5rem; }
.boom-menu .gate-why { margin-top: .375rem; }

/* The sas boom is the exit's second barrier: a compact row in the exit lane's card, under what that lane read. Where
   no exit card can take it, it is the banner above the video and the title is left out. */
.sas > .sas-title { display: none; margin: 0 0 .375rem; }
.sas.in-lane { padding: .5rem 1rem .75rem; border-top: 1px solid var(--line); }
.sas.in-lane > .sas-title { display: block; }
/* It wraps: in an emergency opening the "urgence" badge follows the state, and a phone's lane is about 100 px wide. */
.sas.in-lane .position { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: .75rem; min-height: 0; padding: .375rem .75rem; border-radius: var(--radius); font-size: 1.125rem; text-align: left; }
.sas.in-lane .position .boom-icon { width: 4.125rem; }
.sas.in-lane .sub { margin: .25rem 0 0; }
.sas.in-lane .since { margin-top: .375rem; }
.sas.in-lane .boom-menu { margin-top: .5rem; }

.since {
  margin: .5rem 0 0;
  padding: .5rem .75rem;
  border-radius: var(--radius);
  background: var(--panel);
}

.since.warn { background: var(--alert); font-weight: 600; }

/* The paragraphs that say what a command did (#result, #gate-result), not a refusal's span.result (dueBadge in app.js):
   that one sits in a lane's or the feed's row, and the box's sides left "Bloqué" 39 px on a phone ("Bl…"). */
.request, .confirm, p.result {
  margin: 1rem 0 0;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  background: var(--panel);
}

.rehearsal {
  margin: 1rem 0 0;
  padding: .5rem .75rem;
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-text);
  font-weight: 600;
}

/* A question asked over the page (app.js, openDialog): a command's confirmation with the camera's image, a lane
   command's, a plain yes or no. In the middle of the window, the page dimmed behind it and out of reach. */
dialog.confirm {
  width: min(32rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 1rem;
  border: 2px solid var(--accent);
  color: var(--text);
  overflow-y: auto;
}
dialog.confirm::backdrop { background: var(--scrim); }
#ask p { margin: 0 0 .75rem; }

/* What a command did, over the page wherever it is scrolled (app.js, toast): above the Relecture's bands when they
   are docked, under a question. A touch puts it away. */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock) + var(--tabbar) + max(1rem, env(safe-area-inset-bottom)));
  z-index: 70;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: .625rem 1rem;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--control);
  box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .5);
  cursor: pointer;
}
.toast.warn { border-color: transparent; background: var(--alert); }

.countdown { margin: .25rem 0 .75rem; font-weight: 700; }
.request { border: 2px solid var(--accent); }
.request p { margin: 0 0 .75rem; }
p.result.warn { background: var(--alert); }

.commands {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: 1rem;
}

.commands button { font-weight: 600; }

.confirm h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.confirm img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: .5rem 0;
  border-radius: var(--radius);
  object-fit: contain;
  background: #000;
}

.camera { margin: 1rem 0 0; }

/* Entrée / Sortie: one button each, side by side at any width. Only there when the gateway lists several cameras. */
.camera-switch { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .5rem; margin-bottom: .5rem; }

/* The still, the two videos, the badge and the exit button share one cell, stacked. */
.camera-frame {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  /* A double tap is the way to full screen, so it must not zoom the page. */
  touch-action: manipulation;
}

.camera-frame > * { grid-area: 1 / 1; }

.camera-shot {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  color: var(--muted);
}

/* Inside the frame: the frame clips what is outside it (overflow), and the ring went with it. */
.camera-shot:focus-visible { outline-offset: -4px; }
.camera-shot img { width: 100%; height: 100%; object-fit: contain; }
.camera-shot.stale img { opacity: .35; }

/* The substream is 704x576, squeezed from the camera's 16:9 picture: fill stretches it back. The 4K stream is 16:9 already. */
.camera-video { width: 100%; height: 100%; object-fit: fill; background: #000; }

.video-badge {
  z-index: 1;
  /* Bottom left: the camera draws its own caption at the top left (and the date at the top right), and over that the
     badge hid the lane and the ticket. */
  place-self: end start;
  margin: .5rem;
  padding: .125rem .5rem;
  border-radius: var(--radius-sm);
  background: var(--scrim);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  /* The link's rate is redrawn every second: figures of one width keep the badge from shivering. */
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* While a camera's picture is on its way, in the middle of the frame: under it plays the camera left, or its still. */
.video-loading {
  z-index: 2;
  place-self: center;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .75rem;
  border-radius: var(--radius-sm);
  background: var(--scrim);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  pointer-events: none;
}

.video-loading .spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgb(255 255 255 / .35);
  border-top-color: #fff;
  border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .video-loading .spinner { animation: video-spin .8s linear infinite; }
}

@keyframes video-spin { to { transform: rotate(1turn); } }

.video-exit {
  z-index: 1;
  place-self: start end;
  width: auto;
  min-width: var(--tap);
  min-height: var(--tap);
  /* Only ever shown full screen: on a phone held wide it keeps clear of the notch and the rounded corner. */
  margin: max(.5rem, env(safe-area-inset-top)) max(.5rem, env(safe-area-inset-right)) .5rem .5rem;
  border-color: transparent;
  --fill: var(--scrim);
  --fill-hover: rgb(0 0 0 / .8);
  --fill-active: #000;
}

/* Each lane's last passage beside that lane: the camera can only draw its own text as one block in a corner. */
.lane-tag {
  z-index: 1;
  align-self: center;
  max-width: 46%;
  margin: 0 .5rem;
  padding: .25rem .5rem;
  border-left: .375rem solid var(--closed);
  border-radius: .375rem;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: clamp(.75rem, 2.2vw, 1.125rem);
  font-weight: 700;
  line-height: 1.25;
  pointer-events: none;
}

.lane-tag.left { justify-self: start; }
.lane-tag.right { justify-self: end; text-align: right; border-left: 0; border-right: .375rem solid var(--closed); }
.lane-tag.refused { border-color: var(--not-closed); background: rgba(90, 36, 10, .85); }
.camera-frame:fullscreen > .lane-tag, .camera-frame.full > .lane-tag { font-size: clamp(1rem, 2vw, 2rem); max-width: 40%; }
/* Full screen on a phone held wide: clear of the notch and the rounded corners, as the exit button is. */
.camera-frame:fullscreen > .lane-tag.left, .camera-frame.full > .lane-tag.left { margin-left: max(.5rem, env(safe-area-inset-left)); }
.camera-frame:fullscreen > .lane-tag.right, .camera-frame.full > .lane-tag.right { margin-right: max(.5rem, env(safe-area-inset-right)); }

/* Play and full screen share the row; HD, a switch, takes only its word between them. In a recording only HD and
   "Quitter la relecture" are left, on one row. */
.video-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.video-controls > button { flex: 1 1 0; min-width: 0; }
.video-controls > #video-hd, .video-controls > .video-zoom { flex: 0 0 auto; width: auto; min-width: 4rem; }
/* With the zoom, five buttons on one row crushed "Arrêter la vidéo" and "Plein écran" to a letter a line in the
   column beside the lane bar (seen at République, 2026-11-18): play and full screen fill the first row, and Zoom gauche,
   HD, Zoom droite share the second, HD between them. In a recording "Quitter la relecture" then takes a row of its own. */
.video-controls:has(> .video-zoom:not([hidden])) > :is(#video-play, #video-full) { flex: 1 1 calc(50% - .25rem); }
.video-controls:has(> .video-zoom:not([hidden])) > :is(.video-zoom, #video-hd) { order: 1; }
.video-controls:has(> .video-zoom:not([hidden])) > .video-zoom { flex: 1 1 0; }
.video-controls:has(> .video-zoom:not([hidden])) > #replay-toggle { order: 2; flex-basis: 100%; }

/* Zoom gauche / droite (a camera with a Zoom row, République's exit): twice as large from the picture's left or right
   edge and the row's top, middle or bottom, which shows that quarter of the picture over the whole frame. The clip is
   in the video's own box, before the scale, so in full screen nothing spills into the black bars around the picture. */
.camera-frame[data-zoom] > .camera-video { transform: scale(2); }
.camera-frame[data-zoom="left"][data-zoom-row="top"] > .camera-video { transform-origin: left top; clip-path: inset(0 50% 50% 0); }
.camera-frame[data-zoom="left"][data-zoom-row="middle"] > .camera-video { transform-origin: left center; clip-path: inset(25% 50% 25% 0); }
.camera-frame[data-zoom="left"][data-zoom-row="bottom"] > .camera-video { transform-origin: left bottom; clip-path: inset(50% 50% 0 0); }
.camera-frame[data-zoom="right"][data-zoom-row="top"] > .camera-video { transform-origin: right top; clip-path: inset(0 0 50% 50%); }
.camera-frame[data-zoom="right"][data-zoom-row="middle"] > .camera-video { transform-origin: right center; clip-path: inset(25% 0 25% 50%); }
.camera-frame[data-zoom="right"][data-zoom-row="bottom"] > .camera-video { transform-origin: right bottom; clip-path: inset(50% 0 0 50%); }
.video-controls .whole-row { flex-basis: 100%; }
.video-controls > #lens-toggle { flex: 0 0 auto; width: auto; }
.video-controls:has(> .video-zoom:not([hidden])) > #lens-toggle { order: 2; }
#lens-toggle[aria-expanded="true"] { border-color: var(--accent); }
/* On a phone a fifth button crushed the others' words to a letter a line: it takes a row of its own there. */
@media (max-width: 40rem) {
  .video-controls > #lens-toggle { flex: 1 1 100%; order: 3; }
}

/* The camera's own lens (administrators): two rows of − value +, then three actions. */
.lens { display: grid; gap: .5rem; margin-top: .5rem; padding: .75rem; border: 1px solid var(--line); border-radius: .5rem; }
.lens p { margin: 0; }
.lens-warn { font-size: .875rem; color: var(--muted); }
.lens-row { display: grid; grid-template-columns: 5.5rem 2.75rem 4.5rem 2.75rem; justify-content: start; align-items: center; gap: .5rem; }
.lens-row > button { min-height: 2.75rem; padding: 0; font-size: 1.25rem; font-weight: 600; }
.lens-value { text-align: center; font-variant-numeric: tabular-nums; }
.lens-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.lens-actions > button { flex: 1 1 10rem; }
.lens[aria-busy="true"] .lens-value { opacity: .6; }
/* With the zoom's two rows, the floating window's button goes under them, beside Relecture. */
.video-controls:has(> .video-zoom:not([hidden])) > #video-float { order: 2; }

/* The floating window (app.js, openFloat): the calls, the camera and the lane bar in one column, and nothing that
   needs the app's whole window: no full screen, no Relecture. */
html.floating body { min-height: 100dvh; }
.float-main { display: grid; gap: .5rem; padding: .5rem; }
html.floating .camera { margin: 0; }
html.floating .call-panel { margin: 0; }
html.floating :is(#video-full, #replay-toggle, #replay, #video-exit) { display: none; }
.camera-frame.replaying + .video-controls .whole-row { flex-basis: 0; }
/* A wide window gives the camera's column the room for four: Relecture joins the row, as a row of its own under three
   buttons read as something apart from the bands it opens (2026-11-18). Not with the zoom's two rows. */
@media (min-width: 100rem) {
  .video-controls:not(:has(> .video-zoom:not([hidden]))) > #replay-toggle { flex-basis: 0; }
}

/* On a wide screen the picture would push the bands off the bottom: it keeps to a little over half the height. */
.camera-frame.replaying { width: min(100%, calc(55dvh * 16 / 9)); margin-inline: auto; }

/* Full screen: the browser's own where it has one, otherwise (iPhone) the frame covers the window. The picture stays 16:9. */
.camera-frame:fullscreen, .camera-frame.full { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; place-items: center; }
.camera-frame.full { position: fixed; inset: 0; z-index: 100; height: 100dvh; }
.camera-frame.full > .video-badge { margin: .5rem .5rem max(.5rem, env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-left)); }
.camera-frame:fullscreen > .camera-video, .camera-frame:fullscreen > .camera-shot,
.camera-frame.full > .camera-video, .camera-frame.full > .camera-shot {
  width: min(100vw, calc(100dvh * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
}

/* A screen's still in the call panel's corner (openCallScreen). */
.screen-frame {
  display: grid;
  place-items: center;
  min-height: 6rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  color: var(--muted);
}

.screen-frame img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }

/* The calling station's screen (app.js, openCallScreen): in the lower right corner, above the tabs and the docked
   bands, over the page but not blocking it, under a toast and a question. Agrandir makes it cover the window. */
.call-screen {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(var(--dock) + var(--tabbar) + max(1rem, env(safe-area-inset-bottom)));
  z-index: 65;
  width: min(26rem, calc(100vw - 2rem));
  padding: .5rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .5);
}
.call-screen-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.call-screen-head h2 { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
/* Their own width: the app's buttons are otherwise as wide as their block, which left the title none. */
.call-screen-head button { flex: none; width: auto; min-width: 44px; min-height: 44px; padding: 0 .75rem; }
.call-screen .screen-frame { cursor: default; }
/* Small enough to leave the call banner and the page usable on a phone. */
.call-screen .screen-frame img { max-height: min(40vh, 18rem); }
.call-screen-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .375rem 0 0; }
.call-screen.paused .screen-frame img { opacity: .35; }
.call-screen.zoomed {
  top: max(1rem, env(safe-area-inset-top));
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: auto;
}
/* The picture out of the grid's flow: in it, the row took the height the picture would have at the frame's width,
   taller than the frame on a wide window, so it was cropped and letterboxed against the wrong box. Placed over the
   whole frame, it fits it at its own ratio, black bands on the sides or above and below. */
.call-screen.zoomed .screen-frame { position: relative; flex: 1; min-height: 0; }
.call-screen.zoomed .screen-frame img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; }
.call-screen.zoomed .screen-frame #call-screen-empty { position: absolute; }
/* Prendre la main: the picture takes clicks and keys, and says so. */
.call-screen.controlling { border-color: var(--warn-line); }
.call-screen.controlling .screen-frame img { cursor: crosshair; touch-action: manipulation; }
.call-screen.controlling .screen-frame img:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.call-screen-keys { display: flex; flex-wrap: wrap; gap: .375rem; margin: .375rem 0 0; }
.call-screen-keys input { flex: 1 1 8rem; min-width: 0; min-height: 44px; }
.call-screen-keys button { flex: none; width: auto; min-width: 44px; min-height: 44px; padding: 0 .625rem; }
/* Ends whatever the PC was doing: set apart, and asked again before it goes (app.js). */
#call-screen-restart { margin-left: auto; border: 1px solid var(--warn-line); color: var(--warn-text); background: var(--warn-bg); }

dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem 1rem;
  margin: 0 0 .5rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  background: var(--panel);
}

dt { color: var(--muted); }
dd { margin: 0; text-align: right; }

button, input, a.button {
  width: 100%;
  min-height: 3rem;
  padding: .5rem .75rem;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

/* A field is known by its border alone (see --field-line); a button by what is written on it. */
input { border-color: var(--field-line); }

/* A button's fill is three values, so that a kind of button (the main one, one over a picture, a word in a line)
   names its own and what a pointer over it and a press on it do is written once, below. */
button, a.button {
  --fill: var(--control);
  --fill-hover: var(--control-hover);
  --fill-active: var(--control-active);
  background: var(--fill);
}

/* Links out of the app, to WiFiman and the UI account, look like the buttons. */
a.button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

/* A double tap on a button is a second press, never a zoom. */
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .6; cursor: default; }
/* Waiting on what it started (app.js, busy). */
button[aria-busy="true"] { cursor: progress; }

/* What is chosen and what is the main thing to press share one look: a primary button, the tab shown, a filter in
   force, the camera on screen. White on --accent-fill: the page's text on --accent was too pale to read. */
:is(button.primary, a.button.primary, .tabs button[aria-selected="true"], .chip[aria-pressed="true"],
    .camera-switch button[aria-pressed="true"], #video-hd[aria-pressed="true"], .video-zoom[aria-pressed="true"]) {
  --fill: var(--accent-fill);
  --fill-hover: var(--accent-fill-hover);
  --fill-active: var(--accent-fill-hover);
  border-color: transparent;
  color: var(--on-accent);
  font-weight: 600;
}

button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a.button:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* Under a mouse, what can be pressed says so; under a finger only the press shows. */
@media (hover: hover) {
  :is(button, a.button):hover:not(:disabled) { background: var(--fill-hover); }
  summary:hover { color: var(--text); }
  .boom-menu summary:hover { background: var(--control-hover); }
  /* A row that opens something: a veil over whatever its own colour is, so a refused row stays a refused row. */
  .item[role="button"]:hover { background-image: linear-gradient(rgb(255 255 255 / .05), rgb(255 255 255 / .05)); }
  .still:hover { border-color: var(--field-line); }
  .text-link:hover { text-decoration-thickness: 2px; }
}
:is(button, a.button):active:not(:disabled) { background: var(--fill-active); }

/* A way out that must not be pressed for the button above it: quieter than the others. */
button.quiet { --fill: transparent; --fill-hover: var(--control); --fill-active: var(--control-hover); color: var(--muted); }

/* The emergency opening leaves a barrier up for everyone: the danger button, in the alert's red, set apart from the
   everyday buttons (last, a gap above it) and never the main one, for a lane as for the sas. */
button.urgent { --fill: var(--alert); --fill-hover: var(--alert-hover); --fill-active: var(--alert-hover); border-color: var(--mark-alarm); color: var(--bad-badge-text); font-weight: 600; }
.commands .urgent { grid-column: 1 / -1; }
:is(.gate-actions, .commands) .urgent { margin-top: .25rem; }

/* A button that reads as a word of its line, not as one more box in the row: the way to a number's history, to
   the recording of a card's passage, to a company's cards. */
.text-link {
  --fill: none;
  --fill-hover: none;
  --fill-active: none;
  display: inline;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
}

/* Buttons that follow each other: one under the other with a gap, and none needs a margin of its own. */
.actions { display: grid; gap: .5rem; }

.vpn { margin: 0 0 1rem; }
.vpn h2 { margin: 0 0 .5rem; }
.steps { margin: .75rem 0 0; padding-left: 1.25rem; color: var(--muted); font-size: .875rem; }
.steps li { display: list-item; padding: .125rem 0; border: 0; }

details { margin-top: 1rem; }
/* Two taps on a title fold and unfold it, never zoom the page. */
summary { min-height: 2.75rem; padding: .625rem 0; color: var(--muted); cursor: pointer; touch-action: manipulation; }

form { display: grid; gap: .5rem; }
label { color: var(--muted); font-size: .875rem; }

ul { margin: 0 0 .75rem; padding: 0; list-style: none; }

li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

li button { width: auto; min-height: 2.75rem; margin: 0; flex: none; }
li .sub { display: block; }

/* The Accès list: a person, then what an administrator can do with them, wrapping under the name on a phone. */
#access-list li { flex-wrap: wrap; }
.access-controls, .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.access-controls select { width: auto; min-height: 2.75rem; }

/* Mes appareils: the name and what is known of the device, then its buttons, under the text when the row is narrow. */
#passkeys li { flex-wrap: wrap; }
#passkeys li > span:first-child { flex: 1 1 14rem; }
.rename { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rename input { flex: 1 1 12rem; width: auto; min-width: 0; }

#push-state { margin: 0 0 .75rem; }
#push-result { margin: .75rem 0; }
#push-devices { margin-top: .75rem; }

pre {
  margin: 0;
  padding: .75rem;
  border-radius: var(--radius);
  background: var(--panel);
  font-size: .75rem;
  overflow-x: auto;
}

/* Réglages: test lines for the text on the camera picture */
.samples { display: grid; gap: .5rem; margin: .75rem 0; }
.samples h3 { margin: .5rem 0 0; color: var(--muted); font-size: .875rem; font-weight: 600; }
.samples button { text-align: left; }
.sample-lines { display: block; color: var(--muted); font: .75rem/1.4 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
#overlay-lines { margin: .5rem 0; white-space: pre-wrap; }
#overlay-figure { margin: .5rem 0 .75rem; }

/* The text sits in the picture's bottom right corner and is a few pixels high on a phone, so only that corner
   is shown: the right 40 % of the image and its bottom 22 %, whatever the width. */
.corner { position: relative; aspect-ratio: 3.2 / 1; overflow: hidden; border-radius: var(--radius); background: #000; }
.corner img { position: absolute; right: 0; bottom: 0; width: 250%; }

/* Calls in progress, above the tabs */
.call-panel { display: grid; gap: .5rem; margin-bottom: 1rem; }

.call {
  padding: .75rem 1rem;
  border: 2px solid var(--warn-line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow-wrap: anywhere;
}

.call .item, .call .item.refused { padding: .25rem 0 0; background: none; }
.call-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; margin-top: .5rem; }

/* The tabs: in the header beside the title on a wide screen, a bar across the bottom of the window on one column
   (see the end). */
.tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: .5rem;
  margin-top: .75rem;
}

/* The account button at the header's end, and its menu under it: who is signed in, how, and the way out. Above the
   sticky columns and the bar of the Cartes tab; the tabs' own bar is at the bottom of the window, never under it. */
main.app header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
main.app .brand { flex: 1 1 auto; min-width: 0; }
.account { position: relative; z-index: 70; flex: none; }
.account-btn {
  display: grid;
  place-items: center;
  width: var(--tap);
  min-height: var(--tap);
  padding: 0;
  border-radius: 50%;
  font-weight: 700;
  line-height: 1;
}
.account-btn .icon { margin: 0; }
.account-btn[aria-expanded="true"] { --fill: var(--control-active); }
.account-menu {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  width: min(20rem, calc(100vw - 2rem));
  padding: .75rem 1rem 1rem;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .5);
}
.account-menu p { margin: 0 0 .25rem; overflow-wrap: anywhere; }
.account-name { font-weight: 700; }
.account-menu .actions { margin-top: .75rem; }
/* Other car parks: one full-width link each, as tall as a button so a finger lands on it. */
.account-peers { margin-top: .75rem; display: grid; gap: .35rem; }
.account-peers a { display: block; min-height: var(--tap); line-height: var(--tap); padding: 0 .75rem; border: 1px solid var(--control-line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.account-peers a:hover, .account-peers a:focus-visible { background: var(--control-active); }
/* What Google keeps open is not the gateway's to close: said under the button, in the quiet type. */
#account-note { margin-top: .75rem; }

/* A drawing from the sprite (icons.svg), beside a button's words or alone on it. It takes the words' colour and
   size; its words are in a span, so that one alone on a button is known and loses its margin. */
.icon {
  width: 1.25em;
  height: 1.25em;
  margin-right: .375em;
  flex: none;
  vertical-align: -.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon:only-child { margin-right: 0; }

/* Lanes and tickets */
h2 { margin: 1.25rem 0 .5rem; font-size: 1rem; }

.lanes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .5rem;
}

/* A lane's card: what it last read, then its gate's buttons where it has a gate. */
.lane {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border-left: .375rem solid var(--unknown);
  background: var(--panel);
  overflow-wrap: anywhere;
}

.lane-read { flex: 1; padding: .75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }
/* A card can be narrower than a badge's one line. */
.lane-read .badge { white-space: normal; }
/* The lane's name in the middle, a little bigger, over its camera's and its screen's buttons (laneTools); its boom on
   the left where it has one, and the exit's second boom, the sas, on the right (placeSas). Each boom is its drawing
   over its words. */
.lane-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "first name second"; align-items: end; gap: .5rem; margin-bottom: .375rem; }
.lane-head { grid-area: name; display: flex; flex-direction: column; align-items: center; gap: .375rem; min-width: 0; }
.lane-head .lane-name { max-width: 100%; margin: 0; overflow: hidden; color: var(--text); font-size: 1rem; font-weight: 700; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.lane-tools { display: flex; justify-content: center; gap: .375rem; }
.lane-tools[hidden] { display: none; }
/* Square, a finger's size; pressed in the look of the camera shown elsewhere (the accent, and a white edge inside, so
   it is not told by its colour alone). */
.lane-tool { flex: none; display: grid; place-items: center; width: var(--tap); min-height: var(--tap); height: var(--tap); padding: 0; color: var(--text); }
.lane-tool .icon { width: 1.25rem; height: 1.25rem; margin: 0; }
.lane-tool[aria-pressed="true"] { --fill: var(--accent-fill); --fill-hover: var(--accent-fill-hover); --fill-active: var(--accent-fill-hover); border-color: transparent; color: var(--on-accent); box-shadow: inset 0 0 0 1px var(--on-accent); }
/* No read in the window: a place as tall as a read, so the day under it stays level with the other lanes'. */
.lane-none { display: flex; align-items: center; justify-content: center; min-height: 3.5rem; margin-top: .375rem; padding: 0 .5rem; border: 1px dashed var(--control-line); border-radius: var(--radius-sm); text-align: center; }
/* The lane's day, one line under its read: "Aujourd'hui", then a pill each (a call, the cars through, card, cash). */
.lane-foot { display: flex; align-items: center; gap: .375rem; height: 2.25rem; margin-top: .5rem; overflow: hidden; border-top: 1px solid var(--line); font-size: .8125rem; white-space: nowrap; }
.lane-foot-day { flex: none; color: var(--muted); }
.lane-chip { flex: 0 1 auto; min-width: 0; padding: .0625rem .5rem; overflow: hidden; border-radius: var(--radius-pill); background: var(--control); font-variant-numeric: tabular-nums; text-overflow: ellipsis; }
.lane-chip.warn { flex: none; background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }
/* The amounts give way last: the count of cars first, then the words around them. */
.lane-chip.money { flex-shrink: 0; }
@container lane (max-width: 24rem) {
  .lane-foot-day, .lane-chip .n { display: none; }
}
/* A lane's screen in its card (syncLaneScreens): the still beside its name and buttons where the card is wide enough,
   over them where it isn't. */
.lane { container: lane / inline-size; }
.lane-screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; padding: 0 1rem .75rem; }
.lane-screen-frame { position: relative; display: grid; place-items: center; width: 100%; min-height: 0; aspect-ratio: 5 / 3; padding: 0; overflow: hidden; border-radius: var(--radius-sm); --fill: #0b0e12; --fill-hover: #0b0e12; --fill-active: #0b0e12; }
.lane-screen-frame img { width: 100%; height: 100%; object-fit: contain; }
.lane-screen-frame img[hidden], .lane-screen-empty[hidden] { display: none; }
.lane-screen-empty { padding: .5rem; color: var(--muted); font-size: .75rem; text-align: center; }
.lane-screen-age { position: absolute; bottom: .375rem; left: .375rem; padding: 0 .375rem; border-radius: var(--radius-sm); background: var(--scrim); color: #fff; font-size: .6875rem; }
.lane-screen-age:empty { display: none; }
.lane-screen-side { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; min-width: 0; }
.lane-screen-side > :is(b, .sub) { flex: 1 1 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-screen-side .sub { font-size: .75rem; }
.lane-screen-side button { flex: 1 1 6rem; width: auto; min-height: var(--tap); padding-inline: .5rem; font-size: .875rem; }
@container lane (min-width: 24rem) {
  .lane-screen { grid-template-columns: 15rem minmax(0, 1fr); align-items: stretch; }
  .lane-screen-side { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .lane-screen-side > :is(b, .sub) { flex: none; }
  .lane-screen-side button { flex: none; }
  .lane-screen-side > b + .sub { margin-bottom: auto; }
}
.lane-boom { position: relative; grid-area: first; justify-self: start; display: flex; flex-direction: column; align-items: center; gap: .125rem; min-width: 0; text-align: center; }
.lane-boom .boom-icon { width: 4.125rem; }
.lane-boom .boom-words { font-size: .75rem; }
/* The lane's interphone ringing (paintCallMarks): a round mark in the calls' colour at the drawing's top right, the sky
   over the arm whether it is up or down, for a few seconds after a press. It shakes like a ringing phone. */
.lane-boom .call-mark { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--mark-call); color: #1f1a05; box-shadow: 0 0 0 .125rem var(--panel); }
.lane-boom .call-mark[hidden] { display: none; }
.lane-boom .call-mark .icon { width: .9375rem; height: .9375rem; margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .lane-boom .call-mark .icon { animation: call-ring 1s ease-in-out infinite; }
  .lane-boom .call-mark::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: .125rem solid var(--mark-call); animation: call-wave 1s ease-out infinite; }
}
@keyframes call-ring { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-18deg); } 20%, 40% { transform: rotate(18deg); } }
@keyframes call-wave { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.position .boom-tag { display: none; }
.lane-top > .position { grid-area: second; justify-self: end; flex-direction: column; flex-wrap: nowrap; align-items: center; gap: .125rem; min-width: 0; min-height: 0; padding: 0; background: none; font-size: .75rem; font-weight: 400; }
.lane-top > .position .boom-icon { width: 4.125rem; }
.lane-top > .position .boom-tag { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
/* Not closed is a warning, closed a word, as a lane's boom says it. */
.lane-top > .position.notClosed #position-text { padding: 0 .375rem; border-radius: var(--radius); background: var(--not-closed); font-weight: 600; }
.lane-top > .position.closed #position-text { color: var(--muted); }
/* The newest reads, five at most: each row looks its ticket up. */
.lane-read .list { margin-top: .375rem; }
.lane-read .item { padding: .375rem .5rem; background: rgb(255 255 255 / .05); }
.lane-read .item.refused { background: var(--refused-bg); }
/* Every read is two lines of one line each, so the rows are the same height whatever they say: the first line
   gives the time, the number, the holder (which gives way first) and the outcome; the second the stay. */
/* A nowrap line would stretch the grid's track to its own length: the track is the card's width, whatever a row says. */
.lane, .lane-read { min-width: 0; }
.lane-read .list { grid-template-columns: minmax(0, 1fr); }
.lane-row .line { display: block; min-width: 0; line-height: 1.375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-row .l1 { display: flex; align-items: center; gap: .5rem; overflow: hidden; }
.lane-row .l1 > * { flex: none; }
.lane-row .l1 .who { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lane-row .l1 .who:empty { display: none; }
.lane-row .l1 .badge:last-child { margin-left: auto; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; }
/* A refusal and what it owed, last on the line: it gives way with an ellipsis, as the holder does. Held whole (flex:
   none), the end of "Impayé ● 25,00 €" was cut with nothing to say so on a PC column of 83 to 100rem. */
.lane-row .l1 > .result:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lane-row .l1 .at { font-variant-numeric: tabular-nums; }
.lane-row .l2 { margin-top: 0; font-size: .8125rem; }
.lane-row .badge { white-space: nowrap; line-height: 1.25rem; }
/* In the page's own face, not the monospace one: its "@" and "#" are drawn small and high. */
.lane-row code.ticket { font-family: inherit; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.lane.valid { border-left-color: var(--closed); }
.lane.refused { border-left-color: var(--not-closed); background: var(--refused-bg); }
/* The gate buttons keep their full strength: they are not what is being read again. */
#live-section.refreshing .lane-read, #live-section.refreshing .list, .lanebar.refreshing .lane-read { opacity: .45; }

/* Gate commands: open once, back to normal, then the emergency opening, one under the other (feed.css). The everyday
   ones neutral, on the card's own colour; "Mode normal" the main one while the lane is held open (primary); the
   emergency opening the danger one (button.urgent). The sas boom's menu in the exit's card looks the same. */
.gate-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .5rem; padding: 0 .75rem .75rem; }
:is(.gate-actions, .sas.in-lane .commands) button:not(.urgent, .primary) { --fill: rgb(0 0 0 / .25); --fill-hover: rgb(255 255 255 / .08); --fill-active: rgb(255 255 255 / .14); }
:is(.gate-actions, .sas.in-lane .commands) button { font-weight: 600; }
/* Why a button can't be pressed (no car on the loops): a small line under them, not a title only a mouse can find. */
.gate-why { grid-column: 1 / -1; margin: 0; font-size: .8125rem; line-height: 1.3; }
.gate-site { margin-top: .5rem; }
.gate-confirm { border: 2px solid var(--accent); }
.gate-confirm.lasting { border-color: var(--warn-line); }
.gate-confirm p { margin: 0 0 .75rem; }
.gate-card { display: grid; gap: .5rem; margin-bottom: .75rem; }
.check { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; color: var(--text); font-size: 1rem; }
.check input { width: 1.25rem; min-height: 0; height: 1.25rem; margin: 0; }
.lookup-result button { margin-top: .75rem; }
.lane-name { color: var(--muted); font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; }

/* One column beside the camera: the lane bar, the search with the ticket looked up, then the events feed (feed.css). */
.live-side { display: flex; flex-direction: column; }
.live-find .lookup { margin-top: 0; }

.lookup { margin-top: 1rem; }
.lookup .row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.lookup .row button { width: auto; margin: 0; padding: .5rem 1rem; }

.lookup-result {
  margin-top: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  background: var(--panel);
  display: flow-root;
}

/* The app's own look for the search field: a browser's has its own corners and height. Its cross stays. */
.lookup input[type="search"] { -webkit-appearance: none; appearance: none; }
/* A number refused before it was asked for (app.js, lookupInvalid): the field says so by its border too. */
.lookup input[aria-invalid="true"] { border-color: var(--bad-text); }
/* The box's first words, where the keyboard is sent after a wider search (app.js, focusLookup). */
.lookup-result [tabindex="-1"]:focus-visible { outline: var(--focus); outline-offset: 2px; }
.lookup .sub { margin: 0; }
/* How far back the search reads Janus: the word and its three choices (a .segmented group, feed.css) under the field. */
.lookup-span { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
/* Four choices and their word on one line of a phone: narrower sides than a two-choice switch has. */
.lookup-span .segmented button { padding-inline: .5rem; }
/* With the room (a PC's column, the user's ask 2026-11-17), the field, Chercher and Période are one line: the field's
   label and the hint under it leave the eye, not a screen reader (the field keeps them as its name and its
   description, and the hint as its tooltip, app.js). A container, so it follows the column, not the window. */
.live-find { container: livefind / inline-size; }
@container livefind (min-width: 44rem) {
  .lookup { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; align-items: center; }
  .lookup > label, #lookup-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lookup-span { flex-wrap: nowrap; margin-top: 0; }
}

/* The box's first line: what it says of itself, and the button that puts it away. */
.lookup-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: start; margin-bottom: .5rem; }
.lookup-top .sub { margin: 0; }
/* No hint: the button floats at the corner and the content flows beside it. */
.lookup-top.bare { float: right; display: block; margin: 0 0 .25rem .75rem; }
.lookup-result .lookup-top button { width: auto; min-height: 2.25rem; margin: 0; padding: .25rem .75rem; font-size: .875rem; }

.history + .history { margin-top: 1.25rem; padding-top: 1rem; border-top: 2px solid var(--line); }
/* The top of a history reads as a printed ticket: what it is, its number large, when it was issued, and a perforation
   under it. The 22 digits are in its tooltip. */
.ticket-head { padding-bottom: .625rem; margin-bottom: .25rem; border-bottom: 2px dashed var(--line); }
/* It is a <header>, and main.app header (the page's) made it a row: the number shrank between what it is and when it
   was issued and broke inside ("#632 / 9", 1334 px at the airport). The feed's head keeps that row (feed.css). */
main.app .ticket-head { display: block; margin-bottom: .25rem; }
.ticket-kind { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ticket-num { font-size: 1.75rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ticket-num.raw { font-size: 1rem; line-height: 1.3; word-break: break-all; }
.ticket-meta { margin-top: .125rem; color: var(--muted); font-size: .875rem; }
.ticket-meta b { color: var(--text); }
/* A history's rows are all one number's, so a number hovered lights every one of them: a tint, not a frame each. */
.history .item[data-hot] { outline: none; background: rgb(232 121 249 / .08); }
/* One heading for a day's moments: the rows under it say the time alone. */
.history-day { margin: .75rem 0 .25rem; color: var(--muted); font-size: .8125rem; font-weight: 600; }
.history-day::first-letter { text-transform: uppercase; }
/* More rows of a list, on demand. */
.list-more { margin-top: .5rem; min-height: 2.5rem; font-size: .875rem; }

/* A moment of a ticket's history. Where the recordings cover it: the camera's picture, the text, the way to the Relecture. */
.moment { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem .75rem; align-items: center; padding-inline: 0; }
.moment.recorded { grid-template-columns: 6rem minmax(0, 1fr) auto; }
/* A row with its ▶ but no picture (a payment, a boom, a command). */
.moment.playable { grid-template-columns: minmax(0, 1fr) auto; }
.moment + .moment { border-top: 1px solid var(--line); }
.moment.refused { padding-inline: .5rem; border-radius: .375rem; }
/* The moment the Relecture is on, in the colour of its line. */
.moment[data-current] { box-shadow: inset .25rem 0 0 var(--now); padding-left: .625rem; }
.lookup-result .moment button { margin: 0; }

/* The substream is 704x576, squeezed from the camera's 16:9 picture, as the video is: fill stretches it back. */
.still { display: grid; place-items: center; width: 6rem; min-height: 0; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; --fill: #000; --fill-hover: #000; --fill-active: #000; }
.still img, .moment-still img { display: block; width: 100%; height: 100%; object-fit: fill; }
.still .sub { margin: 0; font-size: .75rem; }
.moment-play { width: 2.75rem; min-height: 2.75rem; padding: 0; }
.moment-still { grid-column: 1 / -1; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #000; }
.moment-still .warn-text { margin: .75rem; }
/* What Janus logged for a step, folded under its line: small, and no taller than a line until it is opened. */
.step-ops { margin-top: .125rem; }
/* Small, but not smaller than a mouse can aim at (1.5rem); a finger gets its 44 px at the end. */
.step-ops summary { display: inline-flex; align-items: center; min-height: 1.5rem; padding: 0; font-size: .8125rem; text-decoration: underline; }
.step-ops .line.sub { margin-top: .125rem; padding-left: .75rem; border-left: 2px solid var(--line); }
/* The time and the stay each hold on one line. On a phone the picture gives the text some of its room. */
.moment b { white-space: nowrap; }
/* 4.875rem keeps the 16:9 picture 44 px tall, as tall as a finger needs (4.5rem made it 41). */
@media (max-width: 30rem) {
  .moment.recorded { grid-template-columns: 4.875rem minmax(0, 1fr) auto; gap: .5rem; }
  .still { width: 4.875rem; }
}

/* The passages around the Relecture's line: a history's rows, each followed by what its number did next. */
.events .moment { padding-inline: .5rem; }
.events .moment[data-current] { padding-left: .625rem; }
.events .moment button { margin: 0; }
.passage-next { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem .75rem; align-items: center; margin-left: 1rem; padding-left: .75rem; border-left: 2px solid var(--line); }
.passage-next.recorded { grid-template-columns: 4.5rem minmax(0, 1fr) auto; }
.passage-next .still { width: 4.5rem; }

.list { display: grid; gap: 1px; border-radius: var(--radius); overflow: hidden; }
.list > p { margin: .25rem 0; }

.item {
  padding: .5rem .75rem;
  background: var(--panel);
  overflow-wrap: anywhere;
}

/* A row that looks its number up: two taps are two looks, never a zoom. */
.item[role="button"] { cursor: pointer; touch-action: manipulation; }
.item.refused { background: var(--refused-bg); }
.item .line { margin: 0; }
.item .line.sub { margin-top: .125rem; }

.badge {
  display: inline-block;
  padding: 0 .5rem;
  border-radius: var(--radius-pill);
  background: var(--unknown);
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge.ok { background: var(--closed); }
.badge.bad { background: var(--alert); color: var(--bad-badge-text); }
.badge.warn { background: var(--warn-bg); color: var(--warn-text); }

code.ticket { font-size: .875rem; }
.warn-text { color: var(--bad-text); margin: .25rem 0; }
.totals { margin-bottom: .5rem; }
.total { padding: .25rem 0; }

.item:focus-visible, .lane-read:focus-visible { outline: var(--focus); outline-offset: -2px; }
/* A number hovered anywhere is lit everywhere (app.js, hoverTicket): in the lists, the passages, the history and on the bands. */
.item[data-hot], .lane-read .item[data-hot] { outline: 2px solid var(--mark-ticket); outline-offset: -2px; background: rgb(232 121 249 / .18); }
.item.refused[data-hot], .lane-read .item.refused[data-hot] { background: var(--refused-hot); }
/* A row the keyboard is on is lit too (focusin, hoverTicket): the keyboard's ring, not the number's colour, says where it is. */
.item[data-hot]:focus-visible, .lane-read .item[data-hot]:focus-visible { outline: var(--focus); }

/* Cartes tab. From the top: the search and the choice of view (they stay in view from 72rem), three tiles that say
   what the cards are (all of them, the ones in somebody's hands, the ones to go through), then the companies and the
   Janus states beside the rows, and the rows in columns. A usage is the same colour wherever it is said (--use-*,
   set by data-usage): the tiles, the companies' figures, each row's edge and badge. What a colour says is always
   written beside it too. One column on a phone. */
.cards { --cards-bar: 0px; max-width: 120rem; margin: 0 auto; }

/* Read by a screen reader, not drawn: a column's head that is only a colour, a field's name that its placeholder says. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

[data-usage="active"] { --use: var(--use-active); }
[data-usage="quiet"] { --use: var(--use-quiet); }
[data-usage="dormant"] { --use: var(--use-dormant); }
[data-usage="never"] { --use: var(--use-never); --use-text: var(--use-never-text); }
[data-usage="retired"] { --use: var(--use-retired); }
.dot { display: inline-block; flex: none; width: .625rem; height: .625rem; border-radius: 50%; background: var(--use, var(--unknown)); }

.cards-bar { display: grid; gap: .625rem; padding-bottom: .75rem; }
.cards-choices { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.cards-bar-end { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
.cards-bar-end .sub { margin: 0; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.cards-bar-end button { width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.chip { width: auto; min-height: 2.25rem; padding: .25rem .75rem; border-radius: var(--radius-pill); font-size: .875rem; }

/* The three tiles. A tile's big button is its filter, the buttons under it split it by usage; the one in force has
   the accent around it. */
.cards-kpis { display: grid; gap: .75rem; }
.kpi-card { display: grid; align-content: start; gap: .625rem; min-width: 0; padding: .75rem 1rem .875rem; border-radius: var(--radius-lg); border-left: .25rem solid transparent; background: var(--panel); }
.kpi-card:has([aria-pressed="true"]) { outline: 2px solid var(--accent); outline-offset: -2px; }
.kpi-ok { border-left-color: var(--use-active); }
.kpi-warn { border-left-color: var(--use-dormant); }
.kpi-card > p { margin: 0; }
.kpi-main { --fill: transparent; --fill-hover: rgb(255 255 255 / .06); --fill-active: rgb(255 255 255 / .09); display: flex; flex-wrap: wrap; align-items: baseline; gap: .125rem .75rem; width: auto; min-height: 0; margin: -.125rem -.375rem 0; padding: .125rem .375rem; border: 0; border-radius: var(--radius); text-align: left; font-weight: 400; }
.kpi-main:focus-visible, .part:focus-visible, .num-btn:focus-visible, .co-pick:focus-visible { outline-offset: 0; }
.cards-kpis .kpi-label { flex: none; }
.kpi-split { height: .625rem; }
.kpi-split i { background: var(--use); }
.kpi-parts { display: flex; flex-wrap: wrap; gap: .375rem; }
.part { display: inline-flex; align-items: center; gap: .375rem; width: auto; min-height: 2rem; padding: .125rem .75rem; border-radius: var(--radius-pill); font-size: .875rem; }
.part-n { font-variant-numeric: tabular-nums; }
.part[aria-pressed="true"] { --fill: var(--accent-fill); --fill-hover: var(--accent-fill-hover); --fill-active: var(--accent-fill-hover); border-color: transparent; color: var(--on-accent); }
.part:disabled { opacity: .45; }
.part.warn { border-color: var(--warn-line); }
.cards-kpis + .sub { margin: .5rem 0 0; }

.cards-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem 1.5rem; margin-top: .75rem; align-items: start; }
.cards-rail { display: grid; gap: .75rem; min-width: 0; }
.cards-main { min-width: 0; container: cardsmain / inline-size; --cc-cols: 4rem 9.25rem 7rem minmax(6rem, 1fr) minmax(0, 1.5fr) 6.5rem; }

/* The panels of the side: the companies and the Janus states, each folds. */
.cards-panel { margin: 0; padding: 0 1rem; border-radius: var(--radius-lg); background: var(--panel); }
.cards-panel > summary { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 0; color: var(--text); font-weight: 600; list-style: none; }
.cards-panel > summary::-webkit-details-marker { display: none; }
.cards-panel > summary::after { content: ''; width: .5rem; height: .5rem; margin: 0 .25rem 0 auto; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.cards-panel[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.cards-panel-count { color: var(--muted); font-size: .875rem; font-weight: 400; }
.cards-panel-body { padding-bottom: 1rem; }
.cards-panel-body > .sub { margin: .75rem 0 0; }

/* The companies: the name, then one figure per usage under that usage's colour, then the total. A figure is tinted
   with its usage, so a column that is all one colour reads at a glance; zero is a dot. */
.cards-summary-scroll { overflow-x: auto; margin-inline: -.25rem; padding-inline: .25rem; }
.cards-companies { width: 100%; border-collapse: collapse; font-size: .875rem; }
.cards-companies th, .cards-companies td { padding: .125rem 0; font-weight: 400; text-align: left; white-space: nowrap; }
.cards-companies thead th { padding-bottom: .375rem; border-bottom: 1px solid var(--line); text-align: center; }
.cards-companies .num { padding-inline: .125rem; text-align: center; font-variant-numeric: tabular-nums; }
.cards-companies td.num { color: var(--muted); }
.cards-companies .co-row > th { width: 100%; padding-right: .5rem; }
.co-pick { --fill: transparent; --fill-hover: var(--control); --fill-active: var(--control-hover); display: block; width: 100%; min-height: 1.875rem; padding: 0 .5rem; border: 0; border-radius: var(--radius-sm); overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: .9375rem; font-weight: 500; }
.co-pick[aria-pressed="true"] { --fill: var(--accent-fill); --fill-hover: var(--accent-fill-hover); --fill-active: var(--accent-fill-hover); color: var(--on-accent); font-weight: 600; }
.num-btn { --fill: color-mix(in srgb, var(--use) 16%, transparent); --fill-hover: color-mix(in srgb, var(--use) 30%, transparent); --fill-active: color-mix(in srgb, var(--use) 38%, transparent); width: auto; min-width: 2rem; min-height: 1.875rem; padding: 0 .25rem; border: 0; border-radius: var(--radius-sm); color: var(--text); font-size: .875rem; font-variant-numeric: tabular-nums; }
.co-total { padding-left: .5rem; color: var(--muted); }
/* A usage the list is narrowed to: the other columns step back, and the figures show where those cards are. */
.cards-companies[data-usage="active"] td:is([data-usage="quiet"], [data-usage="dormant"], [data-usage="never"], [data-usage="retired"]),
.cards-companies[data-usage="quiet"] td:is([data-usage="active"], [data-usage="dormant"], [data-usage="never"], [data-usage="retired"]),
.cards-companies[data-usage="dormant"] td:is([data-usage="active"], [data-usage="quiet"], [data-usage="never"], [data-usage="retired"]),
.cards-companies[data-usage="never"] td:is([data-usage="active"], [data-usage="quiet"], [data-usage="dormant"], [data-usage="retired"]),
.cards-companies:is([data-usage="retired"], [data-usage="still"]) td:is([data-usage="active"], [data-usage="quiet"], [data-usage="dormant"], [data-usage="never"]),
.cards-companies[data-usage="held"] td:is([data-usage="dormant"], [data-usage="never"], [data-usage="retired"]),
.cards-companies[data-usage="review"] td:is([data-usage="active"], [data-usage="quiet"]) { opacity: .35; }
/* The second line: busiest month, subscriptions, and the gap that is owed when it is negative. */
.co-note td { padding: 0 .5rem .375rem; color: var(--muted); font-size: .75rem; white-space: normal; }
.co-note .short { color: var(--bad-text); }
.co-solo > *, .co-note > td { border-bottom: 1px solid var(--line); }
.cards-companies tbody tr:last-child > * { border-bottom: 0; }

.cards-empty { margin: 0 0 .75rem; padding: 1.5rem 1rem; border-radius: var(--radius-lg); background: var(--panel); color: var(--muted); text-align: center; }

/* The time line of the cards (cardlanes.js). A sideways drag slides the days; up and down is still the page's. */
.lanes-canvas { display: block; width: 100%; border-radius: var(--radius); touch-action: pan-y; cursor: grab; }
.lanes-canvas:active { cursor: grabbing; }
.lanes-canvas:focus-visible { outline: var(--focus); outline-offset: 2px; }
.lanes-tools { position: sticky; top: var(--cards-bar); z-index: 1; padding: .375rem 0; background: var(--bg); }
.lanes-key { white-space: pre-wrap; }
.lanes-mark { display: inline-block; width: .75rem; height: .625rem; border-radius: 2px; vertical-align: baseline; }
.lanes-mark.passage { background: var(--mark-passage); }
.lanes-mark.refusal { background: var(--mark-refusal); }
.lanes-mark.week { background: var(--accent); }
.lanes-info { min-height: 1.25rem; color: var(--text); }
.lanes-idle { margin: .25rem .25rem 0; }
/* How many cards were used in the days across, kept in view with the buttons that choose them. */
.lanes-stats { margin: .375rem 0 0; font-size: .9375rem; }
.lanes-stats strong { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
/* Under the buttons: the count by group, then the unused cards and the never used ones, each in a box that scrolls. */
.lanes-summary { margin: .5rem 0 1rem; padding: .75rem 1rem; border-radius: var(--radius-lg); background: var(--panel); }
.lanes-scroll { overflow: auto; max-height: 18rem; }
.lanes-counts { max-height: none; margin-bottom: .75rem; }
.lanes-summary table { border-collapse: collapse; min-width: min(100%, 36rem); font-size: .875rem; }
.lanes-summary th, .lanes-summary td { padding: .375rem .625rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-weight: 400; }
.lanes-summary thead th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-size: .8125rem; }
.lanes-summary .num { text-align: right; font-variant-numeric: tabular-nums; }
.lanes-counts tbody tr:last-child td { border-bottom: 0; font-weight: 600; }
.lanes-list { margin-top: .75rem; }
.lanes-list > summary { cursor: pointer; font-weight: 600; margin-bottom: .25rem; }
.lanes-list td .text-link { font-family: ui-monospace, Consolas, monospace; }
.lanes-rule { margin-top: .75rem; }
/* A group's title sits in the list itself, so one pass keeps every row that hasn't changed (app.js, reconcile). */
.cards-group { margin: 0; padding: .75rem .25rem .375rem; background: var(--bg); }
.card-holder { font-weight: 600; }
.card-company { color: var(--muted); font-size: .875rem; }
.card-refusal { color: var(--bad-text); }
.card-events { margin-top: .375rem; padding-top: .375rem; border-top: 1px solid var(--line); }

/* The rows, one panel. A row is its number, its holder and badges, when it last passed and how often; its edge is its
   usage's colour (the row's data-usage), so a list grouped by company still shows what each card is. Narrow, the
   parts run together in lines; wide (the container query below) they sit in columns. */
#cards-list { display: block; border-radius: var(--radius-lg); background: var(--panel); overflow: clip; }
#cards-list .item.card { position: relative; padding: .625rem 2.5rem .625rem .875rem; border-top: 1px solid var(--line); box-shadow: inset .1875rem 0 0 var(--use, transparent); }
#cards-list > :first-child { border-top: 0; }
#cards-list .item.card::after { content: ''; position: absolute; top: 1.125rem; right: 1.125rem; width: .5rem; height: .5rem; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); }
#cards-list .item.card.open::after { top: 1.3125rem; transform: rotate(225deg); }
#cards-list .cards-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: .125rem .75rem; padding: .5rem .875rem; border-top: 1px solid var(--line); background: var(--control); }
.cg-name { font-size: 1rem; font-weight: 700; }
.cg-count { color: var(--muted); font-size: .875rem; }
.cg-meta { margin-left: auto; color: var(--muted); font-size: .8125rem; }

/* A badge of a usage is tinted with it, not filled: the colour is read from the edge of the row and the dot of the
   tiles, and the words say the rest. A retired card keeps the red fill that says which word retires it. */
.badge[data-usage]:not(.bad) { background: color-mix(in srgb, var(--use) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--use) 45%, transparent); color: var(--use-text, var(--use)); }
.cc-state .badge:not(.warn) { background: transparent; box-shadow: inset 0 0 0 1px var(--control-line); color: var(--muted); font-weight: 500; }

.cc-main { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin-bottom: .125rem; }
.cc-id { font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-who { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; min-width: 0; }
.cc-who .sub, .cc-last .sub { margin: 0; }
.cc-who:empty, .cc-usage:empty, .cc-state:empty { display: none; }
.cc-last, .cc-days { display: inline; color: var(--muted); font-size: .875rem; }
/* A narrow row says how often in words after the last passage; a wide one draws it. */
.cc-days .days-n, .cc-days .days-track { display: none; }
.cc-refusal { margin: .125rem 0 0; }

/* The head of the columns. It is the rows' own grid: the same columns, so the words sit over their figures. */
.cards-colhead { display: none; }
@container cardsmain (min-width: 60rem) {
  .cards-colhead { display: grid; grid-template-columns: var(--cc-cols); gap: 0 1rem; align-items: center; position: sticky; top: var(--cards-bar); z-index: 3; height: 2rem; padding: 0 2.5rem 0 .875rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--panel); box-shadow: 0 1px 0 var(--line); color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .cards-colhead:not([hidden]) + #cards-list { border-top-left-radius: 0; border-top-right-radius: 0; }
  #cards-list .item.card { display: grid; grid-template-columns: var(--cc-cols); gap: .25rem 1rem; align-items: center; padding-block: .5rem; }
  #cards-list .cc-main { display: contents; }
  #cards-list .cc-id, #cards-list .cc-usage, #cards-list .cc-state, #cards-list .cc-who, #cards-list .cc-last, #cards-list .cc-days { grid-row: 1; min-width: 0; }
  #cards-list .cc-id { grid-column: 1; }
  #cards-list .cc-usage { grid-column: 2; display: block; }
  #cards-list .cc-state { grid-column: 3; display: block; }
  #cards-list .cc-who { grid-column: 4; display: flex; }
  #cards-list .cc-last { grid-column: 5; display: block; }
  #cards-list .cc-days { grid-column: 6; display: flex; align-items: center; gap: .5rem; }
  .cc-when:not(.sub) { color: var(--text); }
  .cc-days .days-long { display: none; }
  .cc-days .days-n { display: inline; flex: none; min-width: 2.25rem; text-align: right; font-variant-numeric: tabular-nums; }
  .cc-days .days-track { display: block; flex: 1; height: .375rem; border-radius: 1rem; background: rgb(255 255 255 / .08); overflow: hidden; }
  .days-track i { display: block; width: var(--w); height: 100%; border-radius: 1rem; background: var(--use, var(--accent)); }
  #cards-list .cc-refusal, #cards-list .card-events { grid-column: 2 / -1; margin: 0; }
  #cards-list .card-events { margin-top: .25rem; }
  #cards-list .cards-group { position: sticky; top: calc(var(--cards-bar) + 2rem); z-index: 2; }
}

/* Synthèse tab. From the top: the period (it stays in view on a wide screen, every figure below is of it), three
   figures (the takings, the exits, what to review), the review list and the days beside the stays, the hours and the
   tariff, and every ticket across the bottom. The bars say the same in every block: blue is card or paid, amber is
   cash, grey is free (--series-*); what a bar says is always written beside it too. One column on a phone. */
.synthese { --syn-gap: 1rem; max-width: 120rem; margin: 0 auto; }

.synthese-bar { display: grid; gap: .75rem; padding-bottom: .75rem; }
.synthese-dates { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.synthese-dates label { display: block; margin-bottom: .25rem; }
.synthese-read { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.synthese-read .sub { margin: 0; }
.synthese-read button { width: auto; }
.synthese-source { margin: 1.25rem 0 0; }
/* Figures on screen while they are read again stay, dimmed: the page does not jump and old numbers are not passed
   off as new. */
#synthese-body[data-loading] { opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  #synthese-body { transition: opacity .15s; }
}

/* The parts of a bar or a legend. */
.s-card { background: var(--series-card); }
.s-cash { background: var(--series-cash); }
.s-free { background: var(--series-free); }
.s-paid { background: var(--series-paid); }
.swatch { display: inline-block; flex: none; width: .625rem; height: .625rem; border-radius: 2px; }
.split { display: flex; height: .5rem; overflow: hidden; border-radius: .25rem; background: var(--line); }
.split i { display: block; min-width: 2px; }
.split i + i { margin-left: 2px; }

/* The three figures. */
.synthese-kpis { display: grid; gap: var(--syn-gap); margin-bottom: var(--syn-gap); }
.kpi { display: grid; align-content: start; gap: .5rem; min-width: 0; padding: 1rem 1.25rem; border-radius: var(--radius-lg); background: var(--panel); }
.kpi > p { margin: 0; }
.kpi-label { color: var(--muted); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.kpi-value { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-hero .kpi-value { font-size: clamp(2rem, 8vw, 2.75rem); }
.kpi-sub { color: var(--muted); font-size: .875rem; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
/* A bare li is a flex row with a line under it (the settings' lists): a legend's is neither. */
.lg { display: grid; grid-template-columns: auto auto 1fr; grid-template-areas: "swatch name value" ". sub sub"; justify-content: start; gap: .125rem .5rem; align-items: baseline; padding: 0; border: 0; }
.lg .swatch { grid-area: swatch; align-self: center; }
.lg-name { grid-area: name; }
.lg-value { grid-area: value; font-variant-numeric: tabular-nums; }
.lg-sub { grid-area: sub; color: var(--muted); font-size: .8125rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .75rem 1.5rem; margin-top: .25rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.stat { display: grid; gap: .125rem; align-content: start; }
.stat .kpi-label { font-size: .875rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.stat-value { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
/* What to review has the colour of its state, in the figure and in the edge: red to look at, green when all is in
   order, grey when nothing was checked. */
.kpi-review { --state: var(--unknown); box-shadow: inset .25rem 0 0 var(--state); }
.kpi-review.bad { --state: var(--mark-alarm); }
.kpi-review.ok { --state: var(--mark-passage); }
.kpi-review.bad .kpi-value { color: var(--bad-text); }
.kpi-review.ok .kpi-value, .kpi-review.ok .verdict { color: var(--ok-text); }
.verdict { display: flex; align-items: center; gap: .375rem; font-size: .875rem; }
.verdict .icon { margin-right: 0; }
.kpi-review button { justify-self: start; width: auto; margin-top: .25rem; }

/* The blocks below the figures. */
.synthese-layout { display: grid; gap: var(--syn-gap); align-items: start; }
.synthese-main, .synthese-side { display: grid; gap: var(--syn-gap); align-content: start; min-width: 0; }
.syn-card { min-width: 0; padding: 1rem 1.25rem 1.125rem; border-radius: var(--radius-lg); background: var(--panel); }
.syn-head { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem 1rem; margin-bottom: .75rem; }
.syn-head h2 { margin: 0; font-size: 1rem; }
.syn-head .aside { margin-left: auto; }
.syn-head .aside button { width: auto; }
.syn-note { margin: .75rem 0 0; }
.legend-line { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 0 auto; color: var(--muted); font-size: .8125rem; }
.key { display: inline-flex; align-items: center; gap: .375rem; }
.syn-tickets { margin-top: var(--syn-gap); }
#synthese-review-card { scroll-margin-top: 4.5rem; }

/* A ticket to review: what it is and what is wrong with it on a line, with the way to it at the end, then its story. */
.review-row { display: grid; gap: .25rem; }
.rv-top { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .75rem; }
.rv-id { display: inline-flex; align-items: center; gap: .5rem; }
.rv-id b { font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.rv-flags { display: inline-flex; flex-wrap: wrap; gap: .375rem; }
.review-row .synthese-actions { margin-left: auto; }
.rv-story { margin: 0; }
.synthese-actions { white-space: nowrap; }
.syn-empty { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--ok-text); }
.syn-empty .icon { margin-right: 0; }

/* The report tables fix their layout and their first column; these have more columns, each as wide as its words,
   and a bar column that takes what the figures leave. */
.report-table.synthese-table { table-layout: auto; width: auto; min-width: 100%; margin: 0; }
.report-table.synthese-table th:first-child { width: auto; }
.synthese-table td, .synthese-table th { white-space: nowrap; }
.report-table.synthese-table td { vertical-align: middle; }
.report-table.synthese-table tbody tr:last-child td { border-bottom: 0; }
.synthese-table .strong { font-weight: 600; }
/* A zero is dimmed, so that a column of days nobody paid by cash does not shout. */
.synthese-table .zero { color: var(--muted); }
/* The one column that takes the width the others leave, so that the figures stay together and not spread. */
.synthese-table .bar-col, .synthese-table .remarks { width: 100%; }
.synthese-table .bar-col { min-width: 6rem; padding-inline: 1rem; }
.bar-track { display: block; height: .625rem; border-radius: .25rem; background: rgb(255 255 255 / .06); }
.bar-track .split { height: 100%; background: none; }
/* The side blocks are narrow: a bar gives way to the figures and a long title wraps. */
.synthese-side .synthese-table .bar-col { min-width: 3rem; padding-inline: .5rem; }
.synthese-side .synthese-table th { white-space: normal; vertical-align: bottom; }
/* What asks for a look has a red edge, found by running the eye down the first column. */
.synthese-table tr.flag td:first-child { box-shadow: inset .1875rem 0 0 var(--mark-alarm); }
@media (hover: hover) {
  .synthese-table tbody tr:hover { background: rgb(255 255 255 / .04); }
}
/* A fact's name keeps room to read on one or two lines whatever its value says. */
.synthese-facts { grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.3fr); gap: .5rem 1rem; margin: 0 0 .75rem; padding: 0; border-radius: 0; background: none; font-size: .875rem; }
.synthese-facts dd { font-variant-numeric: tabular-nums; }

/* A PC window: the period stays in view, the blocks sit side by side, and a long table scrolls under its own head. */
@media (min-width: 60rem) {
  .synthese-bar { position: sticky; top: 0; z-index: 5; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: .75rem 1.5rem; padding: .625rem 0; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
  .synthese-dates { display: flex; align-items: center; gap: 1rem; }
  .synthese-dates > div { display: flex; align-items: center; gap: .5rem; }
  .synthese-dates label { margin: 0; }
  .synthese-dates input { width: 10.5rem; }
  .synthese-read { justify-content: flex-end; }
  .synthese-kpis { grid-template-columns: repeat(12, minmax(0, 1fr)); margin-top: .5rem; }
  .kpi-hero { grid-column: span 12; }
  .kpi-flow, .kpi-review { grid-column: span 6; }
  .table-scroll.syn-scroll { max-height: 46rem; scrollbar-width: thin; scrollbar-color: var(--control-line) transparent; }
  .syn-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); box-shadow: 0 1px 0 var(--line); }
}
/* A mouse: fields and buttons as tall as the chips (a finger keeps its 44 px). */
@media (min-width: 60rem) and (pointer: fine) {
  .synthese-bar input, .synthese-read button, .syn-head .aside button { min-height: 2.25rem; padding-block: .25rem; }
}
@media (min-width: 64rem) {
  .synthese-layout { grid-template-columns: minmax(0, 1fr) minmax(24rem, 28rem); }
}
@media (min-width: 84rem) {
  .kpi-hero { grid-column: span 6; }
  .kpi-flow, .kpi-review { grid-column: span 3; }
}
/* A large screen: the stays and the hours beside the tariff, the days and the review list beside all three. */
@media (min-width: 100rem) {
  .synthese-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .synthese-side { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "bands tariff" "hours tariff"; }
  #synthese-bands-card { grid-area: bands; }
  #synthese-hours-card { grid-area: hours; }
  #synthese-tariff-card { grid-area: tariff; }
}

/* Rapports tab */
.report-form { max-width: 34rem; }
.report-form > .sub { margin: -.25rem 0 0; }
.choice { margin: 0; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); }
.choice legend { padding: 0 .25rem; color: var(--muted); font-size: .875rem; }
.choice label { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; color: var(--text); font-size: 1rem; }
.choice input { width: 1.25rem; min-height: 0; height: 1.25rem; margin: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pair label, #report-fees-row label { display: block; margin-bottom: .25rem; }
.report-box { padding: .75rem 1rem; border-radius: var(--radius); background: var(--panel); max-width: 34rem; }
.report-box > p { margin-top: 0; }
.report-dl { margin: .5rem 0 0; padding: 0; column-gap: 0; }
.report-dl dd { padding-left: 1rem; }
.report-box .warn-text { margin: .5rem 0 0; }
.report-dl .net { padding-top: .5rem; border-top: 1px solid var(--line); color: var(--text); font-weight: 700; }
#report-title:focus { outline: none; }
.report-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .5rem; margin-top: .75rem; max-width: 34rem; }
#report-partial { max-width: 34rem; }

/* The synthèse scrolls sideways on a narrow phone rather than pushing the page wider. */
.table-scroll { overflow-x: auto; }

.report-table { width: 100%; margin: 0 0 1rem; border-collapse: collapse; font-size: .875rem; }
.report-table th, .report-table td { padding: .375rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.report-table th { color: var(--muted); font-weight: 600; }
.report-table thead th:first-child { color: var(--text); }
.report-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.report-table tr.total td { font-weight: 700; }
.report-table tr.indent td:first-child { padding-left: 1.5rem; }

/* On screen, the same label column in every section, so the figures line up from one table to the next. Print keeps JRL's look. */
@media screen {
  .report-table { table-layout: fixed; }
  .report-table th:first-child { width: 46%; }
}

@media screen and (max-width: 30rem) {
  .report-table { font-size: .8125rem; }
  .report-table th, .report-table td { padding: .375rem .25rem; }
  .report-table th:first-child { width: 40%; }
  .report-table th.num { white-space: normal; }
  .report-table tr.indent td:first-child { padding-left: .75rem; }
}

/* Réglages: each block is a panel under its own title, so the page reads as a few things and not as one run of
   buttons. What is raw text in a panel takes the page's colour, to stand out from it. */
#tab-settings > details { margin: 0 0 1rem; padding: 0 1rem; border-radius: var(--radius); background: var(--panel); }
#tab-settings > details[open] { padding-bottom: 1rem; }
#tab-settings > details > summary { color: var(--text); font-weight: 600; }
#tab-settings pre { background: var(--bg); }
/* A list that ends its panel needs no line under its last row, nor room after it. */
#tab-settings li:last-child { border-bottom: 0; }
#tab-settings details > ul:last-child { margin-bottom: 0; }
#logout { margin-top: .5rem; }

/* A tablet upright and anything wider: the settings sit side by side. */
@media (min-width: 44rem) {
  #tab-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 0 2rem; align-items: start; }
}

/* A PC window, or a tablet held wide (an iPad is 1024 px and more that way): the whole width. The camera and the
   barrier keep the left and stay in view; lanes and tickets scroll beside them. */
@media (min-width: 60rem) {
  main.app { max-width: none; padding-left: max(1.5rem, env(safe-area-inset-left)); padding-right: max(1.5rem, env(safe-area-inset-right)); }

  main.app header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
  main.app .tabs { flex: none; width: min(40rem, 62%); margin-top: 0; }

  .call-panel { grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); }

  .live { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  /* No lanes or tickets on this gateway: the camera alone, not stretched across a wide window. */
  .live.solo { grid-template-columns: minmax(0, 60rem); justify-content: center; }
  .live-main { position: sticky; top: .75rem; max-height: calc(100dvh - 1.5rem - var(--dock)); overflow-y: auto; }
  /* What scrolls clips at its edge, and a focus ring drawn outside a button there went with it: 4px of room, taken
     back from the margin so nothing moves. */
  .live-main { padding-inline: 4px; margin-inline: -4px; }
  /* Sticky, the column is a layer of its own, and what it holds (the camera covering the window) was drawn under the
     lane bar beside it, whatever its own z-index. The whole column comes up while it does. */
  .live-main:has(.camera-frame.full) { z-index: 100; }
  /* What scrolls inside the page says so with a thin bar, not with a second full one beside the window's. */
  .live-main, .cards-rail { scrollbar-width: thin; scrollbar-color: var(--control-line) transparent; }

  /* Cartes: the companies and the states stay beside the rows instead of pushing them down the page, and the search
     and the choice of view share a line with the count. */
  .cards-layout { grid-template-columns: minmax(21rem, 24rem) minmax(0, 1fr); }
  .cards-rail { position: sticky; top: calc(var(--cards-bar) + .75rem); max-height: calc(100dvh - var(--cards-bar) - 1.5rem - var(--dock)); overflow-y: auto; }
  .cards-bar { grid-template-columns: minmax(12rem, 22rem) auto minmax(0, 1fr); align-items: center; gap: .75rem 1.5rem; padding: .625rem 0; }
  .cards-bar-end { justify-content: flex-end; }
  .cards-kpis { margin-top: .25rem; }

  /* What is left of the window's height is the picture's, with its buttons and caption. */
  html.docked .camera-frame.replaying { width: min(100%, calc((100dvh - var(--dock) - 11rem) * 16 / 9)); }
  .live-main > :first-child, .live-side > .notice:first-child { margin-top: 0; }
  .position { flex-direction: row; gap: 1rem; min-height: 4rem; font-size: 1.5rem; }
  .position .boom-icon { width: 5.25rem; }

  #tab-reports { display: grid; grid-template-columns: 24rem minmax(0, 1fr); gap: 0 2rem; align-items: start; }
  #report-form { grid-row: 1 / span 2; }
  #report-status, #report-hint, #report-result { grid-column: 2; }
  #report-hint { margin-top: 0; }
  #report-result > h2:first-child { margin-top: 0; }
}

/* A large PC screen: the camera takes less of the width than the lanes and the feed beside it. */
@media (min-width: 100rem) {
  .live { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* Cartes: the three tiles side by side from a tablet upright; from 72rem the bar is one line, 3.5rem tall, that stays
   in view, and the column heads and the groups' titles stick under it (--cards-bar is what they stop below). */
@media (min-width: 44rem) {
  .cards-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards-kpis .kpi-label { flex-basis: 100%; }
}
/* A phone: the tiles tighter, and what the peak month says is left to the companies' panel. */
@media (max-width: 43.99rem) {
  .cards-kpis { gap: .5rem; }
  .kpi-card { padding: .625rem .875rem; gap: .5rem; }
  .kpi-all > .kpi-sub { display: none; }
}
/* Wide enough for the third tile's four usages on one line. */
@media (min-width: 84rem) {
  .cards-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.7fr); }
}
@media (min-width: 72rem) {
  .cards { --cards-bar: 3.5rem; }
  .cards-bar { position: sticky; top: 0; z-index: 5; height: var(--cards-bar); padding: 0; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
}
/* A mouse: the search and the buttons as tall as the chips (a finger keeps its 44 px). */
@media (min-width: 60rem) and (pointer: fine) {
  .cards-bar input, .cards-bar-end button { min-height: 2.25rem; padding-block: .25rem; }
}

/* One column: a phone, or a tablet held upright. */
@media (max-width: 59.99rem) {
  /* The bar's row and the home indicator's strip under it (its padding below): what is kept clear of it, the page's
     end, a toast, a row brought into view, needs both, or on an iPhone the last line sat under the bar. */
  :root { --tabbar-row: 3.5rem; --tabbar: calc(var(--tabbar-row) + env(safe-area-inset-bottom)); }
  /* The strip is in --tabbar now: not added a second time. */
  main.app { padding-bottom: calc(1.5rem + var(--dock) + var(--tabbar)); }
  .toast { bottom: calc(var(--dock) + var(--tabbar) + 1rem); }
  main.app header { margin-bottom: .75rem; }
  main.app h1 { font-size: 1.125rem; }

  /* The tabs leave the header for the bottom of the window: under the thumb, and in view however far the page is
     scrolled. At the top they scrolled away with the title, and "En direct" took two lines. */
  main.app .tabs {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    gap: 0;
    margin: 0;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    border-top: 1px solid var(--line);
    background: var(--bg);
  }
  main.app .tabs button, main.app .tabs button[aria-selected="true"] {
    --fill: transparent;
    --fill-hover: var(--control);
    --fill-active: var(--control-hover);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .125rem;
    /* The row alone: the bar's own padding gives the strip under it. */
    min-height: var(--tabbar-row);
    padding: .25rem .125rem;
    border: 0;
    border-radius: 0;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 600;
  }
  /* The tab shown: its words at full strength, its drawing in the accent, a line over it. Not filled, as in the
     header: one filled block in a bar of four reads as a button to press, not as where one is. */
  main.app .tabs button[aria-selected="true"] { color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }
  main.app .tabs button[aria-selected="true"] .icon { color: var(--accent); }
  main.app .tabs .icon { width: 1.5rem; height: 1.5rem; margin: 0; }
  main.app .tabs button:focus-visible { outline-offset: -2px; }
}

/* Under a finger the small buttons grow to what a finger needs (--tap); under a mouse they keep the room they save. */
@media (pointer: coarse) {
  .chip, .list-more, .lookup-result .lookup-top button, .step-ops summary { min-height: var(--tap); }
}

/* Printing: only the sheet, black on white, the bordereau then the synthèse. */
.print-sheet { display: none; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; color: #000; font-size: 10pt; }
  body > main { display: none; }
  .print-sheet { display: block; }
  .print-page { break-after: page; }
  .print-page:last-child { break-after: auto; }
  .print-logo { width: 9cm; }
  .print-title { margin: .75rem 0 .25rem; font-weight: 700; font-size: 12pt; text-align: center; }
  .print-regie { margin: 0 0 1rem; font-weight: 700; text-align: center; }
  .print-info { margin-bottom: 1rem; border-collapse: collapse; }
  .print-info th, .print-info td { padding: .2rem .5rem; text-align: left; }
  .print-grid { width: 100%; border-collapse: collapse; }
  .print-grid th, .print-grid td { padding: .3rem .4rem; border: 1px solid #000; }
  .print-grid th { font-size: 8.5pt; }
  .print-grid .num { text-align: right; white-space: nowrap; }
  .print-grid tr.total td { font-weight: 700; }
  .print-sign { margin: 1.5rem 0 0 55%; }
  .print-sign p { margin: .2rem 0; }
  .print-note { margin-top: 1rem; font-size: 8pt; color: #444; }
  .report-table { font-size: 8.5pt; margin-bottom: .6rem; break-inside: avoid; }
  .report-table th, .report-table td, .report-table thead th:first-child { padding: .15rem .4rem; border-bottom: 1px solid #bbb; color: #000; }
}

/* Rows or tiles (viewmode.js, layoutToggle in app.js). The switch sets the list's data-layout and the style sheet is the
   only reader: the rows are the same nodes either way, so a picture already loaded stays. */
.layout-toggle button { min-height: 2.25rem; padding: .25rem .625rem; }
.layout-toggle[hidden] { display: none; }
.lookup-tools { display: flex; align-items: center; gap: .5rem; }

/* Cartes: a card is a tile, its parts run together as a narrow row's do. A group's title and an unfolded card take the whole line. */
#cards-list[data-layout="grid"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .5rem; background: none; border-radius: 0; overflow: visible; }
.cards-colhead:has(+ #cards-list[data-layout="grid"]) { display: none; }
#cards-list[data-layout="grid"] .item.card { display: block; padding-block: .625rem; border-top: 0; border-radius: var(--radius); background: var(--panel); }
#cards-list[data-layout="grid"] .item.card.refused { background: var(--refused-bg); }
#cards-list[data-layout="grid"] .item.card.open { grid-column: 1 / -1; }
#cards-list[data-layout="grid"] .cards-group { position: static; grid-column: 1 / -1; border-top: 0; border-radius: var(--radius); }
#cards-list[data-layout="grid"] .cc-main { display: flex; }
#cards-list[data-layout="grid"] :is(.cc-usage, .cc-state, .cc-who) { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
#cards-list[data-layout="grid"] :is(.cc-usage, .cc-state, .cc-who):empty, #cards-list[data-layout="grid"] .cc-days:empty { display: none; }
#cards-list[data-layout="grid"] .cc-last { display: block; }
#cards-list[data-layout="grid"] .cc-sep { display: none; }
#cards-list[data-layout="grid"] .cc-ago { display: block; }
#cards-list[data-layout="grid"] .cc-days { display: flex; align-items: center; gap: .5rem; margin-top: .25rem; }
#cards-list[data-layout="grid"] .cc-days .days-long { display: none; }
#cards-list[data-layout="grid"] .cc-days .days-n { display: inline; flex: none; min-width: 2.25rem; text-align: right; font-variant-numeric: tabular-nums; }
#cards-list[data-layout="grid"] .cc-days .days-track { display: block; flex: 1; height: .375rem; border-radius: 1rem; background: rgb(255 255 255 / .08); overflow: hidden; }
#cards-list[data-layout="grid"] .days-track i { display: block; width: var(--w); height: 100%; border-radius: 1rem; background: var(--use, var(--accent)); }
#cards-list[data-layout="grid"] .cc-refusal, #cards-list[data-layout="grid"] .card-events { margin: .25rem 0 0; }

/* A ticket's history: its steps as tiles, the head and each day's title across. */
.lookup-result[data-layout="grid"] .history { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem; }
.lookup-result[data-layout="grid"] .history > :not(.moment) { grid-column: 1 / -1; }
.lookup-result[data-layout="grid"] .history .history-day { margin-block: .25rem 0; }

/* The lookup's switch and close button widen the corner float: where that squeezes the history (tiles always, rows on
   a phone) they sit on a line of their own above it. */
.lookup-result[data-layout="grid"] .lookup-top.bare { float: none; margin: 0 0 .25rem; }
.lookup-result[data-layout="grid"] .lookup-top.bare .lookup-tools { justify-content: flex-end; }
@media (max-width: 40rem) {
  .lookup-result .lookup-top.bare { float: none; margin: 0 0 .25rem; }
  .lookup-result .lookup-top.bare .lookup-tools { justify-content: flex-end; }
}

/* An amount, said the same everywhere (amountChip in app.js): a blue dot and the figure. A filled dot is what was paid and
   how, a ring what is still owed. */
.amount { display: inline-flex; align-items: center; gap: .3125rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount small { color: var(--muted); font-size: .75rem; }
.amount-dot { flex: none; box-sizing: border-box; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--mark-payment); }
.amount[data-state="due"] .amount-dot { background: transparent; border: .125rem solid var(--mark-payment); }

/* A refusal's reason and what it owed stay together on a line that wraps. The span only: the paragraphs that say what
   a command did (#result, #gate-result) are .result too, and ran off a phone's screen on one line. */
span.result { white-space: nowrap; }

/* A number that is also the way to look it up: the largest thing on its row, and a link only by its underline on hover. */
.ticket-link { --fill: none; --fill-hover: none; --fill-active: none; display: inline; width: auto; min-height: 0; padding: 0; border: 0; color: inherit; font: inherit; font-size: 1.125rem; font-weight: 700; line-height: 1.375rem; text-align: left; font-variant-numeric: tabular-nums; }
/* Under a mouse only: after a tap a touch screen kept the underline on. */
@media (hover: hover) {
  button.ticket-link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
}
/* Under a finger the number is 44 px tall to touch (--tap) and no taller to the eye: the padding widens what takes the
   tap, and the same margin taken back keeps the row's height where the number is a flex item (a feed row's second line). */
@media (pointer: coarse) {
  .ticket-link { padding-block: calc((var(--tap) - 1.375rem) / 2); margin-block: calc((1.375rem - var(--tap)) / 2); }
}
.ticket-link code.ticket { font: inherit; }
.ticket-link .holder { font-size: .875rem; font-weight: 600; color: var(--muted); }
