/* La Vigie's one stylesheet, served by the tool: the page loads nothing from a third party, its fonts included
   (R-UI-01). `:root` holds docs/DESIGN.md's semantic tokens as written there (ADR 0136 point 1); every rule below it
   reads a token, and no colour is written anywhere else (`test_colours_are_tokens`). The primitives stay in DESIGN.md. */

/* The face (ADR 0136 point 2, ADR 0144, ADR 0148): Inter for every word, the logo's letters being drawn; variable,
   under the SIL Open Font Licence, beside its OFL.txt. `swap` shows the text in the fallback while the face loads, and
   the fallback holds the layout when it does not. */
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter/Inter-VF.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour — DESIGN.md « Semantic tokens », verbatim (the look of 22/11, ticket 237, ADR 0254). */
  --color-bg-page: #f5f3f0;          /* the page, a warm off-white (ticket 254) */
  --color-bg-raised: #ffffff;        /* surfaces: cards, the rail, the list, menus, the panel */
  --color-bg-sunken: #f2efeb;        /* a row's hover, a quiet ground inside a surface */
  --color-bg-rail: #ffffff;          /* the rail, a surface as the cards */
  --color-bg-rail-hover: #f2efeb;    /* an entry of the rail, hovered */
  --color-separator: #ebe6e0;        /* a rule inside a surface */
  --color-border: #e2ddd6;           /* a surface's or a quiet button's edge (decorative) */
  --color-border-control: #7d828e;   /* a field's edge (3:1, WCAG 1.4.11) */
  --color-text-primary: #0e0f13;     /* ink, near black */
  --color-text-secondary: #5f6470;   /* the second grey */
  --color-text-strong: #3d424d;      /* the third: strong secondary */
  --color-text-on-accent: #ffffff;   /* on the ink, on a state's solid */
  --color-text-on-accent-secondary: #b9bdc7; /* a second line on the ink (the toast's wine) */
  --color-accent-subtle: #eceef2;    /* a chosen ground (chips, the selected) */
  --color-accent-border: #dfe2e8;    /* its hover */
  --color-accent-solid: #0e0f13;     /* the one filled action, a segment on, a toggle on: the ink */
  --color-accent-solid-hover: #2b2f38;
  --color-accent-text: #0e0f13;      /* links, underlined */
  --color-focus-ring: #0e0f13;
  --color-logo: #6e1a2e;             /* the logo's line and letters, the brand's wine (ADR 0148), and nothing else */
  --color-logo-star: #b08d57;        /* the brand's gold: the logo's star, and nothing else (ADR 0148) */
  /* The state colours (SPEC v2 §3.3): one colour, one meaning, everywhere; each its solid, its soft tint, its ink. */
  --color-new: #2563eb;   --color-new-subtle: #e7eefe;   --color-new-text: #1d4ed8;   /* new since your visit */
  --color-soon: #b45309;  --color-soon-subtle: #fef1dc;  --color-soon-text: #92400e;  /* an auction closing within 48 h */
  --color-kept: #15803d;  --color-kept-subtle: #eaf8ef;  --color-kept-text: #166534;  /* kept */
  --color-gold: #8a6414;  --color-gold-subtle: #f6ebd3;  --color-gold-text: #7a5812;  /* a level: grand cru, premier cru */
  --color-on-sale-1: #e4e6eb; --color-on-sale-2: #c7cbd3; --color-on-sale-3: #6b7280; /* on sale: darker, more offers */
  /* A region's identity (cards, banner), never a state: serve.yaml `region_colours` names each region's slot. */
  --color-region-bordeaux: #5b3a8c;
  --color-region-bourgogne: #a3194b;
  --color-region-champagne: #8f6510;
  --color-region-rhone: #c2410c;
  --color-region-loire: #0f7b5f;
  --color-region-others: #475569;
  /* A list's chip on the board of the lists followed (ticket 253, ADR 0272): its identity, one of six by its id, never a
     state; a dot beside the list's name, each 4.7 or more on raised, sunken and page. */
  --color-list-1: #794db6; --color-list-2: #097689; --color-list-3: #9d3d8d;
  --color-list-4: #637103; --color-list-5: #34468e; --color-list-6: #745e52;
  --color-up-subtle: #e3f4e6;   --color-up-text: #2d643e;
  --color-down-subtle: #fdeae4; --color-down-text: #9b361d;
  --color-warn-subtle: #feebd6; --color-warn-text: #8d5416;

  /* Type — DESIGN.md « Faces » and « Scale ». The fallbacks are the faces a blocked font leaves. */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  /* The look of 22/11: display sizes heavy, tracked tight; Inter's optical size follows the size (`font-optical-sizing`,
     the served file has the `opsz` axis, 14 to 32). */
  --text-hero: 2.75rem;     --tracking-hero: -0.035em;   /* a page's sentence, a banner's name: 44 px, 800 */
  --text-display: 2.25rem;  --lh-display: 1.1;  --tracking-figure: -0.02em;
  --text-title: 1.75rem;    --lh-title: 1.15;   --tracking-title: -0.02em;
  --text-heading: 1.125rem; --lh-heading: 1.3;
  --text-reading: 1rem;     --lh-reading: 1.55;
  --text-body: 0.875rem;    --lh-body: 1.45;
  --text-figure: 0.9375rem; --lh-figure: 1.3;
  --text-small: 0.8125rem;  --lh-small: 1.4;
  --text-label: 0.75rem;    --lh-label: 1.3;

  /* Space — the 4 px step. */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px;

  /* Shape, depth, motion — the look of 22/11 (ADR 0254): generous radii; one soft shadow under a surface at rest, one
     lifted for what floats or is hovered; one easing; 120 ms on colour and opacity, longer on what moves. */
  --radius-card: 20px;               /* cards, the list's frame, the banner */
  --radius-panel: 14px;              /* panels, menus, popovers, a toast, a field of the toolbar */
  --radius-control: 10px;            /* buttons, fields, chips of a choice */
  --radius-mark: 6px;                /* a small mark: a status, a monogram, a level, a vintage cell, a key */
  --radius-box: 4px;                 /* a check box drawn by the page, a legend's swatch */
  --radius-chip: 999px;              /* a toggle, a segment, a badge: the pill shape */
  --shadow-soft: 0 1px 2px rgb(16 18 27 / 0.04), 0 8px 24px rgb(16 18 27 / 0.06);
  --shadow-lifted: 0 24px 64px rgb(16 18 27 / 0.18);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion: 120ms;
  --motion-lift: 250ms;              /* a card lifting under the pointer */
  --motion-view: 320ms;              /* a panel's view sliding forward or back */
  --motion-panel: 420ms;             /* the side panel sliding in */
  --lift: -4px;                      /* how far a card rises */
  --motion-rail: 200ms;              /* the rail's column widening or narrowing (ticket 135) */
  --motion-turn: 520ms;              /* « Mur des domaines »'s cards turning and sliding to their places (ticket 268) */
  --opacity-busy: 0.5;               /* a control pressed while its move is sent in place (ticket 196) */
  --opacity-settled: 0.5;            /* a row whose line was dismissed or bought in place, until the list is asked again */
  --control-height: 28px;            /* one control height (DESIGN.md « Decisions », P5 round 3) */
  --control-height-primary: 40px;    /* the one filled action of a view (P5's sign-in) */
  --target-min: 24px;                /* the smallest pointer target, WCAG 2.5.8 */
  --rule-hairline: 1px;
  --rule-strong: 2px;                /* the focus ring, the current tab's underline */
  --rail-width: 11rem;               /* the shell's rail, shown (DESIGN.md « Decisions », P5 round 3) */
  --rail-folded: 3rem;               /* hidden: the strip holding « Afficher le menu » */
  /* The logo's height (ticket 95, ADR 0148), its width following: in the rail and the top bar, on the sign-in page
     (above Accueil's band until ticket 256). */
  --logo-shell: 1.875rem;            /* 30 px, 104 px wide: the rail's head beside its button */
  --logo-display: 5.5rem;            /* 88 px, 303 px wide: inside a 375 px window */
  /* The list's fixed column widths, only « Vin » flexing (DESIGN.md « Decisions », P5 round 3; ticket 77). Ticket 125
     (ADR 0182): the default columns at 1,182 px, under the 1,184 px frame of a 1,280 px window with the rail folded;
     « Décision » in icons, each head on two lines at most, its ▾ and (i) included. Ticket 138: « Marge » 134, so that
     « +318 € · 38 % » holds one line (its (i) under it from three figures of euros), its 30 px from « Coût de revient »
     (136, its total alone now, its head still on two lines) and « Millésime » (72, a year): the same 1,182 px. */
  --col-score: 80px; --col-producer: 96px; --col-vintage: 72px; --col-pack: 88px;
  --col-source: 112px; --col-landed: 136px; --col-margin: 134px; --col-deadline: 100px; --col-decision: 132px;
  --line-page-width: 1240px;         /* the line's page (ADR 0162): its head, figures and two columns */
  --line-side-width: 340px;          /* its decision and history column */
  --line-figure-min: 160px;          /* a figure's narrowest, five in a row from 1,280 px */
  --share-width: 22rem;              /* « Partager »'s form, floating under its button (ticket 141) */
  /* « Suivi des alertes » (ticket 152): the keyword's column, each platform's and the two yields'. Twelve platforms take
     12 × 68 + 176 + 2 × 64 = 1,120 px, under the 1,184 px frame of a 1,280 px window with the rail folded. */
  --col-alert-keyword: 11rem;
  --col-alert-platform: 68px;
  --col-alert-yield: 64px;
  --col-other: 112px;                /* any other column a user shows */
  /* Below its least width the frame scrolls, with its cue: « Vin » at least this, every other column shown at its own
     width, or at `--col-other` (the template sets `--others`, how many; ticket 111). */
  --col-name-min: 112px;
  --chevron: 5px;                    /* the chevron of « Écarter » and of the owner's select */
  --color-scrim: rgb(14 15 19 / 0.3); /* behind a dialog and the side panel: the ink, under a third */
  /* Accueil's column (ticket 256, ADR « Accueil v4 »): centred in the page, the mock-up's 1,240 px. */
  --home-width: 77.5rem;
  /* Accueil's feed (ticket 256): a card's width (at 375 px, its first card and the next's edge in view), the gap between
     two, its region's top edge, the pause button, and one loop of the drift. */
  --feed-card: 16.5rem;
  --feed-card-phone: 15rem;
  --feed-gap: 14px;
  --feed-edge: 5px;
  --feed-pause: 34px;
  --motion-drift: 80s;
  /* Enchères' band « Ferment dans les 48 heures » (ticket 257): the axis's least width, a lot's card's and a « +N »
     mark's — serve.yaml `auction_band`'s `axis_rem`, `lot_rem` and `more_rem`, on which the server lays the cards out (a
     test holds them equal); a row's step, the axis's foot (its ticks), a card's region edge, a dot, the pulse's loop. */
  --band-axis: 60rem;
  --band-lot: 10rem;
  --band-more: 3rem;
  --band-step: 3.25rem;
  --band-foot: 1.75rem;
  --band-edge: 4px;
  --band-dot: 10px;
  --motion-pulse: 1.8s;
  /* The glass filling while something loads (ticket 260): its loop and its sizes — inline, in a card, on a waiting page. */
  --motion-pour: 2.4s;
  --pour-inline: 1.75rem;
  --pour-card: 2.25rem;
  --pour-page: 4.5rem;
  /* A card's mark, an icon, a badge. */
  --card-mark: 1.5rem;               /* 24 px */
  --icon: 1.25rem;                   /* 20 px */
  --badge: 1.125rem;                 /* 18 px */
  --domain-mark: 2.375rem;           /* 38 px: a domain card's two letters on its region's colour (ticket 254) */
  --domain-card: 13.5rem;            /* a domain card's width in its row */
  --domain-tint: 6%;                 /* the share of its region's colour in a domain card's ground */
  --wall-card: 15rem;                /* « Mur des domaines »: a domain card at its narrowest (ticket 268) */
  --wall-search: 16rem;              /* its search field */
  /* The filters folded (ticket 94): the panel's width, a row's column name, the add list's and a head's menu's widths. */
  --filters-folded: 46rem;
  --filter-name: 11rem;
  --add-list-width: 26rem;
  --head-menu-width: 24rem;
  /* « Chasse du mois » (ticket 216): the empty state's panel and the load form, a reading's width; a short field of
     « Modifier » (a year, a quantity, a price); the pasted text's field. A draft's rows (ticket 230): the rank's column,
     a card's choice, a line's actions, the summary's sentence before it wraps, the page's reading width. */
  --hunt-panel: 40rem;
  --hunt-field: 9rem;
  --hunt-rank: 2.5rem;
  --hunt-choice: 28rem;
  --hunt-actions: 11rem;
  --hunt-said: 20rem;
  --hunt-draft: 76rem;
  --hunt-text-rows: 12rem;
  --hunt-pick-height: 18rem;         /* the picker's answers, and a producer's cuvées, before they scroll (ticket 231) */
  /* « Chasse du mois »'s grid (ticket 217, layout C of ticket 215): a box 68 px, ten to a decade's line, 716 px, so that
     the whole row holds 1,280 px with the rail folded. */
  --hunt-home: 76rem;                  /* « Chasse du mois »'s home (ticket 239) */
  --hunt-find: 40rem;                  /* its search field */
  --hunt-find-min: 16rem;
  --hunt-search-height: 3.25rem;
  --hunt-card: 15rem;                  /* a region's card, at its narrowest */
  --follow-star-room: 6.5rem;          /* a list's card's head beside the user's star, « Suivie » (ticket 250) */
  --hunt-rename-field: 12rem;          /* a list's name being changed in its menu, before « Enregistrer » wraps (ticket 251) */
  --hunt-rank-col: 4.5rem;
  --hunt-name: 13rem;
  --vintage-cell: 1.375rem;            /* a cell of a producer's vintage grid */
  --vintage-chip: 1.75rem;
}

/* Reduced motion (SPEC v2 §4): nothing slides, lifts or fades; colour still changes, at once. */
@media (prefers-reduced-motion: reduce) {
  :root { --motion: 0ms; --motion-rail: 0ms; --motion-lift: 0ms; --motion-view: 0ms; --motion-panel: 0ms; --motion-turn: 0ms; --lift: 0px; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

*, *::before, *::after { box-sizing: border-box; }
/* What the page or its script hides stays hidden, whatever display a rule gives the element (a button, a cue). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: var(--space-4) var(--space-4) var(--space-12);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-accent-text); text-underline-offset: 2px; transition: color var(--motion); }
a:hover { text-decoration-thickness: var(--rule-strong); }
:focus-visible { outline: var(--rule-strong) solid var(--color-focus-ring); outline-offset: var(--rule-strong); border-radius: var(--radius-control); }
h1 {
  margin: 0;
  font-size: var(--text-title); line-height: var(--lh-title); font-weight: 800; letter-spacing: var(--tracking-title);
}
h2 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 700; letter-spacing: -0.01em;
}
h3, h4 { margin: var(--space-4) 0 var(--space-1); font-size: var(--text-body); line-height: var(--lh-body); font-weight: 600; }
p { margin: var(--space-1) 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* A figure: tabular, on one line (DESIGN.md « Scale »). */
.figure, .num { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
/* Column heads, `dt`, the small labels, in sentence case (DESIGN.md « Label », ADR 0144). */
.label {
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600;
  color: var(--color-text-secondary);
}

/* Controls — the `button` macro's three kinds (DESIGN.md « Components »): the one filled action of a view, a
   secondary one outlined, a quiet one as text. A bare button is a secondary one. */
button, select, input { font: inherit; color: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
  min-height: var(--control-height); padding: 0 var(--space-3);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-control);
  background: var(--color-bg-raised); color: var(--color-text-primary);
  font-weight: 600; line-height: var(--lh-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--motion), border-color var(--motion), color var(--motion);
}
button:hover, .button:hover { background: var(--color-bg-raised); border-color: var(--color-text-primary); }
.button-primary {
  min-height: var(--control-height-primary); padding: var(--space-2) var(--space-6);
  border-color: var(--color-accent-solid); background: var(--color-accent-solid); color: var(--color-text-on-accent);
  font-weight: 600;
}
.button-primary:hover { border-color: var(--color-accent-solid-hover); background: var(--color-accent-solid-hover); }
.button-quiet { border-color: transparent; background: transparent; color: var(--color-text-secondary); }
.button-quiet:hover { border-color: transparent; background: transparent; color: var(--color-accent-text); text-decoration: underline; }
select, input:not([type="checkbox"]):not([type="hidden"]) {
  min-height: var(--control-height); padding: 0 var(--space-2);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control);
  background: var(--color-bg-raised);
}
input[type="checkbox"] { accent-color: var(--color-accent-solid); }
input[type="number"] { width: 6.5rem; }
details > summary { cursor: pointer; }

/* The `status_mark` macro: a line's status in its word, flat, the same everywhere (DESIGN.md « Decisions »): « nouveau »
   on the sunken ground, « intéressé » (ticket 122, « gardé » before) and the moves after it on the accent's subtle ground. */
.status {
  display: inline-block; padding: 0 var(--space-2); border-radius: var(--radius-mark);
  background: var(--color-bg-sunken); color: var(--color-text-strong);
  font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600; white-space: nowrap;
}
.status[data-status="qualified"], .status[data-status="engaged"] { background: var(--color-kept-subtle); color: var(--color-kept-text); }
.status[data-status="purchased"] { background: var(--color-accent-subtle); color: var(--color-accent-text); }
.status[data-status="dismissed"] { color: var(--color-text-secondary); white-space: normal; }

/* The `source_tag` macro (ADR 0184, amended by ADR 0254): « Origine »'s name in a small neutral tag, the same for every
   source — a list never colours a source (SPEC v2 §3.4); the charts keep the platforms' hues. Its `tag-N` class stays
   in the markup until ticket 240 makes the cell a `source_mark`. A word is never broken nor hyphenated (Corentin,
   15/10): a platform's short name holds on one line, a merchant's name of several words wraps between them. */
.source-tag {
  display: inline-block; max-width: 100%; padding: 0 var(--space-1); border-radius: var(--radius-mark);
  hyphens: none; overflow-wrap: normal; word-break: keep-all;
  background: var(--color-bg-sunken); color: var(--color-text-primary);
  box-shadow: inset 0 0 0 var(--rule-hairline) var(--color-border);
  font-size: var(--text-small); line-height: var(--lh-small);
}

/* The `state` macro: empty, loading, error, stale — each saying what to do next. */
.state { margin: var(--space-2) 0; color: var(--color-text-secondary); }
.state .next { display: block; }
.state[data-state="error"], .state[data-state="stale"] { color: var(--color-warn-text); font-weight: 600; }
.state[data-state="error"] .next, .state[data-state="stale"] .next { font-weight: 400; }

/* The shell (ADR 0136 point 3, DESIGN.md « Decisions », P5's Enchères): a rail the user hides or shows, a top bar with
   only its tools (ticket 134) — search, ⌘K, the user menu (the bell left it, ticket 258) — the content. Below 900 px the rail is a block of
   links above the page. */
body.shell { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); min-height: 100vh; padding: 0; }
.skip-link {
  position: absolute; left: var(--space-2); top: var(--space-2); z-index: 30; transform: translateY(-200%);
  padding: var(--space-2) var(--space-3); background: var(--color-bg-raised); border-radius: var(--radius-control);
}
.skip-link:focus { transform: none; box-shadow: var(--shadow-lifted); }
/* The logo (ticket 95, ADR 0148): its line and letters in the brand's wine (`--color-logo`, ADR 0254), its star in the
   brand's gold; its height set, its width the drawing's, so it is never stretched. A link to Accueil in the rail and the top bar. */
.logo { display: block; height: var(--logo-shell); width: auto; aspect-ratio: 221 / 64; color: var(--color-logo); }
.logo-star { fill: var(--color-logo-star); }
.logo-link { display: inline-flex; flex: none; border-radius: var(--radius-control); }
.logo-link .logo { transition: color var(--motion); }
.logo-link:hover .logo { color: var(--color-logo); opacity: 0.85; }

.rail {
  position: sticky; top: 0; height: 100vh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: var(--space-6);
  padding: var(--space-4) var(--space-2); border-right: var(--rule-hairline) solid var(--color-separator);
  background: var(--color-bg-rail);
}
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.rail-head .logo-link { margin-left: var(--space-2); }
.rail-toggle {
  flex: none; position: relative; width: var(--space-8); min-height: var(--space-8); height: var(--space-8); padding: 0;
  border-color: transparent; background: transparent; color: var(--color-text-secondary);
}
.rail-toggle:hover { background: var(--color-bg-rail-hover); border-color: var(--color-border); }
.rail-toggle::before {
  content: ""; position: absolute; left: 13px; top: 12px; width: 7px; height: 7px;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
.rail nav { display: grid; gap: var(--space-6); }
.rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail .group { margin: 0 0 var(--space-1) var(--space-2); }
/* « Files d'attente » (ticket 135): a disclosure, folded by default, its head a row of the rail — a chevron, the title,
   the three queues' total at its end while folded. */
.rail-queues > summary.group {
  list-style: none; display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-height);
  margin: 0; padding: var(--space-1) var(--space-2); border-radius: var(--radius-control); user-select: none;
  transition: background-color var(--motion), color var(--motion);
}
.rail-queues > summary::-webkit-details-marker { display: none; }
.rail-queues > summary::before {
  content: ""; flex: none; width: 6px; height: 6px; margin-right: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg);
}
.rail-queues[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
.rail-queues > summary:hover { background: var(--color-bg-rail-hover); color: var(--color-text-primary); }
.rail-total { margin-left: auto; font-weight: 400; }
.rail-queues[open] .rail-total { display: none; }
.rail-queues[open] > summary { margin-bottom: var(--space-1); }
.rail nav a {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); min-height: var(--control-height);
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-control);
  color: var(--color-text-strong); text-decoration: none; transition: background-color var(--motion), color var(--motion);
}
.rail nav a:hover { background: var(--color-bg-rail-hover); color: var(--color-text-primary); }
.rail nav a[aria-current="page"] { background: var(--color-bg-sunken); color: var(--color-text-primary); font-weight: 600; }
.nav-text { min-width: 0; overflow-wrap: anywhere; }
/* A screen's name, up to 80 characters, on two lines at most; the link holds it whole for a screen reader. */
.rail .screens .nav-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.nav-count { flex: none; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
/* « Depuis votre visite » (ADR 0132, DESIGN.md « Colour »): a tab's count of what is new since the user's visit, a blue
   pill, white figures (ADR 0254). Read « depuis votre visite : n » by a screen reader. */
.nav-new {
  flex: none; min-width: var(--target-min); padding: 0 var(--space-2); border-radius: var(--radius-chip);
  background: var(--color-new); color: var(--color-text-on-accent);
  font-size: var(--text-label); line-height: var(--lh-small); font-weight: 600; text-align: center;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* Since ticket 170 (ADR 0220) the count is its own link, beside the tab's, to the tab with « Nouveau depuis votre dernière
   visite » on: the pill keeps its look, a 24 px target at least, underlined on hover. */
.rail li.has-new { display: flex; align-items: center; gap: 2px; }
.rail li.has-new > a:first-child { flex: 1 1 auto; min-width: 0; }
.rail nav a.nav-new {
  flex: none; justify-content: center; min-height: var(--target-min); padding: 0 var(--space-1);
  background: var(--color-new); color: var(--color-text-on-accent); font-weight: 600;
}
.rail nav a.nav-new:hover { background: var(--color-new-text); color: var(--color-text-on-accent); text-decoration: underline; }
/* The rail's foot (ticket 134, ADR 0195): « Dernière passe », small in secondary text, where the top bar held it, then
   « Signaler un oubli ». */
.rail-foot { margin-top: auto; padding: 0 var(--space-2); display: grid; gap: var(--space-2); }
.rail-last-run {
  margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small);
  font-variant-numeric: tabular-nums;
}
.rail-clock {
  display: none; flex: none; width: var(--icon); height: var(--icon);
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
#report-missed > summary { color: var(--color-text-secondary); font-size: var(--text-small); }
#report-missed > summary:hover { color: var(--color-accent-text); }
#missed { display: grid; gap: var(--space-2); margin-top: var(--space-2); }
#missed input { width: 100%; min-width: 0; }
#missed button { justify-self: start; }

html.rail-hidden body.shell { grid-template-columns: var(--rail-folded) minmax(0, 1fr); }
html.rail-hidden .rail { align-items: center; padding: var(--space-4) var(--space-1); }
html.rail-hidden .rail-head .logo-link, html.rail-hidden .rail nav { display: none; }
html.rail-hidden .rail-toggle::before { left: 10px; transform: rotate(-135deg); }
/* Folded to its strip, the foot keeps the clock alone (ticket 134), the toggle's size; its words, « Dernière passe : … »,
   float beside the strip on hover and focus, raised with the one shadow, as a move's word does; hidden from sight
   otherwise, never from a screen reader. Below 900 px the rail is never folded (the media query below). */
@media (min-width: 901px) {
  html.rail-hidden .rail-foot { padding: 0; justify-items: center; }
  html.rail-hidden #report-missed { display: none; }
  html.rail-hidden .rail-last-run {
    display: flex; align-items: center; justify-content: center; width: var(--space-8); height: var(--space-8);
    border-radius: var(--radius-control); transition: background-color var(--motion), color var(--motion);
  }
  html.rail-hidden .rail-last-run:hover { background: var(--color-bg-rail-hover); color: var(--color-text-primary); }
  html.rail-hidden .rail-clock { display: block; }
  html.rail-hidden .rail-last-text {
    position: fixed; left: calc(var(--rail-folded) + var(--space-1)); bottom: var(--space-4); z-index: 30;
    padding: var(--space-1) var(--space-2); border: var(--rule-hairline) solid var(--color-border);
    border-radius: var(--radius-control); background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
    color: var(--color-text-primary); font-weight: 500; white-space: nowrap; pointer-events: none; clip-path: inset(50%);
  }
  html.rail-hidden .rail-last-run:is(:hover, :focus-visible) .rail-last-text { clip-path: none; }
}
/* From 901 to 1,419 px (ADR 0140), to 1,599 px over a tab's list (ADR 0182), the script folds the rail. Opened or
   folded by hand, at any width, it pushes the page (ticket 135): its column widens or narrows in --motion-rail, set once
   a click has moved it. While it widens its contents keep the shown width, clipped by the rail, never wrapped. */
html.rail-motion body.shell { transition: grid-template-columns var(--motion-rail) ease-out; }
html:not(.rail-hidden) .rail > * { min-width: calc(var(--rail-width) - 2 * var(--space-2) - var(--rule-hairline)); }

.main { min-width: 0; }
.bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-6);
  padding: var(--space-3) var(--space-8);
}
.bar-logo { display: none; }
html.rail-hidden .bar-logo { display: inline-flex; }
/* A refused site's searches (ticket 97): on their own line under its state, a person's links. */
.source-browse { display: block; }
.bar .banner, .bar .state { flex-basis: 100%; margin: 0; }
.attention { color: var(--color-down-text); font-weight: 600; }

/* The top bar's tools: the search, ⌘K, the user menu. */
.bar-tools { position: relative; display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.user-menu { position: relative; }
.user-menu > summary {
  list-style: none; display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--space-8);
  max-width: 14rem; padding: 0 var(--space-3); border: var(--rule-hairline) solid var(--color-border-control);
  border-radius: var(--radius-control); background: var(--color-bg-raised); user-select: none;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary::after {
  content: ""; flex: none; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px);
}
.user-menu > summary:hover { background: var(--color-bg-sunken); }
.user-menu[open] > summary { border-color: var(--color-accent-solid); }
.menu-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + var(--space-2)); z-index: 20; width: 16rem; max-width: calc(100vw - var(--space-8));
  padding: var(--space-2) 0; border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
}
.menu-who { display: grid; gap: 2px; margin: 0; padding: var(--space-2) var(--space-4) var(--space-3); border-bottom: var(--rule-hairline) solid var(--color-separator); overflow-wrap: anywhere; }
.menu-who-name { font-weight: 600; }
.menu-who-address { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.menu-panel ul { list-style: none; margin: 0; padding: var(--space-1) 0 0; }
.menu-panel li a { display: block; padding: var(--space-2) var(--space-4); color: var(--color-text-primary); text-decoration: none; }
.menu-panel li a:hover, .menu-panel li a[aria-current="page"] { background: var(--color-bg-sunken); color: var(--color-accent-text); }
.menu-panel li.menu-out { margin-top: var(--space-1); border-top: var(--rule-hairline) solid var(--color-separator); padding-top: var(--space-1); }
/* The way out is a form's button (ticket 158), drawn as the menu's links. */
.menu-panel li.menu-out form { margin: 0; }
.menu-panel li.menu-out button { display: block; inline-size: 100%; margin: 0; padding: var(--space-2) var(--space-4); border: 0; border-radius: 0; background: none; font: inherit; color: var(--color-text-primary); text-align: start; cursor: pointer; }
.menu-panel li.menu-out button:hover { background: var(--color-bg-sunken); color: var(--color-accent-text); }

.content { padding: var(--space-4) var(--space-8) var(--space-12); }
.content:focus { outline: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-6); }
/* « Nouveau depuis votre dernière visite » (ticket 170, ADR 0220; the look of 22/11, ADR 0254): a link that turns the
   filter on or off, a chip at the head of the tab, a box before its words, its count in the rail's blue pill after them.
   It wraps under the title at a phone's width. */
.new-toggle {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: calc(var(--control-height) + var(--space-2));
  padding: 0 var(--space-2) 0 var(--space-3); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-chip);
  background: var(--color-bg-raised); color: var(--color-text-primary); font-weight: 600; text-decoration: none;
  transition: background-color var(--motion), border-color var(--motion), color var(--motion);
}
.new-toggle:hover { border-color: var(--color-text-secondary); }
.new-toggle-box {
  flex: none; display: inline-grid; place-items: center; width: 14px; height: 14px;
  border: 1.5px solid var(--color-border-control); border-radius: var(--radius-box); background: var(--color-bg-raised);
}
/* On (ADR 0254): the toggle of 22/11, filled in the ink, its box white with the ink's ✓. */
.new-toggle[data-on] { border-color: var(--color-accent-solid); background: var(--color-accent-solid); color: var(--color-text-on-accent); }
.new-toggle[data-on]:hover { background: var(--color-accent-solid-hover); }
.new-toggle[data-on] .new-toggle-box { border-color: var(--color-text-on-accent); background: var(--color-text-on-accent); }
.new-toggle[data-on] .new-toggle-box::after {
  content: ""; width: 4px; height: 8px; margin-top: -2px;
  border-right: 1.5px solid var(--color-accent-solid); border-bottom: 1.5px solid var(--color-accent-solid); transform: rotate(45deg);
}
.new-toggle-n {
  flex: none; min-width: var(--target-min); padding: 0 var(--space-1); border-radius: var(--radius-chip);
  background: var(--color-new); color: var(--color-text-on-accent);
  font-size: var(--text-label); line-height: var(--lh-small); font-weight: 600; text-align: center;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* The « ? » overlay: a dialog the script opens; without script, « Aide » shows it as the page's target. */
dialog#shortcuts {
  width: min(28rem, calc(100vw - var(--space-8))); padding: var(--space-6); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-panel); background: var(--color-bg-raised); color: var(--color-text-primary); box-shadow: var(--shadow-lifted);
}
dialog#shortcuts::backdrop { background: var(--color-scrim); }
dialog#shortcuts:target:not([open]) { display: block; position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 40; }
dialog#shortcuts h2 { margin-top: 0; }
dialog#shortcuts dl { display: grid; gap: var(--space-2); margin: var(--space-4) 0; }
dialog#shortcuts dl > div { display: grid; grid-template-columns: 7rem 1fr; gap: var(--space-3); align-items: baseline; }
dialog#shortcuts dt { white-space: nowrap; }
dialog#shortcuts dd { margin: 0; }
dialog#shortcuts .then { font-size: var(--text-small); color: var(--color-text-secondary); }
kbd {
  display: inline-block; min-width: var(--target-min); padding: 0 var(--space-1); text-align: center;
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control);
  background: var(--color-bg-page); font: 600 var(--text-small)/var(--lh-small) var(--font-sans);
}

/* The top bar's search (ADR 0135 point 1): a GET form, its button shown, the palette's button beside it once the script
   runs. Each the user menu's height. */
.bar-search { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.bar-search input { width: 15rem; min-width: 0; min-height: var(--space-8); }
.bar-search button, .palette-open { min-height: var(--space-8); }
.palette-open { padding: 0 var(--space-2); color: var(--color-text-secondary); }
.palette-open kbd { min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; }
.palette-open:hover { color: var(--color-text-primary); }

/* The command palette (ADR 0135 points 2 to 4): a dialog over the page, the field, the server's links filtered as you
   type, the one chosen on the accent's subtle ground; the search last, under a hairline. */
dialog.palette {
  width: min(36rem, calc(100vw - var(--space-8))); margin: 12vh auto auto; padding: 0;
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); color: var(--color-text-primary); box-shadow: var(--shadow-lifted);
}
dialog.palette::backdrop { background: var(--color-scrim); }
#palette-input {
  display: block; width: 100%; min-height: var(--control-height-primary); padding: 0 var(--space-4);
  border: 0; border-bottom: var(--rule-hairline) solid var(--color-separator); border-radius: 0; background: transparent;
  font-size: var(--text-reading); line-height: var(--lh-reading);
}
#palette-input:focus-visible { outline: none; box-shadow: inset 0 calc(-1 * var(--rule-strong)) 0 var(--color-focus-ring); }
#palette-list { max-height: min(60vh, 26rem); overflow-y: auto; padding: var(--space-1) 0; }
#palette-list [role="option"] {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4);
  padding: var(--space-2) var(--space-4); color: var(--color-text-primary); text-decoration: none;
}
/* The one chosen: the accent's subtle ground and a bar at its left edge, so it shows without telling colours apart. */
#palette-list [role="option"][aria-selected="true"] {
  background: var(--color-accent-subtle); color: var(--color-accent-text);
  box-shadow: inset var(--rule-strong) 0 0 var(--color-accent-solid);
}
.palette-text { min-width: 0; overflow-wrap: anywhere; }
.palette-kind { flex: none; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
/* The search entry stays in view at the list's foot, however long the list. */
#palette-search {
  position: sticky; bottom: calc(-1 * var(--space-1)); margin-top: var(--space-1);
  border-top: var(--rule-hairline) solid var(--color-separator); background: var(--color-bg-raised);
}
.palette-words { font-weight: 600; }
.palette-keys {
  margin: 0; padding: var(--space-2) var(--space-4); border-top: var(--rule-hairline) solid var(--color-separator);
  font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary);
}

/* The search page: per tab, its count, a raised card linking into the tab; a tab with none, flat on the page. */
.search-intro { max-width: 70ch; color: var(--color-text-secondary); }
.search-words { overflow-wrap: anywhere; }
#search-counts {
  list-style: none; margin: var(--space-4) 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--space-3);
}
#search-counts li { border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised); }
#search-counts li[data-count="0"] { border-color: var(--color-separator); background: transparent; }
#search-counts li > a, #search-counts .search-card { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); }
#search-counts li > a { color: var(--color-text-primary); text-decoration: none; border-radius: var(--radius-panel); }
#search-counts li > a:hover { background: var(--color-bg-sunken); }
.search-tab { font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 600; letter-spacing: var(--tracking-title); }
.search-n { font-size: var(--text-figure); line-height: var(--lh-figure); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-accent-text); }
li[data-count="0"] .search-tab, li[data-count="0"] .search-n { color: var(--color-text-secondary); font-weight: 500; }
#search-counts li > a:hover .search-n { text-decoration: underline; }
.search-country { color: var(--color-text-strong); }

