/* Heddlo design tokens and components: the CSS blocks of docs/style.md, verbatim and in order.
   Change docs/style.md first, then copy here (tests/test_style.py checks both match). */

/* Fonts named by --font-sans and --font-mono, served from /static/fonts (variable fonts, latin subset:
   French included). Inter and JetBrains Mono 5.3.0 from Fontsource, SIL Open Font License 1.1 (fonts/OFL-*.txt). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/static/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e6eb;
  --text: #1f2430;
  --text-muted: #5b6272;
  --text-subtle: #8a90a0;
  --header: #16181d;

  --primary: #2d5bd8;
  --primary-hover: #2349b5;
  --on-primary: #ffffff;

  --model-bg: #eef1fd;
  --model-line: #b9c5f2;
  --model-text: #3247a8;

  --success-bg: #e8f7ec;
  --success-line: #9fd8b0;
  --success-text: #1d7a3a;
  --success-dot: #2fb457;

  --waiting-bg: #fdf3d9;
  --waiting-line: #e08a1e;
  --waiting-text: #8a5a00;

  --danger-bg: #fdecec;
  --danger-line: #c9302c;
  --danger-text: #b3261e;

  --future-line: #a0a6b3;
}

:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
body { font: 14px/1.5 var(--font-sans); color: var(--text); background: var(--bg); }
code, .mono { font-family: var(--font-mono); font-size: 13px; }

:root {
  --radius-sm: 6px; --radius: 8px; --radius-md: 10px; --radius-lg: 12px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --focus-ring: 0 0 0 3px rgb(45 91 216 / .25);
}
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 36px; padding: 0 var(--space-4);
  font: 500 14px var(--font-sans);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { height: 44px; padding: 0 var(--space-6); font-size: 15px; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-danger { border-color: var(--danger-line); color: var(--danger-text); }
.btn-danger:hover { background: var(--danger-bg); }

.btn-soft { background: var(--model-bg); border-color: var(--model-line); color: var(--model-text); }
.btn-soft:hover { border-color: var(--primary); }

.btn-link { height: auto; padding: 0; border: 0; background: none; color: var(--primary); text-decoration: underline; }

.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 2px var(--space-2); border-radius: var(--radius-sm);
  font: 500 12px var(--font-sans);
  background: var(--surface-2); color: var(--text-muted);
}
.badge[data-tone="model"]   { background: var(--model-bg);   color: var(--model-text); }
.badge[data-tone="success"] { background: var(--success-bg); color: var(--success-text); }
.badge[data-tone="waiting"] { background: var(--waiting-bg); color: var(--waiting-text); }
.badge[data-tone="danger"]  { background: var(--danger-bg);  color: var(--danger-text); }
/* An icon in a badge says its state without the colour: smaller than the 16px of the other icons. */
.badge .icon { width: 12px; height: 12px; }

.header { background: var(--header); color: #fff; height: 52px; display: flex; align-items: center; gap: var(--space-5); padding: 0 var(--space-6); }
.conn { display: inline-flex; align-items: center; gap: var(--space-2); padding: 4px var(--space-3); border-radius: 999px; background: #2a2d35; font-size: 13px; }
.conn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success-dot); }
.conn[data-state="off"]::before { background: var(--danger-line); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }
.card[data-tone="waiting"] { border: 2px solid var(--waiting-line); }
.card-title { font: 600 16px var(--font-sans); margin: 0; }
.card-title + .hint { color: var(--text-muted); font-size: 14px; }

.session { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); cursor: pointer; }
.session:hover { border-color: var(--text-subtle); }
.session[aria-current="true"] { border: 2px solid var(--primary); }
.session .meta { color: var(--text-muted); font-size: 13px; }

.stat { background: var(--surface-2); border-radius: var(--radius); padding: var(--space-3) var(--space-4); }
.stat .label { color: var(--text-muted); font-size: 13px; }
.stat .value { font: 600 18px var(--font-sans); }

.step {
  width: 180px; padding: var(--space-3); text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 14px; line-height: 1.4; cursor: pointer;
}
.step .name { font-weight: 600; }
.step[data-tone="model"]   { background: var(--model-bg); border-color: var(--model-line); }
.step[data-tone="success"] { border-color: var(--success-line); }
.step[data-tone="success"] .status { color: var(--success-text); }
.step[data-tone="waiting"] { background: var(--waiting-bg); border: 2px solid var(--waiting-line); color: var(--waiting-text); box-shadow: 0 0 0 4px var(--waiting-bg); }
.step[data-tone="future"]  { background: transparent; border: 1px dashed var(--future-line); color: var(--text-subtle); }

.arrow        { stroke: var(--text-subtle); stroke-width: 1.5; }
.arrow.active { stroke: var(--waiting-line); }
.arrow.future { stroke-dasharray: 4 4; }

.field-label { display: block; font: 500 13px var(--font-sans); color: var(--text-muted); margin-bottom: var(--space-2); }
.input {
  width: 100%; height: 40px; padding: 0 var(--space-3);
  font: 14px var(--font-sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.input::placeholder { color: var(--text-subtle); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }

.code-block {
  background: var(--surface-2); border-radius: var(--radius); padding: var(--space-3) var(--space-4);
  font: 13px/1.6 var(--font-mono); white-space: pre;
}

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--text-muted); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); }
.table td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); }
.table td.mono { font-family: var(--font-mono); }
.table tr[data-tone="waiting"] td { background: var(--waiting-bg); }
.table tr[data-tone="waiting"] td.type { color: var(--waiting-text); }

.track { position: relative; height: 28px; background: var(--surface-2); border-radius: var(--radius-sm); }
.seg { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; border: 1px solid var(--border); font-size: 12px; padding: 0 var(--space-2); display: flex; align-items: center; }
.seg[data-tone="success"] { background: var(--success-bg); border-color: var(--success-line); color: var(--success-text); }
.seg[data-tone="waiting"] {
  background: repeating-linear-gradient(45deg, var(--waiting-bg) 0 6px, #f8e3ad 6px 12px);
  border-color: var(--waiting-line); color: var(--waiting-text);
}
.mark { position: absolute; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--model-line); }
.mark[data-tone="run"]     { background: var(--primary); }
.mark[data-tone="success"] { background: var(--success-text); }
.axis { color: var(--text-subtle); font-size: 12px; }

/* Page layouts (not in docs/style.md). */
/* Widths include padding and border: without it, .input (width: 100%) overflows its card by 26px. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }  /* the browser default (8px) makes .page-center scroll */
.page-center { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6); }
.login { width: 360px; display: grid; gap: var(--space-4); }
.login h1 { font: 600 20px var(--font-sans); margin: 0; }
.alert { margin: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--danger-line); border-radius: var(--radius); background: var(--danger-bg); color: var(--danger-text); }

/* Login page: illustration over the whole page (images/img-bg-login-d|m), form card in its empty area.
   Desktop image: illustration in the left 55%. Mobile image (portrait screens): illustration in the top 43%. */
.auth { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
.auth-bg { position: absolute; inset: 0; }
.auth-bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.auth-main { grid-column: 2; position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; padding: var(--space-6); }
.auth-box { align-self: center; width: 100%; max-width: 480px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 20px var(--font-sans); letter-spacing: -.01em; color: var(--text); }
.brand-mark { width: 32px; height: 32px; flex: none; }
.auth-form { display: grid; gap: var(--space-5); padding: 40px; box-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 12px 32px rgb(16 24 40 / .08); }
.auth-form .brand { margin-bottom: var(--space-2); }
/* Larger controls on the login card only; the components of docs/style.md keep their sizes elsewhere. */
.auth-form .field-label { font-size: 14px; }
.auth-form .input { height: 48px; padding: 0 var(--space-4); font-size: 15px; }
.auth-form .btn-lg { height: 48px; font-size: 16px; }
.auth-form h1 { margin: 0 0 var(--space-1); font: 600 26px var(--font-sans); letter-spacing: -.01em; }
.auth-form .hint { margin: 0; color: var(--text-muted); font-size: 15px; }
.auth-help { margin: 0; text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-footer { padding-top: var(--space-4); font-size: 12px; color: var(--text-subtle); }
/* Same condition as the <source> of the mobile image in login.html. The portrait image keeps a bounded
   width (--auth-art), centred at the top, so that its illustration never pushes the form below the screen.
   Its illustration ends at 40.6% of its height (9:16), i.e. 0.72 x its width: the form starts 24px below 0.76 x. */
@media (max-width: 900px), (max-aspect-ratio: 5/4) {
  .auth { --auth-art: min(100vw, 52vh); grid-template-columns: minmax(0, 1fr); background: #f8fafe; overflow: hidden; }
  .auth-bg { inset: 0 auto auto 50%; width: var(--auth-art); aspect-ratio: 9 / 16; transform: translateX(-50%); }
  .auth-bg img { object-position: center top; }
  .auth-main { grid-column: 1; padding-top: calc(var(--auth-art) * .76 + var(--space-6)); }
  .auth-box { align-self: start; }
}
@media (max-width: 480px) {
  .auth-main { padding-left: var(--space-4); padding-right: var(--space-4); }
  .auth-form { padding: var(--space-6); }
}

/* Icons of templates/_icons.html: 16px, colour of the text around. */
.icon { display: block; width: 16px; height: 16px; flex: none; }

/* Shell of the private pages (templates/layout.html): side panel on the left, status band and page on the right.
   Below 1024px the panel becomes a drawer, opened by the hidden #nav-toggle checkbox (no script needed). */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }
.nav-head { padding: 14px var(--space-4); border-bottom: 1px solid var(--border); }
.nav-head .brand { font-size: 18px; }
.nav-head .brand-mark { width: 26px; height: 26px; }
.nav-body { flex: 1; padding: var(--space-3) var(--space-2); }
.nav-section + .nav-section { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.nav-section-label { padding: 0 var(--space-3); margin-bottom: var(--space-1); font: 500 12px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--text-subtle); }
.nav-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-item { display: flex; align-items: center; gap: var(--space-3); height: 36px; padding: 0 var(--space-3); border-radius: var(--radius); font: 500 14px var(--font-sans); color: var(--text); text-decoration: none; }
.nav-item:hover { background: var(--surface-2); }
.nav-item[aria-current="page"] { background: var(--model-bg); color: var(--model-text); }
.nav-icon { display: grid; place-items: center; width: 18px; color: var(--text-muted); }
.nav-item[aria-current="page"] .nav-icon { color: inherit; }
/* Tones of the icons (docs/style.md): parts of the Security screen, in the side panel and before their titles. */
.nav-icon[data-tone="primary"], .part-icon[data-tone="primary"] { --tone-bg: var(--model-bg); --tone-fg: var(--primary); }
.nav-icon[data-tone="model"], .part-icon[data-tone="model"] { --tone-bg: var(--model-bg); --tone-fg: var(--model-text); }
.nav-icon[data-tone="waiting"], .part-icon[data-tone="waiting"] { --tone-bg: var(--waiting-bg); --tone-fg: var(--waiting-text); }
.nav-icon[data-tone="success"], .part-icon[data-tone="success"] { --tone-bg: var(--success-bg); --tone-fg: var(--success-text); }
.nav-icon[data-tone="neutral"], .part-icon[data-tone="neutral"] { --tone-bg: var(--surface-2); --tone-fg: var(--text-muted); }
/* A state, not a part (P3): the icon of a service is red while it is not connected (Services page). */
.part-icon[data-tone="danger"] { --tone-bg: var(--danger-bg); --tone-fg: var(--danger-text); }
.nav-icon[data-tone], .nav-item[aria-current="page"] .nav-icon[data-tone] { color: var(--tone-fg); }
/* The icon of a part sits in the left padding of its title, centred on its height; the line of the title is as tall as
   the icon, so that a title on one line is centred on it (vertical-align: middle centres on the x-height, too low). */
.part-icon { position: absolute; top: 50%; left: 0; display: grid; place-items: center; width: 28px; height: 28px; margin-top: -14px; border-radius: var(--radius-sm); background: var(--tone-bg); color: var(--tone-fg); }
.block-title:has(> .part-icon) { position: relative; padding-left: 38px; line-height: 28px; }
.page-title:has(> .part-icon) { position: relative; padding-left: 44px; line-height: 32px; }
.page-title .part-icon { width: 32px; height: 32px; margin-top: -16px; }
.page-title .part-icon .icon { width: 18px; height: 18px; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--waiting-bg); color: var(--waiting-text); font: 600 12px/20px var(--font-sans); text-align: center; }
.nav-open:focus-visible { box-shadow: 0 0 0 3px rgb(255 255 255 / .35); border-radius: var(--radius-sm); }
.nav-foot { display: grid; gap: var(--space-3); padding: var(--space-4); border-top: 1px solid var(--border); }
.nav-account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--model-bg); color: var(--model-text); font: 600 13px var(--font-sans); }
.nav-who { display: grid; min-width: 0; line-height: 1.3; }
.nav-login { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px var(--font-sans); }
.nav-meta { color: var(--text-muted); font-size: 12px; }
.nav-meta .mono { font-size: 12px; }
.nav-warning { margin-top: 4px; align-self: flex-start; white-space: normal; }
.nav-logout { width: 100%; height: 34px; font-size: 13px; }
.nav-version { display: flex; align-items: center; gap: 6px; color: var(--text-subtle); font-size: 11px; }
.nav-version img { display: block; width: auto; height: 13px; }
.nav-lang { margin-left: auto; }
.nav-lang .pill { height: 22px; padding: 0 8px; font-size: 11px; }
.main { display: flex; flex-direction: column; min-width: 0; }
.main > .header { position: sticky; top: 0; z-index: 1; }
.main > .header { overflow: hidden; }
.main > .header .conn { flex: none; white-space: nowrap; }
.header-detail { color: #c9ccd3; font-size: 13px; white-space: nowrap; }
/* Status band (_status.html, docs/analyse_reception.md § 1.3): its wrapper only carries the htmx refresh,
   the pill and the details stay items of the header. */
.header-status { display: contents; }
@media (max-width: 639.98px) { .header-detail { display: none; } }
.conn[data-state="none"]::before { background: var(--text-subtle); }
.content { display: grid; align-content: start; gap: var(--space-5); padding: var(--space-6); }
.page-title { margin: 0; font: 600 20px var(--font-sans); }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-open, .nav-backdrop { display: none; }
@media (max-width: 1023.98px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 280px; transform: translateX(-100%); transition: transform .2s ease; }
  .nav-toggle:checked ~ .app .nav { transform: none; box-shadow: 0 12px 32px rgb(16 24 40 / .16); }
  .nav-toggle:checked ~ .app .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 10; background: rgb(22 24 29 / .4); }
  .nav-open { display: inline-flex; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
  .content { padding: var(--space-4); }
}

/* Dashboard (templates/dashboard/): tiles row, then a wide and a narrow column of blocks. */
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.dash-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.dash-body[data-columns="1"] { grid-template-columns: minmax(0, 1fr); }
.dash-col { display: grid; gap: var(--space-4); }
@media (max-width: 1023.98px) {
  .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639.98px) { .dash-tiles { grid-template-columns: minmax(0, 1fr); } }