/* Accueil v4 (ticket 256, ADR « Accueil v4 », home-v4 SPEC §3, DESIGN.md « Decisions »): the state line, « Bonjour » and
   its sentence with the view's one filled action, the feed of the domains' offers drifting by, « Vos domaines » (254,
   255), « Aller plus loin ». One column, centred; the rows that hold more than the width scroll inside themselves. */
body.home .content { max-width: calc(var(--home-width) + 2 * var(--space-6)); margin: 0 auto; }
.home-section-title {
  margin: 0 0 var(--space-3); font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 800;
  letter-spacing: -0.01em;
}
.home-feed, .home-further { margin: 0 0 var(--space-8); }

/* « Bonjour »: the first name at hero size, the sentence at the heading size, the filled action at its right, at the
   sentence's foot. */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-8); margin: 0 0 var(--space-8); }
.hero-hello {
  margin: 0; font-size: var(--text-hero); line-height: 1.05; font-weight: 800; letter-spacing: var(--tracking-hero);
}
.hero-said {
  max-width: 42rem; margin: var(--space-3) 0 0; font-size: var(--text-heading); line-height: var(--lh-reading);
  color: var(--color-text-strong);
}
.hero-said b { font-weight: 700; color: var(--color-text-primary); }
.hero-said .hero-new { color: var(--color-new-text); }
.hero-said .hero-soon { color: var(--color-soon-text); }
.hero-basis { color: var(--color-text-secondary); }
.hero-act { flex: none; display: grid; justify-items: end; gap: var(--space-2); }
.hero-walk { white-space: nowrap; }
.hero-done { margin: 0; color: var(--color-text-secondary); }
.hero-done strong { color: var(--color-text-primary); }

/* « Sur vos domaines »: a raised frame; its cards in a row that drifts sideways, about 80 s a loop (the cards drawn
   twice: the track moves by half its width), stopped under the pointer, under the focus and by the pause button, never
   under reduced motion; fewer than five cards, or reduced motion, the row scrolls by hand. */
.feed {
  padding: var(--space-3) 0 var(--space-4); background: var(--color-bg-raised); border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft), 0 0 0 var(--rule-hairline) var(--color-border);
}
/* The pause button alone (ticket 258: no note beside it), at the right of the section's title, so no empty row. */
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.feed-tools { display: flex; align-items: center; margin-bottom: var(--space-3); }
.feed-pause {
  flex: none; width: var(--feed-pause); height: var(--feed-pause); padding: 0; border-radius: var(--radius-chip);
  border: var(--rule-hairline) solid var(--color-border); background: var(--color-bg-raised); color: var(--color-text-primary);
  cursor: pointer; display: grid; place-items: center;
}
.feed-pause:hover { border-color: var(--color-text-primary); }
.feed-pause::before { content: ""; width: var(--space-2); height: var(--space-3); border-inline: var(--rule-strong) solid currentColor; }
.feed-pause[aria-pressed="true"]::before {
  width: 0; height: 0; border-inline: 0; border-block: calc(var(--space-3) / 2) solid transparent;
  border-left: var(--space-3) solid currentColor;
}
.feed-viewport { overflow-x: auto; scroll-snap-type: x proximity; }
.feed-drifts .feed-viewport { overflow: hidden; }
.feed-track {
  display: flex; gap: var(--feed-gap); width: max-content; list-style: none; margin: 0;
  padding: var(--space-2) var(--space-6) var(--space-3);
}
.feed-drifts .feed-track { animation: feed-drift var(--motion-drift) linear infinite; }
.feed-drifts .feed-viewport:hover .feed-track,
.feed-drifts .feed-viewport:focus-within .feed-track,
.feed-drifts[data-paused] .feed-track {
  animation-play-state: paused;
}
@keyframes feed-drift { to { transform: translateX(calc(-50% - var(--feed-gap) / 2)); } }
/* While a line is open in the side panel, the feed behind it holds still. */
.panel-open .feed-drifts .feed-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .feed-drifts .feed-track {
    animation: none;
  }
  .feed-drifts .feed-viewport {
    overflow-x: auto;
  }
  /* The row standing, the loop's copies would show every card twice (review of ticket 256). */
  .feed-drifts .feed-card[data-copy] {
    display: none;
  }
  .feed-pause { display: none; }
}
.feed-empty { margin: 0; padding: var(--space-4) var(--space-6); color: var(--color-text-secondary); }

/* A card of the feed: a 5 px top edge in its domain's region colour (an identity; the region is written on its domain's
   card), raised, lifting under the pointer. */
.feed-card { flex: none; width: var(--feed-card); scroll-snap-align: start; display: flex; }
.feed-card-link {
  flex: 1; display: flex; flex-direction: column; gap: var(--space-2); overflow: hidden;
  padding: var(--space-3) var(--space-4) var(--space-4); border-radius: var(--radius-panel); background: var(--color-bg-raised);
  border: var(--rule-hairline) solid var(--color-border); border-top: var(--feed-edge) solid var(--region);
  color: var(--color-text-primary); text-decoration: none;
  transition: transform var(--motion-lift) var(--ease), box-shadow var(--motion-lift) var(--ease);
}
.feed-card-link:hover { transform: translateY(var(--lift)); box-shadow: var(--shadow-lifted); }
.feed-card.selected .feed-card-link { box-shadow: 0 0 0 var(--rule-strong) var(--color-text-primary); }
.feed-card-top { display: flex; align-items: center; gap: var(--space-2); min-width: 0; font-size: var(--text-label); color: var(--color-text-secondary); }
.feed-card-top .channel-icon { flex: none; color: var(--color-text-strong); }
.feed-card-channel { font-weight: 600; color: var(--color-text-strong); }
.feed-card-source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-card-badge {
  margin-left: auto; flex: none; padding: 0 var(--space-2); border-radius: var(--radius-chip); font-weight: 700; white-space: nowrap;
}
.feed-card-badge[data-mark="new"] { background: var(--color-new-subtle); color: var(--color-new-text); }
.feed-card-badge[data-mark="new"][data-seen] { background: none; color: var(--color-text-secondary); font-weight: 400; }
.feed-card-badge[data-mark="soon"] { background: var(--color-soon-subtle); color: var(--color-soon-text); }
.feed-card-producer { font-size: var(--text-figure); line-height: var(--lh-figure); font-weight: 800; }
.feed-card-wine {
  margin-top: calc(-1 * var(--space-1)); font-size: var(--text-small); color: var(--color-text-secondary);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.feed-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); font-size: var(--text-label); color: var(--color-text-strong); }
.feed-card-money {
  margin-top: auto; display: grid; gap: var(--space-1); padding-top: var(--space-2);
  border-top: var(--rule-hairline) solid var(--color-separator);
}
.feed-card-cost { font-weight: 700; font-variant-numeric: tabular-nums; }
.feed-card-money small { margin-left: var(--space-1); font-size: var(--text-label); font-weight: 400; color: var(--color-text-secondary); }
.feed-card-margin { font-variant-numeric: tabular-nums; }

/* « Actualités du marché » (ADR 0129 point 7), on « Tableau de bord » › « Le marché » since ticket 256: its headlines in
   rows of three, newest first reading left to right, each title at the reading size with its source and date under it.
   A track never wider than the section, so that the list holds at 320 px (WCAG 1.4.10); a title's long word wraps, since
   titles are outside data. */
.news {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)); gap: var(--space-4) var(--space-6);
}
.news li { display: grid; align-content: start; gap: var(--space-1); min-width: 0; }
.news a {
  font-size: var(--text-reading); line-height: var(--lh-reading); color: var(--color-text-strong);
  text-decoration-thickness: var(--rule-hairline); overflow-wrap: anywhere;
}
.news a:hover { color: var(--color-accent-text); }
.news-meta { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }

/* « Aller plus loin »: four compact cards to a row from 1,100 px, two below, one on a phone. */
.further { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.further-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center;
  column-gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-card); background: var(--color-bg-raised);
  box-shadow: var(--shadow-soft), 0 0 0 var(--rule-hairline) var(--color-border); color: var(--color-text-primary);
  text-decoration: none; transition: transform var(--motion-lift) var(--ease), box-shadow var(--motion-lift) var(--ease);
}
.further-card:hover { transform: translateY(var(--lift)); box-shadow: var(--shadow-lifted); }
.further-card .card-mark {
  grid-row: 1 / 3; box-sizing: content-box; padding: var(--space-2); border-radius: var(--radius-control);
  background: var(--color-bg-sunken); color: var(--color-text-strong);
}
.further-name { font-weight: 700; }
.further-fact {
  grid-column: 2; font-size: var(--text-label); color: var(--color-text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.further-figure {
  grid-row: 1 / 3; grid-column: 3; font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 800;
  letter-spacing: var(--tracking-figure);
}
.further-figure[data-new] { color: var(--color-new-text); }
.card-mark { flex: none; width: var(--card-mark); height: var(--card-mark); }

@media (max-width: 1100px) {
  .further { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* A phone: the state line its dot and pills, the hero stacked with its action full width, one card a row below. */
@media (max-width: 640px) {
  .state-words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero { flex-direction: column; align-items: stretch; gap: var(--space-4); }
  .hero-hello { font-size: var(--text-display); }
  .hero-said { font-size: var(--text-reading); }
  .hero-act { justify-items: stretch; }
  .hero-walk { white-space: normal; }
  .feed-track { padding-inline: var(--space-4); }
  .feed-card { width: var(--feed-card-phone); }
  .further { grid-template-columns: minmax(0, 1fr); }
}

/* The list's frame: it scrolls on its own, with the cue above it, only when the table is wider than the page. */
.table-wrap {  /* the containing block of what it clips */
  position: relative; overflow-x: auto; border-radius: var(--radius-card); background: var(--color-bg-raised);
  box-shadow: var(--shadow-soft), 0 0 0 var(--rule-hairline) var(--color-border);
}
.scroll-cue { margin: 0 0 var(--space-2); font-size: var(--text-small); color: var(--color-text-secondary); }

@media (max-width: 900px) {
  body.shell, html.rail-hidden body.shell { display: block; }
  .rail, html.rail-hidden .rail {
    position: static; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4);
    border-right: 0; border-bottom: var(--rule-hairline) solid var(--color-separator);
  }
  .rail-toggle { display: none; }
  html.rail-hidden .rail-head .logo-link, html.rail-hidden .rail nav { display: revert; }
  html.rail-hidden .bar-logo { display: none; }
  .rail nav, .rail nav > ul, .rail-group, .rail-group ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }
  .rail .group { display: none; }
  /* The titles hidden, a thin rule parts the sections (ticket 135); « Files d'attente »'s head stays, the one way to
     unfold it. */
  html:not(.rail-hidden) .rail > * { min-width: 0; }
  .rail-group { padding-left: var(--space-2); border-left: var(--rule-hairline) solid var(--color-separator); }
  .rail .rail-queues > summary.group { display: flex; }
  /* A screen's name on one line, cut with an ellipsis: twelve long names must not push the page below the fold. */
  .rail .screens a { max-width: 10rem; }
  .rail .screens .nav-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-foot { margin: 0; padding: 0; flex-basis: 100%; }
  .bar, .content { padding-left: var(--space-4); padding-right: var(--space-4); }
  /* The search takes the bar's width, the user menu at its end. */
  .bar-tools { flex-basis: 100%; min-width: 0; justify-content: flex-end; }
  .bar-search { flex: 1 1 auto; }
  .bar-search input { flex: 1 1 auto; width: auto; }
}
/* A phone's width: the palette's button gives its room to the search, the shortcut still opens it. */
@media (max-width: 600px) {
  .palette-open { display: none; }
}

/* The users page's add form wraps as the tabs' toolbar does: each label with its field, never split across lines.
   By attribute: « #add… » would read as a colour literal to the token check. */
form[id="add-user"] { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
form[id="add-user"] > label { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); }

/* The views of the list, as tabs within the page. */
nav#views { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); }
nav#views a {
  padding: var(--space-2) 0; text-decoration: none; color: var(--color-text-secondary);
  border-bottom: var(--rule-strong) solid transparent;
}
nav#views a:hover { color: var(--color-text-primary); }
nav#views a[aria-current="page"] { color: var(--color-text-primary); font-weight: 600; border-bottom-color: var(--color-accent-solid); }

/* The bar above the list (ADR 0126): sort, columns, filters and « Mes écrans », each panel opening below it. */
#toolbar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: var(--space-3) 0 var(--space-2); }
form#filters { display: contents; }
form#filters > label { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); }
/* Down to 320 px (the review of 12/10/2026): a label wraps its select under its words, and a select is never wider. */
form#filters > label { flex-wrap: wrap; max-width: 100%; }
form#filters select { max-width: 100%; }
details.panel > summary {
  list-style: none; display: inline-flex; align-items: center; min-height: var(--control-height); padding: 0 var(--space-3);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control);
  background: var(--color-bg-raised); user-select: none;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after {
  content: ""; display: inline-block; margin-left: var(--space-2);
  border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px);
}
details.panel[open] > summary { border-color: var(--color-accent-solid); color: var(--color-accent-text); }
details.panel[open] > summary::after { border-top-color: transparent; border-bottom-color: currentColor; transform: translateY(-2px); }
/* An open panel drops under the bar, over the list, the bar's width; the bar stays where it is. */
details.panel > .panel-body {
  position: absolute; left: 0; right: 0; top: calc(100% + var(--space-2)); z-index: 5; max-height: 70vh; overflow: auto;
  padding: var(--space-4); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
}
.panel-body.columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--space-1) var(--space-4); }
.panel-body.columns label { display: flex; gap: var(--space-2); align-items: center; }
.panel-body.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--space-4) var(--space-6); }
/* A column's filters, in the panel or in its head's menu (ticket 94): the same group, wherever the script puts it. */
fieldset[data-filters] { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset[data-filters] legend { font-weight: 600; padding: 0; margin-bottom: var(--space-1); }
fieldset[data-filters] .controls {
  display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); align-items: flex-start; align-content: flex-start; min-width: 0;
}
.panel-body select, .panel-body input { max-width: 14rem; }
fieldset[data-filters] select, fieldset[data-filters] input { max-width: min(14rem, 100%); }
fieldset[data-filters] label { display: flex; flex-direction: column; font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary); }
fieldset[data-filters] .range { display: inline-flex; gap: var(--space-1); }
fieldset[data-filters] .range input { width: 6rem; }
/* Folded by the script (ticket 94, ADR 0145): the groups set, one row each — the column's name, its filters, « × » —
   then « Ajouter un filtre ». The panel takes the width its rows need, not the bar's. */
.panel-body.groups.folded { display: block; right: auto; width: min(var(--filters-folded), 100%); }
.folded fieldset[data-filters] {
  display: grid; grid-template-columns: var(--filter-name) minmax(0, 1fr) auto; grid-template-areas: "name controls remove";
  gap: var(--space-1) var(--space-3); align-items: start;
  padding: var(--space-2) 0; border-bottom: var(--rule-hairline) solid var(--color-separator);
}
/* Floated, the legend is a grid item like the others, not drawn in the fieldset's border. */
.folded fieldset[data-filters] legend {
  float: left; grid-area: name; margin: 0; display: flex; align-items: center; min-height: var(--control-height); overflow-wrap: anywhere;
}
.folded fieldset[data-filters] .controls { grid-area: controls; }
.remove-filter {
  grid-area: remove; min-width: var(--target-min); min-height: var(--control-height); padding: 0 var(--space-2);
  border-color: transparent; background: transparent; color: var(--color-text-secondary); font-weight: 700;
}
.remove-filter:hover { border-color: transparent; background: var(--color-bg-sunken); color: var(--color-text-primary); }
@media (max-width: 600px) {
  .folded fieldset[data-filters] { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name remove" "controls controls"; }
}
.folded fieldset[data-filters]:not([hidden]) ~ .add-filter { padding-top: var(--space-3); }
.add-intro { margin: 0 0 var(--space-3); color: var(--color-text-secondary); }
.add-open::before { content: "+"; content: "+" / ""; font-weight: 700; }
.add-list {
  width: min(var(--add-list-width), 100%); margin-top: var(--space-2); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-panel); background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
}
.add-list input.add-search {
  display: block; width: 100%; max-width: none; min-height: var(--control-height-primary); padding: 0 var(--space-3);
  border: 0; border-bottom: var(--rule-hairline) solid var(--color-separator); border-radius: var(--radius-panel) var(--radius-panel) 0 0;
}
.add-list input.add-search:focus-visible { outline: none; box-shadow: inset 0 calc(-1 * var(--rule-strong)) 0 var(--color-focus-ring); }
.add-options { list-style: none; margin: 0; padding: var(--space-1) 0; max-height: 18rem; overflow-y: auto; }
.add-options [role="option"] {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); padding: var(--space-1) var(--space-3); cursor: pointer;
}
.add-options [role="option"][aria-selected="true"] { background: var(--color-bg-sunken); color: var(--color-accent-text); }
/* The shown columns, then the others, then those not shown that no line of the tab fills: a rule between each. */
.add-options [data-shown] + [role="option"]:not([data-shown]),
.add-options [role="option"]:not([data-shown], [data-no-line]) + [data-no-line] { margin-top: var(--space-1); border-top: var(--rule-hairline) solid var(--color-separator); padding-top: var(--space-2); }
.add-includes, .add-note { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.add-none { margin: 0; padding: var(--space-2) var(--space-3); color: var(--color-text-secondary); }
#toolbar form#filters > a { align-self: center; color: var(--color-text-secondary); }
ul.saved-views { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
ul.saved-views li { display: flex; align-items: center; gap: var(--space-1); }
ul.saved-views form { display: inline; }
a.saved-view[aria-current] { font-weight: 600; }
/* The screen shown (ticket 136): said in words besides its weight. */
.view-shown { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
form.save-view { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
form.save-view label { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); }

/* The `chip` macro: a filter set, removable. */
ul#active-filters { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-1) 0 var(--space-2); padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 0 var(--space-1) 0 var(--space-3); border: var(--rule-hairline) solid var(--color-accent-border);
  border-radius: var(--radius-chip); background: var(--color-accent-subtle); color: var(--color-text-primary);
}
.chip a {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--target-min); min-height: var(--target-min);
  border-radius: var(--radius-chip); text-decoration: none; font-weight: 700;
}
.chip a:hover { background: var(--color-accent-border); }
p#count { font-weight: 600; margin: var(--space-2) 0; font-variant-numeric: tabular-nums; }
nav.pages { margin: var(--space-3) 0; display: flex; gap: var(--space-4); color: var(--color-text-secondary); }

/* The list. */
table { border-collapse: collapse; width: 100%; }
/* The list: fixed widths, only « Vin » flexing; wider than its frame, the frame scrolls with its cue (P5 round 3). Never
   narrower than its columns as they are (ticket 111, ADR 0166): each column shown with a width of its own adds it, the
   others count at `--col-other`, « Vin » at its least. */
table#lines {
  table-layout: fixed;
  min-width: calc(
    var(--col-name-min) + var(--others, 0) * var(--col-other)
    + var(--with-score, 0px) + var(--with-producer, 0px) + var(--with-vintage, 0px) + var(--with-pack, 0px) + var(--with-source, 0px) + var(--with-landed, 0px) + var(--with-margin, 0px) + var(--with-deadline, 0px) + var(--with-decision, 0px)
  );
}
table#lines:has(th[data-column="score"]) { --with-score: var(--col-score); }
table#lines:has(th[data-column="producer"]) { --with-producer: var(--col-producer); }
table#lines:has(th[data-column="vintage"]) { --with-vintage: var(--col-vintage); }
table#lines:has(th[data-column="pack"]) { --with-pack: var(--col-pack); }
table#lines:has(th[data-column="source"]) { --with-source: var(--col-source); }
table#lines:has(th[data-column="landed"]) { --with-landed: var(--col-landed); }
table#lines:has(th[data-column="margin"]) { --with-margin: var(--col-margin); }
table#lines:has(th[data-column="deadline"]) { --with-deadline: var(--col-deadline); }
table#lines:has(th[data-column="decision"]) { --with-decision: var(--col-decision); }
table#lines td { overflow-wrap: break-word; hyphens: auto; }
table#lines th { hyphens: auto; }
th[data-column] { width: var(--col-other); }
th[data-column="name"] { width: auto; }
th[data-column="score"] { width: var(--col-score); }
th[data-column="producer"] { width: var(--col-producer); }
th[data-column="vintage"] { width: var(--col-vintage); }
th[data-column="pack"] { width: var(--col-pack); }
th[data-column="source"] { width: var(--col-source); }
th[data-column="landed"] { width: var(--col-landed); }
th[data-column="margin"] { width: var(--col-margin); }
th[data-column="deadline"] { width: var(--col-deadline); }
th[data-column="decision"] { width: var(--col-decision); }
th, td { padding: var(--space-3) var(--space-2); border-bottom: var(--rule-hairline) solid var(--color-separator); text-align: left; vertical-align: top; }
thead th {
  hyphens: auto;
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg-raised);
  position: sticky; top: 0; z-index: 1; border-bottom: var(--rule-hairline) solid var(--color-border); vertical-align: bottom;
}
/* A tab's head is a button opening its menu (ticket 94, ADR 0145), as quiet as the head's text; the current sort's head,
   in a button or not, says which way it goes. */
button.head {
  display: block; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: var(--radius-control);
  background: transparent; color: inherit; font: inherit; font-weight: inherit; line-height: inherit; text-align: inherit;
  hyphens: inherit;
}
button.head:hover, button.head[aria-expanded="true"] { background: transparent; color: var(--color-accent-text); text-decoration: underline; }
/* A sortable head (ticket 124): its name a link to its next order, as quiet as the head's text, underlined in the accent on
   hover, a faint ↕ after it on hover and focus while the list is sorted on another column; the ▾ beside it, a pointer
   target of its own, opens the menu. */
a.head-sort { color: inherit; text-decoration: none; }
a.head-sort:hover { color: var(--color-accent-text); text-decoration: underline; }
th:not([aria-sort]) a.head-sort:is(:hover, :focus-visible)::after {
  content: "\00a0↕"; content: "\00a0↕" / ""; font-weight: 400; color: var(--color-text-secondary);
}
button.head-more {
  display: inline-flex; align-items: center; justify-content: center; width: auto;
  min-width: var(--target-min); min-height: var(--target-min); vertical-align: middle;
  color: var(--color-text-secondary); text-decoration: none;
}
button.head-more:hover, button.head-more[aria-expanded="true"] { color: var(--color-accent-text); text-decoration: none; background: var(--color-bg-sunken); }
th[aria-sort] { color: var(--color-text-primary); }
th[aria-sort="descending"] :is(.head-text, button.head:not(.head-more), a.head-sort)::after { content: "\00a0↓"; content: "\00a0↓" / ""; }
th[aria-sort="ascending"] :is(.head-text, button.head:not(.head-more), a.head-sort)::after { content: "\00a0↑"; content: "\00a0↑" / ""; }
thead th.menu-open { z-index: 6; }
/* Its menu floats under it, over the list and outside the frame that scrolls it (the script places it). */
.head-menu {
  position: fixed; z-index: 20; width: max-content; min-width: 12rem; max-width: min(var(--head-menu-width), calc(100vw - var(--space-4)));
  overflow: auto; padding: var(--space-1) 0; border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
  font-size: var(--text-body); line-height: var(--lh-body); font-weight: 400; color: var(--color-text-primary);
  text-align: left; hyphens: manual; white-space: normal;
}
.head-sorts { list-style: none; margin: 0; padding: 0 0 var(--space-1); border-bottom: var(--rule-hairline) solid var(--color-separator); }
.head-sorts button {
  display: flex; width: 100%; justify-content: flex-start; gap: var(--space-2); padding: 0 var(--space-4);
  border: 0; border-radius: 0; background: transparent; font-weight: 400;
}
.head-sorts button[aria-pressed="true"] { color: var(--color-accent-text); font-weight: 600; }
.head-sorts button[aria-pressed="true"]::after { content: "✓"; content: "✓" / ""; margin-left: auto; }
.head-filter { padding: var(--space-2) var(--space-4) var(--space-2); }
.head-filter-title { margin: 0 0 var(--space-1); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
/* In the menu the head names the column: the group's own name is said, not shown, and its « × » is the panel's. */
.head-filter legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.head-filter .remove-filter { display: none; }
tbody tr[data-line]:hover { background: var(--color-bg-sunken); }
td[data-cell="score"] { font-variant-numeric: tabular-nums; font-weight: 600; }
/* A row new since the user's visit (ADR 0132, ADR 0254): the word in blue on its soft tint under what the row is, and a
   blue bar at the row's left edge, drawn from the word, so the bar never shows alone. */
.new-mark {
  display: table; margin-top: var(--space-1); padding: 0 var(--space-2); border-radius: var(--radius-chip);
  background: var(--color-new-subtle); color: var(--color-new-text);
  font-size: var(--text-label); line-height: var(--lh-small); font-weight: 600; white-space: nowrap;
}
tbody tr:has(.new-mark:not([data-seen])) > td:first-child { box-shadow: inset var(--rule-strong) 0 0 var(--color-new); }
/* Seen during the visit (ticket 170, ADR 0220): the word stays until the next load, so nothing moves, quieted — no blue,
   secondary text inside a hairline drawn within its box, its width the same — and the row's bar goes. */
.new-mark[data-seen] {
  background: transparent; color: var(--color-text-secondary); box-shadow: inset 0 0 0 var(--rule-hairline) var(--color-separator);
  transition: background-color var(--motion), color var(--motion);
}
a.offer, span.offer { font-size: var(--text-small); margin-left: var(--space-1); white-space: nowrap; }
/* On Annonces the ad's link opens « Vin », on its own line above the name (ADR 0139). */
td[data-cell="name"] > .offer-link, td[data-cell="name"] > .offer-none {
  display: block; width: fit-content; margin-bottom: var(--space-1); font-size: var(--text-small);
}
td[data-cell="price_eur"], td[data-cell="price"], td[data-cell="quantity"], td[data-cell="lots"],
td[data-cell="landed"], td[data-cell="price_eur_bottle"], td[data-cell="per_bottle"], td[data-cell="duties"],
table#lines td[data-cell="score"], table#lines td[data-cell="vintage"], table#lines td[data-cell="deadline"],
table#lines th[data-column="score"], table#lines th[data-column="vintage"], table#lines th[data-column="deadline"],
table#lines th[data-column="landed"],
/* « Marge % » (ticket 150): a figure alone, right-aligned as the cost is; coloured by its sign as the margin is. */
td[data-cell="margin_pct"], table#lines th[data-column="margin_pct"] {
  text-align: right; font-variant-numeric: tabular-nums;
}
/* A figure's cell keeps its figure on one line; a cell explaining why there is none wraps (no cell widens the list). */
td[data-cell="price"] { color: var(--color-text-secondary); }
td[data-cell="valuation"] { font-style: italic; }
td[data-cell="review"] { color: var(--color-warn-text); }
td[data-cell="pack"] { hyphens: auto; }
td[data-cell="gone"] { font-size: var(--text-small); color: var(--color-text-secondary); }
/* The `margin` macro: the one figure the list is for, coloured by its sign, its basis beside it (R-VAL-01). */
td[data-cell="margin"] { font-variant-numeric: tabular-nums; }
.margin { color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); }
/* The margin's figure is a sentence (« 1 695,53 € par conditionnement (…) »): it wraps between its amounts, each held
   on one line by its no-break spaces, so it never runs into the next cell. */
.margin .figure {
  display: block; font-size: var(--text-figure); line-height: var(--lh-figure); font-weight: 600;
  color: var(--color-text-primary); white-space: normal;
}
.margin[data-sign="up"] .figure { color: var(--color-up-text); }
.margin[data-sign="down"] .figure { color: var(--color-down-text); }
/* The landed cost as a receipt (ticket 104, ADR 0157): a part to a line, each amount held on its line, the total under a
   rule, what it leaves out beneath in the margin's small grey. */
td[data-cell="landed"] .part, td[data-cell="landed"] .total, td[data-cell="landed"] .notes { display: block; }
td[data-cell="landed"] .part { font-size: var(--text-small); line-height: var(--lh-small); }
td[data-cell="landed"] .total {
  margin-top: var(--space-1); padding-top: var(--space-1); border-top: 1px solid var(--color-border); font-weight: 600;
}
td[data-cell="landed"] .notes {
  margin-top: var(--space-1); color: var(--color-text-secondary); font-size: var(--text-small);
  line-height: var(--lh-small);
}

/* A tab's row says the line's own; its head's (i) says the column's rule (ticket 109, ADR 0164). The margin's own
   reservations under its figure; the cost's total, what it leaves out, then its sum folded in place. */
.margin .cell-notes { display: block; }
.cell-detail { margin-top: var(--space-1); }
.cell-detail > summary {
  cursor: pointer; color: var(--color-accent-text); font-size: var(--text-small); line-height: var(--lh-small);
}
.cell-detail[open] > summary { margin-bottom: var(--space-1); }
/* The (i): a quiet mark beside the head's words, a pointer target of its own; open, the rule floats under it, over the
   rows, its right edge on the head's, so that a column at the list's right keeps it in view. */
.column-info { display: inline-block; position: relative; vertical-align: middle; margin-left: var(--space-1); }
.column-info > summary {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--target-min);
  min-height: var(--target-min); list-style: none; cursor: pointer; border-radius: var(--radius-control);
  color: var(--color-text-secondary);
}
.column-info > summary::-webkit-details-marker { display: none; }
.info-mark {
  display: inline-flex; align-items: center; justify-content: center; width: var(--space-4); height: var(--space-4);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control);
  font-size: var(--text-label); line-height: 1; font-weight: 600;
}
.column-info > summary:hover .info-mark { color: var(--color-accent-text); }
.column-info[open] .info-mark {
  background: var(--color-accent-subtle); border-color: var(--color-accent-border); color: var(--color-accent-text);
}
.column-info-text {
  position: absolute; top: 100%; right: 0; z-index: 7; width: max-content;
  max-width: min(var(--head-menu-width), calc(100vw - var(--space-8))); margin: var(--space-1) 0 0;
  padding: var(--space-3) var(--space-4); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-panel); background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
  font-size: var(--text-body); line-height: var(--lh-body); font-weight: 400; color: var(--color-text-primary);
  text-align: left; hyphens: manual; white-space: normal;
}
thead th:has(> details.column-info[open]) { z-index: 6; }
/* In a head the (i) follows the name or its ▾ with no gap of its own: its 24 px target leaves 4 px either side of its mark
   (ticket 125). */
thead .column-info { margin-left: 0; }

/* A cell's tooltip (ticket 138): a small (i) after the figure, the head's mark at 16 px in a 24 px pointer target that
   overhangs the line by 4 px either side, so the row keeps its height. Without script its words show in the cell when
   it is opened; with it they float under the mark, raised with the one shadow, placed by the script outside the frame
   that scrolls the list. */
.tip { display: inline-block; vertical-align: middle; text-align: left; }
.tip > summary {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--target-min);
  min-height: var(--target-min); margin: calc((var(--space-4) - var(--target-min)) / 2);
  margin-left: 0; list-style: none;
  cursor: pointer; border-radius: var(--radius-control); color: var(--color-text-secondary);
}
.tip > summary::-webkit-details-marker { display: none; }
.tip > summary:hover .info-mark, .tip[open] .info-mark {
  background: var(--color-accent-subtle); border-color: var(--color-accent-border); color: var(--color-accent-text);
}
.tip-body {
  display: block; margin: var(--space-1) 0 0; color: var(--color-text-primary); font-size: var(--text-small);
  line-height: var(--lh-small); font-weight: 400; text-align: left; white-space: normal; hyphens: manual;
  overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
}
.tips-float .tip-body {
  position: fixed; z-index: 30; width: max-content; max-width: min(22rem, calc(100vw - var(--space-8))); margin: 0;
  padding: var(--space-2) var(--space-3); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-panel); background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
}
.tip-body .part, .tip-body .notes, .tip-rate { display: block; }
/* A cost or a margin landed on a price with tax says so first, on a line of its own (ticket 144). */
.tip-body .tip-lead { display: block; margin-bottom: var(--space-1); font-weight: 600; }
.tip-rate { margin-top: var(--space-1); color: var(--color-text-secondary); }
/* In a tab's row the figure and its mark hold one line: the margin's figure, the cost's total, a converted price. */
.margin-row > .figure, .margin-row > .figure-word { display: inline; }
.margin-row > .figure-word { color: var(--color-text-secondary); }
td[data-cell="landed"] > .figure { font-weight: 600; white-space: normal; }
/* A line that cannot be landed (ticket 131): its published price, of the regular weight a price has, not the cost's, its
   (i) beside it; its mark under it, small and secondary. A line for ads an alert did not show: how many, in secondary
   words, as « à valoriser ». */
td[data-cell="landed"] > .figure.published { font-weight: 400; }
td[data-cell="landed"] > .figure.quiet { font-weight: 400; color: var(--color-text-secondary); }
.price-mark { display: block; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); white-space: nowrap; }
td[data-cell="name"] > .wine-line { display: block; }
td[data-cell="name"] > :is(a.offer, span.offer) { margin-left: 0; }
td[data-cell="name"] > .wine-line > a.wine { font-weight: 600; text-decoration: none; color: var(--color-text-primary); }
td[data-cell="name"] > .wine-line > a.wine:hover { color: var(--color-accent-text); text-decoration: underline; }


/* « Action », the decision cell (DESIGN.md « Decisions », P5 round 3; R-UI-07). First line: the status as a flat mark in
   its word, the next move outlined in green, « Écarter » in rust with a chevron, since it opens the reasons. Second
   line: the owner, a real select with no frame until hovered. One control height. */
.d-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); min-height: var(--control-height); }
.d-line form { display: inline-flex; margin: 0; }
/* A status longer than its cell leaves room for (« intéressé ✕ », ticket 122) lets the icons go under it rather than
   past the cell: the column keeps the width ticket 125 gave it. */
td[data-cell="decision"] .d-line { flex-wrap: wrap; gap: var(--space-1); }
td[data-cell="decision"] .status { font-size: var(--text-label); line-height: var(--lh-small); }
/* In a row the status, kept or not, takes 4 px either side of its word, so that it and the two icons hold one line in
   « Décision »'s 132 px (ticket 125). */
td[data-cell="decision"] .status, td[data-cell="decision"] form.unkeep button.status { padding: 0 var(--space-1); }
td[data-cell="decision"] .status[data-status="dismissed"] { white-space: normal; }
/* A move made in place (ticket 196, ADR 0234): while its answer comes, the cell takes no other click and the control
   pressed shows it is working; a line dismissed or bought stays in its row, greyed but for its decision, until the list
   is asked again (Corentin, 17/11). */
td[aria-busy="true"] { cursor: progress; }
td[aria-busy="true"] :is(form, a, summary) { pointer-events: none; }
[data-busy] { opacity: var(--opacity-busy); transition: opacity var(--motion); }
tr.settled > td:not([data-cell="decision"]) { opacity: var(--opacity-settled); transition: opacity var(--motion); }
form.move { margin-left: auto; }
form.move button {
  min-height: var(--control-height); padding: 0 var(--space-2);
  border-color: var(--color-up-text); background: var(--color-bg-raised); color: var(--color-up-text);
  font-size: var(--text-small); font-weight: 600; white-space: nowrap;
}
form.move button:hover { border-color: var(--color-up-text); background: var(--color-up-subtle); }
/* « intéressé », « engagé » and « acheté », for someone signed in, are each the button that takes its move back, one step
   (ticket 116, ticket 206): the mark as it is, a small ✕ after its word, its ground a step darker on hover; on hover and
   focus its name, « Plus intéressé », « Plus engagé » or « Plus acheté », floats under it,
   raised with the one shadow, over the rows below, so the row keeps its height and the cell its width. A button, so
   drawn as a flex box, which `.status` alone is not. */
form.unkeep { position: relative; flex: none; }
form.unkeep button.status {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--target-min); padding: 0 var(--space-2);
  border-color: transparent; background: var(--color-accent-subtle); color: var(--color-accent-text); font-weight: 600;
}
/* Kept (KEPT_STATUSES: qualified, engaged), the colour code's green (ADR 0254); bought, the neutral chosen ground. */
form.unkeep button.status:is([data-status="qualified"], [data-status="engaged"]) { background: var(--color-kept-subtle); color: var(--color-kept-text); }
form.unkeep button.status:hover { border-color: transparent; background: var(--color-accent-border); color: var(--color-text-primary); }
.unkeep-x { font-size: var(--text-label); line-height: 1; }
.unkeep-label, .icon-name {
  display: none; position: absolute; left: 0; top: calc(100% + var(--space-1)); z-index: 10;
  padding: var(--space-1) var(--space-2); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-control); background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
  color: var(--color-text-primary); font-size: var(--text-small); font-weight: 500; white-space: nowrap; pointer-events: none;
}
form.unkeep button:hover .unkeep-label, form.unkeep button:focus-visible .unkeep-label { display: block; }
/* In a list's row the moves and « Écarter » are icons (ticket 125, ADR 0182): a 24 px target each, the move outlined in
   green, « Écarter » in rust; each one's word floats under it on hover and focus, as « Plus intéressé » does, and
   « Écarter »'s leaves while its reasons are open. */
.icon {
  flex: none; width: var(--space-4); height: var(--space-4);
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
form.move:has(> .move-icon) { position: relative; flex: none; }
form.move button.move-icon {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: var(--target-min); min-height: var(--target-min); height: var(--target-min); padding: 0;
}
a.dismiss-open:has(> .icon) { justify-content: center; width: var(--target-min); min-height: var(--target-min); padding: 0; }
a.dismiss-open:has(> .icon)::after { content: none; }
:is(button.move-icon, a.dismiss-open):is(:hover, :focus-visible) > .icon-name { display: block; }
a.dismiss-open[aria-expanded="true"] > .icon-name { display: none; }
/* In a list's row the decision is the last column, at the edge of the list's scrolling frame: the label runs left from
   the mark's right edge, over the column before it, rather than out of the frame. */
td[data-cell="decision"] :is(.unkeep-label, .icon-name) { left: auto; right: 0; }
/* « Écarter »: a disclosure on a line's page and in its side panel; in a list's row, a link to the line's page that the
   script makes the button of the list's one menu of reasons, placed after it when it opens (ADR 0168). */
.dismiss { position: relative; flex: none; }
details.dismiss > summary, a.dismiss-open {
  display: inline-flex; align-items: center; position: relative; min-height: var(--control-height);
  padding: 0 var(--space-6) 0 var(--space-2); border-radius: var(--radius-control); list-style: none;
  color: var(--color-down-text); font-size: var(--text-small); font-weight: 500; white-space: nowrap;
  text-decoration: none; transition: background-color var(--motion);
}
details.dismiss > summary::-webkit-details-marker { display: none; }
details.dismiss > summary::after, a.dismiss-open::after, form.owner label::after {
  content: ""; position: absolute; right: var(--space-2); top: 50%; width: var(--chevron); height: var(--chevron);
  border-right: var(--rule-hairline) solid currentColor; border-bottom: var(--rule-hairline) solid currentColor;
  transform: translateY(-75%) rotate(45deg); pointer-events: none;
}
details.dismiss > summary:hover, details.dismiss[open] > summary, a.dismiss-open:hover, a.dismiss-open[aria-expanded="true"] {
  background: var(--color-down-subtle); color: var(--color-down-text);
}
/* The reasons, over the rows below: the row keeps its height. */
details.dismiss[open] > .dismiss-reasons, div.dismiss > .dismiss-reasons {
  position: absolute; right: 0; top: calc(100% + var(--space-1)); z-index: 10; display: grid; gap: var(--space-1);
  min-width: 14rem; padding: var(--space-2); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-panel); background: var(--color-bg-raised); box-shadow: var(--shadow-lifted); white-space: normal;
}
.dismiss-reasons form { display: block; }
.dismiss-reasons button { width: 100%; justify-content: flex-start; text-align: left; color: var(--color-text-primary); }
.dismiss-reasons button.button-quiet:hover { background: var(--color-down-subtle); color: var(--color-down-text); text-decoration: none; }
.dismiss-reasons details > summary { padding: var(--space-1) var(--space-3); font-weight: 500; }
.dismiss-reasons details[open] { display: grid; gap: var(--space-1); }
form.owner label { position: relative; display: inline-flex; align-items: center; max-width: 100%; color: var(--color-text-secondary); font-size: var(--text-small); }
form.owner label::after { color: var(--color-text-secondary); }
form.owner select {
  appearance: none; -webkit-appearance: none; min-width: 0; max-width: 100%; min-height: var(--control-height);
  padding: 0 var(--space-6) 0 var(--space-2); border-color: transparent; background: transparent;
  color: var(--color-text-strong); font-size: var(--text-small); text-overflow: ellipsis; cursor: pointer;
  transition: background-color var(--motion), border-color var(--motion);
}
form.owner select:hover { border-color: var(--color-border); background: var(--color-bg-sunken); }
td[data-cell="decision"] .d-owner { margin-left: calc(-1 * var(--space-2)); }
td[data-cell="decision"] form.owner { min-width: 0; max-width: 100%; }
td[data-cell="decision"] form.owner select { field-sizing: content; }
/* On the line's own page, the owner's select keeps its frame, beside its label. */
#decision form.owner label { gap: var(--space-2); }
#decision form.owner select { border-color: var(--color-border-control); background: var(--color-bg-raised); }
form.own-rank label, form.deadline label { color: var(--color-text-secondary); font-size: var(--text-small); margin-right: var(--space-1); }
details.feedback > summary { color: var(--color-accent-text); }
details.feedback[open] form { display: block; margin: var(--space-1) 0; }

/* Annonces' first cell: the ad's own link, opening a new tab (ADR 0136 point 5, R-UI-06). */
a.offer-link { font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600; }
.offer-none { color: var(--color-text-secondary); font-size: var(--text-small); }
small.corrects { color: var(--color-text-secondary); font-size: var(--text-small); }

/* A sale's header, for reading only, above its lots (R-UI-03): it scrolls with them, never pinned. */
tr.sale th {
  position: static; background: var(--color-bg-sunken); color: var(--color-text-primary);
  font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600; text-transform: none; letter-spacing: 0;
  border-top: var(--rule-strong) solid var(--color-separator);
}
tr.in-sale td[data-cell="name"] { padding-left: var(--space-6); }
body.expanded .content section { margin: var(--space-6) 0; }
body.expanded .content li { margin: var(--space-1) 0; }

/* A value the model guessed rather than read (R-NRM-07): never read as a fact; marked as one to review. */
mark.guessed {
  padding: 0 var(--space-1); border-radius: var(--radius-mark);
  background: var(--color-warn-subtle); color: var(--color-warn-text); font-size: var(--text-small);
}
li.set-aside { color: var(--color-warn-text); }

/* The line's page laid out for a decision (ticket 108, ADR 0162): the head with the offer, the page's one filled action;
   five figures; the calculation, the wine, the lot and the prices beside the decision and its history. */
body.expanded .content .line-page section { margin: 0 0 var(--space-4); }
.line-page { max-width: var(--line-page-width); }
.line-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-6); }
.line-head h1 { margin: 0 0 var(--space-1); }
.line-sub { margin: 0; color: var(--color-text-secondary); }
/* « Fiche technique » (ticket 261): its name above the heading, the way back above it. */
.fiche-nav { margin: 0 0 var(--space-2); }
.fiche-back { color: var(--color-text-secondary); font-size: var(--text-small); font-weight: 600; text-decoration: none; }
.fiche-back:hover { color: var(--color-text-primary); }
.fiche-eyebrow { margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); font-weight: 700; }
div.line-offer { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); }
a.line-offer { white-space: nowrap; }
div.line-offer small { font-size: var(--text-small); color: var(--color-text-secondary); }
/* « Partager » beside the offer (ticket 141): a quiet outlined button, the offer's the one filled; its form floats under
   it, raised with the one shadow, over the figures below: the head keeps its height. */
.line-actions { flex: none; display: flex; align-items: flex-start; gap: var(--space-3); }
details.share { position: relative; }
details.share > summary { list-style: none; }
details.share > summary::-webkit-details-marker { display: none; }
details.share > summary {
  display: inline-flex; align-items: center; min-height: var(--control-height-primary); padding: 0 var(--space-4);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control);
  background: var(--color-bg-raised); color: var(--color-text-primary); font-weight: 500; cursor: pointer;
  transition: background-color var(--motion), border-color var(--motion);
}
details.share > summary:hover, details.share[open] > summary { background: var(--color-bg-sunken); border-color: var(--color-text-strong); }
form.share-form {
  position: absolute; right: 0; top: calc(100% + var(--space-1)); z-index: 10; display: grid; gap: var(--space-3);
  width: var(--share-width); max-width: calc(100vw - 2 * var(--space-4)); padding: var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
}
form.share-form label { display: grid; gap: var(--space-1); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
form.share-form :is(select, textarea) { width: 100%; font-size: var(--text-body); font-weight: 400; color: var(--color-text-primary); }
form.share-form textarea {
  padding: var(--space-1) var(--space-2); border: var(--rule-hairline) solid var(--color-border-control);
  border-radius: var(--radius-control); background: var(--color-bg-raised); font: inherit; font-weight: 400; resize: vertical;
}
form.share-form button { justify-self: end; }
.line-figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--line-figure-min), 1fr)); gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-6);
}
.line-figure {
  padding: var(--space-3) var(--space-4); border: var(--rule-hairline) solid var(--color-separator);
  border-radius: var(--radius-panel); background: var(--color-bg-raised);
}
.line-figure dt { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.line-figure dd { margin: var(--space-1) 0 0; }
.line-figure dd .figure {
  display: block; font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 600; white-space: normal;
}
.line-figure small { display: block; margin-top: 2px; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
/* The margin, the one figure coloured by its sign (DESIGN.md), on its sign's ground. */
.line-figure[data-sign="up"] { background: var(--color-up-subtle); border-color: transparent; }
.line-figure[data-sign="up"] dd .figure { color: var(--color-up-text); }
.line-figure[data-sign="down"] { background: var(--color-down-subtle); border-color: transparent; }
.line-figure[data-sign="down"] dd .figure { color: var(--color-down-text); }
.line-columns { display: grid; grid-template-columns: minmax(0, 1fr) var(--line-side-width); gap: var(--space-8); align-items: start; }
.line-main > section, .line-side > section {
  padding: var(--space-4); border: var(--rule-hairline) solid var(--color-separator); border-radius: var(--radius-panel);
  background: var(--color-bg-raised);
}
.line-page section h2 { margin: 0 0 var(--space-3); font-size: var(--text-heading); line-height: var(--lh-heading); }
.line-page section h3 { margin: var(--space-4) 0 0; font-size: var(--text-body); }
/* The calculation as a sum (ADR 0157): a part to a row, its amount right-aligned in tabular figures, what it was computed
   from in small grey under it; the cost ruled; a charge not entered in the warning's words. */
table.receipt { width: 100%; border-collapse: collapse; }
table.receipt td, table.receipt tbody th {
  padding: var(--space-2) 0; border-bottom: var(--rule-hairline) solid var(--color-separator); vertical-align: top;
}
table.receipt tbody th { text-align: left; font-weight: 400; }
table.receipt td.op { width: var(--space-6); color: var(--color-text-secondary); }
table.receipt td.num { text-align: right; white-space: nowrap; padding-left: var(--space-4); font-variant-numeric: tabular-nums; }
table.receipt .why { display: block; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
table.receipt tr[data-missing] td, table.receipt tr[data-missing] th { color: var(--color-warn-text); }
table.receipt tr.total td, table.receipt tr.total th { font-weight: 600; border-bottom: var(--rule-strong) solid var(--color-text-strong); }
table.receipt tr.resale td, table.receipt tr.resale th { padding-top: var(--space-4); }
table.receipt tr.margin-row td, table.receipt tr.margin-row th { font-weight: 600; border-bottom: 0; font-size: var(--text-figure); }
table.receipt tr.margin-row[data-sign="up"] td.num { color: var(--color-up-text); }
table.receipt tr.margin-row[data-sign="down"] td.num { color: var(--color-down-text); }
table.receipt tr.margin-row .why { font-weight: 400; }
.line-notes { margin: var(--space-3) 0 0; padding-left: var(--space-4); font-size: var(--text-small); color: var(--color-text-secondary); }
.line-more { margin-top: var(--space-3); }
.line-more summary { cursor: pointer; color: var(--color-accent-text); }
dl.line-facts { max-width: none; }
dl.line-facts .from { font-size: var(--text-small); color: var(--color-text-secondary); }
dl.line-facts .guessed dd { color: var(--color-warn-text); }
dl.line-facts .set-aside dd { color: var(--color-warn-text); }
.table-scroll { overflow-x: auto; }
table.prices { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
/* Each head holds one line, never hyphenated (ticket 146). A list's heads keep the page's ground and sit at the row's
   foot (`thead th`); on this raised section, at 390 px « Conditionnement » broke into five pieces, the head row grew to
   71 px and that ground showed as a grey band above the shorter heads. One line keeps the row at 24 px at every width,
   as it was from 1,280; the table scrolls in its region when wider than the window. */
table.prices th { text-align: left; font-size: var(--text-label); font-weight: 600; color: var(--color-text-secondary); white-space: nowrap; hyphens: manual; }
table.prices th, table.prices td { padding: var(--space-1) var(--space-2) var(--space-1) 0; border-bottom: var(--rule-hairline) solid var(--color-separator); }
table.prices .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.prices tr[data-offer="this"] td { font-weight: 600; }
.tag {
  padding: 0 var(--space-1); border-radius: var(--radius-mark); background: var(--color-bg-sunken);
  color: var(--color-text-strong); font-size: var(--text-label); font-weight: 600;
}
.line-side .d-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
/* The decision's controls hold within the column at any width (WCAG 1.4.10): a label wraps above its control. */
.line-side { min-width: 0; }
.line-side form, .line-side label { max-width: 100%; flex-wrap: wrap; }
.line-side select, .line-side input:not([type="hidden"]) { max-width: 100%; min-width: 0; }
.line-history { margin: 0; padding: 0; list-style: none; font-size: var(--text-small); }
.line-history li { padding: var(--space-2) 0; border-bottom: var(--rule-hairline) solid var(--color-separator); }
/* « Fiche technique » v2 (tickets 262–265, ADR 0279–0282): an index of its sections under the figures; each section's
   head its title and a quiet link at its right; where this offer stands, three figures in the ink (a price marks
   nothing); the bottle's chart as « Prix du marché » draws it, this offer's marks ringed in the ink; every recorded
   price folded; the wine's specification compact, two facts a row on a wide window; the side in view as one scrolls. */
.fiche-index { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.fiche-index a {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--space-3); border-radius: var(--radius-chip);
  border: var(--rule-hairline) solid var(--color-separator); background: var(--color-bg-raised);
  color: var(--color-text-strong); font-size: var(--text-small); font-weight: 600; text-decoration: none;
}
.fiche-index a:hover { border-color: var(--color-text-strong); color: var(--color-text-primary); }
.fiche-section { scroll-margin-top: var(--space-4); }
.fiche-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); }
.fiche-section-head h2 { margin-bottom: var(--space-3); }
.fiche-more { font-size: var(--text-small); font-weight: 600; color: var(--color-text-strong); }
.fiche-note { margin: 0; color: var(--color-text-secondary); }
.fiche-market-wait { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--color-text-secondary); font-weight: 600; }
dl.fiche-standing { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-3); margin: 0 0 var(--space-3); }
dl.fiche-standing > div { padding: var(--space-3); border-radius: var(--radius-panel); background: var(--color-bg-sunken); }
dl.fiche-standing dt { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
dl.fiche-standing dd { margin: 0; }
dl.fiche-standing dd.figure { margin-top: var(--space-1); font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 700; color: var(--color-text-primary); }
dl.fiche-standing .fiche-standing-sub { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-strong); }
.price-chart .own-ring { fill: none; stroke: var(--color-text-primary); stroke-width: 2px; }
/* « Sur vos listes » (ticket 265): each row the line answers — its list a link in 600, its rank, vintages, container and
   quantity in the label size; the target and this offer's cost under them in the strong ink, never coloured. */
ul.fiche-lists { margin: 0; padding: 0; list-style: none; }
ul.fiche-lists li { padding: var(--space-2) 0; border-bottom: var(--rule-hairline) solid var(--color-separator); }
ul.fiche-lists li:last-child { border-bottom: 0; }
.fiche-list-name { font-weight: 600; color: var(--color-text-primary); }
.fiche-list-facts, .fiche-list-target { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin: var(--space-1) 0 0; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.fiche-list-target { color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
details.fiche-every { margin-top: var(--space-4); }
details.fiche-every > summary { cursor: pointer; font-weight: 600; color: var(--color-text-strong); }
details.fiche-every[open] > summary { margin-bottom: var(--space-2); }
@media (min-width: 68.75rem) {
  .fiche-wine dl.facts { grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr) minmax(7rem, 11rem) minmax(0, 1fr); max-width: none; }
}
@media (min-width: 64.01rem) {
  body.expanded .line-side { position: sticky; top: var(--space-4); }
}
/* A narrow window: the decision under the facts, the figures two by two (DESIGN.md: nothing breaks). */
@media (max-width: 64rem) {
  .line-columns { grid-template-columns: minmax(0, 1fr); }
  .line-head { flex-direction: column; }
  form.share-form { right: auto; left: 0; }
}

/* A line in a list's side panel (ticket 238, UI v2 §5): the `panel` of the look of 22/11, the line's page in one column
   inside it — the source and the offer first, the figures two by two, the calculation, the wine, the lot, the prices,
   the decision and its history, then the columns the row does not show. The list behind stays where it is, under the
   scrim; its row is marked. On a phone the panel takes the whole width. */
html.panel-open { overflow: hidden; }
html.panel-open .toast { z-index: 51; }
/* No way back in a line's panel: its title takes the head's first row, beside « Fermer »; a line of « Ailleurs » the list
   does not show (ticket 244) brings the way back to the list's line, above the title, as the hunting panel has it. */
#line-panel .side-panel-title { grid-row: 1; grid-column: 1; }
#line-panel .side-panel-back[hidden] { display: none; }
#line-panel .side-panel-back:not([hidden]) ~ .side-panel-title { grid-row: 2; grid-column: 1 / -1; }
#line-panel[aria-busy="true"] .side-panel-body { opacity: 0.6; transition: opacity var(--motion); }
.panel-note { margin: var(--space-4) 0; color: var(--color-text-secondary); }
.line-panel .line-page { max-width: none; }
.line-panel .line-head { flex-direction: column; gap: var(--space-3); }
.line-panel .line-actions { flex-wrap: wrap; }
.line-panel div.line-offer { align-items: flex-start; }
.line-panel .line-columns { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.line-panel .line-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: var(--space-4) 0; }
.line-panel .line-page section, .panel-columns { margin: 0 0 var(--space-4); }
.line-source { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text-primary); vertical-align: middle; }
.line-source .channel-icon { color: var(--color-text-secondary); }
.line-deadline {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--space-2); border-radius: var(--radius-chip);
  background: var(--color-bg-sunken); color: var(--color-text-strong); font-weight: 600; font-variant-numeric: tabular-nums;
}
.line-deadline[data-closing="soon"] { background: var(--color-soon-subtle); color: var(--color-soon-text); }
.panel-columns {
  padding: var(--space-4); border: var(--rule-hairline) solid var(--color-separator); border-radius: var(--radius-panel);
  background: var(--color-bg-raised);
}
.panel-columns h2 { margin: 0 0 var(--space-3); font-size: var(--text-heading); line-height: var(--lh-heading); }
.panel-columns dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-3) var(--space-6); margin: 0; }
.panel-columns .field { min-width: 0; }
.panel-columns dt { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.panel-columns dd { margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
#line-panel .side-panel-foot { justify-content: flex-start; align-items: center; }
/* « Ailleurs » (ticket 244): the same wine in the other lines — its parts' names in the label size, then a quiet list on
   raised between hairlines, each line a link: where it is at the left (channel, source, its container, its marks), its
   figures at the right, aligned, in tabular figures. No colour but the margin's sign and the marks' own. */
.elsewhere-part { display: flex; align-items: baseline; gap: var(--space-2); margin: var(--space-3) 0 var(--space-2); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; letter-spacing: 0; color: var(--color-text-secondary); }
ul.elsewhere-lines {
  margin: 0; padding: 0; list-style: none; overflow: hidden;
  border: var(--rule-hairline) solid var(--color-separator); border-radius: var(--radius-panel); background: var(--color-bg-raised);
}
li.elsewhere-line + li.elsewhere-line { border-top: var(--rule-hairline) solid var(--color-separator); }
a.elsewhere-open {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-1) var(--space-4);
  padding: var(--space-2) var(--space-3); color: var(--color-text-primary); text-decoration: none; transition: background var(--motion);
}
a.elsewhere-open:hover { background: var(--color-bg-sunken); }
a.elsewhere-open:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: -2px; }
.elsewhere-where { grid-column: 1; display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
.elsewhere-where .channel-icon { color: var(--color-text-secondary); }
.elsewhere-where .monogram { width: 24px; height: 24px; }
/* A neighbouring vintage's year (ticket 264), in the strong ink, under its source; a part's rest unfolding under it. */
.elsewhere-year { grid-column: 1; font-weight: 700; color: var(--color-text-primary); }
details.elsewhere-more { margin-top: var(--space-2); }
details.elsewhere-more > summary { cursor: pointer; font-size: var(--text-small); font-weight: 600; color: var(--color-text-strong); }
details.elsewhere-more[open] > summary { margin-bottom: var(--space-2); }
.elsewhere-container, .elsewhere-marks { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-strong); }
.elsewhere-figures { grid-column: 2; grid-row: 1 / span 3; display: grid; justify-items: end; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; }
.elsewhere-figure { white-space: nowrap; }
.elsewhere-figure small { font-size: var(--text-small); color: var(--color-text-secondary); }
.elsewhere-figure[data-figure="price"] { font-size: var(--text-small); color: var(--color-text-strong); }
.elsewhere-figure[data-figure="landed"] > .num { font-weight: 600; }
.elsewhere-none { margin: 0; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
details.offer-elsewhere > summary { cursor: pointer; font-size: var(--text-small); font-weight: 600; color: var(--color-text-strong); }
details.offer-elsewhere > summary .num { color: var(--color-text-secondary); }
details.offer-elsewhere[open] > summary { margin-bottom: var(--space-1); }
@media (max-width: 640px) {
  a.elsewhere-open { grid-template-columns: minmax(0, 1fr); }
  .elsewhere-figures { grid-column: 1; grid-row: auto; display: flex; flex-wrap: wrap; justify-items: start; gap: var(--space-1) var(--space-3); text-align: left; }
}
.panel-step kbd, .panel-page kbd { margin-left: var(--space-1); }
.panel-page { margin-left: auto; align-self: center; }
/* The line the panel shows, in the list behind it: the chosen ground and a bar in the ink. */
#lines tr.selected > td { background: var(--color-accent-subtle); }
#lines tr.selected > td:first-child { box-shadow: inset 3px 0 0 var(--color-accent-solid); }
@media (max-width: 640px) {
  .line-panel .line-figures { grid-template-columns: minmax(0, 1fr); }
  .panel-page { margin-left: 0; }
}

/* Système (ticket 80, ADR 0134): the administrator's page. Dense tables, figures right-aligned in tabular numbers, what
   each was counted on below it; no colour but the attention word's, always a word. */
.system-intro { max-width: 48rem; margin-top: var(--space-2); color: var(--color-text-strong); }
.system-contents ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); margin: var(--space-3) 0 0; padding: 0; }
.system-section { margin-top: var(--space-8); padding-top: var(--space-4); border-top: var(--rule-hairline) solid var(--color-separator); }
.system-section > h2 { margin-top: 0; }
.system-section h3 { margin-top: var(--space-6); }
.system-note { max-width: 48rem; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); }
dl.facts { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); margin: var(--space-2) 0 0; max-width: 60rem; }
dl.facts > div { display: contents; }
dl.facts dt, dl.facts dd { margin: 0; padding: var(--space-2); border-bottom: var(--rule-hairline) solid var(--color-separator); }
dl.facts dt {
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600;
  color: var(--color-text-secondary);
  padding-top: calc(var(--space-2) + 2px);
}
dl.facts dd { overflow-wrap: anywhere; }
dl.facts .figure-line { display: block; font-variant-numeric: tabular-nums; }
ul.problems { margin: var(--space-2) 0; padding-left: var(--space-6); max-width: 60rem; }
ul.problems li { padding: 2px 0; }
.system-table { width: auto; max-width: 100%; }
.system-table th[scope="row"] { font-weight: 400; min-width: 10rem; max-width: 24rem; overflow-wrap: anywhere; }
.system-table th.num, .system-table td.num { text-align: right; }
.system-table td.num .figure { font-weight: 600; }
.system-table .figure-words { color: var(--color-text-secondary); }
.system-table .counts { display: block; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.system-table .source-note { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); max-width: 18rem; }
.system-table .source-browse { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.system-table td.compared { min-width: 12rem; max-width: 20rem; font-size: var(--text-small); line-height: var(--lh-small); }
.system-table .source-state { white-space: nowrap; }
.system-table th.week { font-variant-numeric: tabular-nums; }
.measure + .measure h3 { margin-top: var(--space-8); }
/* What a figure was counted on wraps under it rather than widening its table. */
.system-table td.num .counts { white-space: normal; min-width: 7rem; }
@media (max-width: 600px) {
  dl.facts { grid-template-columns: minmax(0, 1fr); }
  dl.facts dt { border-bottom: 0; padding-bottom: 0; }
  .system-table th[scope="row"] { min-width: 7rem; }
}

/* The sign-in page (ADR 0136 point 4, ticket 133): the logo, the date, the button, the copyright at the foot, and
   nothing of the database. « La Vigie se prépare » (ADR 0169) takes the same layout. */
body.sign-in-page { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: var(--space-4); }
/* The look of 22/11 (ADR 0254): the page's words on one card, raised on the page's ground, at its centre. */
.sign-in {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: min(30rem, 100%); margin: auto auto 0; padding: var(--space-12) var(--space-8);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-card);
  background: var(--color-bg-raised); box-shadow: var(--shadow-soft);
  text-align: center;
}
.sign-in-logo { margin: 0; }
.sign-in-logo .logo { height: var(--logo-display); }
/* The date, or the page that says the tool is preparing in the sign-in page's layout (ADR 0169). */
.sign-in .date, .sign-in .preparing {
  margin: var(--space-6) 0 0;
  font-size: var(--text-title); line-height: var(--lh-title); font-weight: 800; letter-spacing: var(--tracking-title);
  color: var(--color-text-primary);
}
.sign-in .message { max-width: 28rem; margin: var(--space-6) 0 0; overflow-wrap: anywhere; }
.sign-in .note {
  max-width: 22rem; margin: var(--space-4) 0 0;
  font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary);
}
.sign-in form { margin: var(--space-8) 0 0; }
.sign-in-foot { margin: 0 auto auto; padding: var(--space-6) var(--space-4); text-align: center; }
.sign-in-foot p { margin: 0; }
.sign-in-foot small { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }

/* The `toast` macro (ADR 0130, DESIGN.md « Components »): a move made and « Annuler », floating at the foot of the
   content, by the rail and away from the decisions' column at the row's end, raised, with the one shadow for what
   floats. It neither slides nor fades in (motion minimal); the page keeps room at its foot so it never hides the last
   line. */
.toast {
  position: fixed; left: calc(var(--rail-width) + var(--space-6)); bottom: var(--space-6); z-index: 25;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-1) var(--space-3);
  width: max-content; max-width: min(32rem, calc(100vw - var(--space-8)));
  min-height: calc(var(--control-height) + 2 * var(--space-2));
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border: 0; border-radius: var(--radius-panel);
  background: var(--color-accent-solid); color: var(--color-text-on-accent); box-shadow: var(--shadow-lifted);
  animation: toast-in var(--motion-lift) var(--ease) both;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.toast p { margin: 0; }
/* What it did and the line, then « Annuler » and « Fermer », on one row: the line's wine gives way first. */
.toast-text { grid-column: 1; min-width: 0; display: flex; align-items: baseline; gap: var(--space-2); }
/* What it did wraps when a name makes it long; the line's wine, on one line cut with an ellipsis, gives way before it
   (the line itself names it whole). */
.toast-what { flex: 0 1 auto; overflow-wrap: break-word; font-weight: 600; }
.toast-subject { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-on-accent-secondary); }
.toast-why { grid-column: 1 / -1; grid-row: 2; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-on-accent-secondary); }
.toast-undo { grid-column: 2; }
.toast-close { grid-column: 3; grid-row: 1; }
.toast form { margin: 0; }
.toast-undo .button-quiet { padding: 0 var(--space-2); color: var(--color-text-on-accent); font-weight: 700; text-decoration: underline; }
.toast-undo .button-quiet:hover { color: var(--color-text-on-accent); background: var(--color-accent-solid-hover); }
.toast-close {
  width: var(--control-height); padding: 0;
  border-color: transparent; background: transparent; color: var(--color-text-on-accent-secondary);
}
.toast-close:hover { border-color: transparent; background: var(--color-accent-solid-hover); color: var(--color-text-on-accent); }
body:has(.toast:not([hidden])) .content { padding-bottom: calc(var(--space-12) + var(--space-8)); }
html.rail-hidden .toast { left: calc(var(--rail-folded) + var(--space-6)); }
@media (max-width: 900px) {
  .toast, html.rail-hidden .toast { left: var(--space-4); }
}
@media (max-width: 600px) {
  .toast { left: var(--space-4); right: var(--space-4); bottom: var(--space-4); width: auto; max-width: none; }
}

/* A confirmation, only for what cannot be undone (ADR 0130 point 6): deleting a user with no trace, a saved screen. The
   first click opens it in place, saying so; the second deletes. */
details.confirm { display: inline-block; vertical-align: top; }
details.confirm > summary {
  display: inline-flex; align-items: center; min-height: var(--control-height); padding: 0 var(--space-2);
  border-radius: var(--radius-control); color: var(--color-down-text); list-style: none;
}
details.confirm > summary::-webkit-details-marker { display: none; }
details.confirm > summary:hover { text-decoration: underline; }
details.confirm[open] {
  display: block; margin: var(--space-1) 0; padding: var(--space-2) var(--space-3);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised);
}
details.confirm p { margin: var(--space-1) 0 var(--space-2); max-width: 28rem; }
details.confirm form { display: block; }
details.confirm button { border-color: var(--color-down-text); color: var(--color-down-text); }
details.confirm button:hover { background: var(--color-down-subtle); }

/* « Mon suivi » (R-UI-15, ADR 0137): what changed since the keep, in « Vin » under the name as « Depuis votre visite »
   is, each change a word on a flat mark like a status, its detail under it; « Clôture sous 48 h » on the amber's tint,
   as closing soon is everywhere (ADR 0254, SPEC v2 §3.3). */
.follow-flags { margin: var(--space-1) 0; }
p.intro { margin: 0 0 var(--space-3); color: var(--color-text-secondary); max-width: 60rem; }
ul.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
ul.flags .flag {
  display: inline-block; padding: 0 var(--space-2); border-radius: var(--radius-mark);
  background: var(--color-bg-sunken); color: var(--color-text-strong);
  font-size: var(--text-label); line-height: var(--lh-small); font-weight: 600; white-space: nowrap;
}
ul.flags li[data-flag="closing"] .flag { background: var(--color-soon-subtle); color: var(--color-soon-text); }
/* A gone line's day, in « Vin » under its name (ADR 0141): the flags' flat mark, on its own line. */
.gone-mark {
  display: table; margin-top: var(--space-1); padding: 0 var(--space-2); border-radius: var(--radius-mark);
  background: var(--color-bg-sunken); color: var(--color-text-strong);
  font-size: var(--text-label); line-height: var(--lh-small); font-weight: 600;
}
ul.flags .flag-detail {
  display: block; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}
ul.flag-lines { list-style: none; margin: 0; padding: 0; font-size: var(--text-small); line-height: var(--lh-small); }
.flags-none { font-size: var(--text-small); color: var(--color-text-secondary); }
/* A cellar signal's rank for a buyer (ticket 127): the flags' flat mark, in its word, on its own line above the
   procedure. The same for every rank: its word carries the meaning, no hue (DESIGN.md « How colour is used »). */
.rank-mark {
  display: table; margin-bottom: var(--space-1); padding: 0 var(--space-2); border-radius: var(--radius-mark);
  background: var(--color-bg-sunken); color: var(--color-text-strong);
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; white-space: nowrap;
}
/* A cellar signal's activity code (ADR 0149): the company cell's second line. */
.signal-code {
  display: block; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary);
}
.follow-signals { margin-top: var(--space-8); }
.follow-signals h2 { margin-bottom: var(--space-2); }

/* « Tableau de bord » (ADR 0151, ticket 96): the period's links, the tiles, tables as on Système, and the charts. The
   funnel's bar of five steps left with ticket 123. */
.periods ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0 0; padding: 0; }
.periods a, .daily-filter a {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-height); padding: 0 var(--space-3);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control);
  color: var(--color-text-primary); text-decoration: none; font-size: var(--text-body);
}
.periods a:hover, .daily-filter a:hover { border-color: var(--color-accent-solid); color: var(--color-accent-text); }
.periods a[aria-current="true"], .daily-filter a[aria-current="true"] {
  border-color: var(--color-accent-border); background: var(--color-accent-subtle); color: var(--color-accent-text); font-weight: 600;
}
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
.tile {
  padding: var(--space-4); background: var(--color-bg-raised); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-panel); display: grid; gap: var(--space-1); align-content: start;
}
.tile p { margin: 0; }
.tile-label { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.tile-figure .before { margin-left: 0; }
.tile-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); }
.tile-n {
  font-size: var(--text-title); line-height: var(--lh-title); font-weight: 600; letter-spacing: var(--tracking-figure);
  font-variant-numeric: tabular-nums;
}
.tile-margin { grid-column: span 2; }
.tile-margin .tile-n { white-space: normal; }
/* Ticket 297: the range on one line wherever the tile spans two columns at its width (a seven-figure range measured 390
   of 424 px at 1,280); below, it may part at « à ». */