.block { display: grid; gap: var(--space-3); align-content: start; }
.block-title { margin: 0; font: 600 16px var(--font-sans); }
.block-empty { margin: 0; color: var(--text-muted); }
.block-error { margin: 0; color: var(--danger-text); }
/* Side line of every block (decision of 23/11, docs/style.md): its colour says the state of what the block shows,
   grey without a state. data-accent gives the state (data-tone is taken by .card); an inset shadow draws it, so that
   nothing in the block is clipped (no overflow: hidden). */
.card.block { box-shadow: inset 4px 0 0 var(--tile-line, var(--text-subtle)); padding-left: calc(var(--space-5) + 4px); }
.block[data-accent="waiting"] { --tile-line: var(--waiting-line); --tile-bg: var(--waiting-bg); --tile-text: var(--waiting-text); }
.block[data-accent="model"]   { --tile-line: var(--primary);      --tile-bg: var(--model-bg);   --tile-text: var(--model-text); }
.block[data-accent="danger"]  { --tile-line: var(--danger-line);  --tile-bg: var(--danger-bg);  --tile-text: var(--danger-text); }
.block[data-accent="success"] { --tile-line: var(--success-dot);  --tile-bg: var(--success-bg); --tile-text: var(--success-text); }
/* Tiles of state (decision D-23): the line of their state, the label in small capitals with its state on the right,
   the counter very large and centred, its line centred under it. The tone comes from the view (data-accent). */
.block[data-zone="tiles"] { gap: var(--space-1); padding: var(--space-4) var(--space-5) var(--space-5) 22px; }
.block[data-zone="tiles"] .block-head { min-height: 22px; }
.block[data-zone="tiles"] .block-title { font: 600 12px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.tile-state { display: inline-flex; flex: none; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--tile-bg, var(--surface-2)); color: var(--tile-text, var(--text-muted)); font: 600 11px var(--font-sans); white-space: nowrap; }
.tile-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tile-line, var(--text-muted)); }
.tile-value { margin-top: var(--space-2); font: 700 40px/1.1 var(--font-sans); letter-spacing: -.02em; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tile-detail { overflow: hidden; color: var(--text-muted); font-size: 13px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
/* Trend line of a tile (templates/_sparkline.html, decision D-24): 2px line in the colour of the tile, a very
   light area under it, a dot on the last value (an HTML dot: the SVG is stretched, a circle would be squashed). */
.spark { margin: var(--space-2) 0 0; }
.spark-plot { position: relative; height: 36px; }
.spark svg { display: block; width: 100%; height: 36px; overflow: visible; }
.spark-line { fill: none; stroke: var(--tile-line, var(--text-muted)); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--tile-line, var(--text-muted)); opacity: .1; }
.spark-dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--tile-line, var(--text-muted)); }
.spark figcaption { margin-top: 2px; color: var(--text-subtle); font-size: 11px; }
/* Simple view of the dashboard (docs/new_dashboard/analyse_dashboard_simple.md, decisions S-1 A, S-2 A): the title with
   the sentence of the day and the switch of the views, the tiles in as many equal columns as there are (no limping
   row: 3 tiles stay 3 down to 640px, then 1), the wide zone under the two columns. */
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); }
.dash-titles { display: grid; gap: var(--space-1); min-width: 0; }
.dash-summary { margin: 0; color: var(--text-muted); font-size: 15px; }
.dash-summary b { color: var(--text); font-weight: 600; }
.view-switch .pill { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; text-decoration: none; }
.view-switch .pill[aria-current="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgb(16 24 40 / .12); }
.dash-wide { display: grid; gap: var(--space-4); }
.dash-tiles[data-view="simple"] { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
@media (max-width: 639.98px) { .dash-tiles[data-view="simple"] { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); } }
.block-aside { margin-left: auto; color: var(--text-muted); font-size: 12px; white-space: nowrap; }
/* Tiles of the simple view (blocks/todo_tile.html, health.html, work_done.html): a figure that is a sentence, its
   number large, then a bar, then a note; left-aligned, unlike the counters of the technical view. */
.block[data-view="simple"][data-zone="tiles"] { gap: 10px; }
.tile-figure { color: var(--text-muted); font: 500 15px/1.15 var(--font-sans); }
.tile-number { margin-right: 2px; color: var(--text); font: 700 30px/1.15 var(--font-sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile-note { color: var(--text-muted); font-size: 12px; }
.tile-note b { color: var(--text); font-weight: 600; }
.tile-note span { white-space: nowrap; }
.tile-work { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); min-width: 0; }
.tile-work .tile-figure { min-width: 0; }
.tile-days { display: flex; flex: none; align-items: flex-end; gap: 4px; height: 44px; }
.tile-day { width: 10px; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--success-line); }
.tile-day[data-today="true"] { background: var(--success-dot); }
.tile-day[data-empty="true"] { background: var(--border); }
/* The one bar of the simple view (templates/_bar.html, § 1.6): an 8px grey track (6px when thin), filled by its
   segments in the line colour of their tone; a 2px gap of the surface between two segments, drawn inside the second,
   so that the widths still add up to 100 %; 4px at least, so that a small part stays visible. */
.bar { display: flex; height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.bar[data-size="thin"] { height: 6px; }
.bar-seg { flex: none; min-width: 4px; background: var(--text-subtle); }
.bar-seg + .bar-seg { box-shadow: inset 2px 0 0 var(--surface); }
.bar-seg[data-tone="success"] { background: var(--success-dot); }
.bar-seg[data-tone="waiting"] { background: var(--waiting-line); }
.bar-seg[data-tone="danger"]  { background: var(--danger-line); }
.bar-seg[data-tone="model"]   { background: var(--primary); }
.bar-seg[data-filled="false"] { background: transparent; }
.bar[data-size="steps"] { background: var(--surface-2); }
.bar[data-size="steps"] .bar-seg + .bar-seg { box-shadow: inset 4px 0 0 var(--surface); }
/* À faire maintenant (blocks/todo.html, § 1.5): one row per request, its icon, its sentence and who launched its task,
   its waiting bar with its note, and its button; the columns wrap under 640px. */
.todo { display: grid; }
.todo-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.todo-row:last-child { padding-bottom: 0; }
.todo-icon { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--waiting-bg); color: var(--waiting-text); }
.todo-main { flex: 1 1 220px; min-width: 0; }
.todo-trail { margin-bottom: 2px; font-size: 13px; }
.todo-what { font-weight: 500; }
.todo-what b { font-weight: 600; }
.todo-who { color: var(--text-muted); font-size: 12px; }
.todo-who b { color: var(--text); font-weight: 600; }
.todo-wait { display: grid; flex: 0 1 200px; gap: 6px; min-width: 140px; }
.todo-go { flex: none; text-decoration: none; }
/* Dernières tâches (blocks/recent_tasks.html, decision S-5 A): the letter of the agent, the task and who launched it,
   its 3 steps and its state in the text colour of its tone, then the legend of the steps. */
.tasks { display: grid; }
.task-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.task-badge { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--model-bg); color: var(--model-text); font-weight: 600; }
.task-main { flex: 1 1 220px; min-width: 0; }
.task-what { font-weight: 500; }
/* The service at the head of a line of details, in the technical view (decisions S-26 A, S-27 A): « [server] app-chat · … ». */
.who-service { display: inline-flex; align-items: center; gap: 4px; vertical-align: bottom; }
.who-service .icon { width: 12px; height: 12px; }
/* The trail service › agent of a task (docs/new_dashboard/analyse_dashboard_simple.md § 10.10, decision S-23 D). */
.service-agent { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; font-weight: 500; }
.service-agent-service, .service-agent-agent { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.service-agent-service { color: var(--text-muted); }
.service-agent-agent { color: var(--text); }
.service-agent-sep { display: inline-flex; color: var(--text-subtle); }
.service-agent .icon { flex: none; width: 14px; height: 14px; }
.service-agent-sep .icon { width: 12px; height: 12px; }
.task-who { color: var(--text-muted); font-size: 12px; }
.task-who b { color: var(--text); font-weight: 600; }
.task-progress { display: grid; flex: 1 1 320px; gap: 6px; min-width: 0; }
.task-state { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.task-state[data-tone="model"]   { color: var(--model-text); }
.task-state[data-tone="success"] { color: var(--success-text); }
.task-state[data-tone="waiting"] { color: var(--waiting-text); }
.task-state[data-tone="danger"]  { color: var(--danger-text); }
.tile-note a, .task-state a, .block[data-view="simple"] .block-empty a { color: var(--primary); font-weight: 500; text-decoration: none; }
.tile-note a:hover, .task-state a:hover { color: var(--primary-hover); text-decoration: underline; }
/* The exchanges of Dernières tâches (docs/new_dashboard/analyse_dashboard_simple.md § 10.12, decision S-28 A): a head,
   then under the eye the latest tasks, indented under a line. Open, the head no longer shows the latest task. */
.task-exchange { position: relative; border-top: 1px solid var(--border); }
.task-exchange-head { padding-right: 56px; border-top: 0; }
@media (max-width: 640px) { .task-exchange-head > .task-main { flex-basis: 160px; } }
.task-exchange-head .task-what { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0; font-size: 14px; }
.task-exchange-head .task-what > .service-agent { font-weight: 500; }
.task-exchange-sep { color: var(--text-subtle); }
.task-exchange:has(> .task-exchange-tasks[open]) .task-exchange-latest { display: none; }
.task-eye { position: absolute; top: 6px; right: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius); color: var(--text-muted); cursor: pointer; list-style: none; }
.task-eye::-webkit-details-marker { display: none; }
.task-eye:hover { color: var(--primary); }
.task-eye:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.task-exchange-tasks[open] > .task-eye { background: var(--model-bg); color: var(--primary); }
.task-list { margin: 0; padding: 0 0 var(--space-2); list-style: none; }
.task-item { position: relative; padding: var(--space-2) 56px var(--space-2) 48px; border-top: 0; }
.task-item::before { position: absolute; top: 0; bottom: 0; left: 15px; width: 2px; background: var(--border); content: ""; }
.task-more { margin: 0; padding: 0 0 var(--space-3) 48px; color: var(--text-muted); font-size: 12px; }
.task-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
.task-legend b { color: var(--text); font-weight: 600; }
/* Vos agents (blocks/agents_today.html, decision S-8 B): the name of the agent and its verdict in a pill of its tone,
   then the bar of its day and its sentence; the agents not shown are counted under them. */
.agents { display: grid; gap: var(--space-5); }
.agent-row { display: grid; gap: 6px; min-width: 0; }
.agent-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.agent-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.agent-state { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font: 600 11px var(--font-sans); white-space: nowrap; }
.agent-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-subtle); }
.agent-state[data-tone="model"]   { background: var(--model-bg);   color: var(--model-text); }
.agent-state[data-tone="success"] { background: var(--success-bg); color: var(--success-text); }
.agent-state[data-tone="waiting"] { background: var(--waiting-bg); color: var(--waiting-text); }
.agent-state[data-tone="danger"]  { background: var(--danger-bg);  color: var(--danger-text); }
.agent-state[data-tone="model"]::before   { background: var(--primary); }
.agent-state[data-tone="success"]::before { background: var(--success-dot); }
.agent-state[data-tone="waiting"]::before { background: var(--waiting-line); }
.agent-state[data-tone="danger"]::before  { background: var(--danger-line); }
.agent-more { margin: 0; color: var(--text-muted); font-size: 12px; }
/* Groups by service of Vos agents and of Consommation du forfait (docs/new_dashboard/analyse_dashboard_simple.md § 10,
   decisions S-17 B, S-22 B): a banner in the blue of the model tone, so that the service reads before its agents. */
.service-group { display: grid; gap: 14px; min-width: 0; }
.service-group-head { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0 calc(-1 * var(--space-2)); padding: var(--space-2); border-radius: var(--radius); background: var(--model-bg); }
.service-group-icon { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--surface); color: var(--model-text); }
.service-group-icon svg { width: 16px; height: 16px; }
.service-group-name { overflow: hidden; margin: 0; color: var(--text); font: 600 14px var(--font-sans); text-overflow: ellipsis; white-space: nowrap; }
.service-group-count { flex: none; margin-left: auto; color: var(--model-text); font-size: 12px; font-weight: 500; white-space: nowrap; }
/* Consommation du forfait (blocks/plan_usage.html, decisions S-9 A to S-11 A): the verdict, then one line for all the
   agents and one per agent: who, a thin bar of the part of the plan used, the % on the right. The bars of the agents are
   the tone of the whole, lighter: they are parts of it. A block with hide_when_empty is hidden while empty. */