@media (min-width: 1200px) {
  .tile-margin .tile-n { white-space: nowrap; }
}
.tile-gate, .tile-sub { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.tile-sub strong { color: var(--color-text-strong); }
/* What of the potential margin rests on each basis (ticket 186): one basis a line. */
.tile-bases [data-basis] { display: block; }
.tile-verdict { font-weight: 600; color: var(--color-text-strong); }
.before { margin-left: var(--space-2); font-size: var(--text-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.dashboard-section { margin-top: var(--space-8); padding-top: var(--space-4); border-top: var(--rule-hairline) solid var(--color-separator); }
.dashboard-section > h2 { margin-top: 0; }
.dashboard-section h3 { margin-top: var(--space-6); margin-bottom: var(--space-2); }
.dashboard-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: var(--space-2) var(--space-8); align-items: start; }
.dashboard-list { margin: 0; padding-left: var(--space-6); max-width: 32rem; }
.dashboard-list li { padding: var(--space-1) 0; border-bottom: var(--rule-hairline) solid var(--color-separator); }
.dashboard-list.ranked li { display: flex; justify-content: space-between; gap: var(--space-4); }
.dashboard-list .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.dashboard-table td.num a { font-weight: 600; }
.dash-figure { font-weight: 600; font-variant-numeric: tabular-nums; }
/* The lines per day (ticket 102): a bar a day stacked by tab, the day under its bar in a column as wide, « Filtre » above. */
.daily-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-3); }
.daily-filter-label { font-size: var(--text-small); font-weight: 600; color: var(--color-text-secondary); }
.daily-filter ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; }
.daily-chart { max-width: 60rem; margin-top: var(--space-3); }
svg.daily { display: block; width: 100%; height: 8rem; background: var(--color-bg-raised); border-bottom: var(--rule-hairline) solid var(--color-chart-axis); }
svg.daily .day-hit { fill: transparent; }
svg.daily g.day:hover .day-hit { fill: var(--color-chart-track); }
/* A 2 px gap in the ground's colour between a bar's stacked parts (DESIGN.md « Charts »). */
svg.daily rect[data-tab] { stroke: var(--color-bg-raised); stroke-width: 2px; vector-effect: non-scaling-stroke; }
svg.daily g.day:hover rect[data-tab] { stroke: var(--color-chart-track); }
.daily-axis {
  display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); list-style: none; margin: 0; padding: 0;
  font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums;
}
/* Each day's column exactly a bar's width: the month, wider, hangs under its first day without widening it. */
.daily-axis li { position: relative; min-width: 0; min-height: calc(2lh + var(--space-1)); padding-top: var(--space-1); text-align: center; white-space: nowrap; }
.daily-axis .axis-day { display: block; }
.daily-axis li[data-week] { box-shadow: inset var(--rule-hairline) 0 var(--color-border-control); }
.daily-axis .axis-month { position: absolute; left: 2px; bottom: 0; color: var(--color-text-strong); font-weight: 600; }
/* A month starting under one of the last three bars hangs left of its bar's right edge, never past the chart's end
   (ticket 297: the weeks' columns are narrower than a month's name). */
.daily-axis li:nth-last-child(-n+3) .axis-month { left: auto; right: 2px; }
/* What became of the lines captured (ticket 110, ADR 0165): the names in a grid whose columns are the drawing's, the
   drawing between the steps' names and the stopped's, as high as its sources' names need. Narrower than its least
   width, it scrolls inside its region rather than squeezing its columns. Each source in its colour on the dashboard, its
   box and its band to « Captées » (ticket 117, `series-*`); then the path drawn in the ink, what stopped in the light
   grey (DESIGN.md « Charts »). */
.cohort-scroll { overflow-x: auto; margin-top: var(--space-3); }
.cohort-chart { display: grid; grid-template-columns: var(--cohort-columns); row-gap: var(--space-2); min-width: 44rem; max-width: 64rem; }
.cohort-sources-head {
  grid-column: 1; grid-row: 1; align-self: end; margin: 0; padding-right: var(--space-2); text-align: right;
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary);
}
.cohort-steps, .cohort-stopped {
  grid-column: 1 / -1; display: grid; grid-template-columns: var(--cohort-columns); list-style: none; margin: 0; padding: 0;
}
.cohort-steps { grid-row: 1; }
.cohort-steps li, .cohort-stopped li { display: grid; align-content: start; min-width: 0; padding-right: var(--space-2); }
.cohort-name { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.cohort-steps .cohort-name { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; }
/* Two reasons under one step (ticket 122): each its name over its figure, the second below the first. */
.cohort-stop { display: grid; }
.cohort-stop + .cohort-stop { margin-top: var(--space-2); }
.cohort-n { font-weight: 600; font-variant-numeric: tabular-nums; }
.cohort-rate { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.cohort-plot { grid-column: 1 / -1; position: relative; height: var(--cohort-plot); }
svg.cohort { display: block; width: 100%; height: var(--cohort-plot); }
.cohort-sources { list-style: none; margin: 0; padding: 0; }
.cohort-sources li {
  position: absolute; right: calc(var(--cohort-names) + var(--space-2)); max-width: calc(100% - var(--cohort-names) - var(--space-2));
  transform: translateY(-50%); text-align: right; font-size: var(--text-small); line-height: var(--lh-small);
}
.cohort-sources .num { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The flow's origin and start (ticket 296): two segmented controls at the head's end, each with its name; an origin's
   name a link that filters on it, the ink's weight while it is in; a region its region's colour (`.region-<slot>`). */
.cohort-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-left: auto; min-width: 0; }
.cohort-control { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.cohort-control-name { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 700; color: var(--color-text-secondary); }
.cohort-control .segmented { max-width: 100%; }
a.cohort-origin { color: inherit; text-decoration-color: var(--color-border); text-underline-offset: 0.15em; }
a.cohort-origin:hover { text-decoration-color: currentColor; }
a.cohort-origin[aria-pressed="true"] { font-weight: 700; color: var(--color-text-primary); text-decoration-color: currentColor; }
svg.cohort .origin-region { fill: var(--region); }
svg.cohort a { cursor: pointer; }
svg.cohort a:hover .box-stopped { fill: var(--color-chart-mid); }
svg.cohort .band-source { fill-opacity: 0.3; }
svg.cohort .band-step { fill: var(--color-chart-strong); fill-opacity: 0.28; }
svg.cohort .band-stopped { fill: var(--color-chart-soft); fill-opacity: 0.35; }
svg.cohort path:hover { fill-opacity: 0.55; }
svg.cohort .box-step { fill: var(--color-chart-strong); }
svg.cohort .box-stopped { fill: var(--color-chart-soft); }
/* The small bottles (ticket 117): each in its source's colour, a hairline in the page's colour so that it reads over a
   band of its own; drawn back to its shape across a drawing stretched to the width (`--cohort-unstretch`, the page's
   script). The run is the one motion that travels (DESIGN.md « motion »): never under reduced motion, nor on a phone,
   where tables take the drawing's place. */
svg.cohort .bottle {
  stroke: var(--color-bg-page); stroke-width: 1px; vector-effect: non-scaling-stroke; paint-order: stroke;
  transform: scale(var(--cohort-unstretch, 1), 1);
}
@media (prefers-reduced-motion: reduce) {
  svg.cohort .bottles { display: none; }
}
/* On a phone, the drawing would show its sources only: the same figures as tables take its place. */
.cohort-narrow { display: none; }
.cohort-narrow table + table, .cohort-section .chart-table table + table { margin-top: var(--space-4); }
.cohort-narrow th, .cohort-narrow td { white-space: normal; }
.cohort-narrow td.num { white-space: nowrap; }  /* a figure never broken at its thousands (ticket 296's screenshots) */
.cohort-narrow th[scope="row"] { min-width: 0; overflow-wrap: normal; }
@media (max-width: 640px) {
  .cohort-scroll, .cohort-section .chart-table { display: none; }
  .cohort-narrow { display: block; margin-top: var(--space-3); }
}
@media (max-width: 640px) {
  .daily-axis[data-dense] li:not([data-week]) .axis-day { visibility: hidden; }
  /* A year of weeks on a phone (ticket 297): a column is a few pixels, so only the quarters' months are written. */
  .daily-axis[data-year] .axis-day, .daily-axis[data-year] li:not([data-quarter]) .axis-month { visibility: hidden; }
}
@media (max-width: 900px) {
  .tile-margin { grid-column: auto; }
}

/* « Tableau de bord » v2 (ticket 100): four views as tabs, a « ? » per figure, and the charts drawn on the server as
   inline SVG. The charts' colours, measured with dataviz's validator against the raised ground (docs/DESIGN.md): seven
   sources' hues in a fixed order (the seventh since ticket 129, ADR 0184), then one grey for the rest; two greys and
   the ink for one series' parts. Since ADR 0254 a list never wears these hues: « Origine »'s tag is neutral. */
:root {
  --color-chart-1: #2863ab;      /* blue 255° */
  --color-chart-2: #009394;      /* teal 195° */
  --color-chart-3: #8059bb;      /* violet 300° */
  --color-chart-4: #3697c3;      /* sky 232° */
  --color-chart-5: #778a2d;      /* olive 120° */
  --color-chart-6: #c05296;      /* magenta 345° */
  --color-chart-7: #713a72;      /* plum 327° (ADR 0184) */
  --color-chart-other: #7a838e;  /* cool-500: the sources past the seventh, as one */
  --color-chart-soft: #a3acb8;   /* the rest of a bar: captured, not kept */
  --color-chart-mid: #6b7583;
  --color-chart-strong: #37414f; /* ink-700: the part that matters, one series */
  --color-chart-track: #ecf0f5;  /* cool-100: a gauge's track */
  --color-chart-axis: #7a838e;   /* the zero line, a baseline */
  --color-chart-mark: #151e2d;   /* ink-900: a country's high end, the cap */
  /* The lines per day stacked by tab (ADR 0154): a hue per tab of the tabs' own since ticket 137 (Corentin, 15/10:
     « tout est gris, noir, gris »), bordeaux, gold and a green, none a platform's (ΔE ≥ 9 from each of the seven).
     Validated with dataviz in the stack's order on the raised ground, the page and the track: lightness band, chroma
     floor, adjacent CVD ΔE 9.2 at worst, normal 18.1, each ≥ 3:1 (the 2 px gap in the ground between them). */
  --color-tab-auctions: #8d243c;  /* bordeaux 12°, OKLCH 0.435 0.140: 8.4 on raised */
  --color-tab-merchants: #b17f21; /* gold 78°, 0.631 0.121: 3.5 (3.1 on the track) */
  --color-tab-ads: #327648;       /* green 152°, 0.509 0.101: 5.4 */
}
.dashboard-views ul {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--space-6); margin: var(--space-2) 0 0; padding: 0;
  border-bottom: var(--rule-hairline) solid var(--color-separator);
}
.dashboard-views a {
  display: inline-block; padding: var(--space-2) 0; margin-bottom: calc(-1 * var(--rule-hairline));
  border-bottom: var(--rule-strong) solid transparent; color: var(--color-text-secondary); text-decoration: none;
  font-size: var(--text-body); font-weight: 600;
}
.dashboard-views a:hover { color: var(--color-text-primary); }
.dashboard-views a[aria-current="page"] { color: var(--color-text-primary); border-bottom-color: var(--color-accent-solid); }
/* The head's sentence and the selection bar (ticket 294, dashboard v2 §4.3, §4.4): « Prix du marché »'s sentence and
   gesture — the chips, the period, « Filtres (n) » and its popover under the bar, « Tout effacer » a quiet link. */
.dashboard-head { display: block; }
.dashboard-head h1 { margin: 0; }
.dashboard-say {
  max-width: 52rem; margin: var(--space-2) 0 0; font-size: var(--text-heading); line-height: var(--lh-reading);
  color: var(--color-text-strong);
}
.dashboard-say strong { font-weight: 700; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.dashboard-say-scope { color: var(--color-text-secondary); }
.dashboard-say .say-n { white-space: nowrap; }
.dashboard-selection { margin-top: var(--space-4); }
.dashboard-selection ul#active-filters, .dashboard-periods ul { margin: 0; }
.panel-body.dashboard-popover { right: auto; width: min(34rem, 100%); display: grid; gap: var(--space-2); }
.popover-note { margin: 0; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
/* The view's region asked again in place (ticket 300, ADR 0306): it keeps its place and its height while it is
   asked, its parts dimmed after 150 ms (`--opacity-busy`), the glass that fills over it after 600 ms (ADR 0277), held at
   the window's middle height as the region runs under it; nothing in the way of the pointer, a second gesture asking
   again at once. */
.dashboard-region { position: relative; }
.dashboard-region[aria-busy="true"] { cursor: progress; }
.dashboard-region[data-busy] { opacity: 1; }
.dashboard-region[data-busy] > :not(.dashboard-wait) { opacity: var(--opacity-busy); transition: opacity var(--motion); }
.dashboard-wait { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.dashboard-wait-glass {
  position: sticky; top: 40vh; width: fit-content; margin: 0 auto; display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4); background: var(--color-bg-raised); border: 1px solid var(--color-border);
  border-radius: var(--radius-chip); box-shadow: var(--shadow-soft); font-size: var(--text-small); line-height: var(--lh-small);
  color: var(--color-text-secondary);
}
.dashboard-wait .pour { width: var(--pour-card); height: var(--pour-card); }
.popover-filter { border-top: var(--rule-hairline) solid var(--color-separator); }
.popover-filter > summary {
  display: flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); cursor: pointer; font-weight: 600;
  list-style: none;
}
.popover-filter > summary::-webkit-details-marker { display: none; }
.popover-filter > summary::before { content: "▸"; color: var(--color-text-secondary); }
.popover-filter[open] > summary::before { content: "▾"; }
.popover-filter fieldset { border: 0; margin: 0 0 var(--space-2); padding: 0; min-width: 0; max-height: 18rem; overflow: auto; }
.popover-value {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); align-items: center;
  min-height: var(--target-min); padding: 0 var(--space-2); border-radius: var(--radius-control); cursor: pointer;
}
.popover-value:hover { background: var(--color-bg-sunken); }
.popover-words { overflow-wrap: anywhere; }
.popover-value .num { font-size: var(--text-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.dashboard-clear { color: var(--color-text-secondary); }
.dashboard-clear:hover { color: var(--color-text-primary); }
/* « Santé de l'outil »'s note in place of the filters (ticket 299). */
.dashboard-note { margin: 0; font-size: var(--text-small); color: var(--color-text-secondary); }
#identified-cut { margin: var(--space-1) 0 0; }
.cohort-clear { margin: var(--space-2) 0 0; }
/* The explorer beside the flow (ticket 295, dashboard v2 §5.2): 18.5 rem on the left, above the flow under 1,000 px;
   a row is a link, its name cut short rather than scrolled; its bar three tones on the level's one scale — captured in
   the chart's soft grey, shown in its mid grey, kept in the kept green (its meaning, SPEC v2 §3.3). */
.cohort-body { margin-top: var(--space-3); }
.cohort-explored { display: grid; grid-template-columns: 18.5rem minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.cohort-main { min-width: 0; }
.cohort-explored .cohort-scroll { margin-top: 0; }
@media (max-width: 1000px) { .cohort-explored { grid-template-columns: minmax(0, 1fr); } }
.explorer {
  display: grid; gap: var(--space-2); min-width: 0; padding: var(--space-4); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); border: var(--rule-hairline) solid var(--color-border);
}
.explorer-crumbs ol { margin: 0; }
.dashboard-section .explorer-head {
  display: flex; justify-content: space-between; gap: var(--space-3); margin: 0;
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary);
}
.explorer-lines { font-variant-numeric: tabular-nums; white-space: nowrap; }
.explorer-rows { list-style: none; display: grid; gap: var(--space-1); margin: 0; padding: 0; }
a.explorer-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-2); align-items: baseline;
  padding: var(--space-2); border-radius: var(--radius-control); color: var(--color-text-primary); text-decoration: none;
}
a.explorer-row:hover { background: var(--color-bg-sunken); }
a.explorer-row:hover .explorer-words { text-decoration: underline; }
a.explorer-row[aria-current] { background: var(--color-accent-subtle); box-shadow: inset 0 0 0 var(--rule-strong) var(--color-text-primary); }
.explorer-name { display: flex; align-items: center; gap: var(--space-2); min-width: 0; font-weight: 500; }
.explorer-words { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer-n { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.explorer-kept-n { color: var(--color-kept-text); }
svg.explorer-bar { grid-column: 1 / -1; display: block; width: 100%; }
.explorer-captured { fill: var(--color-chart-soft); }
.explorer-shown { fill: var(--color-chart-mid); }
.explorer-kept { fill: var(--color-kept); }
.explorer-more { margin: 0; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.explorer-legend { margin: var(--space-1) 0 0; }
.explorer-see { margin: var(--space-1) 0 0; font-size: var(--text-small); line-height: var(--lh-small); }
.explorer-see a { font-weight: 600; }
#period-note { margin: var(--space-2) 0 0; }
.tile, .section-head { position: relative; }
.tile-head, .section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.section-head { justify-content: flex-start; align-items: center; }
.section-head h2 { margin: 0; }
.tile-unpriced strong a, .tile-unpriced strong { color: var(--color-text-strong); }
.explain > summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem;
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-chip);
  font-size: var(--text-label); font-weight: 600; color: var(--color-text-secondary); line-height: 1;
}
.explain > summary::-webkit-details-marker { display: none; }
.explain > summary:hover, .explain[open] > summary { border-color: var(--color-accent-solid); color: var(--color-accent-text); }
.explain-body {
  position: absolute; z-index: 10; top: calc(100% + var(--space-1)); left: 0; right: 0; max-width: 34rem;
  padding: var(--space-3); background: var(--color-bg-raised); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-panel); box-shadow: var(--shadow-lifted);
  font-size: var(--text-small); line-height: var(--lh-small); font-weight: 400; color: var(--color-text-primary);
}
.tile .explain-body { left: calc(-1 * var(--rule-hairline)); right: calc(-1 * var(--rule-hairline)); min-width: 16rem; }
.explain-body p { margin: 0; }
.explain-body p + p { margin-top: var(--space-2); }
.tile-n { font-variant-numeric: normal; }
svg.gauge { display: block; margin: var(--space-1) 0; overflow: visible; }
.gauge-track { fill: var(--color-chart-track); }
.gauge-fill { fill: var(--color-chart-strong); }
.gauge-fill[data-level="near"] { fill: var(--color-warn-text); }
.gauge-fill[data-level="spent"] { fill: var(--color-down-text); }
.cost-spent { color: var(--color-down-text); }
.dashboard-section.first { border-top: 0; padding-top: 0; margin-top: var(--space-6); }
.chart-legend {
  list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: var(--space-3) 0; padding: 0;
  font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary);
}
.chart-legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.chart-legend .legend-key { color: var(--color-text-strong); }
svg.swatch { flex: none; }
.series-1 { fill: var(--color-chart-1); }
.series-2 { fill: var(--color-chart-2); }
.series-3 { fill: var(--color-chart-3); }
.series-4 { fill: var(--color-chart-4); }
.series-5 { fill: var(--color-chart-5); }
.series-6 { fill: var(--color-chart-6); }
.series-7 { fill: var(--color-chart-7); }
.tab-auction { fill: var(--color-tab-auctions); }
.tab-merchant { fill: var(--color-tab-merchants); }
.tab-ad { fill: var(--color-tab-ads); }
.series-other { fill: var(--color-chart-other); }
.mark-soft { fill: var(--color-chart-soft); }
.mark-strong { fill: var(--color-chart-strong); }
/* « Les sources »'s three tones (ticket 299): captured the soft grey, shown the mid grey, kept the kept green. */
.mark-mid { fill: var(--color-chart-mid); }
.mark-kept { fill: var(--color-kept); }
.ident-identified { fill: var(--color-chart-strong); }
.ident-absent_from_reference { fill: var(--color-chart-mid); }
.ident-none { fill: var(--color-chart-soft); }
svg.hbar { display: block; width: 100%; overflow: visible; }
svg.hbar rect { stroke: var(--color-bg-page); stroke-width: 2px; }
svg.hbar rect:hover { opacity: 0.8; }
svg.hbar .zero, svg.column .baseline { stroke: var(--color-chart-axis); stroke-width: 1px; }
svg.hbar .high-mark { stroke: var(--color-chart-mark); stroke-width: 2px; }
.cap-mark { stroke: var(--color-chart-mark); stroke-width: 2px; }
svg.column .baseline { stroke: var(--color-border); }
.bars { list-style: none; margin: 0; padding: 0; max-width: 64rem; }
.bars > li {
  display: grid; grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); gap: var(--space-1) var(--space-4); align-items: center;
  padding: var(--space-2) 0; border-bottom: var(--rule-hairline) solid var(--color-separator);
}
.bar-label { display: grid; min-width: 0; }
.bar-label a, .bar-name { font-weight: 600; overflow-wrap: anywhere; }
.bar-sub { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; font-weight: 400; }
.bar-figure { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-figure .bar-sub { display: block; white-space: normal; }
.bar-axis { display: grid; grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); gap: 0 var(--space-4); max-width: 64rem; }
.axis-ticks { position: relative; height: 1.4em; }
.axis-ticks .tick {
  position: absolute; transform: translateX(-50%); font-size: var(--text-label); color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.axis-ticks .tick-start { transform: none; }
.axis-ticks .tick-end { transform: translateX(-100%); }
.source-bars > li { grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr) minmax(8rem, 11rem); }
/* Two families, each its heading and its own scale (ticket 299). */
.source-family + .source-family { margin-top: var(--space-6); }
.source-family-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); max-width: 64rem; }
.source-family-head h3 { margin: 0; }
.source-family-head .system-note { margin: 0; }
.producer-bars > li { grid-template-columns: minmax(0, 1fr) minmax(7rem, auto); align-items: start; }
.producer-bars details > summary {
  display: grid; grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); gap: var(--space-4); align-items: center;
  list-style: none;
}
.producer-bars details > summary::-webkit-details-marker { display: none; }
.producer-bars details > summary .bar-name::before {
  content: ""; display: inline-block; width: 0; height: 0; margin-right: var(--space-2); vertical-align: middle;
  border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.producer-bars details[open] > summary .bar-name::before { transform: rotate(90deg); }
.producer-bars details > summary:hover .bar-name { color: var(--color-accent-text); }
.wines { list-style: none; margin: var(--space-2) 0 var(--space-1); padding: 0 0 0 var(--space-4); }
.wines li {
  display: grid; grid-template-columns: minmax(9.5rem, 14.25rem) minmax(0, 1fr) 3rem; gap: var(--space-4); align-items: center;
  padding: var(--space-1) 0; font-size: var(--text-small);
}
.wines .bar-name { font-weight: 400; }
.wines .bar-figure { text-align: right; }
.missing-bars > li { grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr) minmax(6rem, auto); }
/* One producer's wines (ticket 298): the name, the bar, the lines a link, as the producers' rows without their fold. */
.wine-bars > li { grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr) minmax(7rem, auto); }
svg.hbar-whole { max-width: 64rem; margin-top: var(--space-2); }
/* One column a month, as many as serve.yaml's `dashboard.cost_months` (the list's `--months`), in one row. */
ol.columns {
  --months: 6;
  list-style: none; display: grid; grid-template-columns: repeat(var(--months), minmax(0, 1fr)); gap: var(--space-2);
  max-width: calc(var(--months) * 6.75rem);
  margin: var(--space-3) 0 0; padding: 0;
}
ol.columns li { display: grid; gap: var(--space-1); justify-items: center; align-content: start; text-align: center; }
.column-figure { font-size: var(--text-small); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.column-name { font-size: var(--text-label); color: var(--color-text-secondary); }
svg.column { display: block; overflow: visible; }
.chart-table { margin-top: var(--space-3); }
.chart-table > summary, .dashboard-more > summary { color: var(--color-accent-text); font-size: var(--text-small); font-weight: 600; }
.chart-table > summary:hover, .dashboard-more > summary:hover { text-decoration: underline; }
.dashboard-more { margin-top: var(--space-8); padding-top: var(--space-4); border-top: var(--rule-hairline) solid var(--color-separator); }
.dashboard-more > summary { font-size: var(--text-heading); line-height: var(--lh-heading); }
.dashboard-more[open] > summary { margin-bottom: var(--space-2); }
#identified-share { margin: var(--space-2) 0 0; }
@media (max-width: 640px) {
  .bars > li, .bar-axis, .source-bars > li, .missing-bars > li, .producer-bars details > summary { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
  .bar-axis .axis-spacer { display: none; }
  .producer-bars > li { grid-template-columns: minmax(0, 1fr); }
  .wines li { grid-template-columns: minmax(0, 1fr) 3rem; }
  .wines li svg { grid-column: 1 / -1; grid-row: 2; }
  ol.columns { gap: var(--space-1); }
  .column-figure { font-size: var(--text-label); white-space: normal; }
}

/* « Suivi des alertes » (ticket 152, ADR 0202): the search, the filters as the dashboard's periods, the table of the
   keywords — fixed columns, the keyword's flexing from its least, a cell a mark and a date on one line — and the
   requests. Below 640 px each row is a list: the keyword, then its platforms as tags, the empty ones left out. */
.alerts-search { display: grid; gap: var(--space-1); max-width: 40rem; margin: var(--space-4) 0 0; }
.alerts-search > label { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.alerts-search-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.alerts-search-row input[type="search"] { flex: 1 1 16rem; min-width: 0; }
.alerts-clear { font-size: var(--text-small); color: var(--color-text-secondary); }
.alerts-clear:hover { color: var(--color-accent-text); }
.alerts-filters ul { margin-top: var(--space-3); }
.filter-count { color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
#search-result { margin: var(--space-4) 0 var(--space-2); }
.alerts-found { margin: 0; }
.alerts-none { margin: var(--space-1) 0 0; font-weight: 600; color: var(--color-warn-text); }
.alerts-wrap { margin-top: var(--space-4); }
table.alerts-table {
  table-layout: fixed;
  min-width: calc(var(--col-alert-keyword) + var(--platforms, 0) * var(--col-alert-platform) + 2 * var(--col-alert-yield));
}
.alerts-table th.alerts-keyword { width: auto; min-width: var(--col-alert-keyword); }
.alerts-table thead th.alerts-keyword { width: var(--col-alert-keyword); }
.alerts-table [data-platform] { width: var(--col-alert-platform); padding-left: var(--space-1); padding-right: var(--space-1); white-space: nowrap; }
.alerts-table thead th[data-platform] { hyphens: none; overflow-wrap: normal; }
.alerts-table thead th.num, .alerts-table td.num { width: var(--col-alert-yield); text-align: right; font-variant-numeric: tabular-nums; }
.alerts-table tbody th { font-weight: 400; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.alerts-table tbody tr:hover { background: var(--color-bg-sunken); }
.keyword-text { font-weight: 600; }
.keyword-kind, .keyword-mark {
  display: block; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary);
}
.keyword-requested { display: inline-block; margin-top: 2px; padding: 0 var(--space-2); border-radius: var(--radius-mark); background: var(--color-accent-subtle); color: var(--color-accent-text); font-weight: 600; }
.alerts-table td[data-platform] { font-size: var(--text-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums; }
.cell-placed { color: var(--color-text-primary); }
.cell-to_do { color: var(--color-warn-text); font-weight: 600; }
.cell-removed, .cell-not_applicable, .cell-other { color: var(--color-text-secondary); }
.alert-requests { margin-top: var(--space-6); }
ul.requests { list-style: none; margin: 0; padding: 0; max-width: 60rem; }
li.request { display: grid; gap: var(--space-1); padding: var(--space-3) 0; border-top: var(--rule-hairline) solid var(--color-separator); }
li.request:target { background: var(--color-accent-subtle); }
.request-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin: 0; }
.request-text { font-weight: 600; }
.request-maybe { font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600; color: var(--color-warn-text); }
.request-meta, .request-note { margin: 0; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.request-note { color: var(--color-text-primary); }
.request-close { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-1); }
.request-decline > summary { display: inline-flex; align-items: center; min-height: var(--control-height); padding: 0 var(--space-2); color: var(--color-down-text); }
.request-decline form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-1); }
.request-decline label { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-small); color: var(--color-text-secondary); }
details.ask-alert { margin: var(--space-6) 0 0; max-width: 40rem; }
details.ask-alert > summary {
  display: inline-flex; align-items: center; min-height: var(--control-height); padding: 0 var(--space-3);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control);
  background: var(--color-bg-raised); font-weight: 500;
}
details.ask-alert > summary:hover, details.ask-alert[open] > summary { background: var(--color-bg-sunken); border-color: var(--color-text-strong); }
#ask-form {
  display: grid; gap: var(--space-3); margin-top: var(--space-2); padding: var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised);
}
#ask-form .ask-field { display: grid; gap: var(--space-1); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
#ask-form .ask-field :is(input, textarea) { font-size: var(--text-body); font-weight: 400; color: var(--color-text-primary); }
#ask-form textarea {
  padding: var(--space-1) var(--space-2); border: var(--rule-hairline) solid var(--color-border-control);
  border-radius: var(--radius-control); background: var(--color-bg-raised); font: inherit; resize: vertical;
}
.ask-platforms { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; padding: 0; border: 0; }
.ask-platforms legend { padding: 0; margin-bottom: var(--space-1); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.ask-platforms .system-note { flex-basis: 100%; margin: 0; }
.ask-platforms label { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--target-min); }
#ask-form > button { justify-self: start; }
@media (max-width: 640px) {
  table.alerts-table { min-width: 0; }
  .alerts-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .alerts-table, .alerts-table tbody, .alerts-table tr { display: block; }
  .alerts-table tbody tr { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); padding: var(--space-3) 0; border-bottom: var(--rule-hairline) solid var(--color-separator); }
  .alerts-table tbody th, .alerts-table tbody td { display: block; width: auto; padding: 0; border: 0; text-align: left; }
  .alerts-table tbody th { flex-basis: 100%; }
  .alerts-table td[data-platform]:not([data-status]) { display: none; }
  table.alerts-table td[data-platform], table.alerts-table td.num {
    width: auto; padding: 0 var(--space-2); border: var(--rule-hairline) solid var(--color-separator);
    border-radius: var(--radius-control); background: var(--color-bg-raised); text-align: left;
  }
  .alerts-table td[data-head]::before { content: attr(data-head) " "; color: var(--color-text-secondary); }
}

/* « Toujours en ligne ? » (ticket 169, ADR 0219), first on « À relire »: a raised panel with a hairline, no
   shadow (it does not float); a row per ad between hairlines — the wine (a link to the line) over its tag, price and day
   last seen in the small size and secondary text, then « Voir l'annonce » in the accent, then « Oui » and « Non », two
   secondary buttons of the same weight: neither answer is the default. Below 640 px the row stacks. No new colour pair:
   text, secondary and the accent on raised, a control's border on raised, all measured. */
.online {
  margin: var(--space-4) 0 var(--space-6); padding: var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised);
}
.online h2 { margin-top: 0; }
.online-intro { margin: 0 0 var(--space-3); color: var(--color-text-secondary); max-width: 64rem; }
.online-list { list-style: none; margin: 0; padding: 0; }
.online-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-2) var(--space-4);
  padding: var(--space-2) 0; border-top: var(--rule-hairline) solid var(--color-separator);
}
.online-row:last-child { border-bottom: var(--rule-hairline) solid var(--color-separator); }
.online-what { min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.online-wine { color: var(--color-text-primary); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.online-wine:hover { color: var(--color-accent-text); text-decoration: underline; }
.online-meta { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.online-offer { color: var(--color-accent-text); white-space: nowrap; }
.online-answers { display: flex; gap: var(--space-2); margin: 0; }
.online-answers button { min-width: 4rem; }
.line-online { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-2); }
.online-last { font-size: var(--text-small); }
@media (max-width: 640px) {
  .online { padding: var(--space-3); }
  .online-row { grid-template-columns: minmax(0, 1fr) auto; }
  .online-what { grid-column: 1 / -1; }
}

/* « Prix du marché » (ticket 199, ADR 0237): 198's layout A with C's head — the selection as chips, the period inline,
   the filter panel of the lists; twelve medium cards four to a row, each sparkline with the dealer's price dashed; the
   pivot and the chart full width. The hues are the charts' (DESIGN.md), the dealer's catalogue in the ink. */
.prices-count { margin: 0; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
/* « Exporter » (ticket 201): a secondary button at the head's right end. */
.prices-export { margin-left: auto; text-decoration: none; }
/* Prix du marché v2 (ticket 266, ADR 0283): the head — the title, then one sentence at the heading size in the strong
   ink, its figures in 700 and the ink, the change in its sign's colour (grey when flat), as Accueil's hero says its
   own; « Exporter » at the right, at the sentence's foot. */
.prices-head { align-items: flex-end; }
.prices-head-words { flex: 1 1 32rem; min-width: 0; }
.prices-head-words h1 { margin: 0; }
.prices-say {
  max-width: 46rem; margin: var(--space-2) 0 0; font-size: var(--text-heading); line-height: var(--lh-reading);
  color: var(--color-text-strong);
}
.prices-say strong { font-weight: 700; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.prices-say .say-change[data-trend="up"] { color: var(--color-up-text); }
.prices-say .say-change[data-trend="down"] { color: var(--color-down-text); }
.prices-say .say-change[data-trend="flat"] { color: var(--color-text-secondary); }
/* M, the prices moved since the visit (ticket 271): the new's blue, as the band's dot and the counter. */
.prices-say .say-new strong { color: var(--color-new-text); }
/* The two sub-tabs: a tab row under the selection bar, its hairline across, the one shown in the ink and underlined
   (`--rule-strong`), the other in the secondary ink; a 16 px line drawing before each name. It scrolls inside itself
   rather than widen the page. */
.prices-tabs {
  display: flex; gap: var(--space-6); margin: var(--space-6) 0 0; overflow-x: auto;
  border-bottom: var(--rule-hairline) solid var(--color-border);
}
.prices-tabs [role="tab"] {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target-min);
  padding: var(--space-2) 0 var(--space-3); margin-bottom: calc(-1 * var(--rule-hairline));
  border-bottom: var(--rule-strong) solid transparent; white-space: nowrap; text-decoration: none;
  font-size: var(--text-figure); line-height: var(--lh-figure); font-weight: 700; color: var(--color-text-secondary);
  transition: color var(--motion) var(--ease), border-color var(--motion) var(--ease);
}
.prices-tabs [role="tab"]:hover { color: var(--color-text-primary); }
.prices-tabs [role="tab"][aria-selected="true"] { color: var(--color-text-primary); border-bottom-color: var(--color-text-primary); }
.prices-tabs svg { flex: none; }
.prices-panel > .prices-section:first-child { margin-top: var(--space-6); }
.prices-panel > .state { margin-top: var(--space-6); }
/* « Explorer le marché »: a raised fold at the foot of both sub-tabs (the card's radius, the soft shadow, a hairline),
   its summary the name in 700 and what it holds in the small size, secondary; open, a hairline under the summary. */
.prices-explore {
  margin-top: var(--space-8); background: var(--color-bg-raised); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-soft);
}
.prices-explore > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); cursor: pointer;
  list-style: none; padding: var(--space-4) var(--space-6); border-radius: var(--radius-card);
}
.prices-explore > summary::-webkit-details-marker { display: none; }
.prices-explore > summary::before { content: "▸"; content: "▸" / ""; color: var(--color-text-secondary); }
.prices-explore[open] > summary::before { content: "▾"; content: "▾" / ""; }
.prices-explore[open] > summary { border-bottom: var(--rule-hairline) solid var(--color-separator); border-radius: var(--radius-card) var(--radius-card) 0 0; }
.explore-title { font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 700; }
.explore-hint { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.explore-body { padding: var(--space-4) var(--space-6) var(--space-6); }
.explore-body > .prices-section:first-of-type { margin-top: var(--space-4); }
.explore-export { margin: var(--space-6) 0 0; }
.explore-export .button { text-decoration: none; }
@media (max-width: 640px) {
  .prices-say { font-size: var(--text-reading); }
  .prices-export { margin-left: 0; }
  .prices-explore > summary, .explore-body { padding-left: var(--space-4); padding-right: var(--space-4); }
}
.prices-toolbar ul#active-filters { margin: 0; }
.prices-periods ul { margin: 0; }
.prices-section { margin-top: var(--space-8); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-6); }
.section-head h2 { margin: 0; }
.section-head nav ul { margin: 0; }
.prices-note { max-width: 48rem; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
ol.price-cards { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
@media (max-width: 1279px) { ol.price-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { ol.price-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { ol.price-cards { grid-template-columns: minmax(0, 1fr); } }
.price-card {
  display: grid; gap: var(--space-2); align-content: start; padding: var(--space-3) var(--space-4);
  background: var(--color-bg-raised); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
}
.price-card h3 { margin: 0; font-size: var(--text-body); line-height: var(--lh-body); }
.price-card h3 a { color: var(--color-text-primary); text-decoration: none; }
.price-card h3 a:hover .card-wine { text-decoration: underline; color: var(--color-accent-text); }
.card-vintage { white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-sub, .card-note, .cell-sub { margin: 0; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-weight: 400; }
.cell-sub.warn { color: var(--color-warn-text); }
.card-figures { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2) var(--space-3); margin: 0; }
.card-figures div { display: grid; gap: 0; }
.card-figures dt { font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary); font-weight: 600; }
.card-figures dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-figures dd.figure { font-size: var(--text-figure); line-height: var(--lh-figure); font-weight: 600; }
ul.card-tags { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; padding: 0; }
ul.card-tags li {
  padding: 0 var(--space-2); border-radius: var(--radius-mark); background: var(--color-bg-sunken);
  font-size: var(--text-label); line-height: var(--lh-small); color: var(--color-text-strong);
}
ul.card-tags li[data-tag="single_source"] { background: var(--color-warn-subtle); color: var(--color-warn-text); }
svg.sparkline { display: block; overflow: visible; }
.spark-line { stroke: var(--color-chart-strong); stroke-width: 1.5px; stroke-linecap: round; }
.spark-dot { fill: var(--color-chart-strong); }
.spark-catalogue { stroke: var(--color-chart-mark); stroke-width: 1px; stroke-dasharray: 3 3; }
.prices-table { width: 100%; }
.prices-table th[scope="row"] a { font-weight: 600; }
.prices-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.prices-table .spark-col { width: 7rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-3) 0 0; padding: 0; font-size: var(--text-small); }
.breadcrumb li + li::before { content: "›"; margin-right: var(--space-1); color: var(--color-text-secondary); }
.breadcrumb [aria-current] { font-weight: 600; }
.price-chart-frame {
  position: relative; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-2) 0; background: var(--color-bg-raised);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
}
.price-chart-values { position: relative; }
.price-chart-values .tick {
  position: absolute; right: var(--space-2); transform: translateY(-50%); font-size: var(--text-label);
  color: var(--color-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap;
}
svg.price-chart { display: block; overflow: visible; }
.price-chart-days { grid-column: 2; }
.price-chart .grid { stroke: var(--color-separator); stroke-width: 1px; }
.price-chart .grid-day { stroke: var(--color-separator); stroke-width: 1px; stroke-dasharray: 2 4; }
.price-chart .today { stroke: var(--color-chart-axis); stroke-width: 1px; stroke-dasharray: 2 2; }
.price-chart .verify-rule { stroke: var(--color-warn-text); stroke-width: 1px; stroke-dasharray: 4 3; }
.band { fill: var(--color-chart-track); }
.median { stroke: var(--color-chart-strong); stroke-width: 2px; }
.price-chart .step { stroke-width: 1.5px; opacity: 0.55; fill: none; }
.price-chart .step.dashed { stroke-dasharray: 5 3; opacity: 0.9; }
/* The dealer's last price of a wine he no longer lists, on past its row's end (ticket 283): thinner, fainter. */
.price-chart .step.past { stroke-width: 0.75px; opacity: 0.6; }
.mark { stroke: var(--color-bg-raised); stroke-width: 1px; }
.mark.in-bond, .swatch .in-bond { fill: var(--color-bg-raised); stroke-width: 1.5px; }
.price-chart a:hover .mark { stroke: var(--color-chart-mark); stroke-width: 2px; }
/* A chart's points (ticket 270): focused, the focus ring's colour on the mark; an offer chosen in a bottle's view, its
   points ringed in the ink as the fiche rings its own. */
.price-chart a:focus-visible { outline: none; }
.price-chart a:focus-visible .mark { stroke: var(--color-focus-ring); stroke-width: 3px; }
.price-chart .chosen-ring { fill: none; stroke: var(--color-text-primary); stroke-width: 2px; }
/* A point's tooltip (ticket 270): raised, the lifted shadow, held within the window by the script; its source in 700,
   each part a line, its hint secondary. */
.chart-tip {
  position: fixed; z-index: 52; width: max-content; max-width: min(20rem, calc(100vw - var(--space-4)));
  padding: var(--space-2) var(--space-3); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-panel); background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
  color: var(--color-text-primary); font-size: var(--text-small); line-height: var(--lh-small);
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.chart-tip[hidden] { display: none; }
.chart-tip > * { display: block; }
.chart-tip-source { font-weight: 700; }
.chart-tip-landed { font-weight: 600; }
.chart-tip-hint { margin-top: var(--space-1); color: var(--color-text-secondary); }
.gone { fill: none; stroke-width: 1.5px; stroke-linecap: round; }
.hue-1 { fill: var(--color-chart-1); stroke: var(--color-chart-1); }
.hue-2 { fill: var(--color-chart-2); stroke: var(--color-chart-2); }
.hue-3 { fill: var(--color-chart-3); stroke: var(--color-chart-3); }
.hue-4 { fill: var(--color-chart-4); stroke: var(--color-chart-4); }
.hue-5 { fill: var(--color-chart-5); stroke: var(--color-chart-5); }
.hue-6 { fill: var(--color-chart-6); stroke: var(--color-chart-6); }
.hue-7 { fill: var(--color-chart-7); stroke: var(--color-chart-7); }
.hue-other { fill: var(--color-chart-other); stroke: var(--color-chart-other); }
.hue-catalogue { fill: var(--color-chart-mark); stroke: var(--color-chart-mark); }
.mark.hue-1, .mark.hue-2, .mark.hue-3, .mark.hue-4, .mark.hue-5, .mark.hue-6, .mark.hue-7, .mark.hue-other, .mark.hue-catalogue { stroke: var(--color-bg-raised); }
.mark.in-bond.hue-1 { stroke: var(--color-chart-1); } .mark.in-bond.hue-2 { stroke: var(--color-chart-2); }
.mark.in-bond.hue-3 { stroke: var(--color-chart-3); } .mark.in-bond.hue-4 { stroke: var(--color-chart-4); }
.mark.in-bond.hue-5 { stroke: var(--color-chart-5); } .mark.in-bond.hue-6 { stroke: var(--color-chart-6); }
.mark.in-bond.hue-7 { stroke: var(--color-chart-7); } .mark.in-bond.hue-other { stroke: var(--color-chart-other); }
.mark.in-bond.hue-catalogue { stroke: var(--color-chart-mark); }
.base { stroke: var(--color-chart-axis); stroke-width: 1px; stroke-dasharray: 4 3; }
.index-line { stroke: var(--color-chart-strong); stroke-width: 2px; stroke-linejoin: round; }
.index-dot { fill: var(--color-chart-strong); }
.price-legend { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-2) var(--space-8); margin-top: var(--space-3); }
.price-legend .label { margin: 0; }
.price-legend .legend-n { color: var(--color-text-secondary); font-size: var(--text-small); }
@media (max-width: 900px) { .price-legend { grid-template-columns: minmax(0, 1fr); } }
dl.price-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--space-3) var(--space-6); margin: var(--space-4) 0; }
dl.price-figures div { display: grid; }
dl.price-figures dt { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
dl.price-figures dd { margin: 0; font-variant-numeric: tabular-nums; }
dl.price-figures dd.figure { font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 600; }

/* « Prix du marché » while its market is read (ticket 210): a panel on the raised ground, its bar in the accent on the
   sunken ground; the bar moves at `--motion`, still under `prefers-reduced-motion`. */
.market-loading {
  max-width: 40rem;
  margin-top: var(--space-6);
  padding: var(--space-6);
  background: var(--color-bg-raised);
  border: var(--rule-hairline) solid var(--color-separator);
  border-radius: var(--radius-panel);
}
.market-loading h2 { margin: 0 0 var(--space-2); font-size: var(--text-heading); line-height: var(--lh-heading); }
.market-loading p { margin: 0 0 var(--space-3); max-width: 36rem; }
.market-waiting { color: var(--color-text-secondary); }
.market-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin: var(--space-4) 0;
}
.market-progress .label { grid-column: 1 / -1; color: var(--color-text-secondary); }
.market-progress progress {
  appearance: none;
  width: 100%;
  height: var(--space-2);
  border: 0;
  border-radius: var(--radius-control);
  background: var(--color-bg-sunken);
  color: var(--color-accent-solid);
  overflow: hidden;
}
.market-progress progress::-webkit-progress-bar { background: var(--color-bg-sunken); border-radius: var(--radius-control); }
.market-progress progress::-webkit-progress-value {
  background: var(--color-accent-solid);
  border-radius: var(--radius-control);
  transition: width var(--motion) linear;
}
.market-progress progress::-moz-progress-bar { background: var(--color-accent-solid); border-radius: var(--radius-control); }
.market-share { font-variant-numeric: tabular-nums; color: var(--color-text-strong); white-space: nowrap; }
.market-loading .note { margin: 0; font-size: var(--text-small); }

/* « Chasse du mois » (tickets 215–217, ADR 0241): the monthly hunting list. Ticket 216: its head, the empty state (a
   raised panel, its button the one filled action, as 215 drew it), the form a list is loaded with, and a list's rows —
   the row's number, its text as written, what was read, the reference's wine and its state. A row to choose is the one
   on the attention ground: it is what keeps the list from being validated; « hors référentiel » is a neutral tag, as
   layout C marks it. A draft's forms sit in the row; « Modifier » unfolds in its cell, the row growing with it. */
.hunt-back { margin: 0 0 var(--space-2); font-size: var(--text-small); line-height: var(--lh-small); }
.hunt-page p.intro { margin-top: var(--space-2); }
.hunt-head { align-items: center; }
.hunt-head .hunt-meta { margin: 0; }
.hunt-meta { margin: var(--space-1) 0 0; color: var(--color-text-secondary); max-width: 60rem; }
.hunt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin: 0 0 0 auto; }
.hunt-actions .button { text-decoration: none; }
.hunt-empty {
  max-width: var(--hunt-panel); margin-top: var(--space-6); padding: var(--space-6);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised);
}
.hunt-empty h2 { margin: 0 0 var(--space-2); font-size: var(--text-heading); line-height: var(--lh-heading); }
.hunt-empty p { margin: 0 0 var(--space-4); font-size: var(--text-reading); line-height: var(--lh-reading); color: var(--color-text-strong); }
.hunt-empty .button { display: inline-flex; align-items: center; text-decoration: none; }
/* The empty panel's actions: loading the list, the one filled action, and the template beside it (ticket 221). */
.hunt-empty .hunt-empty-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.hunt-empty .system-note { margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); }
.hunt-requests { margin-top: var(--space-8); }
/* « Listes de chasse » (ticket 248, ADR 0266): the page that picks a list. A group's label, then its cards in a grid,
   each a raised card as a region's (the card's radius, the soft shadow, lifting under the pointer), wholly a link: its
   name in the heading size, 800, its status mark; under it in the small size who validated or made it; for an active
   list its wines with an open offer in the figure's size and its new offers (the blue badge); its wines, producers and
   « acheté »; its regions, each a dot in the region's colour (its identity, `--region`) and its name; its last change,
   secondary. « Reprendre »'s card is wide. The archived lists folded under their label. */
.hunt-picker { display: grid; gap: var(--space-8); margin-top: var(--space-4); }
.hunt-lists-group > .label, .hunt-lists-group > summary { margin: 0 0 var(--space-3); }
details.hunt-lists-archived > summary { width: fit-content; color: var(--color-accent-text); cursor: pointer; }
ul.hunt-list-cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--hunt-card), 1fr)); gap: var(--space-4); margin: 0; padding: 0; }
a.hunt-list-card {
  display: grid; align-content: start; gap: var(--space-1); height: 100%; padding: var(--space-4) var(--space-6);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-card); background: var(--color-bg-raised);
  box-shadow: var(--shadow-soft); color: var(--color-text-primary); text-decoration: none;
  transition: transform var(--motion-lift) var(--ease), box-shadow var(--motion-lift) var(--ease);
}
a.hunt-list-card:hover, a.hunt-list-card:focus-visible { transform: translateY(calc(-1 * var(--lift))); box-shadow: var(--shadow-lifted); }
a.hunt-list-card-wide { height: auto; max-width: calc(2 * var(--hunt-card) + var(--space-4)); }
/* A card and the user's star (ticket 250): the star in the card's top right corner, beside the link and not in it; the
   card's head leaves it room; the item lifts as a whole, the star with the card. */
.hunt-list-item { position: relative; height: 100%; transition: transform var(--motion-lift) var(--ease); }
.hunt-list-item-wide { height: auto; max-width: calc(2 * var(--hunt-card) + var(--space-4)); }
.hunt-list-item > a.hunt-list-card:hover, .hunt-list-item > a.hunt-list-card:focus-visible { transform: none; }
.hunt-list-item:hover, .hunt-list-item:has(> a.hunt-list-card:focus-visible) { transform: translateY(calc(-1 * var(--lift))); }
.hunt-list-item:hover > a.hunt-list-card { box-shadow: var(--shadow-lifted); }
/* The head flows beside the star's room, a float, so that only its first line gives it room: a name wraps under the
   star only once it is long. */
.hunt-list-item[data-followed] .hunt-list-card-head { display: block; }
.hunt-list-item[data-followed] .hunt-list-card-head::before { content: ""; float: right; width: var(--follow-star-room); height: var(--control-height); }
.hunt-list-item[data-followed] .hunt-list-card-head > * { display: inline-flex; vertical-align: baseline; margin: 0 var(--space-2) var(--space-1) 0; }
.hunt-list-item[data-followed] .hunt-list-card-head > .hunt-list-card-name { display: inline; }
/* The star and the card's menu « ⋯ » (ticket 251) together in the corner; the head leaves room for both. An item whose menu
   is open stands over the cards after it. */
.hunt-list-item > .hunt-list-tools { position: absolute; top: var(--space-3); right: var(--space-4); display: flex; align-items: center; gap: var(--space-1); }
.hunt-list-item[data-followed][data-menu] .hunt-list-card-head::before { width: calc(var(--follow-star-room) + var(--target-min) + var(--space-1)); }
.hunt-list-item:has(details[open]) { z-index: 3; }
.hunt-card-menu summary.hunt-menu-open { min-height: var(--control-height); min-width: var(--control-height); padding: 0; }
.hunt-list-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); }
.hunt-list-card-name { font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.hunt-list-card-by, .hunt-list-card-facts, .hunt-list-card-changed, .hunt-list-card-todo {
  font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums;
}
.hunt-list-card-todo [data-tone] { font-weight: 600; }
.hunt-list-card-todo [data-tone="warn"] { color: var(--color-warn-text); }
.hunt-list-card-todo [data-tone="up"] { color: var(--color-up-text); }
.hunt-list-card-figures { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-4); margin-top: var(--space-2); }
.hunt-list-card-offered .num { font-size: var(--text-figure); font-weight: 700; }
.hunt-list-card-regions { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: var(--space-1); font-size: var(--text-small); line-height: var(--lh-small); }
.hunt-list-card-region { display: inline-flex; align-items: center; gap: var(--space-1); }
.region-dot { flex: none; width: var(--space-2); height: var(--space-2); border-radius: 50%; background: var(--region); }
.hunt-list-card-changed { margin-top: var(--space-2); }
label.hunt-lists-filter { max-width: 28rem; }
label.hunt-lists-filter input { width: 100%; }
/* A list's board's head (ticket 248 D): the breadcrumb, then the list's name at the title's size with ▾, the switcher
   (a disclosure whose box is a popover under it), an archived list's status, the menu « ⋯ » at the row's end; its line
   of facts under them. An archived list's band, a state on raised, « Restaurer » confirmed in it. */
.hunt-board-head { display: grid; gap: var(--space-2); margin-bottom: var(--space-6); }
.hunt-board-head .breadcrumb ol { margin: 0; }
.hunt-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
details.hunt-switch, details.hunt-menu { position: relative; }
details.hunt-menu { margin-left: auto; }
summary.hunt-switch-name { display: inline-flex; align-items: center; gap: var(--space-2); list-style: none; cursor: pointer; border-radius: var(--radius-control); }
summary.hunt-switch-name::-webkit-details-marker, summary.hunt-menu-open::-webkit-details-marker { display: none; }
summary.hunt-switch-name h1 { margin: 0; overflow-wrap: anywhere; }
.hunt-switch-mark { font-size: var(--text-title); line-height: 1; color: var(--color-text-secondary); }
summary.hunt-switch-name:hover .hunt-switch-mark { color: var(--color-text-primary); }
summary.hunt-menu-open { list-style: none; min-width: var(--target-min); justify-content: center; }
.hunt-switch-box, .hunt-menu-box { top: calc(100% + var(--space-1)); left: 0; }
.hunt-menu-box { left: auto; right: 0; }
.hunt-switch-type input { width: 100%; }
ul.hunt-switch-list, ul.hunt-menu-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; max-height: 22rem; overflow-y: auto; overscroll-behavior: contain; }
.hunt-switch-list a, .hunt-menu-list > li > a {
  display: flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-control); color: var(--color-text-primary); text-decoration: none;
}
.hunt-switch-list a:hover, .hunt-switch-list a:focus-visible, .hunt-menu-list > li > a:hover, .hunt-menu-list > li > a:focus-visible { background: var(--color-bg-sunken); }
.hunt-switch-list a[aria-current] { font-weight: 600; }
.hunt-switch-tick { flex: none; width: var(--space-4); text-align: center; }
.hunt-switch-label { min-width: 0; overflow-wrap: anywhere; }
li.hunt-switch-all { margin-top: var(--space-1); padding-top: var(--space-1); border-top: var(--rule-hairline) solid var(--color-separator); }
li.hunt-switch-rule { margin: var(--space-1) 0; border-top: var(--rule-hairline) solid var(--color-separator); }
.hunt-switch-keys { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-2) 0 0; font-size: var(--text-small); color: var(--color-text-secondary); }
.hunt-menu-list > li { padding: 0; }
/* A menu holds a handful of items, a confirmation open among them (ticket 251): it grows rather than scrolls, so that a
   confirmation's button is never cut. */
ul.hunt-menu-list { max-height: none; overflow: visible; }
.hunt-menu-list .hunt-hint { display: block; padding: 0 var(--space-2) var(--space-1) calc(var(--space-2)); font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.hunt-menu-list details.confirm { display: block; margin: 0; }
.hunt-menu-list details.confirm > summary { display: flex; min-height: var(--target-min); }
.hunt-menu-list details.confirm[open] { margin: var(--space-1) 0; }
/* « Restaurer » undoes nothing and loses nothing: the ink's link and an outlined button, not the rust of a removal; so does
   « Renommer » (ticket 251). « Supprimer » keeps the rust of `details.confirm`, last in the menu after a hairline. */
details.confirm.hunt-confirm-restore > summary, details.confirm.hunt-confirm-visibility > summary, details.confirm.hunt-confirm-rename > summary { color: var(--color-accent-text); }
details.confirm.hunt-confirm-restore button, details.confirm.hunt-confirm-visibility button, details.confirm.hunt-confirm-rename button { border-color: var(--color-border); color: var(--color-text-primary); }
details.confirm.hunt-confirm-restore button:hover, details.confirm.hunt-confirm-visibility button:hover, details.confirm.hunt-confirm-rename button:hover { background: var(--color-bg-sunken); }
.hunt-menu-list > li.hunt-menu-foot { margin-top: var(--space-1); padding-top: var(--space-1); border-top: var(--rule-hairline) solid var(--color-separator); }
.hunt-rename-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-1) 0; }
.hunt-rename-field { flex: 1 1 var(--hunt-rename-field); min-width: 0; }
.hunt-rename-input { width: 100%; }
.hunt-menu-list form.hunt-duplicate { margin: 0; }
.hunt-menu-list button.hunt-menu-action {
  display: flex; align-items: center; width: 100%; min-height: var(--target-min); padding: var(--space-1) var(--space-2);
  justify-content: flex-start; border: 0; border-radius: var(--radius-control); background: none; color: var(--color-text-primary); font: inherit; font-weight: inherit; text-align: left; cursor: pointer;
}
.hunt-menu-list button.hunt-menu-action:hover, .hunt-menu-list button.hunt-menu-action:focus-visible { background: var(--color-bg-sunken); }
/* « Corbeille » (ticket 251): the deleted lists, folded at the page's foot, each a line between hairlines — its name, its
   marks, who deleted it and when — and « Restaurer » at its end. */
details.hunt-bin { margin-top: var(--space-8); }
.hunt-bin-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.hunt-bin-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding: var(--space-3) 0; border-top: var(--rule-hairline) solid var(--color-separator); }
.hunt-bin-item form { margin: 0; }
.hunt-bin-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); margin: 0; min-width: 0; }
.hunt-bin-name { font-weight: 600; overflow-wrap: anywhere; }
.hunt-bin-by { flex-basis: 100%; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.hunt-board-head .hunt-meta { margin: 0; }
.hunt-archived {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: var(--space-4) 0 0; padding: var(--space-3) var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised); box-shadow: var(--shadow-soft); color: var(--color-text-strong);
}
.hunt-archived > p { margin: 0; font-weight: 600; }
.hunt-archive-source { display: inline-flex; align-items: center; gap: var(--space-2); margin-right: var(--space-3); font-size: var(--text-small); }
.hunt-view-head h2 { margin: var(--space-6) 0 var(--space-2); font-size: var(--text-title); line-height: var(--lh-title); font-weight: 800; }
.request-close label { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-small); color: var(--color-text-secondary); }
.request-close form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.request-close select { max-width: 28rem; }

form.hunt-load { display: grid; gap: var(--space-4); max-width: var(--hunt-panel); margin-top: var(--space-4); }
.hunt-field { display: grid; gap: var(--space-1); font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.hunt-field :is(input, textarea) { font-size: var(--text-body); font-weight: 400; color: var(--color-text-primary); }
.hunt-field input[type="file"] { padding: var(--space-1) var(--space-2); min-height: var(--control-height-primary); }
.hunt-field textarea {
  min-height: var(--hunt-text-rows); padding: var(--space-2); resize: vertical; font-family: var(--font-sans);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control); background: var(--color-bg-raised);
}
form.hunt-load .system-note { margin: 0; }
form.hunt-load > button { justify-self: start; }
/* « Nouvelle liste » (ticket 234): where a list made in the tool starts, two radio buttons in the accent, each with
   its sentence in the small size under it. */
fieldset.hunt-start { display: grid; gap: var(--space-2); margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset.hunt-start > legend { padding: 0; font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
label.hunt-start-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--space-2); align-items: center; min-height: var(--target-min); cursor: pointer; }
label.hunt-start-choice > input { min-height: 0; margin: 0; accent-color: var(--color-accent-solid); }
label.hunt-start-choice > .hunt-hint { grid-column: 2; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
label.hunt-start-choice:has(input:disabled) { cursor: not-allowed; color: var(--color-text-secondary); }

/* A list's page (ticket 230, ADR 0247; layout A): the summary bar, a raised panel with the three counts in one sentence,
   the one filled action and the draft's discarding; then three storeys by what a row needs. « À faire avant de
   valider »: a raised card per row, its reason in warn ink, its choice visible on the right; on a suspected file, one
   compact line. « À regarder »: a hairlined line per remark. « Prêts »: folded, a line per wine. A row's form is its own
   (`data-form`): written in place, it keeps its place in the storey it left, greyed, marked. No new colour pair: warn
   and up text on raised (6.0, 6.9) and on their badges (5.3, 6.1), secondary and the accent on raised and sunken, a
   control's border on sunken (3.4), all measured. */
#hunt-draft, .hunt-storey { max-width: var(--hunt-draft); }
.hunt-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4); padding: var(--space-3) var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised);
}
.hunt-summary-said { flex: 1 1 var(--hunt-said); margin: 0; font-variant-numeric: tabular-nums; }
.hunt-summary-said a { color: inherit; text-decoration: none; }
.hunt-summary-said a:hover { text-decoration: underline; }
/* An empty draft's way to a file (ticket 234): a link among the sentence's words, so in the accent and underlined. */
.hunt-summary-said a.hunt-summary-file { color: var(--color-accent-text); text-decoration: underline; }
.hunt-summary-said [data-tone] { font-weight: 600; }
.hunt-summary-said [data-tone="warn"] { color: var(--color-warn-text); }
.hunt-summary-said [data-tone="up"] { color: var(--color-up-text); }
.hunt-summary form { margin: 0; }
.hunt-summary button[disabled] { opacity: var(--opacity-busy); cursor: not-allowed; }
.hunt-summary details.confirm[open] { flex-basis: 100%; }
#hunt-flagged a.hunt-restart { display: inline-block; margin-top: var(--space-1); font-weight: 400; }

.hunt-storey { margin-top: var(--space-8); }
.hunt-storey > h2 { margin: 0; }
.hunt-storey:focus { outline: none; }
.hunt-storey-count { margin-left: var(--space-1); font-weight: 400; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.hunt-storey-intro { margin: var(--space-1) 0 0; color: var(--color-text-secondary); }
details.hunt-ready > summary { padding: var(--space-1) 0; color: var(--color-accent-text); cursor: pointer; }
ol.hunt-items { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
li.hunt-item { display: grid; gap: var(--space-1) var(--space-4); align-items: start; scroll-margin-top: var(--space-12); }
li.hunt-item:target { background: var(--color-accent-subtle); }
li.hunt-item:focus { outline: none; }
li.hunt-item p { margin: 0; }
.hunt-rank { text-align: right; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
li.hunt-item[data-form="card"], li.hunt-item[data-form="compact"] {
  margin-bottom: var(--space-2); padding: var(--space-3) var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised);
}
li.hunt-item[data-form="card"] { grid-template-columns: var(--hunt-rank) minmax(0, 1fr) minmax(0, var(--hunt-choice)); }
li.hunt-item[data-form="compact"] {
  grid-template-columns: var(--hunt-rank) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr) auto;
  align-items: center; margin-bottom: var(--space-1); padding: var(--space-2) var(--space-4);
}
li.hunt-item[data-form="line"], li.hunt-item[data-form="ready"] {
  padding: var(--space-2) 0; border-bottom: var(--rule-hairline) solid var(--color-separator);
}
li.hunt-item[data-form="line"] { grid-template-columns: var(--hunt-rank) minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(var(--hunt-actions), auto); }
li.hunt-item[data-form="ready"], .hunt-columns {
  display: grid; gap: var(--space-1) var(--space-4); align-items: baseline;
  grid-template-columns: var(--hunt-rank) minmax(0, 1.5fr) minmax(0, 1fr) var(--hunt-actions);
}
.hunt-columns {
  margin: var(--space-2) 0 0; padding-bottom: var(--space-1); border-bottom: var(--rule-hairline) solid var(--color-text-primary);
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary);
}
.hunt-columns + ol.hunt-items { margin-top: 0; }
/* A row written in place stays where it stood until the page is asked again: greyed, its mark saying what it now is. */
li.hunt-item[data-settled] { margin-bottom: var(--space-2); padding-inline: var(--space-4); }
li.hunt-item[data-settled][data-form="ready"] > :is(.hunt-rank, .hunt-wine, .hunt-read) { opacity: var(--opacity-settled); transition: opacity var(--motion); }
li.hunt-item[aria-busy="true"] { cursor: progress; }
li.hunt-item[aria-busy="true"] :is(button, a) { pointer-events: none; }
.hunt-item-editor { grid-column: 1 / -1; }
.hunt-why { font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600; color: var(--color-warn-text); }
.hunt-written { color: var(--color-text-strong); overflow-wrap: anywhere; }
.hunt-words, .hunt-wine { font-weight: 600; overflow-wrap: anywhere; }
.hunt-all { font-weight: 400; }
.hunt-read, .hunt-reason, .hunt-note { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.hunt-read { font-variant-numeric: tabular-nums; }
.hunt-wine > .hunt-read { font-weight: 400; }
.hunt-demand > span { white-space: nowrap; }
.hunt-note, .hunt-reason { color: var(--color-warn-text); }
li.hunt-item[data-form="compact"] .hunt-note { display: block; }
.status[data-status="hunt-remark"] { background: var(--color-warn-subtle); color: var(--color-warn-text); }
.status:is([data-status="hunt-settled"], [data-status="hunt-added"]) { background: var(--color-up-subtle); color: var(--color-up-text); }
.status[data-status="hunt-not_found"] { border: var(--rule-hairline) solid var(--color-border); }
.hunt-remark + .hunt-remark { margin-top: var(--space-1); }
.hunt-item-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 var(--space-3); }
.hunt-item-actions form { margin: 0; }
.hunt-item-actions .button-quiet { padding: 0; }
a.hunt-edit-link { display: inline-flex; align-items: center; min-height: var(--target-min); white-space: nowrap; text-decoration: none; }
a.hunt-edit-link:hover { text-decoration: underline; }
.hunt-item-actions .button-quiet { color: var(--color-accent-text); }
.hunt-item-choice { display: grid; gap: var(--space-1); justify-items: start; min-width: 0; }
.hunt-item-choice form.hunt-confirm { margin-top: var(--space-1); }
form.hunt-choose { margin: 0; min-width: 0; }
form.hunt-choose fieldset { display: grid; gap: 0; margin: 0; padding: 0; border: 0; min-width: 0; }
form.hunt-choose label { display: flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); padding: var(--space-1) 0; cursor: pointer; }
form.hunt-choose input[type="radio"] { flex: none; min-height: 0; margin: 0; padding: 0; border: 0; background: none; accent-color: var(--color-accent-solid); }
form.hunt-choose label > span { overflow-wrap: anywhere; }
details.hunt-others > summary { padding: var(--space-1) 0; color: var(--color-accent-text); cursor: pointer; }
.hunt-choice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); }
.hunt-choice-actions form { margin: 0; }
ul.hunt-offered { margin: 0; padding-left: var(--space-4); }
/* What a row must state before its list is validated (ticket 233): its vintages from two lists of years, its
   target's container from a list. On a card, the lists and their button on one line, « Tous les millésimes » quiet
   under them. A grouped card settles several rows at once: its words at the left, its control at the right, as a
   card's choice; the rows it speaks of under a disclosure, each a line between hairlines with its own list. */
form:is(.hunt-vintages, .hunt-container), .hunt-group > form {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: 0;
}
form:is(.hunt-vintages, .hunt-container) select, .hunt-group > form select { width: auto; font-variant-numeric: tabular-nums; }
form.hunt-vintages-any { margin: 0; }
form.hunt-vintages-any .button-quiet { padding: 0; color: var(--color-accent-text); }
.hunt-group {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-4); align-items: center;
  margin: var(--space-3) 0 var(--space-2); padding: var(--space-3) var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised);
}
.hunt-group p { margin: 0; }
.hunt-group + ol.hunt-items { margin-top: 0; }
details.hunt-group-rows { grid-column: 1 / -1; }
details.hunt-group-rows > summary { width: fit-content; padding: var(--space-1) 0; color: var(--color-accent-text); cursor: pointer; }
/* The grouped card says why once: its rows do not say it again. */
details.hunt-group-rows .hunt-why { display: none; }
details.hunt-group-rows ol.hunt-items { margin-top: var(--space-1); }
details.hunt-group-rows li.hunt-item[data-form="card"] {
  margin: 0; padding: var(--space-2) 0; border: 0; border-top: var(--rule-hairline) solid var(--color-separator);
  border-radius: 0; background: none;
}
:is(form.hunt-edit, form.hunt-add-form) label.hunt-edit-check { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); align-self: end; cursor: pointer; }
:is(form.hunt-edit, form.hunt-add-form) label.hunt-edit-check input { flex: none; width: var(--space-4); height: var(--space-4); min-height: 0; margin: 0; }
:is(form.hunt-edit, form.hunt-add-form) label.hunt-edit-check > span:first-of-type { font-size: var(--text-body); line-height: var(--lh-body); font-weight: 400; color: var(--color-text-primary); }
:is(form.hunt-edit, form.hunt-add-form) label.hunt-edit-check .hunt-hint { flex-basis: 100%; }
/* The add band (ticket 234, ADR 0251), under the summary bar: a raised panel with a hairline, as the bar, no shadow.
   Its title in 600; the producer's field and its answers, the picker's own; once a producer is picked, its cuvées as
   check boxes, then on one line the two lists of years and « Tous les millésimes », « Plus » a disclosure in the
   accent over three fields, and « Ajouter », a secondary button: « Valider la liste » stays the view's one filled
   action. After an addition, one sentence: how many wines in up ink 600, then the rows that were on the list. */
.hunt-add {
  display: grid; gap: var(--space-2); justify-items: start;
  margin-top: var(--space-3); padding: var(--space-3) var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised);
  scroll-margin-top: var(--space-12);
}
.hunt-add > * { margin: 0; min-width: 0; max-width: 100%; }
.hunt-add > h2 { font-size: var(--text-body); line-height: var(--lh-body); font-weight: 600; }
.hunt-add form.hunt-pick-search > label { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.hunt-add-said { font-variant-numeric: tabular-nums; }
.hunt-add-said [data-tone="up"] { color: var(--color-up-text); font-weight: 600; }
form.hunt-add-form:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); justify-items: start; width: 100%; }
form.hunt-add-form > * { min-width: 0; max-width: 100%; }
.hunt-add-demand { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); width: 100%; }
.hunt-add-range { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: 0; }
.hunt-add-range select { width: auto; font-variant-numeric: tabular-nums; }
form.hunt-add-form label.hunt-edit-check { align-self: center; }
details.hunt-add-more { flex-basis: 100%; min-width: 0; max-width: 100%; }
.hunt-add-demand > * { min-width: 0; max-width: 100%; }
details.hunt-add-more > summary { width: fit-content; min-height: var(--target-min); display: flex; align-items: center; gap: var(--space-2); color: var(--color-accent-text); cursor: pointer; }
details.hunt-add-more > summary .hunt-hint, details.hunt-add-more > p.hunt-hint { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
details.hunt-add-more > p.hunt-hint { margin: var(--space-1) 0 0; }
.hunt-add .hunt-hint { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
.hunt-add-fields {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--hunt-field), 1fr)); gap: var(--space-2) var(--space-3);
  max-width: var(--hunt-panel); margin-top: var(--space-1);
}
.hunt-add-fields label { display: grid; gap: var(--space-1); align-content: start; font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.hunt-add-fields :is(input, select) { width: 100%; min-width: 0; font-size: var(--text-body); font-weight: 400; color: var(--color-text-primary); }
/* A row's editor (ticket 230), asked for when opened: a sunken panel under the row, as a list's opened line is. Its
   fields, then the producers of a producer's row, each with its quiet form that takes it off (ticket 220), then what
   the file wrote, then the row's quiet actions. */
.hunt-editor {
  margin-top: var(--space-2); padding: var(--space-3) var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-sunken);
}
.hunt-editor-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.hunt-editor-head h3 { margin: 0; }
.hunt-editor-head h3:focus { outline: none; }
a.hunt-editor-close { display: inline-flex; align-items: center; min-height: var(--target-min); font-size: var(--text-small); }
form.hunt-edit {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--hunt-field), 1fr)); gap: var(--space-2) var(--space-3);
  margin: var(--space-2) 0 0;
}
.hunt-editor label { display: grid; gap: var(--space-1); align-content: start; font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.hunt-editor form.hunt-choose label { display: flex; font-size: var(--text-body); line-height: var(--lh-body); font-weight: 400; color: var(--color-text-primary); }
.hunt-editor :is(input:not([type="radio"]), select) { width: 100%; min-width: 0; font-size: var(--text-body); font-weight: 400; color: var(--color-text-primary); }
form.hunt-edit .hunt-field-wide, form.hunt-edit > button { grid-column: 1 / -1; }
form.hunt-edit > button { justify-self: start; }
/* A field whose list holds longer words than a figure's (ticket 235: a packaging preference): two of the grid's columns,
   so that the word chosen is read whole. */
:is(form.hunt-edit, .hunt-add-fields) label.hunt-field-double { grid-column: span 2; }
.hunt-hint { font-weight: 400; }
.hunt-editor-part { margin-top: var(--space-3); }
.hunt-editor-part[data-part="choose"] { display: grid; gap: var(--space-1); justify-items: start; }
.hunt-editor-label { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
ul.hunt-producers { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
ul.hunt-producers > li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2); }
ul.hunt-producers button { font-size: var(--text-small); }
ul.hunt-producers form { margin: 0; }
form.hunt-add-producer { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-2) var(--space-3); margin: var(--space-2) 0 0; }
form.hunt-add-producer label { flex: 0 1 var(--hunt-choice); }
/* A row's wine picked in the reference (ticket 231, ADR 0248): the field, its answers under it as a list box, the
   producer's cuvées, then the one free text for a wine the reference does not hold. */