.block[hidden] { display: none; }
.plan-groups { display: grid; gap: var(--space-6); }
.plan-verdict { margin: 0; }
.plan-verdict b { font-weight: 600; }
.plan { display: grid; }
.plan-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.plan-line:last-child { padding-bottom: 0; }
.plan-who { flex: 0 1 240px; min-width: 160px; }
.plan-name { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.plan-name[data-total="true"] { font-weight: 600; }
.plan-sub { color: var(--text-muted); font-size: 12px; }
.plan-line .bar { flex: 1 1 300px; }
.plan-line[data-part="agent"] .bar-seg { opacity: .6; }
.plan-share { flex: none; width: 104px; color: var(--text-muted); font-size: 13px; text-align: right; }
.plan-share b { color: var(--text); font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* Activity chart (blocks/activity.html, decision D-21): stacked bars per day, 4px rounded top on the topmost
   segment and 2px gap between segments (dataviz skill); hairline horizontal grid with the vertical graduations. */
.block-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.pills { display: inline-flex; flex: none; gap: 2px; padding: 2px; border-radius: 999px; background: var(--surface-2); }
.pill { height: 24px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--text-muted); font: 500 12px var(--font-sans); cursor: pointer; }
.pill:hover { color: var(--text); }
.pill[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(16 24 40 / .12); }
.chart { padding-left: 26px; }
.chart-plot { position: relative; height: 150px; margin-bottom: 22px; border-bottom: 1px solid #d5d9e0; }
.chart-grid { position: absolute; right: 0; left: 0; border-top: 1px solid var(--surface-2); }
.chart-grid span { position: absolute; top: -7px; right: calc(100% + 6px); color: var(--text-subtle); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart-cols[data-count="60"] { gap: 1px; }
.chart-col { position: relative; display: flex; flex: 1; justify-content: center; height: 100%; }
.chart-col:hover .chart-seg { filter: brightness(.9); }
.chart-bar { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; width: min(100%, 26px); height: 100%; }
.chart-seg { display: block; border-radius: 2px; }
.chart-seg:first-child { border-radius: 4px 4px 2px 2px; }
.chart-seg[data-tone="success"], .legend-key[data-tone="success"] { background: var(--success-dot); }
.chart-seg[data-tone="danger"],  .legend-key[data-tone="danger"]  { background: var(--danger-line); }
.chart-label { position: absolute; top: calc(100% + 5px); color: var(--text-subtle); font-size: 11px; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0; padding: 0; list-style: none; color: var(--text-muted); font-size: 13px; }
.legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.legend-key { width: 10px; height: 10px; border-radius: 2px; }
/* Latence des modèles (blocks/latency.html, decision D-25): a 2px curve per model in the series colours, points of
   8px with a 2px surface ring, name and last value at the end of each curve, in text colour next to its last point. */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; } /* fixed order, never status colours */
.legend-key[data-slot="1"], .lat-point[data-slot="1"] { background: var(--series-1); }
.legend-key[data-slot="2"], .lat-point[data-slot="2"] { background: var(--series-2); }
.legend-key[data-slot="3"], .lat-point[data-slot="3"] { background: var(--series-3); }
.legend-key[data-slot="4"], .lat-point[data-slot="4"] { background: var(--series-4); }
.lat-line[data-slot="1"] { stroke: var(--series-1); }
.lat-line[data-slot="2"] { stroke: var(--series-2); }
.lat-line[data-slot="3"] { stroke: var(--series-3); }
.lat-line[data-slot="4"] { stroke: var(--series-4); }
.lat { padding: 0 118px 0 36px; }
.lat-plot { position: relative; height: 150px; margin-bottom: 22px; border-bottom: 1px solid #d5d9e0; }
.lat-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lat-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lat-point { position: absolute; width: 8px; height: 8px; margin: 0 0 -4px -4px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.lat-point::before { position: absolute; inset: -5px; content: ""; }
.lat-point:hover { transform: scale(1.35); }
.lat-label { position: absolute; left: calc(100% + 10px); max-width: 108px; overflow: hidden; transform: translateY(-50%); color: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }
.lat-day { position: absolute; top: calc(100% + 5px); transform: translateX(-50%); color: var(--text-subtle); font-size: 11px; white-space: nowrap; }
.legend-more { color: var(--text-subtle); }
.block-note { margin: 0; color: var(--text-muted); font-size: 12px; }
/* Tokens par modèle (blocks/tokens.html, decision D-28): a ring per model for its part of the tokens (its series
   colour, the same as in the latency), a bar for the mix of its own tokens in four violets (never a series or status
   colour), its total and average per call, an inactive eye until the page of the detail exists. */
:root { --tok-input: #3c3489; --tok-output: #7f77dd; --tok-cache-read: #afa9ec; --tok-cache-write: #cecbf6; }
.tok-legend { gap: var(--space-2) var(--space-4); font-size: 12px; }
.tok-legend .tok-ring { width: 13px; height: 13px; }
.legend-key[data-kind="input"],       .tok-seg[data-kind="input"]       { background: var(--tok-input); }
.legend-key[data-kind="output"],      .tok-seg[data-kind="output"]      { background: var(--tok-output); }
.legend-key[data-kind="cache_read"],  .tok-seg[data-kind="cache_read"]  { background: var(--tok-cache-read); }
.legend-key[data-kind="cache_write"], .tok-seg[data-kind="cache_write"] { background: var(--tok-cache-write); }
.tok-list { display: grid; }
.tok-row { display: grid; grid-template-columns: 30px minmax(0, 10rem) minmax(0, 1fr) 8.5rem 18px; gap: var(--space-3); align-items: center; padding: var(--space-2) 0; border-top: 1px solid var(--border); }
.tok-ring { display: block; width: 30px; height: 30px; }
.tok-ring circle { fill: none; stroke-width: 5; }
.tok-ring-track { stroke: var(--border); }
.tok-ring-arc { stroke: var(--text-muted); stroke-linecap: butt; }
.tok-ring-arc[data-slot="1"] { stroke: var(--series-1); }
.tok-ring-arc[data-slot="2"] { stroke: var(--series-2); }
.tok-ring-arc[data-slot="3"] { stroke: var(--series-3); }
.tok-ring-arc[data-slot="4"] { stroke: var(--series-4); }
.tok-name { display: grid; min-width: 0; line-height: 1.35; }
.tok-name b { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.tok-name span, .tok-total span { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tok-bar { display: flex; height: 12px; overflow: hidden; border-radius: 3px; background: var(--surface-2); }
.tok-total { display: grid; line-height: 1.35; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tok-total b { font-weight: 600; }
.tok-eye { display: grid; place-items: center; color: var(--text-subtle); opacity: .55; cursor: default; }
.tok-notes { display: grid; gap: var(--space-1); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.tok-notes p { margin: 0; }
@media (max-width: 639.98px) {
  .tok-row { grid-template-columns: 30px minmax(0, 1fr) auto 18px; }
  .tok-bar { grid-column: 2 / -1; grid-row: 2; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* A link drawn as a button (« Ajouter un utilisateur ») is not underlined; .btn-link stays a link, underlined. */
a.btn:not(.btn-link) { text-decoration: none; }

/* File des demandes (blocks/request_queue.html, decision D-14): a waiting bar per request on a fixed axis,
   green / orange / red by waiting time, a mark at the deadline. Columns: kind icon, bar, waiting time. */
.queue { display: grid; gap: var(--space-3); }
.q-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 112px 24px; gap: var(--space-3); align-items: center; }
.q-kind { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); }
.q-head { display: flex; justify-content: space-between; gap: var(--space-2); font-size: 13px; }
.q-head > span:first-child { white-space: nowrap; }
.q-who { overflow: hidden; color: var(--text-muted); font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.q-who b { font-weight: 600; color: var(--text); }
.q-who .mono { font-size: 12px; }
.q-track { position: relative; height: 8px; margin-top: 6px; border-radius: 4px; background: var(--surface-2); }
.q-fill { position: absolute; inset: 0 auto 0 0; min-width: 4px; border-radius: 4px; }
.q-fill[data-urgency="ok"],   .legend-key[data-urgency="ok"]   { background: var(--success-dot); }
.q-fill[data-urgency="warn"], .legend-key[data-urgency="warn"] { background: var(--waiting-line); }
.q-fill[data-urgency="late"], .legend-key[data-urgency="late"] { background: var(--danger-line); }
.q-deadline { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); }
.q-age { display: grid; line-height: 1.3; text-align: right; white-space: nowrap; }
.q-age b { font: 600 14px var(--font-sans); }
.q-age span { color: var(--text-subtle); font-size: 11px; }
.q-ticks { display: flex; justify-content: space-between; color: var(--text-subtle); font-size: 11px; }
.q-legend { padding-top: var(--space-3); border-top: 1px solid var(--border); font-size: 12px; }
.q-legend .legend-key { width: 14px; height: 6px; border-radius: 3px; }
.legend-deadline { width: 2px; height: 12px; border-radius: 1px; background: var(--text); }

/* Dernières sessions (blocks/recent_sessions.html, decisions D-19, D-27, D-29): a line per session, then its root
   runs, indented, and their sub-agents, indented again; each line has a status chip, the time bar, when, how long,
   the cost and an eye. */
.runs { display: grid; }
.run-group + .run-group { border-top: 1px solid var(--border); }
/* Columns: status, agent, then Time, Age and Duration under their headings (.run-head), then the eye. Fixed widths,
   so that the figures line up from one row to the next, whatever the indentation; no cost (decision S-6 A). */
.run-head, .run-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 88px 15ch 11ch 18px; gap: var(--space-3); }
.run-head { padding: 0 var(--space-2) var(--space-1); border-bottom: 1px solid var(--border); }
/* The small font on the cells, not on .run-head: its columns in ch must measure those of the rows. */
.run-head span { color: var(--text-subtle); font: 500 11px var(--font-sans); letter-spacing: .04em; text-align: right; text-transform: uppercase; }
/* Every row, and the headings, keep --space-2 inside on the left and the right: the grey of a row lit up under the
   pointer stays within the lines between the rows, and the columns still line up. */
.run-row { position: relative; align-items: center; padding: var(--space-2); border-radius: var(--radius); }
.run-row:hover { background: var(--surface-2); }
.run-figures { display: contents; }
.run-age, .run-took { color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
@media (max-width: 639.98px) {
  .run-head { display: none; }
  .run-row { grid-template-columns: 28px minmax(0, 1fr); }
  .run-figures { display: flex; grid-column: 2; flex-wrap: wrap; gap: var(--space-2); }
  .run-age, .run-took { font-size: 12px; text-align: left; }
  .time-bar { width: 64px; align-self: center; }
}
.run-row[data-indent="1"] { padding-left: calc(32px + var(--space-2)); }
.run-row[data-indent="2"] { padding-left: calc(64px + var(--space-2)); }
/* Line that ties a sub-agent to the run above it. */
.run-row[data-indent="1"]::before, .run-row[data-indent="2"]::before {
  content: ""; position: absolute; top: -8px; width: 14px; height: 29px;
  border-left: 2px solid #cfd4dc; border-bottom: 2px solid #cfd4dc; border-bottom-left-radius: 8px;
}
.run-row[data-indent="1"]::before { left: calc(13px + var(--space-2)); }
.run-row[data-indent="2"]::before { left: calc(45px + var(--space-2)); }
.run-row[data-indent="1"] .run-status, .run-row[data-indent="2"] .run-status { width: 24px; height: 24px; justify-self: center; }
.run-status { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); }
.run-status[data-tone="model"]   { background: var(--model-bg);   color: var(--model-text); }
.run-status[data-tone="success"] { background: var(--success-bg); color: var(--success-text); }
.run-status[data-tone="waiting"] { background: var(--waiting-bg); color: var(--waiting-text); }
.run-status[data-tone="danger"]  { background: var(--danger-bg);  color: var(--danger-text); }
.run-main { display: grid; min-width: 0; line-height: 1.35; }
.run-title { font-weight: 500; }
.run-label { font-size: 12px; color: var(--text-muted); }
.run-label[data-tone="model"]   { color: var(--model-text); }
.run-label[data-tone="success"] { color: var(--success-text); }
.run-label[data-tone="waiting"] { color: var(--waiting-text); }
.run-label[data-tone="danger"]  { color: var(--danger-text); }
.run-who { overflow: hidden; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.run-who b { font-weight: 600; color: var(--text); }
.run-more { padding: 0 0 var(--space-2) calc(72px + var(--space-2)); color: var(--text-subtle); font-size: 12px; }
.run-tag { display: inline-flex; align-items: center; gap: 4px; margin-right: 2px; padding: 1px 6px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-muted); font: 500 11px var(--font-sans); vertical-align: 1px; }
.run-tag .icon { width: 12px; height: 12px; }
.run-who .mono { font-size: 12px; }
.run-help { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
.run-help .icon { margin-top: 1px; }
/* A session: a <details>, closed, opened by its line (static/refresh.js keeps it open across the refreshes);
   its runs under a line that ties them to it. */
.ses-group + .ses-group { border-top: 1px solid var(--border); }
.ses-row { padding-left: calc(34px + var(--space-2)); cursor: pointer; list-style: none; }
.ses-row::-webkit-details-marker { display: none; }
/* The button that opens a session (decision of 23/11): a light blue disc with a blue chevron, solid blue with a white
   chevron under the pointer and while open; the chevron turns a quarter. The whole row opens it. */
.ses-toggle { position: absolute; top: 50%; left: 4px; display: grid; place-items: center; width: 28px; height: 28px; margin-top: -14px; border: 1px solid var(--model-line); border-radius: 50%; background: var(--model-bg); color: var(--primary); transition: background .15s, color .15s, border-color .15s; }
.ses-toggle .icon { width: 16px; height: 16px; transition: transform .15s; }
.ses-row:hover .ses-toggle, .ses-row:focus-visible .ses-toggle, .ses-group[open] > .ses-row .ses-toggle { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.ses-group[open] > .ses-row .ses-toggle .icon { transform: rotate(90deg); }
.ses-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ses-row .run-title { font-weight: 600; }
.ses-id { display: inline-block; max-width: 22ch; overflow: hidden; vertical-align: bottom; text-overflow: ellipsis; white-space: nowrap; }
.ses-runs { margin: 0 0 var(--space-2) calc(47px + var(--space-2)); padding-left: 11px; border-left: 2px solid var(--border); }
.ses-more { padding-left: calc(52px + var(--space-2)); }
/* The tools and decisions of a root run. */
.run-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.run-by { margin-right: 4px; font-size: 12px; }
.run-by b { font-weight: 600; color: var(--text); }
/* White with a border: it stays visible on a row lit up under the pointer (--surface-2). */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); font: 500 11px var(--font-sans); white-space: nowrap; }
.chip .mono { font-size: 11px; }
.chip .icon { width: 12px; height: 12px; }
.chip[data-tone="success"] { border-color: var(--success-line); background: var(--success-bg); color: var(--success-text); }
.chip[data-tone="waiting"] { border-color: #f0c27a; background: var(--waiting-bg); color: var(--waiting-text); }
.chip[data-tone="danger"]  { border-color: #f0a8a5; background: var(--danger-bg);  color: var(--danger-text); }
/* Where the time went: model in blue, tools in violet, wait for a human in amber (the colours of the mockup); a part
   above zero keeps 3px, so that 2 ms of tools in a run of 3 s still shows. */
:root { --time-model: #378add; --time-tools: #7f77dd; --time-human: #ef9f27; }
.time-bar { display: flex; height: 6px; overflow: hidden; border-radius: 3px; background: var(--border); }
.time-seg { display: block; min-width: 3px; height: 100%; }
.time-seg[data-part="model"], .legend-key[data-part="model"] { background: var(--time-model); }
.time-seg[data-part="tools"], .legend-key[data-part="tools"] { background: var(--time-tools); }
.time-seg[data-part="human"], .legend-key[data-part="human"] { background: var(--time-human); }
/* The calls of a root run, under its line: the icon of its kind in a small tile (never the status icons of the
   runs), its name, then a dot of its state and its details. A sub-agent and a delegated role have their own tile. */
.calls { margin: -4px 0 var(--space-2) calc(40px + var(--space-2)); }
.calls-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px 1px 2px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 12px; cursor: pointer; list-style: none; }
.calls-toggle::-webkit-details-marker { display: none; }
.calls-toggle:hover { background: var(--surface-2); color: var(--text); }
.calls-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.calls-toggle .icon { width: 14px; height: 14px; transition: transform .15s; }
.calls[open] > .calls-toggle .icon { transform: rotate(90deg); }
.call-list { display: grid; gap: 3px; margin: var(--space-1) 0 0; padding: 0 0 0 6px; list-style: none; font-size: 12px; }
.call { display: grid; grid-template-columns: 20px minmax(0, max-content) minmax(0, 1fr); gap: var(--space-2); align-items: center; color: var(--text-muted); }
.call-kind { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text-muted); }
.call-kind .icon { width: 13px; height: 13px; }
.call[data-kind="agent"] .call-kind { border-color: var(--model-line); background: var(--model-bg); color: var(--model-text); }
.call[data-kind="role"] .call-kind { border-color: #cecbf6; background: #f3f2fd; color: #534ab7; }
.call[data-kind="question"] .call-kind, .call[data-kind="approval"] .call-kind { border-color: #f0c27a; background: var(--waiting-bg); color: var(--waiting-text); }
.call .mono { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.call-what { display: flex; align-items: center; gap: 6px; overflow: hidden; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.call-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--success-dot); }
.call[data-tone="danger"] .call-dot { background: var(--danger-line); }
.call[data-tone="danger"] .call-what { color: var(--danger-text); }
.call[data-tone="waiting"] .call-dot { background: var(--waiting-line); }
.call[data-tone="model"] .call-dot { background: var(--model-text); }
.call-more { padding-left: 24px; color: var(--text-subtle); }
.row-eye { display: grid; place-items: center; color: var(--text-subtle); opacity: .55; cursor: default; }
/* An eye that opens a page (a run): plain, and the colour of a link under the pointer. */
a.row-eye { color: var(--text-muted); opacity: 1; cursor: pointer; text-decoration: none; }
a.row-eye:hover, a.row-eye:focus-visible { color: var(--primary); }
.ses-notes { display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.ses-notes p { margin: 0; }
.ses-notes .legend { font-size: 12px; }
.ses-notes .run-help { padding-top: 0; border-top: 0; }
/* Security screen (templates/security/, docs/analyse_referentiel_utilisateurs.md § 1.7): notices of the last change,
   tables of users, accounts, processes and journal, form of a user. Its parts are entries of the side panel. */
/* Security screen, premium display (docs/analyse_securite_premium.md, lot 1). Title row: the title on the left, the
   search and the actions on the right; they wrap under it when the page is narrow. */
.sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.sec-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.sec-head-actions .btn .icon { width: 16px; height: 16px; }
/* Search of a page (?q=, decision D-P3): a GET form, sent with Enter; the count and « Effacer » under it once searched. */
.sec-search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0; }
.sec-search-field { display: inline-flex; align-items: center; gap: var(--space-2); width: 280px; max-width: 100%; height: 36px; padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text-subtle); }
.sec-search-field:focus-within { box-shadow: var(--focus-ring); border-color: var(--primary); }
.sec-search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 14px var(--font-sans); }
.sec-search-field input:focus-visible { box-shadow: none; }
.sec-search-found { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
/* Head of a list card: its title, then one sentence that says what the list holds, under the text of the title (after its
   icon); a little more room before the data, so that the head reads apart from the rows. */
.sec-block-heading { display: grid; gap: 2px; min-width: 0; }
.sec-subtitle { margin: 0; padding-left: 38px; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
/* A subtitle at the left edge of its card, not under the text of the title (security/gateway.html). */
.sec-subtitle[data-align="left"] { padding-left: 0; }
.block-head:has(.sec-subtitle) { align-items: flex-start; margin-bottom: var(--space-2); }
/* Part of a page that refreshes itself (instances): it keeps the spacing of the page between its cards. */
.sec-live { display: grid; gap: var(--space-5); min-width: 0; }
/* State of an instance in the head of its card (instances.html): a light, green while connected, red once every process
   left, grey before the first; the words say it too (guide P4). The badges on the right: synchro, then mode. */
.sec-inst-state { display: flex; align-items: center; gap: var(--space-2); }
.sec-led { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-subtle); box-shadow: 0 0 0 3px var(--surface-2); }
.sec-inst-state[data-state="on"] { color: var(--success-text); }
.sec-inst-facts { color: var(--text-muted); }
.sec-inst-state[data-state="on"] .sec-led { background: var(--success-dot); box-shadow: 0 0 0 3px var(--success-bg); }
.sec-inst-state[data-state="off"] { color: var(--danger-text); }
.sec-inst-state[data-state="off"] .sec-led { background: var(--danger-line); box-shadow: 0 0 0 3px var(--danger-bg); }
.sec-inst-badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
/* Valid keys of a service on the page that adds one (service_key.html), then the steps of a rotation. */
.sec-key-list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius); }
.sec-key-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.sec-key-list li + li { border-top: 1px solid var(--border); }
.sec-key-list li[data-revoked="true"] { background: var(--danger-bg); }
.sec-key-list li .icon { width: 16px; height: 16px; color: var(--text-muted); }
.sec-key-list .badge { margin-left: auto; }
/* Ends of validity of the keys of a service (analyse_expiration_cle_service.md lot 3): within 30 days, then expired. */
.sec-key-list b[data-tone] { font-weight: 600; }
/* The keys of a service, in its card (analyse_liste_cles_service.md lot 2): disabled and expired ones fade. */
.sec-keys-table .sec-key-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: 600; }
.sec-keys-table .sec-key-hint, .sec-keys-table .sec-key-when { display: block; color: var(--text-muted); font-size: 12px; }
.sec-keys-table .sec-key-expires { white-space: nowrap; }
.sec-keys-table .sec-key-expires b[data-tone="waiting"] { color: var(--waiting-text); }
.sec-keys-table tr[data-state="disabled"] td, .sec-keys-table tr[data-state="expired"] td { color: var(--text-subtle); }
/* The menu « ⋯ » of a key (analyse_liste_cles_service.md lot 3): a <details> that opens under its button, links only. */
.sec-keys-table .sec-key-menu { width: 1%; text-align: right; vertical-align: middle; }
.sec-menu { position: relative; display: inline-block; }
.sec-menu > summary { list-style: none; }
.sec-menu > summary::-webkit-details-marker { display: none; }
.sec-menu-button { width: 32px; height: 32px; padding: 0; justify-content: center; border-color: transparent; }
.sec-menu[open] > .sec-menu-button { border-color: var(--border); background: var(--surface-2); }
.sec-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 220px; margin: 0; padding: 6px; list-style: none; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(22 24 29 / .14); }
.sec-menu-list a { display: flex; align-items: center; gap: var(--space-2); padding: 8px 12px; border-radius: 6px; color: var(--text); text-decoration: none; font-weight: 500; white-space: nowrap; }
.sec-menu-list a:hover, .sec-menu-list a:focus-visible { background: var(--bg); }
.sec-menu-list a[data-tone="danger"] { color: var(--danger-text); }
.sec-menu-list .icon { width: 16px; height: 16px; }
.sec-key-facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4); margin: 0; }
.sec-key-facts dt { color: var(--text-muted); }
.sec-key-facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.sec-key-list b[data-tone="waiting"] { color: var(--waiting-text); }
.sec-valid-until { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-weight: 500; }
.sec-valid-until .icon { width: 16px; height: 16px; color: var(--text-muted); }
.sec-steps { display: grid; gap: var(--space-2); margin: 0; padding-left: var(--space-5); }
/* Agents of a service (instances.html): one chip each, green while a connected process announces it, red otherwise;
   the words say it too (guide P4). Then the processes, folded under « Détails techniques ». */
/* Agents of a service (decision of 23/11): who answers, then what it did, as on the Agents mockup. Below 1200px
   the figures (6 of them) go under the name. */
.sec-agents { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.sec-agent { display: grid; grid-template-columns: 32px minmax(150px, 1fr) minmax(0, 3fr); column-gap: var(--space-4); row-gap: var(--space-2); align-items: center; padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sec-agent-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--success-bg); color: var(--success-text); }
.sec-agent-who { display: grid; gap: 2px; min-width: 0; }
.sec-agent-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sec-agent-state { color: var(--success-text); font-size: 12px; }
.sec-agent[data-available="false"] .sec-agent-icon { background: var(--danger-bg); color: var(--danger-text); }
.sec-agent[data-available="false"] .sec-agent-state { color: var(--danger-text); }
.sec-agent-figures { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--border); }
.sec-agent-figure { display: grid; gap: 2px; justify-items: center; padding: 6px 10px; background: var(--surface); text-align: center; }
.sec-agent-figure dt { max-width: 100%; overflow: hidden; color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.sec-agent-figure dd { margin: 0; color: var(--text); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; }
.sec-agent-figure[data-zero="true"] dd { color: var(--text-subtle); font-weight: 500; }
/* A value above zero in a tone: tinted cell, a bar of its tone on top and at the bottom (model: its text colour, its line is too pale), the value in its colour. */
.sec-agent-figure[data-tone] { box-shadow: inset 0 3px 0 var(--tone-line), inset 0 -3px 0 var(--tone-line); background: var(--tone-bg); }
.sec-agent-figure[data-tone] dt, .sec-agent-figure[data-tone] dd { color: var(--tone-text); }
.sec-agent-figure[data-tone="model"] { --tone-bg: var(--model-bg); --tone-line: var(--model-text); --tone-text: var(--model-text); }
.sec-agent-figure[data-tone="waiting"] { --tone-bg: var(--waiting-bg); --tone-line: var(--waiting-line); --tone-text: var(--waiting-text); }
.sec-agent-figure[data-tone="danger"] { --tone-bg: var(--danger-bg); --tone-line: var(--danger-line); --tone-text: var(--danger-text); }
@media (max-width: 1200px) {
  .sec-agent { grid-template-columns: 32px minmax(0, 1fr); }
  .sec-agent-figures { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
}
/* The folded parts of a card of the Services page, « Détails techniques » and « Clés du service » (decision of 29/11):
   a band on a light background, the whole of it clicked to open, its chevron on the right turning; closed at first,
   kept open across the refresh of the card (data-keep-open). The links of a part sit on its band, out of its
   <summary>, on the right; under 720px, under the band. */
.sec-fold { display: grid; gap: var(--space-3); }
.sec-fold > summary { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 6px var(--space-3) 6px var(--space-4); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text); font: 600 14px var(--font-sans); cursor: pointer; list-style: none; }
.sec-fold > summary::-webkit-details-marker { display: none; }
.sec-fold > summary:hover { background: var(--border); }
.sec-fold > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sec-fold > summary > .icon { width: 16px; height: 16px; color: var(--text-muted); }
.sec-fold-title { min-width: 0; }
.sec-fold-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--text-muted); font-size: 13px; font-weight: 500; }
.sec-fold-toggle .icon { width: 16px; height: 16px; transform: rotate(90deg); transition: transform .15s; }
.sec-fold[open] .sec-fold-toggle .icon { transform: rotate(-90deg); }
.sec-fold-hide, .sec-fold[open] .sec-fold-show { display: none; }
.sec-fold[open] .sec-fold-hide { display: inline; }
.sec-fold-wrap { position: relative; }
.sec-fold-actions { position: absolute; top: 6px; right: 120px; display: flex; gap: var(--space-2); }
.sec-fold-note { margin: calc(-1 * var(--space-1)) 0 0; color: var(--waiting-text); font-size: 13px; }
.sec-fold-actions .btn { height: 32px; }
.sec-fold-actions .btn .icon { width: 16px; height: 16px; }
@media (max-width: 719.98px) { .sec-fold-actions { position: static; flex-wrap: wrap; margin-top: var(--space-2); } }
/* Tiles of a page (§ 1.3): the tiles of the dashboard (decision D-23) without trend line; 3 or 4 in a row, never a
   lame row: 4 become 2 + 2 below 1024px, every tile takes the whole width below 640px. */
.sec-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.sec-tiles[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023.98px) { .sec-tiles[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639.98px) { .sec-tiles[data-count] { grid-template-columns: minmax(0, 1fr); } }
.sec-tiles .tile-detail .mono { font-size: 12px; }
/* Rich rows (§ 1.4, users): initial, who, chips of roles and instances, a count on the right; the head of the columns is
   for the eye only (each cell says what it is to a screen reader). Below 1024px: two lines, without the head. */
.sec-rows { display: grid; min-width: 0; }
.sec-rows-head, .sec-row { display: grid; grid-template-columns: 36px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 72px; gap: var(--space-4); align-items: center; }
.sec-rows-head { padding: 0 var(--space-1) var(--space-2); border-bottom: 1px solid var(--border); color: var(--text-muted); font: 500 13px var(--font-sans); }
.sec-rows-head > :last-child { text-align: right; }
.sec-row-list { display: grid; margin: 0; padding: 0; list-style: none; }
.sec-row { padding: var(--space-3) var(--space-1); border-radius: var(--radius-sm); }
.sec-row + .sec-row { border-top: 1px solid var(--border); border-radius: 0; }
.sec-row:hover { background: var(--bg); }
.sec-row[data-kind="account"] { grid-template-columns: 36px minmax(0, 1fr) auto; }
.sec-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--model-bg); color: var(--model-text); }
.sec-avatar .icon { width: 18px; height: 18px; }
.sec-avatar[data-kind="gateway"] { border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); }
.sec-row-who { display: grid; min-width: 0; line-height: 1.4; }
.sec-row-who > a, .sec-row-who > b { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-row-who > a { color: var(--primary); font-weight: 500; }
.sec-row-who > b { font-weight: 600; }
.sec-row-who > span { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-1); min-width: 0; color: var(--text-muted); font-size: 12px; }
.sec-row-who .sec-login { max-width: 32ch; }
.sec-row-who .mono { font-size: 12px; }
.sec-row-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); min-width: 0; }
.sec-row-chips .chip { padding: 2px 8px; font-size: 12px; color: var(--text); }
.sec-row-chips .chip .icon { color: var(--text-subtle); }
.chip[data-kind="role"] { border-color: transparent; background: var(--surface-2); font-family: var(--font-mono); }
/* On a row under the pointer (background --bg, as light as the chip), the role chip turns white with its border. */
.sec-row:hover .chip[data-kind="role"] { border-color: var(--border); background: var(--surface); }
.sec-row-count { display: grid; justify-items: end; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-row-count b { font: 600 14px var(--font-sans); }
.sec-row-count span { color: var(--text-subtle); font-size: 11px; }
.sec-row-admin { justify-self: end; }
@media (max-width: 1023.98px) {
  .sec-rows-head { display: none; }
  .sec-row { grid-template-columns: 36px minmax(0, 1fr) auto; row-gap: var(--space-2); }
  .sec-row > .sec-row-chips { grid-column: 2 / 4; }
  .sec-row > .sec-row-count { grid-column: 3; grid-row: 1; }
}
/* Filters of a list (lot 2, keys): links in .pills, the current one raised as a pressed pill (decision D-22). */
.sec-filter .pill { display: inline-flex; align-items: center; text-decoration: none; }
.sec-filter .pill[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(16 24 40 / .12); }
/* Matrix of the roles (roles.html, § 1.4, variant A): a column per permission of loom, grouped; a full dot (primary) for
   a permission given, a small grey dot for one missing; a thin rule before each group. Scrolls in its card when narrow. */
.sec-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.sec-matrix th, .sec-matrix td { padding: var(--space-2); border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; }
.sec-matrix thead th { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.sec-matrix .sec-matrix-groups th, .sec-matrix .sec-matrix-groups td { padding-bottom: 0; border-bottom: 0; color: var(--text-subtle); font: 600 11px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; }
.sec-matrix .sec-matrix-permission { font: 500 12px var(--font-mono); cursor: help; }
.sec-matrix .sec-matrix-role, .sec-matrix .sec-matrix-text { text-align: left; }
.sec-matrix tbody th.sec-matrix-role { font-weight: 400; }
.sec-matrix-who { display: grid; gap: 2px; min-width: 180px; }
.sec-matrix-who > a { justify-self: start; color: var(--primary); font-weight: 600; }
.sec-matrix-description { color: var(--text-muted); font-size: 12px; }
.sec-matrix-endorse { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); color: var(--text-muted); font-size: 12px; }
.sec-matrix-endorse .icon { width: 14px; height: 14px; }
.sec-matrix-endorse .chip { font-size: 11px; color: var(--text); }
.sec-matrix .sec-matrix-start { border-left: 1px solid var(--border); }
.sec-matrix .sec-matrix-groups .sec-matrix-start { border-left-color: transparent; }
.sec-matrix .num { text-align: right; font-variant-numeric: tabular-nums; }
.sec-matrix tbody tr:hover > * { background: var(--bg); }
.sec-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); vertical-align: middle; }
.sec-dot[data-on="false"] { width: 6px; height: 6px; background: #d5d9e0; } /* the baseline grey of the charts (guide § 9.2) */
.sec-matrix-legend { display: flex; gap: var(--space-4); margin: 0; color: var(--text-muted); font-size: 12px; }
.sec-matrix-legend > span { display: inline-flex; align-items: center; gap: 6px; }
/* Rows of the API keys (keys.html, § 1.4): the end as a bar of the queue (.q-track, decision D-14) on a fixed axis, the time
   left in its colour and the date beside it; the axis under the last row, in the column of the ends. */
.sec-key-grid { grid-template-columns: 36px minmax(0, 1.1fr) minmax(0, 1fr) 88px minmax(220px, 1.3fr); }
.sec-rows-head.sec-key-grid > :nth-child(4) { text-align: right; }
.sec-rows-head.sec-key-grid > :last-child { text-align: left; }
.sec-key-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); }
.sec-key-icon[data-urgency="warn"] { background: var(--waiting-bg); color: var(--waiting-text); }
.sec-key-icon[data-urgency="late"] { background: var(--danger-bg); color: var(--danger-text); }
.sec-key-scopes { color: var(--text); font-size: 13px; }
.sec-key-rate { display: grid; justify-items: end; line-height: 1.3; font-variant-numeric: tabular-nums; }
.sec-key-rate b { font: 600 14px var(--font-sans); }
.sec-key-rate span { color: var(--text-subtle); font-size: 11px; }
.sec-key-end { display: grid; gap: 2px; min-width: 0; }
.sec-key-end-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--space-2); font-size: 13px; }
.sec-key-end-head b { font-weight: 600; }
.sec-key-end-head b[data-urgency="warn"] { color: var(--waiting-text); }
.sec-key-end-head b[data-urgency="late"] { color: var(--danger-text); }
.sec-key-end-head span { color: var(--text-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.sec-key-end .q-track { margin-top: var(--space-1); }
.sec-key-axis { display: grid; gap: var(--space-4); padding: var(--space-1) var(--space-1) 0; }
.sec-key-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.sec-key-legend .legend-key { width: 14px; height: 6px; border-radius: 3px; }
.sec-key-legend .legend-key + * { margin-right: var(--space-2); }
@media (max-width: 1023.98px) {
  .sec-row.sec-key-grid { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .sec-row.sec-key-grid > .sec-key-rate { grid-column: 3; grid-row: 1; }
  .sec-row.sec-key-grid > .sec-row-who + .sec-row-who, .sec-row.sec-key-grid > .sec-key-end { grid-column: 2 / 4; }
  .sec-key-axis { display: none; }
}
.sec-notice { margin: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sec-notice[data-tone="success"] { border-color: var(--success-line); background: var(--success-bg); color: var(--success-text); }
.sec-notice[data-tone="waiting"] { border-color: var(--waiting-line); background: var(--waiting-bg); color: var(--waiting-text); }
.sec-notice[data-tone="danger"]  { border-color: var(--danger-line);  background: var(--danger-bg);  color: var(--danger-text); }
.sec-notice p { margin: 0; }
.sec-notice ul { margin: var(--space-1) 0 0; padding-left: var(--space-5); }
.sec-refusal { font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }
.sec-version { margin-left: var(--space-2); color: var(--text-subtle); font: 500 12px var(--font-sans); font-variant-numeric: tabular-nums; }
.sec-lead { margin: 0; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sec-help { margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
.sec-hint { margin: var(--space-1) 0 0; color: var(--text-muted); font-size: 12px; }
/* Tables scroll inside their card below their width, never the page (docs/bonnes-pratiques-design.md § 2.3). */
.sec-scroll { min-width: 0; overflow-x: auto; }
.sec-table td { vertical-align: top; }
.sec-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-who { display: grid; }
.sec-who a { color: var(--primary); font-weight: 500; }
.sec-who span { color: var(--text-muted); font-size: 12px; }
.sec-chip { display: inline-block; margin: 0 var(--space-1) 2px 0; padding: 1px 6px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12px; }
.sec-login { display: inline-block; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.sec-none { color: var(--text-subtle); }
.sec-inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.sec-since { display: grid; line-height: 1.3; }
.sec-since b { font-weight: 600; }
.sec-since span { color: var(--text-subtle); font-size: 11px; }
.sec-error-row td { padding-top: 0; color: var(--danger-text); }
.sec-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sec-diff summary { color: var(--primary); cursor: pointer; }
.sec-diff-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-2); }
.sec-diff-body .code-block { margin: 0; max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.sec-local { display: grid; gap: var(--space-1); margin: 0; }
.sec-local dt { margin: var(--space-2) 0 0; }
.sec-local dd { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; }
.sec-local-user { white-space: nowrap; }
.sec-states { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-3); margin: 0; align-items: baseline; }
.sec-states dd { margin: 0; color: var(--text-muted); }
/* Form of a user (security/user.html). */
/* Title of a page of one object (form_head): a square button back to the list, then « Utilisateur › paul ». */
.sec-title-row { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.sec-back-button { flex: none; width: 36px; padding: 0; color: var(--text-muted); }
.sec-back-button:hover { color: var(--text); }
.sec-title-row .page-title { display: flex; align-items: center; min-width: 0; }
.sec-title-part { color: var(--text-muted); font-weight: 500; }
.sec-title-sep { display: inline-grid; margin: 0 var(--space-2); color: var(--text-subtle); }
.sec-title-name { overflow: hidden; color: var(--primary); text-overflow: ellipsis; white-space: nowrap; }
/* An id in a title takes the size of the title (.mono is 13px for the text, docs/style.md). */
.page-title .mono, .block-title .mono { font-size: inherit; }
.sec-form { display: grid; gap: var(--space-5); max-width: 640px; }
.sec-field { margin: 0; padding: 0; border: 0; min-width: 0; }
/* Framed sections: the forms of the Security screen, the card of an approval (docs/style.md, decisions D-CP13, D-AP27). */
.frame { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.frame-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.frame-head .part-icon { position: static; flex: none; margin: 0; }
.frame-head .part-icon[data-tone="neutral"] { background: var(--surface); }
.frame-titles { display: grid; min-width: 0; }
.frame-title { margin: 0; font: 600 14px var(--font-sans); color: var(--text); }
.frame-title .mono { font-size: 13px; }
.frame-sub { margin: 0; color: var(--text-muted); font-size: 12px; }
.frame-head .rp-state { margin-left: auto; }
.frame-body { display: grid; gap: var(--space-5); padding: var(--space-4); }
.frame-body > .rp-actions { padding-top: 0; border-top: 0; }
.sec-form .frame .field-label { color: var(--text); font-weight: 600; }
.sec-form .frame .field-label + .sec-hint { margin: calc(-1 * var(--space-1)) 0 var(--space-2); }
.sec-form .frame .sec-pair { margin-top: 0; }
/* A field title of the Security forms with its icon (D-CP11): the icon in the color of the title, before it. */
.field-label:has(> .icon) { display: flex; align-items: center; gap: var(--space-2); }
.field-label > .icon { width: 14px; height: 14px; }
.sec-choices { display: grid; gap: var(--space-2); }
.sec-choice { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); cursor: pointer; }
.sec-choice-detail { color: var(--text-muted); font-size: 13px; }
.sec-choice:has(input:disabled) { color: var(--text-subtle); cursor: default; }
.sec-choice:has(input:disabled) .sec-choice-detail { color: var(--text-subtle); }
.sec-choice[data-indent="1"], .sec-hint[data-indent="1"] { margin-left: var(--space-6); }
/* Roles endorsed (security/role.html, analyse_fonctions_communes.md § 7.5): right under act_as, shown only while it is
   checked, without script; a browser without :has() shows them always, as before. */
.sec-endorsed[data-indent="1"] { margin-left: var(--space-6); }
.sec-endorsed > .sec-choices { margin-top: var(--space-2); }
.sec-choices:has(input[name="permissions"][value="act_as"]:not(:checked)) > .sec-endorsed { display: none; }
/* Key of a gateway (security/gateway.html, analyse_creation_passerelle.md § 2.3): its fields are shown only while
   « Une application appelle loom en son nom » is checked, without script; a browser without :has() shows them always. */
.sec-gateway-key[data-indent="1"] { margin-left: var(--space-6); margin-top: var(--space-2); }
.sec-application:has(input[name="application"]:not(:checked)) > .sec-gateway-key { display: none; }
/* Services of a user (security/user.html, Q-8): the list is shown only while the « Seulement ceux cochés » choice is
   checked, without script; a browser without :has() shows it always, as before. */
.sec-choices:has(input[name="scope"][value="all"]:checked) > [data-scope="some"] { display: none; }
/* Validity of a new key of a service (security/_parts.html validity, analyse_expiration_cle_service.md § 2.3): the day
   is asked only while « Date précise » is chosen, without script; a browser without :has() shows it always. */
.sec-validity-day { margin-top: var(--space-3); }
.sec-validity:has(option[value="date"]:not(:checked)) > .sec-validity-day { display: none; }
.sec-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-3) 0; }
.sec-actions { display: flex; gap: var(--space-2); }
.sec-danger { border-color: var(--danger-line); }
.sec-confirm summary { list-style: none; }
.sec-confirm summary::-webkit-details-marker { display: none; }
.sec-confirm[open] summary { display: none; }
.sec-confirm form { display: grid; gap: var(--space-3); justify-items: start; }
.sec-confirm p { margin: 0; }
/* Roles and API keys (security/role.html, key.html, key_made.html, § 3.1): facts of a key, short fields, the key made. */
.sec-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-4); margin: 0; }
.sec-facts dt { color: var(--text-muted); font-size: 13px; }
.sec-facts dd { margin: 0; }
.sec-short { max-width: 220px; }
.sec-secret { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
/* A block shown once and its button « Copier » (_parts.copyable, static/copy.js): the button on its right, under it on a
   phone; it says « Copié » in green, or that the copy failed in red, for two seconds. */
.sec-copyable { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: start; }
.sec-copyable > pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sec-copy .icon { width: 16px; height: 16px; }
.sec-copy[data-state="done"] { border-color: var(--success-line); color: var(--success-text); }
.sec-copy[data-state="failed"] { border-color: var(--danger-line); color: var(--danger-text); }
@media (max-width: 639.98px) {
  .sec-pair, .sec-diff-body, .sec-copyable { grid-template-columns: minmax(0, 1fr); }
}
/* Page of a run (docs/analyse_detail_run.md, lot 1): its head, its figures and its latest events. */
.rp-page { display: grid; gap: var(--space-5); }
.rp-head { gap: var(--space-3); }
.rp-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.rp-title-row .page-title { margin: 0; }
.rp-title-row .page-title .mono { font-size: inherit; font-weight: 600; }
.rp-meta { margin: 0; color: var(--text-muted); font-size: 13px; }
.rp-block-head { flex-wrap: wrap; justify-content: flex-start; gap: var(--space-3); }
.rp-hint { color: var(--text-muted); font-size: 13px; }
.rp-table-wrap { overflow-x: auto; }
.rp-events td.mono { font-size: 13px; white-space: nowrap; }
.rp-events tr:target td { background: var(--model-bg); }
.rp-more { margin: 0; font-size: 13px; }
/* Steps of a run (lot 2): boxes in a snake, 4 per row (2 under 900px); places from steps.placed (--row/--col,
   --row2/--col2), arrows drawn between the boxes from data-way / data-way2: orange towards the step that waits,
   dashed towards the step to come. */
.rp-title-row .page-title { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rp-sub-chip { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--model-bg); color: var(--model-text); }
.rp-sub-chip .icon { width: 18px; height: 18px; }
.rp-meta a { color: inherit; text-decoration: none; }
.rp-meta a:hover { color: var(--primary); }
.rp-flow { --gap-x: 44px; --gap-y: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 210px)); justify-content: center; gap: var(--gap-y) var(--gap-x); margin: var(--space-2) 0; padding: var(--space-2) 0; list-style: none; }
.rp-cell { position: relative; display: grid; grid-row: var(--row); grid-column: var(--col); --arrow: var(--text-subtle); }
.rp-cell[data-link="active"] { --arrow: var(--waiting-line); }
.rp-cell .step { display: grid; align-content: center; gap: 2px; width: auto; height: 100%; min-height: 84px; cursor: default; }
.rp-cell .step .mono { font-size: 13px; }
.rp-cell .step .status, .rp-cell .step-type { color: var(--text-muted); font-size: 13px; }
.rp-cell .step[data-tone="success"] .status { color: var(--success-text); }
.rp-cell .step[data-tone="waiting"] .status { color: var(--waiting-text); font-weight: 600; }
.rp-cell .step[data-tone="danger"] { border-color: var(--danger-line); }
.rp-cell .step[data-tone="danger"] .status { color: var(--danger-text); }
.rp-cell .step[data-tone="future"] .status { color: var(--text-subtle); }
.rp-cell .step[data-kind="tool"][data-tone="neutral"] .status { color: var(--success-text); }
.rp-cell .step-gap { border-style: dashed; color: var(--text-muted); }
.rp-cell::after, .rp-cell::before { position: absolute; pointer-events: none; }
@media (min-width: 901px) {
  .rp-cell[data-way]::after { content: ""; }
  .rp-cell[data-way]::before { content: ""; width: 0; height: 0; border: 5px solid transparent; }
  .rp-cell[data-way="right"]::after, .rp-cell[data-way="left"]::after { top: 50%; width: var(--gap-x); border-top: 2px solid var(--arrow); }
  .rp-cell[data-way="right"]::after { left: 100%; }
  .rp-cell[data-way="left"]::after { right: 100%; }
  .rp-cell[data-way="right"]::before { top: calc(50% - 4px); left: calc(100% + var(--gap-x) - 9px); border-left: 8px solid var(--arrow); border-right: 0; }
  .rp-cell[data-way="left"]::before { top: calc(50% - 4px); right: calc(100% + var(--gap-x) - 9px); border-right: 8px solid var(--arrow); border-left: 0; }
  .rp-cell[data-way="down"]::after { top: 100%; left: 50%; height: var(--gap-y); border-left: 2px solid var(--arrow); }
  .rp-cell[data-way="down"]::before { top: calc(100% + var(--gap-y) - 9px); left: calc(50% - 4px); border-top: 8px solid var(--arrow); border-bottom: 0; }
  .rp-cell[data-link="future"]::after { border-top-style: dashed; border-left-style: dashed; }
}
@media (max-width: 900px) {
  .rp-flow { grid-template-columns: repeat(2, minmax(0, 220px)); }
  .rp-cell { grid-row: var(--row2); grid-column: var(--col2); }
  .rp-cell[data-way2]::after { content: ""; }
  .rp-cell[data-way2]::before { content: ""; width: 0; height: 0; border: 5px solid transparent; }
  .rp-cell[data-way2="right"]::after, .rp-cell[data-way2="left"]::after { top: 50%; width: var(--gap-x); border-top: 2px solid var(--arrow); }
  .rp-cell[data-way2="right"]::after { left: 100%; }
  .rp-cell[data-way2="left"]::after { right: 100%; }
  .rp-cell[data-way2="right"]::before { top: calc(50% - 4px); left: calc(100% + var(--gap-x) - 9px); border-left: 8px solid var(--arrow); border-right: 0; }
  .rp-cell[data-way2="left"]::before { top: calc(50% - 4px); right: calc(100% + var(--gap-x) - 9px); border-right: 8px solid var(--arrow); border-left: 0; }
  .rp-cell[data-way2="down"]::after { top: 100%; left: 50%; height: var(--gap-y); border-left: 2px solid var(--arrow); }
  .rp-cell[data-way2="down"]::before { top: calc(100% + var(--gap-y) - 9px); left: calc(50% - 4px); border-top: 8px solid var(--arrow); border-bottom: 0; }
  .rp-cell[data-link="future"]::after { border-top-style: dashed; border-left-style: dashed; }
}
/* A sub-agent (decision D-DR2): a stacked card — a second card behind, offset — with its robot, its state and a
   link to its own steps; the whole box is the link. */
.rp-cell .step-sub { position: relative; justify-items: center; gap: 3px; border: 1px solid var(--model-line); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: 5px 5px 0 -1px var(--surface), 5px 5px 0 0 var(--model-line); }
a.step-sub { cursor: pointer; }
a.step-sub:hover { border-color: var(--primary); box-shadow: 5px 5px 0 -1px var(--surface), 5px 5px 0 0 var(--primary); }
a.step-sub:hover .step-sub-link { text-decoration: underline; }
.step-sub-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--model-text); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.step-sub-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-sm); background: var(--model-bg); }
.step-sub-icon .icon { width: 14px; height: 14px; }
.step-sub-state { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.step-sub-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-subtle); }
.step-sub-state[data-tone="success"]::before { background: var(--success-dot); }
.step-sub-state[data-tone="danger"]::before { background: var(--danger-line); }
.step-sub-state[data-tone="waiting"]::before { background: var(--waiting-line); }
.step-sub-state[data-tone="model"]::before { background: var(--primary); }
.step-sub-figures { color: var(--text-muted); font-size: 12px; }
.step-sub-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--primary); font-size: 13px; font-weight: 600; }
.step-sub-link .icon { width: 14px; height: 14px; }
/* The mirror of a sub-agent, first box of its own steps: the run that launched it, stacked on the other side. */
.rp-cell .step-from { box-shadow: -5px 5px 0 -1px var(--surface), -5px 5px 0 0 var(--model-line); }
a.step-from:hover { box-shadow: -5px 5px 0 -1px var(--surface), -5px 5px 0 0 var(--primary); }
/* Timeline of a run, « Où est passé le temps » (lot 3, then decisions of 24/11, mockup Frise-A): a sentence with the
   largest part of the run, the split of the whole run in one bar and its legend, then a track per lane the run has,
   bars and marks placed in % of the window (timeline.Bar), its pauses as hatched bands over the tracks, light lines at
   the graduations, its end on the axis. The colours are those of the steps (§ Boîtes du déroulé): the type, unless it
   waits (orange) or went wrong (red). A narrow item has its words beside it. */