.hunt-pick { display: grid; gap: var(--space-2); justify-items: start; }
.hunt-pick > * { margin: 0; min-width: 0; max-width: 100%; }
form.hunt-pick-search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); width: 100%; }
form.hunt-pick-search > label, form.hunt-pick-search > .hunt-hint { flex: 0 0 100%; }
:is(.hunt-editor, .hunt-add) form.hunt-pick-search > input[name="q"] { flex: 1 1 var(--hunt-field); width: auto; max-width: var(--hunt-choice); }
form.hunt-pick-search > button { flex: none; }
form.hunt-pick-search > .hunt-hint { font-size: var(--text-small); color: var(--color-text-secondary); }
.hunt-pick-answers { width: 100%; max-width: var(--hunt-choice); }
.hunt-pick-answers:empty { display: none; }
ul.hunt-pick-list {
  list-style: none; margin: 0; padding: var(--space-1) 0; max-height: var(--hunt-pick-height); overflow-y: auto;
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control); background: var(--color-bg-raised);
}
ul.hunt-pick-list > li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); min-height: var(--target-min);
  padding: var(--space-1) var(--space-3); cursor: pointer;
}
ul.hunt-pick-list > li > .hunt-pick-name { font-weight: 600; overflow-wrap: anywhere; }
ul.hunt-pick-list > li:hover { background: var(--color-bg-sunken); }
/* The active option, as the palette's: the accent's subtle ground and a bar at its left edge. */
ul.hunt-pick-list > li[aria-selected="true"] { background: var(--color-accent-subtle); box-shadow: inset var(--rule-strong) 0 0 var(--color-accent-solid); }
.hunt-pick-said { font-size: var(--text-small); color: var(--color-text-secondary); }
.hunt-pick-said:empty { display: none; }
form.hunt-pick-wine:not([hidden]), form.hunt-pick-chosen { display: grid; gap: var(--space-2); justify-items: start; width: 100%; }
fieldset:is(.hunt-pick-cuvees, .hunt-pick-radios) { display: block; margin: 0; padding: 0; border: 0; min-width: 0; max-width: 100%; max-height: var(--hunt-pick-height); overflow-y: auto; }
fieldset.hunt-pick-cuvees > legend { padding: 0; font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
:is(.hunt-editor, .hunt-add) fieldset:is(.hunt-pick-cuvees, .hunt-pick-radios) label {
  display: flex; align-items: center; gap: var(--space-2); min-height: var(--target-min); padding: var(--space-1) 0;
  font-size: var(--text-body); line-height: var(--lh-body); font-weight: 400; color: var(--color-text-primary); cursor: pointer;
}
fieldset:is(.hunt-pick-cuvees, .hunt-pick-radios) input { flex: none; min-height: 0; margin: 0; padding: 0; border: 0; background: none; accent-color: var(--color-accent-solid); }
:is(.hunt-editor, .hunt-add) fieldset:is(.hunt-pick-cuvees, .hunt-pick-radios) input { width: auto; }
fieldset:is(.hunt-pick-cuvees, .hunt-pick-radios) label > span:first-of-type { overflow-wrap: anywhere; }
details.hunt-pick-outside > summary { display: inline-flex; align-items: center; min-height: var(--target-min); color: var(--color-accent-text); font-size: var(--text-small); cursor: pointer; }
form.hunt-outside { display: grid; grid-template-columns: minmax(0, var(--hunt-choice)) minmax(0, max-content); align-items: end; gap: var(--space-2) var(--space-3); margin: var(--space-1) 0 0; }
form.hunt-outside > .hunt-field-wide { grid-column: 1 / -1; }
form.hunt-outside > button { justify-self: start; }
.hunt-row-actions { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); margin-top: var(--space-2); margin-left: calc(-1 * var(--space-3)); }
.hunt-row-actions form { margin: 0; }
.hunt-row-actions button { font-size: var(--text-small); }

details.hunt-not-wine { margin-top: var(--space-8); max-width: 60rem; }
details.hunt-not-wine > summary { font-weight: 600; cursor: pointer; }
details.hunt-not-wine ul { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
details.hunt-not-wine li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3);
  padding: var(--space-1) 0; border-top: var(--rule-hairline) solid var(--color-separator);
}
details.hunt-not-wine li .hunt-row-number { min-width: var(--space-6); text-align: right; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
details.hunt-not-wine li form { margin-left: auto; }
/* The rows taken off the draft (ticket 232), above the file's rows read as no wine: the same lines, the wine in 600,
   its demand in the small size, « Remettre » quiet at the line's end. */
details.hunt-set-aside li .hunt-wine { min-width: 0; }
details.hunt-set-aside li form .button-quiet { padding: 0; color: var(--color-accent-text); }
.hunt-set-aside-title { margin: var(--space-6) 0 0; font-weight: 600; }

/* The rows checked (ticket 232, ADR 0249). A check box before each rank, in the rank's cell, which is wider for it;
   « tout cocher » on a storey's head, in the small size; « Confirmer les N lignes » at the end of the same line. The
   bar of the rows checked floats at the window's foot — raised, the one shadow, as the toast, which stands above it
   when both show — once a box is checked: the style alone shows it, so that it works without script. The page keeps
   room at its foot so the bar never hides the last line. No new colour pair. */
#hunt-draft[data-checks] { --hunt-rank: 4rem; }
.hunt-rank:has(> input) { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--target-min); }
input[data-hunt-check], .hunt-check-all input { flex: none; width: var(--space-4); height: var(--space-4); min-height: 0; margin: 0; cursor: pointer; }
.hunt-storey-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-4); margin-top: var(--space-2); }
.hunt-check-all {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target-min);
  font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); cursor: pointer;
}
.hunt-storey:has(li.hunt-item[data-form="card"], li.hunt-item[data-form="compact"]) .hunt-check-all { padding-left: var(--space-4); }
.hunt-confirm-all { margin-left: auto; }
.hunt-confirm-all form { margin: 0; }
.hunt-bulk { display: none; }
#hunt-draft:has(input[data-hunt-check]:checked) .hunt-bulk {
  position: fixed; left: calc(var(--rail-width) + var(--space-6)); right: var(--space-6); bottom: var(--space-6); z-index: 24;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3);
  max-width: var(--hunt-draft); margin: 0; padding: var(--space-2) var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
}
.hunt-bulk-said { margin: 0 var(--space-2) 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.hunt-bulk .button-quiet { color: var(--color-accent-text); }
html.rail-hidden #hunt-draft:has(input[data-hunt-check]:checked) .hunt-bulk { left: calc(var(--rail-folded) + var(--space-6)); }
body:has(input[data-hunt-check]:checked) .content { padding-bottom: calc(var(--space-12) + var(--space-8)); }
body:has(input[data-hunt-check]:checked) .toast { bottom: calc(var(--space-6) + var(--control-height) + 2 * var(--space-2) + var(--space-3)); }
body:has(input[data-hunt-check]:checked):has(.toast:not([hidden])) .content { padding-bottom: calc(2 * var(--space-12) + var(--space-8)); }

/* A narrow window (D2: it must not break): a row is a block — its rank, its words, its choice or its remark, its
   actions one under the other; the ready lines' heads left out. With its check box (ticket 232), the box and the rank
   stand at the row's left, one over the other, and the row's blocks beside them. */
@media (max-width: 900px) {
  li.hunt-item[data-form] { grid-template-columns: minmax(0, 1fr); }
  li.hunt-item .hunt-rank { text-align: left; }
  li.hunt-item .hunt-rank:empty { display: none; }
  #hunt-draft[data-checks] li.hunt-item[data-form] { grid-template-columns: auto minmax(0, 1fr); }
  #hunt-draft[data-checks] li.hunt-item > .hunt-rank { grid-row: 1 / span 3; flex-direction: column; justify-content: flex-start; align-items: center; }
  #hunt-draft[data-checks] li.hunt-item[data-form="card"] > .hunt-rank { grid-row: 1 / span 2; }
  #hunt-draft[data-checks] li.hunt-item[data-form="compact"] > .hunt-rank { grid-row: 1 / span 4; }
  #hunt-draft[data-checks] li.hunt-item > :not(.hunt-rank) { grid-column: 2; }
  #hunt-draft[data-checks] li.hunt-item > .hunt-item-editor { grid-column: 1 / -1; }
  .hunt-columns { display: none; }
  .hunt-group { grid-template-columns: minmax(0, 1fr); }
  .hunt-item-actions { justify-content: flex-start; }
  .hunt-actions { margin-left: 0; }
  #hunt-draft:has(input[data-hunt-check]:checked) .hunt-bulk,
  html.rail-hidden #hunt-draft:has(input[data-hunt-check]:checked) .hunt-bulk { left: var(--space-4); right: var(--space-4); }
}
@media (max-width: 600px) {
  #hunt-draft:has(input[data-hunt-check]:checked) .hunt-bulk { bottom: var(--space-4); }
  /* The bar wraps onto three lines of controls here: the toast stands above them. */
  body:has(input[data-hunt-check]:checked) .toast { bottom: calc(var(--space-4) + 3 * var(--control-height) + 4 * var(--space-2) + var(--space-3)); }
  body:has(input[data-hunt-check]:checked) .content { padding-bottom: calc(3 * var(--space-12) + var(--space-4)); }
  body:has(input[data-hunt-check]:checked):has(.toast:not([hidden])) .content { padding-bottom: calc(4 * var(--space-12) + var(--space-8)); }
}

/* « Chasse du mois » v2 (ticket 239, UI v2 §6; DESIGN.md « Decisions »). Its home: the sentence of what is new, the
   search, a card per region, its region's colour its top edge alone. A region: the toolbar, a table of producers, each
   with its vintage grid — a block per decade, five cells by two, the year's last digit in its own, its colour by the
   colour code (blue new, amber closing soon, grey darker for more offers, outlined asked with nothing). The panel's
   views: a producer's wines and their vintage chips; a wine's offers by vintage under sticky heads; an offer's card.
   Price is shown, never sorted or coloured (UI v2 §3.5): the card's figure is the ink. No new colour pair: every ink
   and ground is DESIGN.md's measured ones. */
.hunt-home { max-width: var(--hunt-home); margin-top: var(--space-6); }
.hunt-news {
  margin: 0; max-width: 20ch; font-size: var(--text-hero); line-height: 1.05; font-weight: 800; letter-spacing: var(--tracking-hero);
  font-variant-numeric: tabular-nums;
}
.hunt-news-sub { margin: var(--space-3) 0 0; font-size: var(--text-reading); line-height: var(--lh-reading); color: var(--color-text-secondary); }
form.hunt-find { position: relative; display: flex; flex-wrap: wrap; gap: var(--space-2); max-width: var(--hunt-find); margin: var(--space-6) 0 0; }
label.hunt-search { position: relative; flex: 1 1 var(--hunt-field); display: flex; align-items: center; }
label.hunt-search input[type="search"] {
  width: 100%; min-height: var(--hunt-search-height); padding: 0 var(--space-12) 0 var(--space-4);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); box-shadow: var(--shadow-soft); font-size: var(--text-reading);
}
label.hunt-search kbd { position: absolute; right: var(--space-3); color: var(--color-text-secondary); }
form.hunt-find .hunt-find-go, #hunt-toolbar .hunt-search-go { min-height: var(--hunt-search-height); }
/* With script the search answers as one types: its button stays for a page without. */
.hunt-board .hunt-search-go:not(:focus), form.hunt-find:has(.hunt-find-result) .hunt-find-go:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
ul.hunt-find-results {
  flex-basis: 100%; list-style: none; margin: 0; padding: var(--space-1);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
}
.hunt-find-result a { display: grid; gap: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-control); color: var(--color-text-primary); text-decoration: none; }
.hunt-find-result a:hover, .hunt-find-result[data-on] a { background: var(--color-accent-subtle); }
.hunt-find-sub { font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.hunt-find-new { color: var(--color-new-text); font-weight: 600; }
.hunt-find-none { padding: var(--space-2) var(--space-3); color: var(--color-text-secondary); }
.hunt-cards-title { margin: var(--space-8) 0 var(--space-3); }
ul.hunt-cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--hunt-card), 1fr)); gap: var(--space-4); margin: 0; padding: 0; }
a.region-card {
  display: grid; gap: var(--space-1); height: 100%; padding: var(--space-6); border: var(--rule-hairline) solid var(--color-border);
  border-top: calc(2 * var(--rule-strong)) solid var(--region); border-radius: var(--radius-card); background: var(--color-bg-raised); box-shadow: var(--shadow-soft);
  color: var(--color-text-primary); text-decoration: none;
  transition: transform var(--motion-lift) var(--ease), box-shadow var(--motion-lift) var(--ease);
}
a.region-card:hover { transform: translateY(var(--lift)); box-shadow: var(--shadow-lifted); }
.region-card-name { font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 800; letter-spacing: -0.01em; }
.region-card-new { margin-top: var(--space-2); font-size: var(--text-display); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.region-card-new[data-calm] { color: var(--color-text-secondary); }
.region-card-new-said { font-size: var(--text-small); color: var(--color-text-secondary); }
.region-card-tops { display: grid; gap: var(--space-1); margin-top: var(--space-3); min-height: calc(3 * var(--lh-body) * 1rem); }
.region-card-top { display: flex; justify-content: space-between; gap: var(--space-3); }
.region-card-top-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-card-top .num { font-weight: 700; }
.region-card-calm { color: var(--color-text-secondary); }
.region-card-meta {
  display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin-top: var(--space-3); padding-top: var(--space-3);
  border-top: var(--rule-hairline) solid var(--color-separator); font-size: var(--text-small); color: var(--color-text-secondary);
}
/* A region's card grows into its banner (View Transitions where the browser has them): the four named regions. */
a.region-card.region-bourgogne, .region-banner.region-bourgogne { view-transition-name: region-bourgogne; }
a.region-card.region-champagne, .region-banner.region-champagne { view-transition-name: region-champagne; }
a.region-card.region-rhone, .region-banner.region-rhone { view-transition-name: region-rhone; }
a.region-card.region-loire, .region-banner.region-loire { view-transition-name: region-loire; }

/* A region: the toolbar, then the table. */
form.hunt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-3); }
form.hunt-toolbar label.hunt-search { flex: 1 1 var(--hunt-find-min); max-width: var(--hunt-find); }
.hunt-toggles, .hunt-segments { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hunt-segments { flex-basis: 100%; }
.hunt-table-wrap { border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-card); background: var(--color-bg-raised); box-shadow: var(--shadow-soft); }
table.hunt-table { width: 100%; border-collapse: collapse; }
table.hunt-table thead th {
  padding: var(--space-3) var(--space-4); text-align: left; vertical-align: bottom; border-bottom: var(--rule-hairline) solid var(--color-separator);
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); white-space: nowrap;
}
table.hunt-table th.hunt-col-producer { position: relative; }
a.hunt-sort { color: var(--color-text-secondary); text-decoration: none; }
a.hunt-sort:hover { color: var(--color-text-primary); text-decoration: underline; }
a.hunt-sort[aria-current="true"] { color: var(--color-text-primary); }
a.hunt-sort[aria-current="true"]::after { content: " ▲"; }
.hunt-col-hint { font-weight: 400; }
button.column-filter {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-height); padding: 0 var(--space-2);
  border: var(--rule-hairline) solid transparent; border-radius: var(--radius-control); background: transparent;
  color: var(--color-text-primary); font-size: var(--text-label); font-weight: 600;
}
button.column-filter:hover, button.column-filter[aria-expanded="true"] { border-color: var(--color-border); background: var(--color-bg-sunken); }
button.column-filter[data-on] { background: var(--color-accent-subtle); }
.column-filter-icon { width: var(--space-3); height: var(--space-3); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
table.hunt-table .popover { top: 100%; left: var(--space-2); text-align: left; white-space: normal; font-weight: 400; color: var(--color-text-primary); }
.hunt-pick-type input { width: 100%; }
p.hunt-pick-all { display: flex; gap: var(--space-3); margin: var(--space-2) 0; }
button.link-button { min-height: 0; padding: 0; border: 0; background: none; color: var(--color-accent-text); font-size: var(--text-small); font-weight: 600; text-decoration: underline; }
ul.hunt-pick-list { list-style: none; max-height: var(--hunt-pick-height); overflow: auto; margin: 0; padding: 0; }
ul.hunt-pick-list label {
  display: grid; grid-template-columns: auto var(--hunt-rank) minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-2);
  min-height: var(--target-min); font-size: var(--text-body); cursor: pointer;
}
.hunt-pick-rank, .hunt-pick-n { color: var(--color-text-secondary); }
.hunt-pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hunt-pick-new { color: var(--color-new-text); font-weight: 700; }
p.hunt-pick-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0 0; padding-top: var(--space-2); border-top: var(--rule-hairline) solid var(--color-separator); font-size: var(--text-small); color: var(--color-text-secondary); }
tr.hunt-producer > :is(td, th) { padding: var(--space-3) var(--space-4); border-top: var(--rule-hairline) solid var(--color-separator); vertical-align: middle; text-align: left; }
tr.hunt-producer:first-child > :is(td, th) { border-top: 0; }
tr.hunt-producer:hover, tr.hunt-producer:focus-within { background: var(--color-bg-sunken); }
td.hunt-rank { width: var(--hunt-rank-col); color: var(--color-text-secondary); white-space: nowrap; }
th.hunt-name { min-width: var(--hunt-name); font-weight: 400; }
a.hunt-producer-link { display: block; color: var(--color-text-primary); font-size: var(--text-reading); line-height: var(--lh-body); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
a.hunt-producer-link:hover { text-decoration: underline; }
.hunt-sub { display: block; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
td.hunt-offers { font-variant-numeric: tabular-nums; }
.hunt-none { color: var(--color-text-secondary); }
.vintage-grid { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.vintage-decade { display: grid; gap: 2px; }
.vintage-decade-label { font-size: var(--text-label); line-height: 1; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.vintage-cells { display: grid; grid-template-columns: repeat(5, var(--vintage-cell)); grid-auto-rows: var(--vintage-cell); gap: 2px; }
.vintage-cell {
  position: relative; display: grid; place-items: center; border-radius: var(--radius-box);
  font-size: var(--text-label); line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none;
}
.vintage-cell[data-mark="on-sale-1"], .vintage-chip[data-mark="on-sale-1"] { background: var(--color-on-sale-1); color: var(--color-text-primary); }
.vintage-cell[data-mark="on-sale-2"], .vintage-chip[data-mark="on-sale-2"] { background: var(--color-on-sale-2); color: var(--color-text-primary); }
.vintage-cell[data-mark="on-sale-3"], .vintage-chip[data-mark="on-sale-3"] { background: var(--color-on-sale-3); color: var(--color-text-on-accent); }
.vintage-cell[data-mark="new"], .vintage-chip[data-mark="new"] { background: var(--color-new); color: var(--color-text-on-accent); }
.vintage-cell[data-mark="soon"], .vintage-chip[data-mark="soon"] { background: var(--color-soon); color: var(--color-text-on-accent); }
.vintage-cell[data-state="none"] { box-shadow: inset 0 0 0 var(--rule-hairline) var(--color-border-control); }
.vintage-cell[data-state="out"] { visibility: hidden; }
a.vintage-cell:hover, a.vintage-chip:hover { outline: var(--rule-strong) solid var(--color-focus-ring); outline-offset: 1px; }
.vintage-cell[data-kept]::after, .vintage-chip[data-kept]::after {
  content: ""; position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; border-radius: var(--radius-chip);
  background: var(--color-kept); box-shadow: 0 0 0 var(--rule-hairline) var(--color-bg-raised);
}
p.hunt-quiet { margin: var(--space-3) 0 0; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); }
p.hunt-quiet a { color: var(--color-text-strong); }
p.hunt-clear { margin: var(--space-2) 0 0; }

/* The panel's views. */
#hunt-panel .side-panel-title { grid-row: 2; }
#hunt-panel .side-panel-back[hidden] { display: none; }
#hunt-panel[aria-busy="true"] .side-panel-body { opacity: 0.6; transition: opacity var(--motion); }
#hunt-panel .side-panel-foot kbd { margin-left: var(--space-1); }
p.hunt-view-said { margin: var(--space-2) 0 var(--space-4); font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.hunt-view-new { color: var(--color-new-text); font-weight: 600; }
ul.hunt-wines { list-style: none; display: grid; gap: var(--space-2); margin: 0; padding: 0; }
li.hunt-wine { padding: var(--space-3) var(--space-4); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); }
li.hunt-wine:focus { outline: var(--rule-strong) solid var(--color-focus-ring); outline-offset: 2px; }
p.hunt-wine-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
a.hunt-wine-title { color: var(--color-text-primary); font-weight: 700; text-decoration: none; }
a.hunt-wine-title:hover { text-decoration: underline; }
.hunt-wine-n { font-size: var(--text-small); color: var(--color-text-secondary); }
p.vintage-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-2) 0 0; }
a.vintage-chip {
  position: relative; display: inline-flex; align-items: center; min-height: var(--vintage-chip); padding: 0 var(--space-2);
  border-radius: var(--radius-chip); font-size: var(--text-small); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none;
}
.vintage-chip-n { font-weight: 400; }
section.hunt-asked { margin-top: var(--space-6); }
section.hunt-asked h3 { margin: 0 0 var(--space-2); font-size: var(--text-heading); line-height: var(--lh-heading); }
ol.hunt-rows { list-style: none; margin: 0; padding: 0; }
li.hunt-row { padding: var(--space-2) 0; border-top: var(--rule-hairline) solid var(--color-separator); }
li.hunt-row-served { opacity: var(--opacity-settled); }
h4.hunt-title, h5.hunt-title { margin: 0; font-size: var(--text-body); line-height: var(--lh-body); font-weight: 600; overflow-wrap: anywhere; }
p.hunt-facts { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); margin: var(--space-1) 0 0; font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
p.hunt-facts > span { white-space: nowrap; }
.hunt-bought { color: var(--color-text-strong); }
a.hunt-verify { font-size: var(--text-small); white-space: nowrap; color: var(--color-accent-text); font-weight: 600; }
section.hunt-year { margin-top: var(--space-4); }
h3.hunt-year-head {
  position: sticky; top: calc(-1 * var(--space-2)); z-index: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2);
  margin: 0 0 var(--space-2); padding: var(--space-2) 0; border-bottom: var(--rule-hairline) solid var(--color-separator);
  background: var(--color-bg-raised); font-size: var(--text-title); line-height: var(--lh-title); font-weight: 800; letter-spacing: var(--tracking-title);
}
h3.hunt-year-head a { color: var(--color-text-primary); text-decoration: none; font-size: var(--text-heading); }
.hunt-year-said { font-size: var(--text-small); font-weight: 400; letter-spacing: 0; color: var(--color-text-secondary); }
article.offer-card {
  display: grid; gap: var(--space-2); margin: 0 0 var(--space-3); padding: var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised);
}
article.offer-card:focus, article.offer-card:focus-within { border-color: var(--color-text-primary); box-shadow: var(--shadow-soft); outline: none; }
.offer-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.offer-channel { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-2); border-radius: var(--radius-mark); background: var(--color-bg-sunken); color: var(--color-text-strong); font-size: var(--text-small); }
.offer-new, .offer-ago { margin-left: auto; }
/* A hunting offer seen on screen (ticket 243, ADR 0220): its « Nouvelle » quieted as a list's « Non vue » is — no blue,
   secondary text inside a hairline, the same width — until the view is asked again. */
.offer-new[data-seen] { background: transparent; color: var(--color-text-secondary); box-shadow: inset 0 0 0 var(--rule-hairline) var(--color-separator); }
.offer-new[data-seen]::before { background: var(--color-text-secondary); }
.offer-ago { font-size: var(--text-small); color: var(--color-text-secondary); }
p.offer-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin: 0; }
.offer-figure { font-size: var(--text-title); line-height: var(--lh-title); font-weight: 800; letter-spacing: var(--tracking-figure); }
.offer-basis { font-size: var(--text-small); color: var(--color-text-secondary); }
p.offer-facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4); margin: 0; color: var(--color-text-strong); }
.offer-deadline[data-closing="soon"] { color: var(--color-soon-text); font-weight: 600; }
.offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.offer-actions form { margin: 0; }
.offer-actions details.dismiss > summary { list-style: none; }
.offer-actions .dismiss-reasons { display: grid; gap: var(--space-1); margin-top: var(--space-2); }
.offer-actions a.offer-link, .offer-actions a.offer-fiche { display: inline-flex; align-items: center; min-height: var(--control-height-primary); padding: 0 var(--space-3); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-control); color: var(--color-text-primary); font-weight: 600; text-decoration: none; }
.offer-actions a.offer-link:hover, .offer-actions a.offer-fiche:hover { border-color: var(--color-text-primary); }
/* A note the page's script shows over the page (« Tout est vu chez… »): the toast's look, then gone. */
.hunt-note {
  position: fixed; left: 50%; bottom: var(--space-6); z-index: 60; transform: translateX(-50%); max-width: calc(100vw - var(--space-8));
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-panel); background: var(--color-accent-solid); color: var(--color-text-on-accent);
  box-shadow: var(--shadow-lifted); animation: pop 160ms var(--ease);
}

/* « liste du mois » in a channel tab's « Vin »: outlined in the accent, so that it never reads as « intéressé »'s filled
   ground. */
.hunt-mark {
  display: inline-block; padding: 0 var(--space-1); border: var(--rule-hairline) solid var(--color-accent-solid);
  border-radius: var(--radius-mark); color: var(--color-accent-text); font-size: var(--text-label); line-height: var(--lh-label);
  white-space: nowrap;
}
/* A narrow window: the producers' table in rows of their own — the rank, the name and the counts on one line, the grid
   under them —, the heads a bar of their sorts, so that nothing is wider than the window (UI v2 §10 point 5). */
@media (max-width: 760px) {
  .hunt-news { font-size: var(--text-display); }
  table.hunt-table, table.hunt-table tbody, table.hunt-table thead, table.hunt-table tr { display: block; }
  table.hunt-table thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: var(--rule-hairline) solid var(--color-separator); }
  table.hunt-table thead th { display: block; padding: 0; border: 0; }
  table.hunt-table thead th.hunt-col-grid { display: none; }
  /* The column's popover under the whole bar of heads, as wide as the table, never past the window. */
  table.hunt-table thead tr { position: relative; }
  table.hunt-table th.hunt-col-producer { position: static; }
  table.hunt-table .popover { left: var(--space-2); right: var(--space-2); width: auto; }
  table.hunt-table tr.hunt-producer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-3) var(--space-4); border-top: var(--rule-hairline) solid var(--color-separator); }
  tr.hunt-producer:first-child { border-top: 0; }
  tr.hunt-producer > :is(td, th) { display: block; padding: 0; border: 0; }
  th.hunt-name { min-width: 0; }
  td.hunt-rank { width: auto; }
  td.hunt-grid { grid-column: 1 / -1; }
  .vintage-grid { gap: var(--space-2) var(--space-3); }
}
}

/* ===================================================================================================================
   The look of 22/11 (ticket 237, ADR 0254; docs/DESIGN.md « Components »): the components every list of UI v2 draws
   with. Each reads the tokens of `:root`, and a state colour marks its state alone (SPEC v2 §3.3).
   =================================================================================================================== */

/* View Transitions where the browser has them (SPEC v2 §4): a region's card grows into its banner, the two sharing a
   `view-transition-name` the page sets; the page itself does not fade, so a list's rows never re-animate on a filter. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation: none; }
::view-transition-group(*) { animation-duration: var(--motion-view); animation-timing-function: var(--ease); }

/* `segmented`: one on, filled in the ink; each its count, quieter. */
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px;
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-chip); background: var(--color-bg-raised);
}
.segment {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-height); padding: 0 var(--space-3);
  border-radius: var(--radius-chip); color: var(--color-text-secondary); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color var(--motion), color var(--motion);
}
.segment:hover { background: var(--color-bg-sunken); color: var(--color-text-primary); }
.segment[aria-current="true"] { background: var(--color-accent-solid); color: var(--color-text-on-accent); }
.segment-n { font-weight: 500; }

/* `toggle`: a chip, its state's dot before its words; on, the ink, the dot ringed in white. */
.toggle {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: calc(var(--control-height) + var(--space-2));
  padding: 0 var(--space-4); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-chip);
  background: var(--color-bg-raised); color: var(--color-text-primary); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color var(--motion), background-color var(--motion), color var(--motion);
}
.toggle:hover { border-color: var(--color-text-secondary); }
.toggle[data-on] { border-color: var(--color-accent-solid); background: var(--color-accent-solid); color: var(--color-text-on-accent); }
.toggle-dot { flex: none; width: 8px; height: 8px; border-radius: var(--radius-chip); background: var(--color-text-secondary); }
.toggle[data-state="new"] .toggle-dot { background: var(--color-new); }
.toggle[data-state="soon"] .toggle-dot { background: var(--color-soon); }
.toggle[data-state="kept"] .toggle-dot { background: var(--color-kept); }
.toggle[data-on] .toggle-dot { box-shadow: 0 0 0 var(--rule-strong) var(--color-text-on-accent); }
.toggle-n { font-weight: 500; }

/* `new_badge`: blue, a dot before its count or its word. */
.new-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px var(--space-3); border-radius: var(--radius-chip);
  background: var(--color-new-subtle); color: var(--color-new-text);
  font-size: var(--text-small); line-height: var(--lh-small); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.new-badge::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: var(--radius-chip); background: var(--color-new); }

/* `level_pill`: grand cru gold filled, premier cru gold light, village grey, régional outlined. */
.level-pill {
  display: inline-block; flex: none; padding: 2px var(--space-2); border-radius: var(--radius-mark);
  background: var(--color-bg-sunken); color: var(--color-text-strong);
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 700; white-space: nowrap;
}
.level-pill[data-level="grand_cru"] { background: var(--color-gold); color: var(--color-text-on-accent); }
.level-pill[data-level="premier_cru"] { background: var(--color-gold-subtle); color: var(--color-gold-text); }
.level-pill[data-level="regional"] { background: transparent; box-shadow: inset 0 0 0 var(--rule-hairline) var(--color-border); color: var(--color-text-secondary); }

/* `channel_icon`: a 16 px line in the text's colour, beside its words or alone with its name. */
.channel-icon {
  flex: none; display: inline-block; vertical-align: -3px; width: var(--space-4); height: var(--space-4);
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* `source_mark`: the two letters in a neutral badge, then the name. */
.source-mark { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
.monogram {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px;
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-mark); background: var(--color-bg-sunken);
  color: var(--color-text-strong); font-size: var(--text-label); line-height: 1; font-weight: 700; letter-spacing: -0.02em;
}
.source-mark-name { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }

/* `legend`: the colour code, each swatch beside its words, on a raised band. */
.state-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); margin: 0 0 var(--space-3);
  padding: var(--space-2) var(--space-4); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small);
}
.state-legend-title { font-weight: 600; color: var(--color-text-primary); }
.state-legend-item { display: inline-flex; align-items: center; gap: var(--space-2); }
.state-legend-swatch { flex: none; width: 14px; height: 14px; border-radius: var(--radius-box); }
.state-legend-swatch[data-state="new"] { background: var(--color-new); }
.state-legend-swatch[data-state="soon"] { background: var(--color-soon); }
.state-legend-swatch[data-state="on-sale"] { width: 34px; background: linear-gradient(90deg, var(--color-on-sale-1), var(--color-on-sale-2), var(--color-on-sale-3)); }
.state-legend-swatch[data-state="none"] { box-shadow: inset 0 0 0 var(--rule-hairline) var(--color-border-control); }
.state-legend-swatch[data-state="kept"] { width: 9px; height: 9px; border-radius: var(--radius-chip); background: var(--color-kept); }
.state-legend-swatch[data-state="level"] { background: var(--color-gold); }

/* A region's colour (serve.yaml `region_colours`): its identity, read by `.banner` and a region's card, never a state. */
.region-bordeaux { --region: var(--color-region-bordeaux); }
.region-bourgogne { --region: var(--color-region-bourgogne); }
.region-champagne { --region: var(--color-region-champagne); }
.region-rhone { --region: var(--color-region-rhone); }
.region-loire { --region: var(--color-region-loire); }
.region-others { --region: var(--color-region-others); }
/* A list's chips (ticket 253, ADR 0272): small, on the quiet ground, the name in the strong ink beside a dot in the list's
   colour — the colour an identity, the name what says it. A chip that links (the board's head) underlines on hover. */
.list-chip-1 { --list: var(--color-list-1); }
.list-chip-2 { --list: var(--color-list-2); }
.list-chip-3 { --list: var(--color-list-3); }
.list-chip-4 { --list: var(--color-list-4); }
.list-chip-5 { --list: var(--color-list-5); }
.list-chip-6 { --list: var(--color-list-6); }
.list-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.hunt-name .list-chips, .hunt-list-card .list-chips { display: flex; margin-top: var(--space-1); }
.list-chip {
  display: inline-flex; align-items: center; gap: var(--space-1); max-width: 100%;
  padding: 0 var(--space-2); border-radius: var(--radius-chip); background: var(--color-bg-sunken);
  font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600; color: var(--color-text-strong);
  overflow-wrap: anywhere; text-decoration: none;
}
.list-chip::before { content: ""; flex: none; width: var(--space-2); height: var(--space-2); border-radius: 50%; background: var(--list); }
a.list-chip:hover, a.list-chip:focus-visible { text-decoration: underline; }
.hunt-asked-list { margin-top: var(--space-3); }
/* Each row's alert coverage (ticket 218, 215's look, ported 30/11 to the board v2): « aucune alerte » and « alerte
   muette » in the warning's ink on its tint, « trouvé ailleurs » outlined, « ✓ alertes » in secondary text; its word always
   written, its reason in a tooltip. No new pair: warn ink on its tint (5.3), text and the control's edge on raised (19.2,
   3.9), secondary on raised (5.9). A div, not a p, under a row of « Sur la liste »: the tooltip is a disclosure. */
div.hunt-alert {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-3); margin: var(--space-1) 0 0;
  font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary);
}
.hunt-coverage {
  display: inline-block; padding: 0 var(--space-1); border-radius: var(--radius-control);
  font-size: var(--text-label); line-height: var(--lh-label); white-space: nowrap;
}
.hunt-coverage:is([data-coverage="none"], [data-coverage="muted"]) { background: var(--color-warn-subtle); color: var(--color-warn-text); font-weight: 600; }
.hunt-coverage[data-coverage="elsewhere"] { border: var(--rule-hairline) solid var(--color-border-control); color: var(--color-text-primary); }
.hunt-coverage[data-coverage="covered"] { padding: 0; color: var(--color-text-secondary); }
div.hunt-alert .tip { margin-left: calc(-1 * var(--space-2)); }
/* A producer to review in its region's table, under its name; in « Rien en vente », after it. */
th .hunt-alert-mark { display: flex; align-items: center; gap: var(--space-1); margin-top: var(--space-1); font-weight: 400; }
.hunt-alert-reason { display: block; }
.hunt-alert-reason + .hunt-alert-reason { margin-top: var(--space-1); }
a.hunt-ask { color: var(--color-accent-text); white-space: nowrap; }
/* « Couverture à revoir »'s dot: the warning's ink (on page 5.6, non-text). */
.toggle[data-state="review"] .toggle-dot { background: var(--color-warn-text); }
/* « Alertes à poser » on the board's home: the regions to review, then the open requests summed by platform, one line
   each, its words after its count, then each request as « Suivi des alertes » draws it. */