.rp-zoom { margin-left: auto; }
/* Its two parts, « Répartition par type » and « Chronologie » (24/11): a subtitle in capitals with its icon in a
   blue pastille, then a line to the end of the block; the zoom goes with the timeline, the only part it changes. */
.rp-subtitle { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; margin: var(--space-2) 0 0; color: var(--text); font: 700 13px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; }
.rp-subtitle::after { content: ""; flex: 1; min-width: var(--space-4); border-top: 1px solid var(--border); }
.rp-subtitle-icon { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: var(--radius); background: var(--model-bg); color: var(--primary); }
.rp-subtitle-icon .icon { width: 16px; height: 16px; }
.rp-subhead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.rp-subhead .rp-subtitle { flex: 1 0 auto; margin: 0; }  /* never cut: the zoom goes to the next line */
/* The sentence beside the title of the block. */
.rp-verdict { display: flex; flex: 1 1 360px; align-items: center; gap: var(--space-2); min-width: 0; margin: 0; color: var(--text); font-size: 14px; line-height: 1.45; }
.rp-verdict b { font-weight: 700; }
.rp-verdict-icon, .rp-lane-icon { display: grid; flex: none; place-items: center; border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); }
.rp-verdict-icon { width: 26px; height: 26px; }
.rp-verdict-icon .icon { width: 15px; height: 15px; }
.rp-lane-icon { width: 26px; height: 26px; border-radius: 7px; }
.rp-lane-icon .icon { width: 15px; height: 15px; }
:is(.rp-verdict-icon, .rp-lane-icon):is([data-part="model"], [data-lane="model"]) { background: var(--model-bg); color: var(--model-text); }
:is(.rp-verdict-icon, .rp-lane-icon):is([data-part="tools"], [data-lane="tools"]) { background: var(--tool-bg); color: var(--tool-text); }
.rp-verdict-icon[data-part="subagents"] { background: var(--sub-bg); color: var(--sub-text); }
:is(.rp-verdict-icon, .rp-lane-icon):is([data-part="human"], [data-lane="humans"]) { background: var(--human-bg); color: var(--human-text); }
.rp-verdict-icon[data-part="waiting"] { background: var(--waiting-bg); color: var(--waiting-text); }
.rp-split { display: flex; gap: 2px; height: 14px; overflow: hidden; border-radius: 999px; }
.rp-part { flex: none; min-width: 3px; height: 100%; }
:is(.rp-part, .rp-key)[data-part="model"] { background: var(--model-line); }
:is(.rp-part, .rp-key)[data-part="tools"] { background: var(--tool-line); }
:is(.rp-part, .rp-key)[data-part="subagents"] { background: var(--sub-line); }
:is(.rp-part, .rp-key)[data-part="human"] { background: var(--human-line); }
.rp-part[data-part="waiting"] { background: var(--waiting-line); }
:is(.rp-part, .rp-key)[data-part="rest"] { background: repeating-linear-gradient(135deg, #d5d9e0 0 3px, var(--surface-2) 3px 6px); }
.rp-keys { display: flex; flex-wrap: wrap; gap: var(--space-2) 22px; margin: 0; padding: 0; list-style: none; color: var(--text-muted); font-size: 13px; }
.rp-keys li { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; }
.rp-keys b { color: var(--text); font-weight: 600; }
.rp-key { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.rp-why, .rp-none { color: var(--text-subtle); }
.rp-none { font-style: italic; }
/* --lead: room above the tracks, for the words of a wide pause (data-worded). */
.rp-frieze { --lead: 6px; display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: var(--space-4); }
.rp-frieze[data-worded="true"] { --lead: 22px; }
.rp-lane-names, .rp-plot { display: grid; grid-auto-rows: 30px; row-gap: 10px; align-content: start; padding-top: var(--lead); }
.rp-lane-name { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-size: 13px; font-weight: 500; }
.rp-plot { position: relative; }
.rp-grid { position: absolute; top: var(--lead); bottom: 26px; border-left: 1px dashed var(--border); }
.rp-pause { position: absolute; top: 0; bottom: 26px; border-left: 2px solid var(--waiting-line); background: repeating-linear-gradient(135deg, rgb(224 138 30 / .10) 0 6px, transparent 6px 12px); }
.rp-pause:not([data-open]) { border-right: 2px solid var(--waiting-line); }
.rp-pause-words { position: absolute; top: 0; left: 8px; display: inline-flex; align-items: center; gap: 5px; color: var(--waiting-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.rp-pause-words .icon { width: 13px; height: 13px; }
/* The end of the run: just after the tracks, so that it never covers a bar that ends with the run. */
.rp-end { position: absolute; top: calc(var(--lead) - 4px); bottom: 22px; width: 3px; margin-left: 5px; border-radius: 2px; background: var(--success-text); }
.rp-end[data-outcome="failed"] { background: var(--danger-line); }
.rp-end[data-outcome="cancelled"] { background: var(--text-subtle); }
.rp-track { height: auto; overflow: visible; background: rgb(31 36 48 / .035); }
.rp-track .seg { top: 3px; bottom: 3px; min-width: 4px; overflow: hidden; border-radius: 5px; font-weight: 500; white-space: nowrap; }
.rp-track .seg[data-tone="model"] { background: var(--model-bg); border-color: var(--model-line); color: var(--model-text); }
.rp-track .seg[data-tone="tool"] { background: var(--tool-bg); border-color: var(--tool-line); color: var(--tool-text); }
.rp-track .seg[data-tone="sub"] { background: var(--sub-bg); border-color: var(--sub-line); color: var(--sub-text); }
.rp-track .seg[data-tone="human"] { background: var(--human-bg); border-color: var(--human-line); color: var(--human-text); }
.rp-track .seg[data-tone="danger"] { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-text); }
/* A request still open: plain orange, a thicker border, open on the right: it goes on. */
.rp-track .seg[data-tone="waiting"] { background: var(--waiting-bg); border: 2px solid var(--waiting-line); color: var(--waiting-text); font-weight: 600; }
.rp-track .seg[data-open="true"] { border-right: 0; border-radius: 5px 0 0 5px; }
.rp-seg-words { overflow: hidden; text-overflow: ellipsis; }
.rp-track .mark { top: 3px; bottom: 3px; width: 4px; margin-left: -2px; }
.rp-track .mark[data-tone="model"] { background: var(--model-line); }
.rp-track .mark[data-tone="tool"] { background: var(--tool-text); }
.rp-track .mark[data-tone="sub"] { background: var(--sub-text); }
.rp-track .mark[data-tone="human"] { background: var(--human-text); }
.rp-track .mark[data-tone="danger"] { background: var(--danger-line); }
.rp-track .mark[data-tone="waiting"] { background: var(--waiting-line); }
.rp-words { position: absolute; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 12px; white-space: nowrap; pointer-events: none; }
.rp-words[data-tone="danger"] { color: var(--danger-text); font-weight: 500; }
.rp-axis { position: relative; height: 26px; font-variant-numeric: tabular-nums; }
.rp-axis span { position: absolute; top: 8px; transform: translateX(-50%); white-space: nowrap; }
.rp-axis span:first-child { transform: none; }
.rp-axis .rp-axis-end { right: 0; transform: none; font-weight: 600; }
.rp-axis-end[data-outcome="completed"] { color: var(--success-text); }
.rp-axis-end[data-outcome="failed"] { color: var(--danger-text); }
.rp-axis-end[data-outcome="running"] { color: var(--waiting-text); }
@media (max-width: 900px) { .rp-frieze { grid-template-columns: 150px minmax(0, 1fr); } .rp-zoom { margin-left: 0; } }
/* On a phone, the pastille of a lane alone, its name kept for the screen readers; on the axis, its start and its end. */
@media (max-width: 560px) {
  .rp-frieze { grid-template-columns: 26px minmax(0, 1fr); column-gap: var(--space-2); }
  .rp-lane-name { font-size: 0; }
  .rp-axis span:not(:first-child, .rp-axis-end) { display: none; }
}
/* A style of box per type (decision of 23/11, mockup B1; docs/style.md § Boîtes du déroulé): its shape and a pastel
   say what a step is - pill for the request and the end, rounded rectangle for a model call, hexagon for a decision of
   a human, parallelogram for a tool, stacked card for a sub-agent. The colours of the states take over only when a
   step waits (orange) or went wrong (red); the end has the colour of its state. A shape cut with clip-path has its
   border drawn by .step-edge behind it. */
:root {
  --ask-bg: #fde8f0;
  --ask-line: #f0a9c4;
  --ask-text: #9b2c5a;
  --human-bg: #efeafd;
  --human-line: #c4b8f3;
  --human-text: #4a3fa6;
  --tool-bg: #dff5f1;
  --tool-line: #9ad8cf;
  --tool-text: #0b5d55;
  --sub-bg: #e0f2fe;
  --sub-line: #9ccdf0;
  --sub-text: #0b5a8a;
}
.rp-cell .step[data-kind="message"] { border-color: var(--ask-line); border-radius: 999px; background: var(--ask-bg); }
.rp-cell .step[data-kind="message"] .name { color: var(--ask-text); }
.rp-cell .step[data-kind="model"] .name { color: var(--model-text); }
.rp-cell .step[data-kind="end"] { border-radius: 999px; }
.rp-cell .step[data-kind="end"][data-tone="success"] { background: var(--success-bg); }
.rp-cell .step[data-kind="end"][data-tone="success"] .name { color: var(--success-text); }
.rp-cell .step[data-kind="end"][data-tone="danger"] { background: var(--danger-bg); }
.rp-cell .step[data-kind="end"][data-tone="danger"] .name { color: var(--danger-text); }
.rp-cell .step[data-kind="end"][data-tone="neutral"] { background: var(--surface-2); }
.step-edge { display: grid; padding: 2px; background: var(--edge); }
.rp-cell .step-edge > .step { min-height: 80px; border: 0; border-radius: 0; background: var(--fill); box-shadow: none; }
.rp-cell .step-edge > .step .name { color: var(--ink); }
.step-edge[data-kind="approval"], .step-edge[data-kind="question"] { --edge: var(--human-line); --fill: var(--human-bg); --ink: var(--human-text); clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 18px 100%, 0 50%); }
.rp-cell .step-edge[data-kind="approval"] > .step, .rp-cell .step-edge[data-kind="question"] > .step { padding: 10px 22px; clip-path: polygon(17px 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 17px 100%, 0 50%); }
.step-edge[data-kind="tool"] { --edge: var(--tool-line); --fill: var(--tool-bg); --ink: var(--tool-text); clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%); }
.rp-cell .step-edge[data-kind="tool"] > .step { padding: 10px 26px; clip-path: polygon(17.4px 0, calc(100% - .6px) 0, calc(100% - 17.4px) 100%, .6px 100%); }
.step-edge[data-tone="waiting"] { --edge: var(--waiting-line); --fill: var(--waiting-bg); --ink: var(--waiting-text); padding: 3px; }
.step-edge[data-tone="danger"] { --edge: var(--danger-line); --fill: var(--danger-bg); --ink: var(--danger-text); }
.step-edge[data-tone="future"] { --edge: var(--future-line); --fill: var(--surface); --ink: var(--text-subtle); }
.rp-cell .step-sub { border-color: var(--sub-line); background: var(--sub-bg); box-shadow: 5px 5px 0 -1px var(--sub-bg), 5px 5px 0 0 var(--sub-line); }
.rp-cell .step-from { box-shadow: -5px 5px 0 -1px var(--sub-bg), -5px 5px 0 0 var(--sub-line); }
a.step-sub:hover { box-shadow: 5px 5px 0 -1px var(--sub-bg), 5px 5px 0 0 var(--primary); }
a.step-from:hover { box-shadow: -5px 5px 0 -1px var(--sub-bg), -5px 5px 0 0 var(--primary); }
.rp-cell .step-sub[data-tone="waiting"] { border-color: var(--waiting-line); box-shadow: 5px 5px 0 -1px var(--sub-bg), 5px 5px 0 0 var(--waiting-line); }
.rp-cell .step-sub[data-tone="danger"] { border-color: var(--danger-line); box-shadow: 5px 5px 0 -1px var(--sub-bg), 5px 5px 0 0 var(--danger-line); }
.step-sub-tag { color: var(--sub-text); }
.step-sub-icon { background: var(--surface); }
/* Legend of the steps: a small key per type, then the two states that take the colour over. */
.rp-legend { align-items: center; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.rp-legend-group { color: var(--text); font-weight: 600; }
.rp-key { box-sizing: border-box; width: 30px; height: 16px; border: 1px solid var(--edge, var(--border)); background: var(--fill, var(--surface)); }
.rp-key[data-kind="message"] { --edge: var(--ask-line); --fill: var(--ask-bg); border-radius: 999px; }
.rp-key[data-kind="model"] { --edge: var(--model-line); --fill: var(--model-bg); border-radius: 4px; }
.rp-key[data-kind="human"] { border: 0; background: var(--human-line); clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%); }
.rp-key[data-kind="tool"] { border: 0; background: var(--tool-line); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.rp-key[data-kind="subagent"] { --edge: var(--sub-line); --fill: var(--sub-bg); border-radius: 4px; box-shadow: 3px 3px 0 -1px var(--sub-bg), 3px 3px 0 0 var(--sub-line); margin-right: 3px; }
.rp-key[data-kind="waiting"] { --edge: var(--waiting-line); --fill: var(--waiting-bg); border-width: 2px; border-radius: 4px; }
.rp-key[data-kind="danger"] { --edge: var(--danger-line); --fill: var(--danger-bg); border-radius: 4px; }
/* Figures of a run (decision B of 23/11): one band, a cell per figure with the pastille of the type it measures in the
   colours of the steps (model, tool, human), its label in small capitals, its value; a zero stays faint. The tokens,
   the longest, get a wider cell. Below 900px: three a row, the tokens over two cells; below 560px: two a row, the
   tokens on a row of their own (dense: no hole), the labels on two lines if need be. */
.rp-title-agent { font-weight: 600; }
.rp-title-sep { color: var(--text-subtle); font-weight: 400; }
.rp-figures { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 1px; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--border); list-style: none; }
.rp-figure { display: grid; grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); background: var(--surface); --chip-bg: var(--surface-2); --chip-ink: var(--text-muted); }
.rp-figure[data-type="model"] { --chip-bg: var(--model-bg); --chip-ink: var(--model-text); }
.rp-figure[data-type="tool"] { --chip-bg: var(--tool-bg); --chip-ink: var(--tool-text); }
.rp-figure[data-type="human"] { --chip-bg: var(--human-bg); --chip-ink: var(--human-text); }
.rp-figure-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--chip-bg); color: var(--chip-ink); }
.rp-figure-icon .icon { width: 18px; height: 18px; }
.rp-figure-label { overflow: hidden; color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.rp-figure-value { overflow: hidden; color: var(--text); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.rp-figure[data-zero="true"] .rp-figure-value { color: var(--text-subtle); font-weight: 500; }
.rp-figure[data-zero="true"] .rp-figure-icon { opacity: .55; }
@media (max-width: 900px) {
  .rp-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rp-figure[data-wide="true"] { grid-column: span 2; }
}
@media (max-width: 560px) {
  .rp-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-figure { padding: var(--space-3); }
  .rp-figure-label { white-space: normal; }
}
/* Card Décision of the page of a run (docs/analyse_approbation.md, lot 2; docs/style.md § Bloc Décision): under the
   head, one box per open approval; its detail is loaded once, its place shows why when it does not come (data-failed,
   approvals/_request.html). */
.rp-label { font: 500 12px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--text-subtle); }
.rp-file {
  display: inline-flex; align-items: center; gap: var(--space-2); height: 36px; padding: 0 var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  font: 500 13px var(--font-sans); color: var(--text); cursor: pointer;
}
.rp-file:hover { border-color: var(--primary); color: var(--primary); }
.rp-outcome { display: flex; align-items: center; gap: var(--space-3); margin: 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius); }
.rp-outcome[data-tone="danger"]  { background: var(--danger-bg);  color: var(--danger-text); }
.rp-outcome[data-tone="waiting"] { background: var(--waiting-bg); color: var(--waiting-text); }
.rp-outcome[data-tone="neutral"] { background: var(--surface-2);  color: var(--text-muted); }
.rp-live { display: contents; }
.rp-decisions { gap: var(--space-4); }
/* An approval: framed sections side by side, the request then #rp-more, which its detail fills (decision D-AP28). */
.rp-request, .rp-more { display: grid; gap: var(--space-4); min-width: 0; }
.rp-more:empty { display: none; }
.rp-detail, .rp-detail-body { display: grid; gap: var(--space-4); }
.rp-request [data-when] { display: none; }
.rp-request[data-failed] .rp-detail-body, .rp-request[data-failed] .rp-more { display: none; }
.rp-request[data-failed="gone"] [data-when="gone"], .rp-request[data-failed="error"] [data-when="error"] { display: flex; }
.rp-args-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3); }
.rp-args-head .rp-hint, .rp-args-head .badge { margin-left: auto; }
.rp-file .mono { font-size: 13px; }
.rp-file-what { color: var(--text-subtle); font-weight: 400; }
.rp-none { color: var(--text-muted); font-size: 13px; }
.rp-outcome small { display: block; color: inherit; opacity: .85; font-size: 12px; }
.rp-loading { display: flex; align-items: center; gap: var(--space-3); margin: 0; color: var(--text-muted); }
.rp-loading::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--primary); animation: rp-turn .8s linear infinite;
}
@keyframes rp-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rp-loading::before { animation: none; } }
.rp-actions { display: grid; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.rp-reason {
  width: 100%; min-height: 64px; padding: var(--space-2) var(--space-3); resize: vertical;
  font: 14px var(--font-sans); color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.rp-editor {
  width: 100%; min-height: 200px; padding: var(--space-3) var(--space-4); resize: vertical;
  font: 13px/1.6 var(--font-mono); color: var(--text); background: var(--surface);
  border: 1px solid var(--primary); border-radius: var(--radius); box-shadow: var(--focus-ring);
}
.rp-error { margin: 0; color: var(--danger-text); font-size: 13px; }
.rp-outcome[data-tone="success"] { background: var(--success-bg); color: var(--success-text); }
/* Decision on a request (lot 3, docs/style.md § Bloc Décision): the state of a row at the right of its head, the
   card hidden while it has no row (it waits for one, decision D-AP15), the form in a fieldset that htmx disables while
   the decision goes. « Corriger » is the label of a checkbox kept focusable: checked, the editor shows, and the row
   swaps « Refuser » and « Approuver » for « Annuler la correction » and « Approuver avec ces arguments ». */
.rp-decisions:not(:has(.rp-request)) { display: none; }
.rp-actions fieldset { position: relative; display: grid; gap: var(--space-3); min-width: 0; margin: 0; padding: 0; border: 0; }
.rp-actions .field-label { margin: 0; }
.rp-reason:focus, .rp-editor:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.rp-actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.rp-actions-row .rp-who { margin-right: auto; color: var(--text-muted); font-size: 13px; }
.rp-amend-toggle { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.rp-amend, .rp-when-amending { display: none; }
.rp-amend-toggle:checked ~ .rp-amend { display: grid; gap: var(--space-2); }
.rp-amend-toggle:checked ~ .rp-actions-row .rp-when-amending { display: inline-flex; }
.rp-amend-toggle:checked ~ .rp-actions-row .rp-when-plain { display: none; }
.rp-amend-toggle:focus-visible ~ .rp-actions-row .rp-amend-switch { box-shadow: var(--focus-ring); }
.rp-amend-switch .rp-when-plain { display: inline-flex; align-items: center; gap: var(--space-2); }
/* Viewer of the files of a request (RA-8, D-AP14; docs/style.md § Visionneuse): a modal <dialog> over the page, whole
   screen below 1024px; its body is a single row that each kind of content fills and scrolls by itself. */
.viewer {
  width: min(1120px, calc(100vw - 2 * var(--space-6))); height: min(820px, calc(100vh - 2 * var(--space-6)));
  max-width: none; max-height: none; margin: auto; padding: 0; border: 0; overflow: hidden;
  flex-direction: column; color: var(--text); background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: 0 24px 64px rgb(0 0 0 / .28);
}
.viewer[open] { display: flex; }
.viewer::backdrop { background: rgb(22 24 29 / .55); }
.viewer-icon {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--radius); background: var(--model-bg); color: var(--model-text);
}
.viewer-warnings { flex: none; display: grid; gap: var(--space-1); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); background: var(--waiting-bg); color: var(--waiting-text); font-size: 13px; }
.viewer-lines {
  overflow: auto; margin: 0; padding: var(--space-4) 0; list-style: none; counter-reset: line;
  font: 13px/1.7 var(--font-mono); background: var(--surface);
}
.viewer-lines li::before { content: counter(line); padding-right: var(--space-4); text-align: right; color: var(--text-subtle); user-select: none; }
.viewer-bar { flex: none; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.viewer-name { display: grid; min-width: 0; line-height: 1.35; }
.viewer-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px var(--font-mono); }
.viewer-meta { color: var(--text-muted); font-size: 12px; }
.viewer-meta .mono { font-size: 12px; }
.viewer-tools { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.viewer-tools form { display: flex; margin: 0; }
.viewer-close { width: 36px; padding: 0; }
.viewer-warnings p { margin: 0; }
.viewer-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); background: var(--surface-2); }
.viewer-lines li { counter-increment: line; display: grid; grid-template-columns: 64px minmax(0, 1fr); }
.viewer-lines li span { padding-right: var(--space-4); white-space: pre-wrap; overflow-wrap: anywhere; }
.viewer-frame { display: block; width: 100%; height: 100%; border: 0; }
.viewer-image { display: flex; overflow: auto; padding: var(--space-4); }
.viewer-image img { margin: auto; max-width: 100%; max-height: 100%; cursor: zoom-in; }
.viewer-image img[data-actual] { max-width: none; max-height: none; cursor: zoom-out; }
.viewer-card { display: grid; place-items: center; overflow: auto; }
.viewer-card-inner { display: grid; justify-items: center; gap: var(--space-3); max-width: 440px; padding: var(--space-6); text-align: center; }
.viewer-card-inner > b { font: 600 16px var(--font-mono); overflow-wrap: anywhere; }
.viewer-card-inner p { margin: 0; color: var(--text-muted); }
.viewer-card-inner p b { color: var(--text); }
.viewer-card-icon {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface); color: var(--model-text);
}
.viewer-card-icon .icon { width: 32px; height: 32px; }
.viewer-card-inner[data-tone="danger"] .viewer-card-icon { color: var(--danger-text); }
.viewer-card-inner[data-tone="waiting"] .viewer-card-icon { color: var(--waiting-text); }
.viewer-card-inner[data-tone="neutral"] .viewer-card-icon { color: var(--text-muted); }
@media (max-width: 1023.98px) { .viewer { width: 100vw; height: 100dvh; border-radius: 0; } }