section.hunt-alerts { margin-top: var(--space-8); max-width: 60rem; }
section.hunt-alerts h2 { margin: 0 0 var(--space-1); font-size: var(--text-heading); line-height: var(--lh-heading); }
p.hunt-alerts-review { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); margin: var(--space-3) 0; }
p.hunt-alerts-review .label { margin: 0; }
a.hunt-alerts-region { color: var(--color-accent-text); white-space: nowrap; }
ul.hunt-alerts-sums { list-style: none; margin: var(--space-2) 0 var(--space-4); padding: 0; display: grid; gap: var(--space-1); }
li.hunt-alerts-platform { font-size: var(--text-small); line-height: var(--lh-small); }
.hunt-alerts-name { font-weight: 600; }
.hunt-alerts-count { color: var(--color-text-secondary); }
.hunt-alerts-words { display: block; color: var(--color-text-secondary); overflow-wrap: anywhere; }
h4.hunt-asked-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); font-size: var(--text-small); }
.hunt-combined-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.hunt-list-card-count { font-size: var(--text-small); color: var(--color-text-secondary); }

/* `banner`: the region's head, in its colour, white words on it, darker toward its foot. */
.region-banner {
  position: relative; overflow: hidden; margin: 0 0 var(--space-6); padding: var(--space-6) var(--space-8) var(--space-6);
  border-radius: var(--radius-card); color: var(--color-text-on-accent);
  background: radial-gradient(120% 140% at 100% 0%, var(--region) 0%, color-mix(in oklab, var(--region) 70%, var(--color-text-primary)) 100%);
}
.region-banner-back {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-height); padding: 0 var(--space-3);
  border-radius: var(--radius-chip); background: color-mix(in oklab, var(--color-text-primary) 22%, transparent);
  color: var(--color-text-on-accent); font-size: var(--text-small); font-weight: 600; text-decoration: none;
  transition: background-color var(--motion);
}
/* A veil of the ink, never of white: the white words keep at least their region's ratio (review of 23/11). */
.region-banner-back:hover { background: color-mix(in oklab, var(--color-text-primary) 36%, transparent); }
.region-banner-title { margin: var(--space-4) 0; font-size: var(--text-hero); line-height: 1.05; font-weight: 800; letter-spacing: var(--tracking-hero); }
.region-banner-stats { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); margin: 0; }
.region-banner-stats > div { display: flex; flex-direction: column-reverse; }
.region-banner-stats dt { font-size: var(--text-small); }
.region-banner-stats dd { margin: 0; font-size: var(--text-title); line-height: var(--lh-title); font-weight: 700; letter-spacing: var(--tracking-figure); }

/* `panel`: on the right, the list staying where it is under a scrim; it slides in (ticket 238 opens it). */
.side-panel {
  position: fixed; top: var(--space-3); right: var(--space-3); bottom: var(--space-3); z-index: 50;
  display: flex; flex-direction: column; width: min(45rem, calc(100vw - var(--space-6))); overflow: hidden;
  border-radius: calc(var(--radius-card) + 4px); background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
  animation: panel-in var(--motion-panel) var(--ease) both;
}
@keyframes panel-in { from { transform: translateX(calc(100% + var(--space-6))); } to { transform: none; } }
.side-panel-scrim { position: fixed; inset: 0; z-index: 49; background: var(--color-scrim); }
.side-panel-head {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-2) var(--space-3);
  padding: var(--space-6) var(--space-6) var(--space-4); border-bottom: var(--rule-hairline) solid var(--color-separator);
}
.side-panel-back { grid-column: 1; justify-self: start; color: var(--color-text-secondary); font-size: var(--text-small); font-weight: 600; text-decoration: none; }
.side-panel-back:hover { color: var(--color-text-primary); }
.side-panel-close {
  grid-column: 2; grid-row: 1; width: 36px; height: 36px; min-height: 36px; padding: 0;
  border: 0; border-radius: var(--radius-chip); background: var(--color-bg-sunken); color: var(--color-text-secondary);
}
.side-panel-close:hover { background: var(--color-separator); border-color: transparent; color: var(--color-text-primary); }
.side-panel-title { grid-column: 1 / -1; margin: 0; font-size: var(--text-title); line-height: var(--lh-title); font-weight: 800; letter-spacing: var(--tracking-title); }
.side-panel-body { flex: 1; overflow: auto; padding: var(--space-2) var(--space-6) var(--space-6); overscroll-behavior: contain; }
.side-panel-body > .view { animation: view-forward var(--motion-view) var(--ease) both; }
.side-panel-body > .view.backward { animation-name: view-back; }
@keyframes view-forward { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes view-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.side-panel-foot {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-6);
  border-top: var(--rule-hairline) solid var(--color-separator); background: var(--color-bg-raised);
}

/* On a phone the panel takes the whole screen (ticket 238): no margin, no radius. */
@media (max-width: 640px) {
  .side-panel { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; }
  .side-panel-head, .side-panel-body, .side-panel-foot { padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* `popover`: under its control, raised, the lifted shadow; it appears without sliding far. */
.popover {
  position: absolute; z-index: 40; width: min(26rem, calc(100vw - var(--space-8))); padding: var(--space-3);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); box-shadow: var(--shadow-lifted);
  animation: pop 160ms var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* The list bar (ticket 240, ADR 0257; UI v2 §7): the search first in the toolbar, a field with its lens, the widest of
   the bar; under it the toggles and segments, each with its count; the chips; the legend, foldable. */
.list-search {
  position: relative; display: flex; align-items: center; flex: 1 1 18rem; max-width: 28rem; min-width: 0;
}
.list-search-icon {
  position: absolute; left: var(--space-3); width: var(--space-4); height: var(--space-4); pointer-events: none;
  fill: none; stroke: var(--color-text-secondary); stroke-width: 1.5; stroke-linecap: round;
}
#toolbar .list-search input {
  width: 100%; max-width: none; min-height: var(--control-height-primary); padding: 0 var(--space-3) 0 calc(var(--space-8) + var(--space-1));
  border-radius: var(--radius-panel); background: var(--color-bg-raised); box-shadow: var(--shadow-soft);
}
#list-body[aria-busy="true"] #count { color: var(--color-text-secondary); }
.list-facets { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: var(--space-2) 0 var(--space-3); }
.list-facets:empty { display: none; }
/* A segment's choices wrap rather than push the page sideways (UI v2 §10 point 5). */
.list-facets .segmented { max-width: 100%; }
#list-chips:empty { display: none; }
/* Open, one band: the summary is the legend's title; folded, that word alone, quiet. */
details.list-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-4); margin: 0 0 var(--space-2); }
details.list-legend[open] {
  padding: 0 var(--space-4); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised);
}
details.list-legend > summary {
  list-style: none; display: inline-flex; align-items: center; gap: var(--space-1); min-height: calc(var(--target-min) + var(--space-3));
  color: var(--color-text-secondary); font-size: var(--text-small); font-weight: 600; cursor: pointer;
}
details.list-legend[open] > summary { color: var(--color-text-primary); }
details.list-legend > summary:hover { color: var(--color-text-primary); }
details.list-legend > summary::-webkit-details-marker { display: none; }
details.list-legend > summary::before { content: "▸"; content: "▸" / ""; font-size: var(--text-label); }
details.list-legend[open] > summary::before { content: "▾"; content: "▾" / ""; }
details.list-legend .state-legend { flex: 1 1 auto; margin: 0; padding: var(--space-2) 0; border: 0; background: transparent; }
details.list-legend .state-legend-title { display: none; }
/* « Producteur · 5 »: how many values its filter keeps, in the ink beside the column's name. */
.head-count { margin-left: var(--space-1); color: var(--color-text-primary); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* « Origine »: the two letters, the name, the channel's icon in the secondary ink. */
.origin {
  display: inline-grid; grid-template-columns: auto auto; grid-template-areas: "mark icon" "name name";
  justify-content: start; align-items: center; gap: var(--space-1) var(--space-2); min-width: 0;
}
.origin .source-mark { display: contents; }
.origin .monogram { grid-area: mark; width: 24px; height: 24px; }
.origin .channel-icon { grid-area: icon; color: var(--color-text-secondary); }
/* The name whole, never cut inside a word (Corentin, 15/10, of the tags): it wraps between its words only. */
.origin .source-mark-name { grid-area: name; hyphens: none; overflow-wrap: normal; word-break: keep-all; }

/* A column's popover in its head's menu: a field, « Tout cocher / Tout décocher », the names with their counts, the
   keys at its foot (the mock-up's « pick »). */
.head-menu:has(.pick-slot) { width: min(26rem, calc(100vw - var(--space-4))); max-width: none; padding-bottom: 0; }
.pick-slot { padding: var(--space-3) var(--space-3) 0; color: var(--color-text-secondary); }
.pick { color: var(--color-text-primary); }
.pick input.pick-search {
  display: block; width: 100%; max-width: none; min-height: var(--control-height-primary); padding: 0 var(--space-3);
  border-radius: var(--radius-control);
}
.pick-all { display: flex; gap: var(--space-4); margin: var(--space-2) 0 var(--space-1); }
.pick-all button { min-height: var(--target-min); padding: 0 var(--space-1); }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 18rem; overflow-y: auto; overscroll-behavior: contain; }
.pick-list label {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-2) var(--space-3);
  min-height: var(--target-min); padding: var(--space-1) var(--space-1); border-radius: var(--radius-control); cursor: pointer;
}
.pick-list label:hover { background: var(--color-bg-sunken); }
.pick-list .new-badge { grid-column: 3; }
.pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-n { grid-column: 4; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; text-align: right; min-width: 2.5rem; }
.pick-nothing { margin: var(--space-2) 0; color: var(--color-text-secondary); }
.pick-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-3); margin: var(--space-2) calc(-1 * var(--space-3)) 0;
  padding: var(--space-2) var(--space-3); border-top: var(--rule-hairline) solid var(--color-separator);
  color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small);
}
.pick-foot kbd { font-size: var(--text-label); }

/* « Ferment dans les 48 heures » on Enchères (ticket 257; home-v4 SPEC §5, §6.3–6.4): a raised frame above the list and
   the agenda. Its axis runs from now (an ink line, its word at the foot) to the hours' end, the nights on the sunken
   ground, the ticks at its foot; each lot a small card whose left edge stands at its time, wearing its wine's region on
   that edge, a hairline down to its dot on the axis in the amber, the dot pulsing within the last hours and never under
   reduced motion; « +N » above the rows. The plot is at least the axis's width, with a card's width of room after it
   for a card at the hours' end; below that the frame scrolls sideways inside itself. */
.auction-band {
  margin: 0 0 var(--space-4); padding: var(--space-4) var(--space-6) var(--space-2); background: var(--color-bg-raised);
  border-radius: var(--radius-card); box-shadow: var(--shadow-soft), 0 0 0 var(--rule-hairline) var(--color-border);
}
.band-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); }
.band-head h2 { margin: 0; font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 800; }
.band-all { font-size: var(--text-small); font-weight: 600; white-space: nowrap; }
.band-empty { margin: var(--space-2) 0 var(--space-2); color: var(--color-text-secondary); }
.band-scroll {
  position: relative; display: flex; overflow-x: auto; margin: 0 calc(-1 * var(--space-6));
  padding: var(--space-3) calc(var(--band-lot) + var(--space-6)) var(--space-1) var(--space-6);
}
.band-plot {
  position: relative; flex: 1 0 var(--band-axis);
  height: calc(var(--band-foot) + var(--space-2) + var(--levels) * var(--band-step));
}
.band-axis { position: absolute; inset: 0; }
.band-axis::after {
  content: ""; position: absolute; left: 0; right: calc(-1 * var(--space-2)); bottom: var(--band-foot);
  border-top: var(--rule-hairline) solid var(--color-border);
}
.band-night { position: absolute; top: 0; bottom: var(--band-foot); background: var(--color-bg-sunken); border-radius: var(--radius-box); }
.band-night-word { position: absolute; top: var(--space-1); left: var(--space-2); font-size: var(--text-label); color: var(--color-text-secondary); }
.band-now { position: absolute; left: 0; top: 0; bottom: var(--band-foot); border-left: var(--rule-strong) solid var(--color-text-primary); }
.band-now-word {
  position: absolute; top: 100%; left: 0; margin-top: var(--space-1); padding: 0 var(--space-2); border-radius: var(--radius-chip);
  background: var(--color-text-primary); color: var(--color-bg-raised); font-size: var(--text-label); line-height: var(--lh-label);
  font-weight: 700; white-space: nowrap;
}
.band-tick {
  position: absolute; bottom: 0; transform: translateX(-50%); font-size: var(--text-label); line-height: var(--band-foot);
  color: var(--color-text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.band-tick[data-day] { font-weight: 700; color: var(--color-text-strong); }
.band-lots { list-style: none; margin: 0; padding: 0; }
.band-lot {
  position: absolute; bottom: calc(var(--band-foot) + var(--space-2) + var(--row) * var(--band-step));
  width: calc(var(--band-lot) - var(--space-2)); display: flex;
}
.band-lot::before {
  content: ""; position: absolute; z-index: 0; left: 0; top: 100%; height: calc(var(--space-2) + var(--row) * var(--band-step));
  border-left: var(--rule-hairline) solid var(--color-border);
}
.band-lot-link {
  position: relative; z-index: 1; flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px;
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-3);
  border: var(--rule-hairline) solid var(--color-border); border-left: var(--band-edge) solid var(--region);
  border-radius: var(--radius-control); background: var(--color-bg-raised); box-shadow: var(--shadow-soft);
  color: var(--color-text-primary); text-decoration: none;
  transition: transform var(--motion-lift) var(--ease), box-shadow var(--motion-lift) var(--ease);
}
.band-lot-link:hover { transform: translateY(var(--lift)); box-shadow: var(--shadow-lifted); }
.band-lot:hover, .band-lot:focus-within { z-index: 2; }
.band-lot.selected .band-lot-link { box-shadow: 0 0 0 var(--rule-strong) var(--color-text-primary); }
.band-lot-name { display: flex; gap: var(--space-1); font-size: var(--text-small); line-height: var(--lh-small); font-weight: 700; white-space: nowrap; }
.band-lot-wine { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.band-lot-vintage { flex: none; }
.band-lot-meta {
  display: flex; justify-content: space-between; gap: var(--space-2); font-size: var(--text-label); line-height: var(--lh-label);
  color: var(--color-text-secondary);
}
.band-lot-source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band-countdown { flex: none; font-weight: 700; color: var(--color-soon-text); }
.band-closing-dot {
  position: absolute; z-index: 1; left: calc(var(--band-dot) / -2);
  bottom: calc(-1 * (var(--space-2) + var(--row) * var(--band-step)) - var(--band-dot) / 2);
  width: var(--band-dot); height: var(--band-dot); border-radius: 50%; color: var(--color-soon); background: currentColor;
  box-shadow: 0 0 0 var(--rule-strong) var(--color-bg-raised);
}
.band-lot[data-pulse] .band-closing-dot { animation: band-pulse var(--motion-pulse) var(--ease) infinite; }
@keyframes band-pulse {
  0% { box-shadow: 0 0 0 var(--rule-strong) var(--color-bg-raised), 0 0 0 var(--rule-strong) color-mix(in srgb, currentColor 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 var(--rule-strong) var(--color-bg-raised), 0 0 0 var(--space-2) color-mix(in srgb, currentColor 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .band-lot[data-pulse] .band-closing-dot {
    animation: none;
  }
}
.band-more {
  position: absolute; bottom: calc(var(--band-foot) + var(--space-2) + var(--row) * var(--band-step) + var(--space-2));
  width: calc(var(--band-more) - var(--space-1)); padding: 2px 0; text-align: center; border-radius: var(--radius-chip);
  background: var(--color-bg-sunken); border: var(--rule-hairline) solid var(--color-border);
  font-size: var(--text-small); line-height: var(--lh-small); font-weight: 700; color: var(--color-text-primary); text-decoration: none;
}
.band-more:hover { border-color: var(--color-text-primary); }
@media (max-width: 640px) {
  .auction-band { padding-inline: var(--space-4); }
  .band-scroll { margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4) calc(var(--band-lot) + var(--space-4)); }
}

/* « Agenda » on Enchères (ticket 241, ADR 0258): the days, each a heading at title size with its lots counted, then its
   sales, each a card — its source's two letters, its house, its facts, its lots and new ones — holding its lots as compact
   rows. The days to jump to lead it; the closed lots, folded, end it. A card is no link: it does not lift. */
.agenda { display: flex; flex-direction: column; gap: var(--space-8); --col-lot: 56px; --col-bid: 136px; --col-closes: 132px; }
.agenda-head { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.agenda-head .segmented { max-width: 100%; }
.agenda-day { display: flex; flex-direction: column; gap: var(--space-4); }
.agenda-day h2 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-3); margin: 0;
  font-size: var(--text-title); line-height: var(--lh-title); font-weight: 800; letter-spacing: var(--tracking-title);
}
.agenda-date, .agenda-day-n {
  font-size: var(--text-body); line-height: var(--lh-body); font-weight: 600; letter-spacing: normal; color: var(--color-text-secondary);
}
details.agenda-day > summary { list-style: none; cursor: pointer; }
details.agenda-day > summary::-webkit-details-marker { display: none; }
details.agenda-day > summary h2::before { content: "▸"; content: "▸" / ""; font-size: var(--text-heading); color: var(--color-text-secondary); }
details.agenda-day[open] > summary h2::before { content: "▾"; content: "▾" / ""; }
details.agenda-day:not([open]) > summary h2 { color: var(--color-text-secondary); }
details.agenda-day > summary:hover h2 { color: var(--color-text-primary); }
.sale-card {
  padding: var(--space-4) var(--space-6) var(--space-2); border-radius: var(--radius-card); background: var(--color-bg-raised);
  box-shadow: var(--shadow-soft), 0 0 0 var(--rule-hairline) var(--color-border);
}
.sale-card-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "source counts" "title counts" "facts facts";
  align-items: center; gap: var(--space-1) var(--space-4); padding-bottom: var(--space-3);
}
.sale-card-source { grid-area: source; margin: 0; }
.sale-card-source .monogram { width: 24px; height: 24px; }
.sale-card-title {
  grid-area: title; margin: 0; font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 700; letter-spacing: -0.01em;
}
.sale-card-facts { grid-area: facts; margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); }
.sale-card-counts {
  grid-area: counts; display: flex; align-items: center; gap: var(--space-2); margin: 0; align-self: start;
  font-weight: 600; white-space: nowrap;
}
.agenda-lots { width: 100%; border-collapse: collapse; table-layout: fixed; }
.agenda-lots thead th { position: static; background: transparent; }
.agenda-lots thead [data-column="lot"] { width: var(--col-lot); }
.agenda-lots thead [data-column="name"] { width: auto; }
.agenda-lots thead [data-column="price_eur"] { width: var(--col-bid); text-align: right; }
.agenda-lots thead [data-column="landed"] { width: var(--col-landed); text-align: right; }
.agenda-lots thead [data-column="margin"] { width: var(--col-margin); }
.agenda-lots thead [data-column="closes"] { width: var(--col-closes); }
.agenda-lots thead [data-column="decision"] { width: var(--col-decision); }
.agenda-lots tbody tr:last-child > td { border-bottom: 0; }
.agenda-lots td { overflow-wrap: break-word; }
.agenda-lots td[data-cell="lot"] { color: var(--color-text-secondary); font-weight: 600; }
.agenda-kind, .agenda-when {
  display: block; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums;
}
.agenda-left { display: block; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Amber: a close within `closing_soon_hours` (SPEC v2 §3.3), as the deadline's pill in the panel. */
td[data-cell="closes"][data-soon] .agenda-left {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--space-2); border-radius: var(--radius-chip);
  background: var(--color-soon-subtle); color: var(--color-soon-text);
}
/* On a phone a lot is a block of three lines, nothing scrolling sideways (UI v2 §10 point 5): its number and its wine,
   its figures, its close and its decision. */
@media (max-width: 640px) {
  .agenda { gap: var(--space-6); }
  .sale-card { padding: var(--space-3) var(--space-4) var(--space-1); }
  .agenda-lots, .agenda-lots tbody { display: block; }
  .agenda-lots thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .agenda-lots tr {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "name name name" "price landed margin" "closes closes decision";
    gap: var(--space-1) var(--space-3); padding: var(--space-3) 0; border-bottom: var(--rule-hairline) solid var(--color-separator);
  }
  .agenda-lots tbody tr:last-child { border-bottom: 0; }
  .agenda-lots td { padding: 0; border: 0; text-align: left; }
  /* The lot's number at the start of the wine's line, the wine beside it. */
  .agenda-lots td[data-cell="lot"] { grid-area: name; justify-self: start; }
  .agenda-lots td[data-cell="name"] { grid-area: name; padding-left: var(--col-lot); }
  .agenda-lots td[data-cell="price_eur"] { grid-area: price; }
  .agenda-lots td[data-cell="landed"] { grid-area: landed; }
  .agenda-lots td[data-cell="margin"] { grid-area: margin; }
  .agenda-lots td[data-cell="closes"] { grid-area: closes; }
  .agenda-lots td[data-cell="decision"] { grid-area: decision; justify-self: end; }
  .agenda-lots td[data-short]::before {
    content: attr(data-short); display: block; color: var(--color-text-secondary);
    font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600;
  }
}

/* A key named on the filled action (« Suivant avec du nouveau n », ticket 239): white on the ink, its edge the toast's
   second grey. */
.button-primary kbd { background: transparent; color: var(--color-text-on-accent); border-color: var(--color-text-on-accent-secondary); box-shadow: none; }

/* « Par négociant » on Négociants (ticket 242, ADR 0259): a field to find a merchant, then a card per merchant, three or
   four to a row, one on a phone. A card is a link to its catalogue (its name's link stretched over it), so it lifts
   under the pointer as Accueil's do: its two letters and name at heading size, its country, its new lines at display
   size (blue when there are some), its lines, drops and prices not compared, then when its stock was last read and,
   when it needs attention, its state in the warning's ink. */
.merchants { --merchant-card-min: 17rem; display: grid; gap: var(--space-6); margin: 0 0 var(--space-6); }
.merchants-search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-4); }
.merchants-search .list-search input {
  width: 100%; min-height: var(--control-height-primary); padding: 0 var(--space-3) 0 calc(var(--space-8) + var(--space-1));
  border-radius: var(--radius-panel); background: var(--color-bg-raised); box-shadow: var(--shadow-soft);
}
.merchants-none { margin: 0; color: var(--color-text-secondary); }
.merchant-cards {
  list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6);
  grid-template-columns: repeat(auto-fill, minmax(min(var(--merchant-card-min), 100%), 1fr));
}
.merchant-card {
  position: relative; display: grid; align-content: start; gap: var(--space-3); min-width: 0; padding: var(--space-6);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-card); background: var(--color-bg-raised);
  box-shadow: var(--shadow-soft); transition: transform var(--motion-lift) var(--ease), box-shadow var(--motion-lift) var(--ease);
}
.merchant-card:hover, .merchant-card:focus-within { transform: translateY(var(--lift)); box-shadow: var(--shadow-lifted); }
.merchant-card-head { display: grid; gap: var(--space-1); }
.merchant-card-name { margin: 0; font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 700; letter-spacing: -0.01em; }
.merchant-card-link { color: var(--color-text-primary); text-decoration: none; }
.merchant-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.merchant-card-link:focus-visible { outline: none; }
.merchant-card:has(.merchant-card-link:focus-visible) { outline: var(--rule-strong) solid var(--color-focus-ring); outline-offset: 2px; }
.merchant-card-link:hover .source-mark-name { text-decoration: underline; }
.merchant-card-country, .merchant-head-country, .merchant-head-label {
  margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small);
}
.merchant-card-new { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin: 0; }
.merchant-card-n {
  font-size: var(--text-display); line-height: var(--lh-display); font-weight: 800; letter-spacing: var(--tracking-figure);
  font-variant-numeric: tabular-nums lining-nums; color: var(--color-text-secondary);
}
.merchant-card-new-words { color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600; }
/* What is new since the visit, in blue (ADR 0254): the figure and its words, when there are some. */
.merchant-card-new:not([data-new="0"]) .merchant-card-n, .merchant-card-new:not([data-new="0"]) .merchant-card-new-words {
  color: var(--color-new-text);
}
.merchant-card-facts {
  list-style: none; margin: 0; padding: var(--space-3) 0 0; display: grid; gap: var(--space-1);
  border-top: var(--rule-hairline) solid var(--color-separator); font-variant-numeric: tabular-nums;
}
.merchant-card-facts [data-fact="drops"] { font-weight: 600; }
.merchant-card-quiet { color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); }
.merchant-card-read { margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); }
/* A source that needs attention says so in the warning's ink (ADR 0029), its word beside when it was last read. */
.merchant-card-state { color: var(--color-warn-text); font-weight: 700; }
.merchants-others { margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); }
.merchants-others a { color: var(--color-text-primary); }

/* A merchant's catalogue (ticket 242): above its list bar, a card of its facts — the way back, the label, its two letters
   and name at title size, its country; on the right its new lines, lines, drops and last reading; its state in a
   sentence; then its drops, open, and its prices not compared, folded. */
.merchant-head {
  display: grid; gap: var(--space-4); margin: 0 0 var(--space-4); padding: var(--space-4) var(--space-6) var(--space-6);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-card); background: var(--color-bg-raised);
  box-shadow: var(--shadow-soft);
}
.merchant-head-back { margin: 0; font-size: var(--text-small); line-height: var(--lh-small); }
.merchant-back { color: var(--color-accent-text); }
.merchant-head-main { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4) var(--space-8); }
.merchant-head-who { display: grid; gap: var(--space-1); min-width: 0; }
.merchant-head-name { margin: 0; font-size: var(--text-title); line-height: var(--lh-title); font-weight: 800; letter-spacing: var(--tracking-title); }
.merchant-head-name .monogram { width: 36px; height: 36px; font-size: var(--text-small); }
.merchant-head-facts {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-6);
  font-variant-numeric: tabular-nums;
}
.merchant-head-facts .merchant-card-n { font-size: var(--text-title); line-height: var(--lh-title); }
.merchant-head-facts [data-fact="read"] { color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); }
.merchant-head-state { margin: 0; font-size: var(--text-small); line-height: var(--lh-small); }
.merchant-head-state[data-attention] { color: var(--color-warn-text); font-weight: 600; }
.merchant-drops { border-top: var(--rule-hairline) solid var(--color-separator); padding-top: var(--space-3); }
.merchant-drops > summary { cursor: pointer; font-weight: 600; }
.merchant-drops ul { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.merchant-drops li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); }
.merchant-drops li a { color: var(--color-text-primary); font-weight: 600; }
.merchant-drop-prices { white-space: nowrap; }
.merchant-drop-by { white-space: nowrap; font-weight: 600; }
.merchant-drop-since { color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); }
@media (max-width: 640px) {
  .merchant-card { padding: var(--space-4); }
  .merchant-head { padding: var(--space-3) var(--space-4) var(--space-4); }
  .merchant-head-name { font-size: var(--text-heading); line-height: var(--lh-heading); }
  .merchant-drop-prices, .merchant-drop-by { white-space: normal; }
}

/* The « tout est vu » loop (ticket 243, ADR 0260): at the head of a tab's list and of a hunting region, a raised band —
   the panel's radius, the soft shadow, a hairline —: the count of what is new after the blue dot, in the figure's size
   and 700; a thin bar of what has been seen since the page came, the ink over the sunken ground, with « vues x / N » in
   the small size, secondary, tabular; « Voir les nouveautés n », the view's filled action, at its right end. All seen,
   « Tout est vu. » in 700 and the next pass in the secondary ink, on the same band. It wraps at 375 px, never sideways;
   the bar's fill moves at `--motion`, at once under `prefers-reduced-motion`. */
.seen-loop {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6);
  margin: var(--space-2) 0 var(--space-3); padding: var(--space-3) var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel);
  background: var(--color-bg-raised); box-shadow: var(--shadow-soft);
}
.seen-loop-head { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); min-width: 0; }
.seen-loop-head[hidden], .seen-loop-done[hidden] { display: none; }
.seen-loop p { margin: 0; }
.seen-loop-said { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-figure); line-height: var(--lh-figure); font-weight: 700; }
.seen-loop-new::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: var(--radius-chip); background: var(--color-new); }
.seen-loop-progress { display: inline-flex; align-items: center; gap: var(--space-2); flex: 1 1 12rem; max-width: 22rem; }
.seen-loop-count { flex: none; color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seen-loop-bar {
  flex: 1 1 auto; min-width: 4rem; height: 6px; appearance: none; border: 0; border-radius: var(--radius-chip);
  background: var(--color-bg-sunken); overflow: hidden;
}
.seen-loop-bar::-webkit-progress-bar { background: var(--color-bg-sunken); border-radius: var(--radius-chip); }
.seen-loop-bar::-webkit-progress-value { background: var(--color-accent-solid); border-radius: var(--radius-chip); transition: inline-size var(--motion); }
.seen-loop-bar::-moz-progress-bar { background: var(--color-accent-solid); border-radius: var(--radius-chip); }
.seen-loop-next { margin-left: auto; white-space: nowrap; }
.seen-loop-done { flex: 1 1 auto; color: var(--color-text-secondary); }
.seen-loop-done strong { color: var(--color-text-primary); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .seen-loop-bar::-webkit-progress-value { transition: none; }
}

/* The user's star on a hunting list (ticket 250, ADR 0268): a quiet button, the star's line drawing then « Suivre »; followed,
   the star filled in the ink and « Suivie » in the ink. Never gold: gold is a level's and the logo's. */
.follow-star {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-height); padding: 0 var(--space-3);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-chip); background: var(--color-bg-raised);
  color: var(--color-text-secondary); font: inherit; font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600;
  white-space: nowrap; cursor: pointer; transition: color var(--motion) var(--ease), background var(--motion) var(--ease);
}
.follow-star:hover { background: var(--color-bg-sunken); color: var(--color-text-primary); }
.follow-star[data-followed="1"] { color: var(--color-text-primary); }
.follow-star-icon {
  flex: none; width: var(--space-4); height: var(--space-4);
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.follow-star[data-followed="1"] .follow-star-icon { fill: currentColor; }

/* Who sees a hunting list (ticket 249, ADR 0267): a pill, its line drawing then its word, no colour — it is no state. */
.visibility-pill {
  display: inline-flex; align-items: center; gap: var(--space-1); padding: 0 var(--space-2);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-chip); background: var(--color-bg-raised);
  color: var(--color-text-secondary); font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600; white-space: nowrap;
}
.visibility-icon {
  flex: none; width: var(--space-4); height: var(--space-4);
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.visibility-choice-name { display: inline-flex; align-items: center; gap: var(--space-2); }
.hunt-lists-show { margin: var(--space-2) 0 var(--space-6); max-width: 100%; }
.hunt-visibility-row { flex-basis: 100%; }
.hunt-visibility-row details.confirm { display: inline-block; margin: 0; }

/* « Vos domaines » (ticket 254, ADR 0269, home-v4 SPEC §3.3): a head, the edit band (a `<details>` whose summary sits at
   the head's right), then the cards in a row that scrolls sideways inside itself. A card wears its region's colour as
   its mark and a faint tint of its ground — an identity, never a state; the region is written beside it. */
.home-domains { position: relative; margin: 0 0 var(--space-8); }
.domains-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-2) var(--space-4);
  padding-right: calc(var(--space-12) * 4);
}
/* At the heading size since Accueil v4 (ticket 256), as the page's other sections under the hero. */
.domains-head h2 { margin: 0; font-size: var(--text-heading); line-height: var(--lh-heading); letter-spacing: -0.01em; font-weight: 800; }
.domains-lede { margin: var(--space-1) 0 0; color: var(--color-text-secondary); font-size: var(--text-small); }
.domains-prices { font-weight: 600; white-space: nowrap; }
.domains-edit > summary { position: absolute; top: 0; right: 0; list-style: none; }
.domains-edit > summary::-webkit-details-marker { display: none; }
.domains-edit .when-open, .domains-edit[open] .when-closed { display: none; }
.domains-edit[open] .when-open { display: inline; }
.domains-band {
  display: grid; gap: var(--space-3); margin: var(--space-4) 0 0; padding: var(--space-4);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-card);
  background: var(--color-bg-raised); box-shadow: var(--shadow-soft);
}
.domains-find { display: grid; gap: var(--space-1); }
.domains-find label { font-weight: 600; font-size: var(--text-small); }
.domains-find-row { display: flex; gap: var(--space-2); }
.domains-find input[type="search"] {
  flex: 1 1 auto; min-width: 0; min-height: var(--control-height); padding: 0 var(--space-3);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control); background: var(--color-bg-raised);
}
.domain-offers { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.domain-offers form { margin: 0; }
.domain-offer { border-radius: var(--radius-chip); background: var(--color-bg-sunken); font-weight: 600; max-width: 100%; }
.domain-offer-where { margin-left: var(--space-1); color: var(--color-text-secondary); font-weight: 400; font-size: var(--text-small); }
.domains-suggested { display: grid; gap: var(--space-1); }
.domains-suggested p, .domain-none, .domains-full { margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); }
.domains-full { color: var(--color-warn-text); font-weight: 600; }
.domains-chosen { margin: var(--space-3) 0 0; font-size: var(--text-small); }
.domains {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--domain-card); gap: var(--space-3);
  margin: var(--space-4) 0 0; padding: var(--space-2) var(--space-2) var(--space-3); list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
}
/* The card's rows, shared with its link by a subgrid (ticket 255): the name, the region, the market index and the foot —
   the whole card one link to « Prix du marché » on the producer (ticket 258). */
.domain {
  position: relative; scroll-snap-align: start; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto;
  transition: transform var(--motion-lift) var(--ease);
}
.domain-link {
  grid-row: 1 / -1; grid-column: 1;
  display: grid; grid-template-columns: var(--domain-mark) minmax(0, 1fr); grid-template-rows: subgrid; gap: var(--space-1) var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3);
  border: var(--rule-hairline) solid color-mix(in srgb, var(--region) 22%, var(--color-border)); border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--region) var(--domain-tint), var(--color-bg-raised)); box-shadow: var(--shadow-soft);
  color: var(--color-text-primary); text-decoration: none;
  transition: transform var(--motion-lift) var(--ease), box-shadow var(--motion-lift) var(--ease), border-color var(--motion);
}
.domain:hover { transform: translateY(calc(-1 * var(--lift))); }
.domain:hover .domain-link { box-shadow: var(--shadow-lifted); }
.domain-link[aria-current="true"] { border-color: var(--color-text-primary); box-shadow: 0 0 0 var(--rule-strong) var(--color-text-primary); }
.domain-mark {
  grid-row: 1 / 3; display: grid; place-items: center; width: var(--domain-mark); height: var(--domain-mark);
  border-radius: var(--radius-panel); background: var(--region); color: var(--color-text-on-accent);
  font-weight: 800; font-size: var(--text-small); letter-spacing: 0.02em;
}
.domain-name {
  font-weight: 700; line-height: var(--lh-heading); overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.domain[data-new]:not([data-new="0"]) .domain-name { padding-right: var(--space-6); }
.domain-region { grid-column: 2; color: var(--color-text-secondary); font-size: var(--text-label); line-height: var(--lh-label); }
.domain-new {
  position: absolute; top: var(--space-3); right: var(--space-3); min-width: var(--badge); padding: 0 var(--space-2);
  border-radius: var(--radius-chip); background: var(--color-new); color: var(--color-text-on-accent);
  font-size: var(--text-label); line-height: var(--badge); font-weight: 700; text-align: center;
}
.domain-foot {
  grid-column: 1 / -1; grid-row: 4; margin-top: var(--space-2); padding-top: var(--space-2);
  border-top: var(--rule-hairline) solid color-mix(in srgb, var(--region) 14%, var(--color-separator));
  color: var(--color-text-strong); font-size: var(--text-label); line-height: var(--lh-label);
}
.domain-foot .margin-up { color: var(--color-up-text); }
.domain-foot .margin-down { color: var(--color-down-text); }
.domain[data-foot="unwatched"] .domain-foot { color: var(--color-text-secondary); }
/* While editing: each card's arrows and « × », visible, never on hover only; a click on a card does not open it. */
.domain-tools { display: none; position: absolute; top: calc(-1 * var(--space-2)); right: calc(-1 * var(--space-1)); gap: var(--space-1); }
.home-domains:has(.domains-edit[open]) .domain-tools { display: flex; }
.home-domains:has(.domains-edit[open]) .domain-new { display: none; }
.domain-tools form { margin: 0; }
.domain-tool {
  min-height: var(--target-min); min-width: var(--target-min); padding: 0;
  border-radius: var(--radius-chip); background: var(--color-bg-raised); box-shadow: var(--shadow-soft);
  color: var(--color-text-secondary); font-size: var(--text-small);
}
.domain-tool:disabled { opacity: var(--opacity-busy); cursor: default; }
.domain-x:hover { color: var(--color-down-text); border-color: var(--color-down-text); }
@media (max-width: 640px) {
  .domains-head { padding-right: 0; }
  .domains-edit > summary { position: static; margin-top: var(--space-3); }
  .domains-find-row { flex-wrap: wrap; }
}

/* A domain's market index (ticket 255, ADR 0273): the small chart at the left in its sign's colour, grey when flat; the
   change at the right, signed, in 800 and tabular figures, its bottles under it. Above the card's link, which it sits
   in; « peu de cotes » and « indice en lecture » in the secondary ink. */
.domain-index {
  grid-row: 3; grid-column: 1 / -1; align-self: end;
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-2);
  margin-top: var(--space-2); color: var(--color-text-secondary);
}
.domain-index[data-state="reading"] { align-items: center; }
.domain-spark { flex: 0 1 5.5rem; min-width: 0; }
.domain-index .spark-line { stroke: var(--color-text-secondary); }
.domain-index[data-trend="up"] .spark-line { stroke: var(--color-up-text); }
.domain-index[data-trend="down"] .spark-line { stroke: var(--color-down-text); }
.domain-figure { margin-left: auto; text-align: right; line-height: var(--lh-label); }
.domain-figure b { display: block; font-weight: 700; font-size: var(--text-small); }
.domain-figure small { display: block; font-size: var(--text-label); white-space: nowrap; }
/* The words of a state with no figure (« indice en lecture », « peu de cotes ») wrap inside the card (ticket 256: they ran
   past its edge while the market was read). */
.domain-index:not([data-state="index"]) .domain-figure small { white-space: normal; }
.domain-figure .domain-change { font-weight: 800; font-size: var(--text-reading); color: var(--color-text-secondary); }
.domain-index[data-trend="up"] .domain-change { color: var(--color-up-text); }
.domain-index[data-trend="down"] .domain-change { color: var(--color-down-text); }
.domain-link:hover .domain-index[data-state="index"] .domain-figure b { text-decoration: underline; }

/* The best margin's basis, written under it (review of 254: a weaker basis says so wherever a margin is shown). */
.domain-basis { display: block; color: var(--color-text-secondary); font-size: var(--text-label); }

/* The glass filling while something loads (ticket 260; DESIGN.md's motion, « the pour »): the bottle's and the glass's
   lines in the secondary ink, the stream and the wine in the bordeaux; the stream runs and the wine rises over
   `--motion-pour`, then starts again. Under `prefers-reduced-motion` the glass stands half full and the stream still. */
.pour { display: inline-block; flex: none; width: var(--pour-inline); height: var(--pour-inline); vertical-align: middle; overflow: visible; }
.pour-glass-line { fill: none; stroke: var(--color-text-secondary); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.pour-label { fill: var(--color-text-secondary); opacity: 0.25; }
.pour-stream {
  fill: none; stroke: var(--color-tab-auctions); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 3 2.5; animation: pour-stream calc(var(--motion-pour) / 4) linear infinite;
}
.pour-wine { fill: var(--color-tab-auctions); opacity: 0.85; animation: pour-fill var(--motion-pour) var(--ease) infinite; }
@keyframes pour-stream { to { stroke-dashoffset: -11; } }
@keyframes pour-fill {
  0% { transform: translateY(13px); }
  80% { transform: translateY(2px); }
  100% { transform: translateY(2px); opacity: 0; }
}
.domain-pour { width: var(--pour-card); height: var(--pour-card); }
.page-pour { display: block; width: var(--pour-page); height: var(--pour-page); margin: 0 auto var(--space-3); }
@media (prefers-reduced-motion: reduce) {
  .pour-stream { animation: none; }
  .pour-wine { animation: none; transform: translateY(7px); }
}
.panel-wait, .hunt-load-wait { display: flex; align-items: center; gap: var(--space-3); color: var(--color-text-secondary); }
.panel-wait .pour, .hunt-load-wait .pour { width: var(--pour-card); height: var(--pour-card); }
.hunt-load-wait { margin: var(--space-3) 0 0; }

/* « Mur des domaines » (ticket 268, Prix du marché v2 §4; DESIGN.md « Components », `price_wall`, `domain_face`,
   `gap_strip`). Three counters, each a toggle filtering the wall: its count at display size, a thin bar of its share; on,
   an ink ring. The faces' control, the search and the count. Then the cards, `domains`' look (ticket 254): the region's
   mark and its 6 % tint; two faces in one place, the gap's in front, the change's behind, the control turning every card
   (rotateY over `--motion-turn`); the script slides them to their new places over the same time. The gap is in the ink,
   always; only the change wears its sign's colour. */
.price-wall { margin-top: var(--space-6); }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wall-counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.wall-counter {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-3); align-items: end; height: 100%;
  padding: var(--space-3) var(--space-4); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-card);
  background: var(--color-bg-raised); box-shadow: var(--shadow-soft); color: var(--color-text-primary); text-decoration: none;
  transition: transform var(--motion-lift) var(--ease), box-shadow var(--motion-lift) var(--ease), border-color var(--motion);
}
a.wall-counter:hover { transform: translateY(var(--lift)); box-shadow: var(--shadow-lifted); }
.wall-counter[aria-pressed="true"] { border-color: var(--color-text-primary); box-shadow: 0 0 0 var(--rule-strong) var(--color-text-primary); }
.wall-counter[aria-disabled="true"] { box-shadow: none; background: transparent; border-style: dashed; color: var(--color-text-secondary); }
.counter-title { font-weight: 700; }
.counter-sub { grid-column: 1; font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary); }
.counter-n {
  grid-row: 1 / 3; grid-column: 2; font-size: var(--text-display); line-height: 1; font-weight: 800;
  letter-spacing: var(--tracking-figure); font-variant-numeric: tabular-nums;
}
.counter-bar { grid-column: 1 / -1; margin-top: var(--space-2); display: block; }
.counter-bar .bar-track { fill: var(--color-chart-track); }
.counter-bar .bar-fill { fill: var(--color-chart-strong); }
.wall-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-bottom: var(--space-4); }
.wall-search { margin: 0; }
.wall-search input {
  width: var(--wall-search); max-width: 100%; min-height: var(--control-height-primary); padding: 0 var(--space-3);
  border: var(--rule-hairline) solid var(--color-border-control); border-radius: var(--radius-control);
  background: var(--color-bg-raised); color: var(--color-text-primary); font: inherit;
}
.wall-count { margin: 0 0 0 auto; color: var(--color-text-secondary); font-size: var(--text-small); font-variant-numeric: tabular-nums; }
.wall-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--wall-card)), 1fr)); gap: var(--space-3);
  margin: 0; padding: 0; list-style: none;
}
.wall-domain { position: relative; min-width: 0; perspective: 1200px; }
.wall-card {
  display: flex; height: 100%; color: var(--color-text-primary); text-decoration: none; border-radius: var(--radius-card);
  transition: transform var(--motion-lift) var(--ease);
}
.wall-card:hover { transform: translateY(var(--lift)); }
.wall-flipper {
  display: grid; flex: 1; min-width: 0; transform-style: preserve-3d;
  transition: transform var(--motion-turn) var(--ease);
}
.price-wall[data-face="change"] .wall-flipper { transform: rotateY(180deg); }
.domain-face {
  grid-area: 1 / 1; position: relative; min-width: 0;
  display: grid; grid-template-columns: var(--domain-mark) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto;
  gap: var(--space-1) var(--space-3); align-content: start; padding: var(--space-3);
  border: var(--rule-hairline) solid color-mix(in srgb, var(--region) 22%, var(--color-border)); border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--region) var(--domain-tint), var(--color-bg-raised)); box-shadow: var(--shadow-soft);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: box-shadow var(--motion-lift) var(--ease);
}
.domain-face[data-face="change"] { transform: rotateY(180deg); }
.wall-card:hover .domain-face { box-shadow: var(--shadow-lifted); }
.domain-face .domain-new { top: var(--space-3); right: var(--space-3); }
.domain-face:has(.domain-new) .domain-name { padding-right: var(--space-6); }
.face-figure {
  grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2);
  margin: var(--space-2) 0 0;
}
.face-figure b {
  font-size: var(--text-title); line-height: 1; font-weight: 800; letter-spacing: var(--tracking-figure);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.face-figure[data-state] b { font-size: var(--text-figure); font-weight: 700; color: var(--color-text-secondary); letter-spacing: 0; }
.face-words { font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary); text-align: right; max-width: 62%; }
.face-figure[data-trend="up"] b { color: var(--color-up-text); }
.face-figure[data-trend="down"] b { color: var(--color-down-text); }
.face-figure[data-trend="flat"] b { color: var(--color-text-secondary); }
.gap-strip, .wall-spark { grid-column: 1 / -1; display: block; overflow: visible; }
.gap-strip .strip-track { fill: var(--color-chart-track); }
.gap-strip .strip-market { stroke: var(--color-text-primary); stroke-width: 1.5px; }
.gap-strip .strip-dot { fill: var(--color-chart-strong); fill-opacity: 0.55; stroke: var(--color-bg-raised); stroke-width: 1px; }
.gap-strip .strip-median, .gap-strip .strip-beyond { fill: var(--color-text-primary); }
.gap-strip text { font-size: var(--text-label); fill: var(--color-text-secondary); }
.wall-spark { align-self: end; }
.wall-spark .spark-base { stroke: var(--color-chart-axis); stroke-width: 1px; stroke-dasharray: 3 3; }
.wall-spark .spark-line { stroke: var(--color-text-secondary); stroke-width: 2px; }
.domain-face:has([data-trend="up"]) .wall-spark .spark-line { stroke: var(--color-up-text); }
.domain-face:has([data-trend="down"]) .wall-spark .spark-line { stroke: var(--color-down-text); }
.face-foot {
  grid-column: 1 / -1; grid-row: 5; display: flex; justify-content: space-between; gap: var(--space-2);
  margin: var(--space-2) 0 0; padding-top: var(--space-2);
  border-top: var(--rule-hairline) solid color-mix(in srgb, var(--region) 14%, var(--color-separator));
  color: var(--color-text-strong); font-size: var(--text-label); line-height: var(--lh-label);
}
.face-sep { color: var(--color-text-secondary); }
.wall-more { margin-top: var(--space-4); }
/* « Ont bougé depuis votre visite » (ticket 271): its count and its bar in the new's blue. */
.wall-counter[data-new-count] .counter-n { color: var(--color-new-text); }
.wall-counter[data-new-count] .bar-fill { fill: var(--color-new); }

/* « Depuis votre visite » (ticket 271, Prix du marché v2 §5): the all-seen loop's band (ADR 0260) under the counters, its
   moves in a row that scrolls inside itself — never a drift —, each card raised with the panel's radius and a 5 px top
   edge in its domain's region colour (an identity), the source and how long ago, « Non vu » a blue pill until its line
   is seen, then quiet; the domain at the figure size, the wine small; a hairline, the new price a bottle and its gap to
   the market in the ink (a price marks nothing), the price it had before. Hovered it rises; opened, an ink ring. */
.moves-band { margin: 0 0 var(--space-4); }
.moves-viewport {
  flex: 1 0 100%; min-width: 0; overflow-x: auto; scroll-snap-type: x proximity;
  margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4);
}
.moves-track { display: flex; gap: var(--feed-gap); width: max-content; margin: 0; padding: var(--space-1) 0 var(--space-3); list-style: none; }
.move-card { flex: none; width: var(--feed-card); scroll-snap-align: start; display: flex; }
.move-card-link {
  flex: 1; display: flex; flex-direction: column; gap: var(--space-1); overflow: hidden;
  padding: var(--space-3) var(--space-4) var(--space-3); border-radius: var(--radius-panel); background: var(--color-bg-raised);
  border: var(--rule-hairline) solid var(--color-border); border-top: var(--feed-edge) solid var(--region);
  color: var(--color-text-primary); text-decoration: none;
  transition: transform var(--motion-lift) var(--ease), box-shadow var(--motion-lift) var(--ease);
}
.move-card-link:hover { transform: translateY(var(--lift)); box-shadow: var(--shadow-lifted); }
.move-card.selected .move-card-link { box-shadow: 0 0 0 var(--rule-strong) var(--color-text-primary); }
.move-card-top { display: flex; align-items: center; gap: var(--space-2); min-width: 0; font-size: var(--text-label); color: var(--color-text-secondary); }
.move-card-source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move-card-badge { margin-left: auto; flex: none; padding: 0 var(--space-2); border-radius: var(--radius-chip); font-weight: 700; white-space: nowrap; }
.move-card-badge[data-mark="new"] { background: var(--color-new-subtle); color: var(--color-new-text); }
.move-card-badge[data-mark="new"][data-seen] { background: none; color: var(--color-text-secondary); font-weight: 400; }
.move-card-domain { margin-top: var(--space-1); font-weight: 800; line-height: var(--lh-small); }
.move-card-wine {
  font-size: var(--text-small); line-height: var(--lh-small); color: var(--color-text-secondary);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.move-card-money {
  margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2);
  padding-top: var(--space-2); border-top: var(--rule-hairline) solid var(--color-separator);
}
.move-card-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.move-card-gap { font-size: var(--text-figure); line-height: var(--lh-figure); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.move-card-note { font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary); }
.moves-none { margin: 0; color: var(--color-text-secondary); }
.moves-more { flex: 1 0 100%; margin: 0; }
@media (max-width: 720px) {
  .wall-counters { grid-template-columns: minmax(0, 1fr); }
  .move-card { width: var(--feed-card-phone); }
  .wall-count { margin-left: 0; }
  .wall-search, .wall-search input { width: 100%; }
}
/* Reduced motion (ADR 0274's way: a rule of its own beside the global one): the cards neither turn nor slide; the face
   changes at once and the order is drawn in place. */
@media (prefers-reduced-motion: reduce) {
  .wall-flipper, .wall-card, .wall-counter, .domain-face, .move-card-link {
    transition: none;
  }
}

/* A domain of the wall (ticket 268, Prix du marché v2 §4.4), in the side panel or as its page: its head, three figures on
   the sunken ground (the gap in the ink, the change in its sign's colour), its index, its bottles as rows — the wine, the
   gauge (the market's band and median, your price a diamond in the ink), the median and your gap, the change. */
.domain-page-back { margin: 0 0 var(--space-3); font-size: var(--text-small); font-weight: 600; }
.domain-page-back a { color: var(--color-text-secondary); text-decoration: none; }
.domain-view-head { display: grid; grid-template-columns: var(--domain-mark) minmax(0, 1fr); gap: 0 var(--space-3); align-items: center; margin-bottom: var(--space-4); }
.domain-view-head .domain-mark { grid-row: 1 / 3; }
.domain-view-head:not(:has(.domain-view-name)) .domain-mark { grid-row: auto; }
.domain-view-name { margin: 0; font-size: var(--text-title); line-height: var(--lh-title); letter-spacing: var(--tracking-title); font-weight: 800; }
.domain-view-where { grid-column: 2; margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); }
.domain-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: 0 0 var(--space-6); }
.domain-figures > div { padding: var(--space-3); border-radius: var(--radius-panel); background: var(--color-bg-sunken); }
.domain-figures dt { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-secondary); }
.domain-figures dd { margin: var(--space-1) 0 0; }
.domain-figures dd b { display: block; font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 700; font-variant-numeric: tabular-nums; }
.domain-figures dd small { display: block; font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-strong); }
.domain-figures dd[data-trend="up"] b { color: var(--color-up-text); }
.domain-figures dd[data-trend="down"] b { color: var(--color-down-text); }
.domain-figures dd[data-trend="flat"] b { color: var(--color-text-secondary); }
.domain-section { margin-bottom: var(--space-6); }
.domain-section-title {
  display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin: 0 0 var(--space-2);
  font-size: var(--text-body); font-weight: 700;
}
.domain-section-title span { font-weight: 400; font-size: var(--text-small); color: var(--color-text-secondary); }
.domain-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0 0 var(--space-2); padding: 0; list-style: none; font-size: var(--text-label); color: var(--color-text-secondary); }
.domain-legend li { display: inline-flex; align-items: center; gap: var(--space-1); }
.domain-bottles { margin: 0; padding: 0; list-style: none; border-top: var(--rule-hairline) solid var(--color-separator); }
.domain-bottle {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(5rem, 1fr) auto auto; gap: var(--space-3); align-items: center;
  padding: var(--space-3) var(--space-2); border-bottom: var(--rule-hairline) solid var(--color-separator);
  color: var(--color-text-primary); text-decoration: none;
}
.domain-bottle:hover { background: var(--color-bg-sunken); }
.domain-bottle:hover .bottle-wine b { text-decoration: underline; }
.domain-bottle small { display: block; font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary); }
.bottle-wine b { font-weight: 600; }
/* A bottle whose price moved since the visit and is not seen yet (ticket 276): the domain card's pill's blue, a dot before
   its wine, its words for a screen reader alone. */
.bottle-new {
  position: relative; display: inline-block; width: 8px; height: 8px; margin-right: var(--space-2); border-radius: 50%;
  background: var(--color-new); vertical-align: 0.0625rem;
}
.bottle-price, .bottle-change { text-align: right; white-space: nowrap; }
.bottle-price b, .bottle-change b { font-weight: 700; font-variant-numeric: tabular-nums; }
/* A bottle's change in its sign's colour, as the wall's « Évolution » face; its gap in the ink (ticket 286, point 2). */
.bottle-change[data-trend="up"] b { color: var(--color-up-text); }
.bottle-change[data-trend="down"] b { color: var(--color-down-text); }
.bottle-change[data-trend="flat"] b { color: var(--color-text-secondary); }
.domain-gauge { display: block; overflow: visible; }
.domain-gauge .gauge-axis { stroke: var(--color-border); stroke-width: 2px; stroke-linecap: round; }
.gauge-band { fill: var(--color-on-sale-2); }
.gauge-median { stroke: var(--color-chart-strong); stroke-width: 2px; }
.gauge-yours { fill: var(--color-text-primary); stroke: var(--color-bg-raised); stroke-width: 1.5px; }
.domain-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.domain-actions form { margin: 0; }
.domain-followed { margin: 0; color: var(--color-text-secondary); font-size: var(--text-small); }
.domain-view > .domain-actions { margin-top: var(--space-4); }
#prices-panel .side-panel-foot .domain-actions { width: 100%; }
#prices-panel[aria-busy="true"] .side-panel-body { opacity: 0.6; transition: opacity var(--motion); }
/* A bottle opened from its domain (ticket 269): « ← <domaine> » above the title; none, the title beside « Fermer ». */
#prices-panel .side-panel-back[hidden] { display: none; }
#prices-panel .side-panel-title { grid-row: 1; grid-column: 1; }
#prices-panel .side-panel-back:not([hidden]) ~ .side-panel-title { grid-row: 2; grid-column: 1 / -1; }
@media (max-width: 640px) {
  .domain-figures { grid-template-columns: minmax(0, 1fr); }
  .domain-bottle { grid-template-columns: minmax(0, 1fr) auto auto; }
  .domain-gauge { grid-column: 1 / -1; grid-row: 2; }
}

/* A bottle against its offers (ticket 269, Prix du marché v2 §6), in the side panel or as its page: four figures on the
   sunken ground (every gap in the ink, the change alone in its sign's colour); the ladder — one axis of landed cost a
   bottle, your price a diamond in the ink named above it, each open line a mark in its source's hue and its kind's
   shape, hollow in bond, ringed in the ink when chosen —; the offers by landed cost, a divider where your price falls,
   each row opening in place; then the price in time. */
.bottle-figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ladder { position: relative; padding-top: calc(var(--text-label) * 1.6); }
.ladder-yours-said {
  position: absolute; top: 0; margin: 0; transform: translateX(-50%); white-space: nowrap;
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 800; color: var(--color-text-primary);
}
.ladder-yours-said[data-end="start"] { transform: translateX(-12px); }
.ladder-yours-said[data-end="end"] { transform: translateX(calc(-100% + 12px)); }
.ladder-axis { display: block; overflow: visible; }
.ladder-track { stroke: var(--color-border); stroke-width: 2px; stroke-linecap: round; }
.ladder-median { stroke: var(--color-chart-strong); stroke-width: 2px; }
.ladder-yours-line { stroke: var(--color-text-primary); stroke-width: 1.2px; stroke-dasharray: 3 3; }
.ladder-yours { fill: var(--color-text-primary); stroke: var(--color-bg-raised); stroke-width: 1.5px; }
.ladder-mark { cursor: pointer; }
/* A price to verify beyond the scale, at the nearer edge: an arrow in the ink pointing out (ticket 286, point 3). */
.ladder-beyond { fill: var(--color-text-primary); }
.ladder-mark:focus { outline: none; }
.ladder-ring { fill: none; stroke: none; stroke-width: 2px; }
.ladder-mark:hover .ladder-ring { stroke: var(--color-border-control); }
.ladder-mark.is-chosen .ladder-ring { stroke: var(--color-text-primary); }
.ladder-mark:focus-visible .ladder-ring { stroke: var(--color-focus-ring); stroke-width: 3px; }
.ladder-ends {
  display: flex; justify-content: space-between; gap: var(--space-3); margin: var(--space-1) 0 0;
  font-size: var(--text-label); line-height: var(--lh-label); font-weight: 600; color: var(--color-text-strong);
}
.ladder-legend {
  display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: var(--space-2) 0 0; padding: 0; list-style: none;
  font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary);
}
.ladder-legend li { display: inline-flex; align-items: center; gap: var(--space-1); }
.offer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-3); }
.offer-rows { margin: 0; padding: 0; list-style: none; border-top: var(--rule-hairline) solid var(--color-separator); }
.offer-row { border-bottom: var(--rule-hairline) solid var(--color-separator); scroll-margin: var(--space-6); }
.offer-row[data-chosen] { box-shadow: inset 3px 0 0 var(--color-text-primary); }
.offer-row-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "source cost gap" "what cost gap";
  gap: 0 var(--space-3); align-items: center; width: 100%; min-height: auto; padding: var(--space-3) var(--space-2);
  border: 0; border-radius: 0; background: none; color: var(--color-text-primary); text-align: left; font: inherit; cursor: pointer;
}
.offer-row-head:hover, .offer-row[data-chosen] .offer-row-head { background: var(--color-bg-sunken); }
.offer-row-head .source-mark { grid-area: source; }
.offer-row-head .monogram { width: 24px; height: 24px; }
.offer-row-what { grid-area: what; padding-left: calc(24px + var(--space-2)); font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary); }
.offer-row-cost { grid-area: cost; text-align: right; white-space: nowrap; }
.offer-row-cost b { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.offer-row-cost small { display: block; max-width: 16rem; margin-left: auto; white-space: normal; font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary); }
.offer-row-gap {
  grid-area: gap; padding: 2px var(--space-2); border-radius: var(--radius-chip); background: var(--color-bg-sunken);
  border: var(--rule-hairline) solid var(--color-border); font-size: var(--text-label); line-height: var(--lh-label);
  font-weight: 600; color: var(--color-text-strong); white-space: nowrap;
}
.offer-row-detail { padding: 0 var(--space-2) var(--space-3) calc(var(--space-2) + 24px + var(--space-2)); font-size: var(--text-small); line-height: var(--lh-small); }
.offer-row-detail p { margin: 0 0 var(--space-2); }
.offer-row-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.offer-divider {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0;
  font-size: var(--text-small); font-weight: 700; color: var(--color-text-primary); white-space: nowrap;
}
.offer-divider[hidden] { display: none; }
.offer-divider::before, .offer-divider::after { content: ""; flex: 1; border-top: 1.2px dashed var(--color-text-primary); }
.offer-unvalued-title { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-small); font-weight: 700; color: var(--color-text-secondary); }
.offer-rows-none { margin-top: var(--space-2); }
.bottle-every { font-size: var(--text-small); font-weight: 600; }
@media (max-width: 640px) {
  .bottle-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offer-row-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "source cost" "what cost" "what gap"; }
  .offer-row-gap { justify-self: end; margin-top: var(--space-1); }
  .offer-row-cost small { max-width: 9rem; }
  .offer-row-what { padding-left: 0; }
  .offer-row-detail { padding-left: var(--space-2); }
}

/* « Carte du marché » (ticket 272, ADR « The market map: one bubble, burst on demand »): the controls in a row, each a
   `segmented` after its name; the stage, a canvas on the raised ground (the card's radius, the soft shadow, a hairline),
   560 px high, 460 on a phone; the fiche at its right, 20rem, below it from 1,100 px down; under them, two lists of five
   bottles. The points' motion is the script's: under reduced motion it draws them at rest, never in flight. */
.market-map { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); }
.map-control { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.map-control-name { font-size: var(--text-label); line-height: var(--lh-label); font-weight: 700; color: var(--color-text-secondary); }
.map-control .segmented { max-width: 100%; }
.map-read .segment[aria-disabled="true"] { color: var(--color-text-secondary); cursor: not-allowed; }
.map-read .segment[aria-disabled="true"]:hover { background: none; }
.map-body { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--space-4); align-items: start; }
.map-main { display: grid; gap: var(--space-2); min-width: 0; }
.map-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.map-crumbs ol { margin: 0; }
.map-count { margin: 0; font-size: var(--text-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.map-regions { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; }
.map-region {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-height); padding: 0 var(--space-3);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-chip); background: var(--color-bg-raised);
  color: var(--color-text-primary); font-size: var(--text-small); font-weight: 600; text-decoration: none;
  transition: background-color var(--motion), color var(--motion), opacity var(--motion);
}
.map-region[aria-pressed="false"] { color: var(--color-text-secondary); background: var(--color-bg-sunken); }
.map-region[aria-pressed="false"] .map-region-dot { opacity: 0.35; }
a.map-region:hover { border-color: var(--color-border-control); }
.map-region-dot { display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-chip); background: var(--region); }
.map-note { margin: 0; font-size: var(--text-small); color: var(--color-text-strong); }
.map-note[hidden] { display: none; }
.map-stage {
  position: relative; height: 560px; overflow: hidden; border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-card); background: var(--color-bg-raised); box-shadow: var(--shadow-soft);
}
.map-stage canvas { display: block; width: 100%; height: 100%; }
.map-tip {
  position: absolute; z-index: 2; display: grid; gap: 2px; max-width: 18rem; padding: var(--space-2) var(--space-3);
  border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-bg-raised);
  box-shadow: var(--shadow-lifted); font-size: var(--text-small); line-height: var(--lh-small); pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.map-tip[hidden] { display: none; }
.map-tip small { color: var(--color-text-secondary); }
/* The map's replay (ticket 273): a round ▶ in the ink, the slider in the ink, the week beside it in 700. */
.map-replay { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.map-replay[hidden] { display: none; }
.map-play {
  flex: none; display: grid; place-items: center; width: var(--control-height-primary); height: var(--control-height-primary);
  padding: 0; border: 0; border-radius: var(--radius-chip); background: var(--color-accent-solid); color: var(--color-text-on-accent); cursor: pointer;
}
.map-play svg { width: var(--space-4); height: var(--space-4); fill: currentColor; }
.map-play .map-pause-icon, .map-play.is-playing .map-play-icon { display: none; }
.map-play.is-playing .map-pause-icon { display: inline; }
.map-play:focus-visible { border-radius: var(--radius-chip); }
input.map-week { flex: 1; min-width: 9rem; min-height: var(--control-height); padding: 0; border: 0; background: none; accent-color: var(--color-accent-solid); }
.map-when { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 10rem; }
.map-legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; padding: 0; font-size: var(--text-label); color: var(--color-text-secondary); }
.map-legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.map-legend-regions, .map-legend-sizes { display: inline-flex; align-items: center; gap: 2px; }
.map-size { display: inline-block; border-radius: var(--radius-chip); background: var(--color-text-secondary); }
.map-size.small { width: 5px; height: 5px; }
.map-size.large { width: 12px; height: 12px; }
.map-fiche {
  position: sticky; top: var(--space-4); padding: var(--space-4); border: var(--rule-hairline) solid var(--color-border);
  border-radius: var(--radius-card); background: var(--color-bg-raised); box-shadow: var(--shadow-soft); min-width: 0;
}
.map-fiche .domain-section-title { margin-top: 0; }
.map-fiche .domain-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--space-4); }
.map-fiche-sub { display: flex; justify-content: space-between; gap: var(--space-2); margin: var(--space-4) 0 var(--space-1); font-size: var(--text-small); font-weight: 700; }
.map-fiche-sub span { font-weight: 400; color: var(--color-text-secondary); }
.map-rows, .map-offers, .map-list-rows { list-style: none; margin: 0; padding: 0; }
.map-row, .map-offer, .map-list-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3);
  min-height: var(--target-min); padding: var(--space-2); border-bottom: var(--rule-hairline) solid var(--color-separator);
  color: var(--color-text-primary); text-decoration: none; border-radius: var(--radius-mark);
  transition: background-color var(--motion);
}
.map-row:hover, .map-offer:hover, .map-list-row:hover { background: var(--color-bg-sunken); }
.map-row-name, .map-offer-what, .map-list-wine { display: grid; min-width: 0; }
.map-row-name b, .map-list-wine b { font-weight: 600; overflow-wrap: anywhere; }
.map-row-name small, .map-offer-what small, .map-list-wine small, .map-row-figure small, .map-offer-cost small { font-size: var(--text-label); line-height: var(--lh-label); color: var(--color-text-secondary); }
.map-row-figure, .map-offer-cost { display: grid; justify-items: end; text-align: right; font-variant-numeric: tabular-nums; }
.map-row-figure[data-trend="up"] b { color: var(--color-up-text); }
.map-row-figure[data-trend="down"] b { color: var(--color-down-text); }
.map-row-figure[data-trend="flat"] b { color: var(--color-text-secondary); }
.map-offer { grid-template-columns: minmax(0, 1fr) auto; }
.map-more { margin: var(--space-2) 0 0; font-size: var(--text-small); color: var(--color-text-secondary); }
.map-fiche-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0 0; }
.map-below { margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-panel); background: var(--color-bg-sunken); color: var(--color-text-strong); font-size: var(--text-small); font-weight: 600; }
/* « TVA inconnue » (ticket 284 part 0, ADR 0297): a price on the scale as published whose VAT its source does not state,
   in the ink beside its secondary words; once in a group's head on « Les sources » when every offer of it is. */
.vat-unknown { color: var(--color-text-primary); white-space: nowrap; }
.sources-vat { margin: 0 0 var(--space-3); color: var(--color-text-primary); font-size: var(--text-small); line-height: var(--lh-small); font-weight: 600; }
.map-index { display: block; margin: var(--space-2) 0; overflow: visible; }
.map-index .index-line { vector-effect: non-scaling-stroke; }
.map-index .base { vector-effect: non-scaling-stroke; }
.map-fiche .gap-strip { margin: var(--space-2) 0; }
.map-fiche .gap-strip .strip-axis { stroke: var(--color-border); stroke-width: 1px; }
.map-yours { display: grid; margin: var(--space-3) 0; }
.map-yours span { font-size: var(--text-label); font-weight: 600; color: var(--color-text-secondary); }
.map-yours b { font-size: var(--text-title); line-height: var(--lh-title); font-weight: 800; letter-spacing: var(--tracking-title); font-variant-numeric: tabular-nums; }
.map-yours small { font-size: var(--text-small); color: var(--color-text-strong); }
.map-bottle .domain-view-head { margin-bottom: 0; }
.map-bottle-name { margin: 0; font-size: var(--text-heading); }
.map-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.map-list { padding: var(--space-4); border: var(--rule-hairline) solid var(--color-border); border-radius: var(--radius-card); background: var(--color-bg-raised); box-shadow: var(--shadow-soft); min-width: 0; }
.map-list .domain-section-title { margin-top: 0; }
.map-list-row { grid-template-columns: minmax(0, 1fr) auto; border-left: 4px solid var(--region); }
.map-list-figure { font-size: var(--text-figure); font-weight: 800; }
/* The fiche's figures are today's: « aujourd'hui » after them on a past week of the replay alone (ticket 286, point 5). */
.map-today { display: none; }
.market-map[data-past] .map-today { display: inline; }
/* « Les plus forts mouvements » in their sign's colour; « Votre prix le plus au-dessus » in the ink (ticket 286, point 2). */
.map-list-figure[data-trend="up"] { color: var(--color-up-text); }
.map-list-figure[data-trend="down"] { color: var(--color-down-text); }
.map-list-figure[data-trend="flat"] { color: var(--color-text-secondary); }
/* « Les sources » (ticket 274, ADR « Who sells cheapest »): the same stage, its height the script's (one row a group, at
   least 280 px, 240 on a phone); « Périmètre », a select after its name; the sentence in the ink, its groups in 700; the
   channels' dots of the legend in the tabs' hues (lent to this reading, DESIGN.md « Charts »); the sources not read in a
   quiet line under the stage. */
.sources-stage { height: 280px; }
.sources-for select { min-height: var(--control-height); max-width: 18rem; }
.sources-say { margin: 0; color: var(--color-text-primary); }
.sources-say b { font-weight: 700; }
.sources-dot { display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-chip); background: var(--dot); }
.tab-dot-auction { --dot: var(--color-tab-auctions); }
.tab-dot-merchant { --dot: var(--color-tab-merchants); }
.tab-dot-ad { --dot: var(--color-tab-ads); }
.sources-dash { display: inline-block; width: 16px; border-top: 2px dashed var(--color-text-primary); }
.sources-unread { margin: 0; font-size: var(--text-small); color: var(--color-text-secondary); }
.sources-row.is-few .map-row-name b, .sources-row.is-few .map-row-figure b { color: var(--color-text-secondary); }
.sources-fiche-group[hidden], .sources-fiche-overview[hidden] { display: none; }
.domain-figures dd.sources-band b { font-size: var(--text-body); line-height: var(--lh-body); }
@media (max-width: 1100px) {
  .map-body { grid-template-columns: minmax(0, 1fr); }
  .map-fiche { position: static; }
}
@media (max-width: 720px) {
  .map-stage { height: 460px; }
  .map-lists { grid-template-columns: minmax(0, 1fr); }
  .map-controls { gap: var(--space-2); }
}