/* Page « À décider » (docs/analyse_approbation.md, lot 4; docs/style.md § Page « À décider »): the list of the open
   requests on the left, the approval opened on the right, in the card of the page of a run; under 1 200 px, one
   column, and the rows lead to the card (#rq-open, rendered there only). The link of the head of a block goes here too. */
.block-link { margin-left: auto; color: var(--primary); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.block-link:hover { text-decoration: underline; }
.rq-page { display: grid; gap: var(--space-5); }
.rq-title-row { display: grid; gap: var(--space-1); }
.rq-title-row .rp-hint { margin: 0; }
.rq-layout { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.rq-layout[data-single] { grid-template-columns: minmax(0, 1fr); }
.rq-live { min-width: 0; }
.rq-count { color: var(--text-muted); font-weight: 500; }
.rq-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.rq-item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center;
  padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); text-decoration: none;
}
a.rq-item:hover { border-color: var(--primary); }
.rq-item[aria-current="true"] { padding: calc(var(--space-3) - 1px); border: 2px solid var(--primary); background: var(--model-bg); }
.rq-item[aria-current="true"] .q-kind { background: var(--surface); color: var(--primary); }
.rq-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; }
.rq-what { overflow: hidden; font: 600 14px var(--font-sans); text-overflow: ellipsis; white-space: nowrap; }
.rq-who { overflow: hidden; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.rq-who b { font-weight: 600; color: var(--text); }
.rq-who .mono { font-size: 12px; }
.rq-main .q-track { margin-top: var(--space-1); }
.rq-more { margin: 0; color: var(--text-muted); font-size: 12px; }
.rq-pane { position: relative; }
.rq-anchor { position: absolute; top: calc(-1 * var(--space-4)); display: none; }
.rq-run { flex-wrap: wrap; justify-content: flex-start; align-items: baseline; gap: var(--space-1) var(--space-3); }
.rq-run-meta { color: var(--text-muted); font-size: 13px; }
.rq-open-run { margin-left: auto; height: 32px; padding: 0 var(--space-3); color: var(--primary); font-size: 13px; white-space: nowrap; }
.rq-open-run:hover { border-color: var(--primary); background: var(--model-bg); }
.rq-empty { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-6) var(--space-5); text-align: center; }
.rq-empty-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--success-bg); color: var(--success-text);
}
.rq-empty-icon .icon { width: 20px; height: 20px; }
.rq-empty-title { margin: 0; font: 600 16px var(--font-sans); }
.rq-empty p { margin: 0; max-width: 46ch; color: var(--text-muted); }
@media (max-width: 1199.98px) {
  .rq-layout { grid-template-columns: minmax(0, 1fr); }
  .rq-anchor { display: block; }
}
/* Mini-déroulé of the card (docs/style.md § Page « À décider », decision D-RQ1). */
.rq-trail { display: flex; flex-wrap: wrap; align-items: center; row-gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.rq-trail li { display: flex; align-items: center; min-width: 0; }
.rq-trail li + li::before { content: ""; width: 14px; border-top: 1px solid var(--border); }
.rq-trail li[data-tone="future"]::before { border-top: 1px dashed var(--future-line); }
.rq-step { display: inline-flex; align-items: center; gap: 6px; max-width: 280px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 12px; text-decoration: none; white-space: nowrap; }
.rq-step .icon { width: 14px; height: 14px; color: var(--text-muted); }
.rq-step .mono { font-size: 12px; }
.rq-step-name { overflow: hidden; text-overflow: ellipsis; }
.rq-step-state { font-weight: 600; }
.rq-step[data-tone="model"] { background: var(--model-bg); border-color: var(--model-line); color: var(--model-text); }
.rq-step[data-tone="success"] { border-color: var(--success-line); }
.rq-step[data-tone="waiting"] { background: var(--waiting-bg); border-color: var(--waiting-line); color: var(--waiting-text); }
.rq-step[data-tone="danger"] { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-text); }
.rq-step[data-tone="future"] { background: transparent; border-style: dashed; border-color: var(--future-line); color: var(--text-subtle); }
.rq-step[data-tone] .icon { color: inherit; }
.rq-step-more { color: var(--text-muted); background: transparent; }
/* An expired request (docs/style.md § Page « À décider », decisions D-RQ4, D-RQ5). */
.rq-item[data-expired]:not([aria-current="true"]) { border-color: var(--danger-line); }
.rq-item[data-expired] .q-kind { background: var(--danger-bg); color: var(--danger-text); }
.q-age .rq-expired { display: inline-flex; align-items: center; justify-self: end; gap: 4px; margin: 2px -8px 0 0; padding: 1px 8px; border-radius: 999px; background: var(--danger-bg); color: var(--danger-text); font-size: 11px; font-weight: 600; }
.rq-expired .icon { width: 12px; height: 12px; }
.q-over { position: absolute; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: repeating-linear-gradient(135deg, transparent 0 3px, var(--surface) 3px 5px); }
.rp-expired { align-items: flex-start; }
.rp-expired > .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.rp-expired-body { display: grid; gap: var(--space-1); min-width: 0; }
.rp-command { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-1); }
.rp-command code { padding: 3px 8px; border-radius: var(--radius-sm); background: var(--surface); color: var(--text); overflow-wrap: anywhere; user-select: all; }
.rp-copy { height: 28px; padding: 0 var(--space-3); font-size: 12px; }
/* The decision sheet of an approval (docs/style.md § Fiche de décision, analyse_fiche_decision.md). */
.fd-head { display: grid; gap: var(--space-1); }
.fd-ask { margin: 0; color: var(--text-muted); font-size: 13px; }
.fd-ask b { color: var(--text); font-weight: 600; }
.fd-action { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-1) 0 0; padding: var(--space-2) var(--space-3); border-left: 3px solid var(--waiting-line); background: var(--waiting-bg); font: 600 14px/1.5 var(--font-sans); color: var(--text); overflow-wrap: anywhere; }
.fd-action > .icon { flex: none; color: var(--waiting-text); }
.fd-head[data-expired] .fd-action { border-left-color: var(--danger-line); background: var(--danger-bg); }
.fd-head[data-expired] .fd-action > .icon { color: var(--danger-text); }
.fd-path { padding: 0 5px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 12px; font-weight: 500; }
.fd-why { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; color: var(--text-muted); font-size: 13px; }
.fd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); margin: 0; }
.fd-tile { display: grid; align-content: start; gap: var(--space-1); padding: var(--space-3); border-radius: var(--radius); background: var(--surface-2); }
.fd-tile dd { display: grid; gap: 2px; margin: 0; }
.fd-tile b { display: flex; align-items: center; gap: var(--space-2); font: 600 14px var(--font-sans); color: var(--text); }
.fd-tile b .icon { color: var(--text-muted); }
.fd-tile dd > span { color: var(--text-muted); font-size: 12px; }
.fd-tile[data-tone="you"] { background: var(--model-bg); }
.fd-tile[data-tone="you"] b, .fd-tile[data-tone="you"] b .icon { color: var(--model-text); }
.fd-tile[data-tone="danger"] { background: var(--danger-bg); }
.fd-tile[data-tone="danger"] b, .fd-tile[data-tone="danger"] b .icon, .fd-tile[data-tone="danger"] dd > span { color: var(--danger-text); }
.fd-docs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.fd-preview { display: inline-flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--model-line); border-radius: var(--radius); background: var(--model-bg); color: var(--model-text); font: inherit; text-align: left; cursor: pointer; }
.fd-preview:hover { border-color: var(--primary); }
.fd-preview .icon { width: 20px; height: 20px; }
.fd-preview span { display: grid; }
.fd-preview b { font-weight: 600; }
.fd-preview small { color: var(--text-muted); font-size: 12px; }
.fd-args { display: grid; gap: var(--space-2); }
.fd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fd-table th { width: 160px; padding: var(--space-2) var(--space-3) var(--space-2) 0; color: var(--text-muted); font-weight: 500; text-align: left; vertical-align: top; }
.fd-table td { padding: var(--space-2) 0; overflow-wrap: anywhere; vertical-align: top; }
.fd-table tr + tr > * { border-top: 1px solid var(--border); }
.fd-text { white-space: pre-wrap; }
.fd-tech summary { color: var(--primary); font-size: 13px; cursor: pointer; }
.fd-tech .rp-hint { margin: var(--space-2) 0 0; }
.fd-tech .code-block { margin: var(--space-2) 0 0; max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.rp-reason-label span { color: var(--text-muted); font-weight: 400; }
.rp-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-left: auto; }
.rp-choice { flex-direction: column; align-items: flex-start; gap: 2px; height: auto; min-width: 220px; padding: var(--space-2) var(--space-4); text-align: left; }
.rp-choice b { font: 600 15px var(--font-sans); }
.rp-choice small { font-size: 12px; font-weight: 400; opacity: .9; }
.rp-signed { margin: 0; color: var(--text-muted); font-size: 12px; text-align: right; }
/* Card of a question (templates/questions/_form.html; docs/style.md § Carte d'une question, analyse_reponse_question.md,
   decision Q-9 A): each question in a fieldset, its choices in framed rows that turn blue once checked, the foot with
   who signs and « Répondre ». */
.qa-form > .qa-fields { display: grid; gap: var(--space-5); min-width: 0; margin: 0; padding: 0; border: 0; }
.qa-question { display: grid; gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.qa-question + .qa-question { padding-top: var(--space-4); border-top: 1px solid var(--border); }
.qa-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: 0; font: 600 14px var(--font-sans); color: var(--text); }
.qa-num { color: var(--text-subtle); font-weight: 500; }
.qa-hint { margin: 0; color: var(--text-muted); font-size: 12px; }
.qa-options { display: grid; gap: var(--space-2); }
.qa-option {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; min-height: 44px;
  padding: 10px var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer;
}
.qa-option:hover { border-color: var(--model-line); }
.qa-option:has(> input:checked) { border-color: var(--primary); background: var(--model-bg); }
.qa-option > input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--primary); }
.qa-option > span { display: grid; gap: 2px; min-width: 0; }
.qa-option b { font-weight: 600; }
.qa-option small { color: var(--text-muted); font-size: 12px; }
.qa-option .input { margin-top: 6px; }
.qa-text {
  width: 100%; min-height: 72px; padding: var(--space-2) var(--space-3); resize: vertical;
  font: 14px var(--font-sans); color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.qa-text:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.qa-text[aria-invalid="true"] { border-color: var(--danger-line); }
.qa-send { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.qa-send .rp-signed { text-align: left; }
/* Page « Décisions prises » (templates/decisions/page.html; docs/style.md § Page « Décisions prises »,
   docs/analyse_historique_decisions.md, lots 1 and 2, decisions D-HD1 to D-HD3, D-HD7, D-HD8): the title row with the
   search, the filter bar at the top of the card, the rows, the foot with the total and the pages. */
.dc-page { display: grid; gap: var(--space-5); }
.dc-title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); }
.dc-title-row .rq-title-row { min-width: 0; }
.dc-title-row .sec-search-field { width: 320px; }
.dc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin: 0 0 var(--space-2); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); }
.dc-filter { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.dc-filter-label { color: var(--text-muted); font: 500 12px var(--font-sans); white-space: nowrap; }
.dc-select { height: 32px; min-width: 140px; max-width: 220px; padding: 0 var(--space-2); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: 13px var(--font-sans); }
.dc-select[data-set] { border-color: var(--primary); background: var(--model-bg); color: var(--model-text); font-weight: 500; }
.dc-filters .btn { height: 32px; padding: 0 var(--space-3); font-size: 13px; }
.dc-found { margin: 0 0 0 auto; color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.dc-found b, .dc-total b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.dc-rows { display: grid; min-width: 0; }
.dc-head, .dc-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 190px 170px 20px; gap: var(--space-4); align-items: center; }
.dc-head { padding: 0 var(--space-2) var(--space-2); border-bottom: 1px solid var(--border); }
.dc-head span { color: var(--text-subtle); font: 500 11px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; }
.dc-head span:nth-child(4) { text-align: right; }
.dc-list { display: grid; margin: 0; padding: 0; list-style: none; }
.dc-row { padding: var(--space-3) var(--space-2); border-radius: var(--radius-sm); }
.dc-row + .dc-row { border-top: 1px solid var(--border); border-radius: 0; }
.dc-row:hover { background: var(--bg); }
.dc-row .q-kind[data-tone="success"] { background: var(--success-bg); color: var(--success-text); }
.dc-row .q-kind[data-tone="danger"] { background: var(--danger-bg); color: var(--danger-text); }
.dc-main { display: grid; gap: 2px; min-width: 0; }
.dc-what { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.dc-tool { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dc-what .badge { flex: none; padding: 1px 7px; font-size: 11px; font-weight: 600; }
.dc-who { overflow: hidden; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dc-who b { color: var(--text); font-weight: 600; }
.dc-who .mono { font-size: 12px; }
.dc-by, .dc-when { display: grid; min-width: 0; line-height: 1.3; white-space: nowrap; }
.dc-by > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.dc-by b { font: 600 14px var(--font-sans); }
.dc-by[data-kind="none"] b { color: var(--text-muted); font-weight: 500; }
.dc-when { justify-items: end; font-variant-numeric: tabular-nums; }
.dc-by > span:last-child, .dc-when > span:last-child { color: var(--text-subtle); font-size: 11px; }
.dc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.dc-total { margin: 0; color: var(--text-muted); font-size: 13px; }
.dc-empty-icon { background: var(--surface-2); color: var(--text-muted); }
@media (max-width: 1023.98px) {
  .dc-head { display: none; }
  .dc-row { grid-template-columns: 28px minmax(0, 1fr) auto 20px; row-gap: var(--space-1); }
  .dc-row > .dc-by { display: flex; align-items: baseline; gap: var(--space-2); grid-column: 2; grid-row: 2; }
  .dc-row > .dc-when { grid-column: 3; grid-row: 1 / 3; }
  .dc-row > .dc-eye { grid-column: 4; grid-row: 1 / 3; }
}
@media (max-width: 639.98px) {
  .dc-row { grid-template-columns: 28px minmax(0, 1fr) 20px; }
  .dc-row > .dc-eye { grid-column: 3; grid-row: 1 / 4; }
  .dc-what { flex-wrap: wrap; row-gap: 2px; }
  .dc-row > .dc-when { display: flex; align-items: baseline; gap: var(--space-2); grid-column: 2; grid-row: 3; }
  .dc-row > .dc-when > span:first-child { font-size: 13px; }
  .dc-filters { gap: var(--space-3); }
  .dc-filter { flex-wrap: wrap; width: 100%; }
  .dc-filter .pills { flex: 0 1 auto; flex-wrap: wrap; min-width: 0; border-radius: var(--radius); }
  .dc-select { flex: 1; max-width: none; }
  .dc-found { margin-left: 0; white-space: normal; }
}
/* Window of a decision (templates/decisions/_detail.html, _content.html; docs/style.md § Fenêtre d'une décision,
   docs/analyse_historique_decisions.md RH-9 to RH-12, decisions D-HD4, D-HD5, D-HD9): the viewer, as high as its
   content from 1024 px; « La demande » and « La décision » side by side, one under the other below 1024 px; the motive
   and the arguments read in loom on the whole width under them. Served open without script, it is drawn over the page
   with its shade. */
.dc-dialog-icon[data-tone="success"] { background: var(--success-bg); color: var(--success-text); }
.dc-dialog-icon[data-tone="danger"] { background: var(--danger-bg); color: var(--danger-text); }
.dc-dialog-icon[data-tone="neutral"] { background: var(--surface-2); color: var(--text-muted); }
.dc-dialog .viewer-meta .badge { padding: 1px 7px; font-size: 11px; font-weight: 600; }
.dc-dialog .viewer-meta b { color: var(--text); font: 600 12px var(--font-sans); }
.dc-dialog-body { display: block; overflow: auto; padding: var(--space-5); background: var(--bg); }
.dc-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.fd-head[data-closed] .fd-action { border-left-color: var(--text-subtle); background: var(--surface-2); }
.fd-head[data-closed] .fd-action > .icon { color: var(--text-muted); }
.fd-tile[data-tone="success"] { background: var(--success-bg); }
.fd-tile[data-tone="success"] b, .fd-tile[data-tone="success"] b .icon, .fd-tile[data-tone="success"] dd > span { color: var(--success-text); }
.dc-outcome { display: flex; align-items: flex-start; gap: var(--space-3); margin: 0; padding: var(--space-2) var(--space-3); border-left: 3px solid var(--text-subtle); background: var(--surface-2); font-size: 14px; line-height: 1.5; }
.dc-outcome > .icon { flex: none; margin-top: 3px; color: var(--text-muted); }
.dc-notes { display: grid; gap: var(--space-1); margin: 0; padding: 0; list-style: none; color: var(--text-muted); font-size: 13px; }
.dc-notes li { display: flex; align-items: center; gap: var(--space-2); }
.dc-ids { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px var(--space-4); margin: var(--space-2) 0 0; font-size: 13px; }
.dc-ids dt { color: var(--text-muted); }
.dc-ids dd { margin: 0; overflow-wrap: anywhere; }
.dc-content { display: grid; grid-column: 1 / -1; gap: var(--space-4); }
.dc-quote { margin: 0; padding: var(--space-3) var(--space-4); border-left: 3px solid var(--text-subtle); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface-2); font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.dc-quote[data-tone="success"] { border-left-color: var(--success-dot); }
.dc-quote[data-tone="danger"] { border-left-color: var(--danger-line); }
.dc-approved { display: grid; gap: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.dc-approved .rp-label, .dc-approved .rp-hint { margin: 0; }
.dc-dialog[open]:not(:modal) { position: fixed; inset: 0; z-index: 30; box-shadow: 0 0 0 100vmax rgb(22 24 29 / .55), 0 24px 64px rgb(0 0 0 / .28); }
@media (min-width: 1024px) {
  .dc-dialog { height: fit-content; max-height: calc(100vh - 2 * var(--space-6)); }
}
@media (max-width: 1023.98px) {
  .dc-dialog-body { padding: var(--space-4); }
  .dc-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639.98px) {
  .dc-dialog .rq-open-run { width: 36px; padding: 0; }
  .dc-open-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Numbered pages of a list (templates/_pager.html; docs/style.md § Pagination, docs/analyse_historique_decisions.md
   RH-7, decision D-HD7): « ‹ Précédente 1 2 3 … 11 Suivante › »; below 640 px, the arrows only. */
.pager-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pager-link { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: 500 13px var(--font-sans); font-variant-numeric: tabular-nums; text-decoration: none; }
a.pager-link:hover { border-color: var(--primary); color: var(--primary); }
.pager-link[aria-current="page"], a.pager-link[aria-current="page"]:hover { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.pager-link[aria-disabled="true"] { color: var(--text-subtle); }
.pager-link .icon { width: 14px; height: 14px; }
.pager-link[data-dir="prev"] .icon { transform: scaleX(-1); }
.pager-gap { padding: 0 4px; color: var(--text-subtle); }
@media (max-width: 639.98px) {
  .pager-link[data-dir] { padding: 0; }
  .pager-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
