@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2");
}
/* Titres : Source Serif 4, dessin « Subhead » (prévu pour 20 à 30 px), une
   seule graisse. Adobe, licence OFL (fonts/OFL-source-serif-4.md). */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/source-serif-4-subhead-600.woff2") format("woff2");
}

/*
 * Feuille de style d'Érudit.
 *
 * Deux changements de fond par rapport à l'ancienne version :
 *
 *  - MODE SOMBRE. L'ancienne version figeait `color-scheme: light`. Ici tout
 *    passe par des variables redéfinies pour le thème sombre, suivant le
 *    réglage du système, et basculables à la main.
 *
 *  - AUCUNE POLICE EXTERNE. L'ancienne version chargeait Fraunces et Inter
 *    depuis les serveurs de Google à chaque ouverture : un appel réseau vers un
 *    tiers (point de friction RGPD en Europe), et une promesse « local / hors
 *    ligne » intenable. On utilise la pile de polices du système, et la
 *    politique de sécurité du contenu peut rester stricte.
 *    Pour retrouver Fraunces/Inter : dépose les .woff2 dans static/fonts/ et
 *    décommente le bloc @font-face en bas de ce fichier.
 */

:root {
  color-scheme: light dark;

  /* Identité « Indigo et cachet » (décision du 13/11/2026, voir
     docs/12_IDENTITE.md). Les noms disent le RÔLE, pas la couleur : une
     mairie qui choisit sa couleur d'accent (erudit/marque.py) ne repeint
     que --accent et --accent-lien, jamais le cachet. */
  --ink-900: #0f1640;
  --ink-700: #2e40ac;
  --ink-500: #4b5168;
  --ink-300: #8b90a6;

  --paper: #f2f3f7;
  --paper-raised: #ffffff;
  --paper-sunken: #e8eaf2;

  --sidebar-bg: #0f1640;
  --sidebar-text: #f2f3f7;
  --sidebar-muted: #9aa3c7;
  --sidebar-hover: rgba(255, 255, 255, 0.07);
  --sidebar-active: #1e2a63;

  --line: #e3e5ee;
  --line-strong: #d5d8e4;

  /* Action : boutons, liens, sélection. Personnalisable par organisation. */
  --accent: #2e40ac;
  --accent-lien: #2e40ac;
  --on-accent: #ffffff;
  /* Le cachet de vérification, et lui seul. Jamais personnalisé : c'est la
     garantie d'Érudit, pas la marque du client. */
  --cachet: #8a5e00;
  /* Motif de fond, façon fil de discussion : objets du service public à
     7 % d'opacité. Il habille sans distraire ; le cachet reste seul à briller. */
  --motif: url("../img/motif-clair.svg");

  --ok: #1f6b4a;
  --ok-bg: #e6f2ec;
  --warn: #8a5a00;
  --warn-bg: #fdf3e0;
  --error: #a23b2e;
  --error-bg: #fbebe8;

  --code-bg: #eef0f6;
  --code-border: #d5d8e4;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;

  /* Deux voix, chacune à sa place (décision du 14/11/2026) :
     - le TEXTE en Atkinson Hyperlegible, dessinée pour les lecteurs
       malvoyants — c'est elle qu'on lit sur un petit téléphone au soleil ;
     - les TITRES en Source Serif 4, l'élégance d'un document officiel.
     Repli sur la police du système si un fichier manque. */
  --font-body: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --t-fast: 140ms;
  --t-normal: 220ms;
  --sidebar-w: 268px;
}

/* Mode sombre : suit le système, sauf si l'utilisateur a choisi « clair ». */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink-900: #e8eaf5;
    --ink-700: #b4bcf5;
    --ink-500: #a3a9c4;
    --ink-300: #6f7695;

    --paper: #0b1030;
    --paper-raised: #141b42;
    --paper-sunken: #080c26;

    --sidebar-bg: #080c26;
    --sidebar-text: #e8eaf5;
    --sidebar-muted: #8b93bd;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: #1e2a63;

    --line: #252d5c;
    --line-strong: #333c70;

    --accent: #8d9bf2;
    --accent-lien: #aeb8ff;
    --on-accent: #0b1030;
    --cachet: #e0a526;
    --motif: url("../img/motif-sombre.svg");

    --ok: #7fd6a4;
    --ok-bg: #12291f;
    --warn: #e3b765;
    --warn-bg: #2a2114;
    --error: #f0968a;
    --error-bg: #2d1a18;

    --code-bg: #080c26;
    --code-border: #252d5c;
  }
}

/* Bascule manuelle vers le thème sombre. */
:root[data-theme="dark"] {
  --ink-900: #e8eaf5;
  --ink-700: #b4bcf5;
  --ink-500: #a3a9c4;
  --ink-300: #6f7695;

  --paper: #0b1030;
  --paper-raised: #141b42;
  --paper-sunken: #080c26;

  --sidebar-bg: #080c26;
  --sidebar-text: #e8eaf5;
  --sidebar-muted: #8b93bd;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: #1e2a63;

  --line: #252d5c;
  --line-strong: #333c70;

  --accent: #8d9bf2;
  --accent-lien: #aeb8ff;
  --on-accent: #0b1030;
  --cachet: #e0a526;
  --motif: url("../img/motif-sombre.svg");

  --ok: #7fd6a4;
  --ok-bg: #12291f;
  --warn: #e3b765;
  --warn-bg: #2a2114;
  --error: #f0968a;
  --error-bg: #2d1a18;

  --code-bg: #080c26;
  --code-border: #252d5c;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

/*
 * L'attribut `hidden` doit TOUJOURS gagner.
 *
 * Le navigateur applique `[hidden] { display: none }` avec une specificite
 * minimale : n'importe quelle regle de classe (ici `.image-preview { display:
 * inline-block }`) l'ecrase, et l'element reste visible alors que le code le
 * croit cache. C'est la cause classique de « l'apercu d'image s'affiche vide ».
 */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink-900);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Visible au clavier : indispensable pour naviguer sans souris. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a { color: var(--accent-lien); }

/* Lisible par un lecteur d'écran, invisible à l'œil. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ===================================================== Connexion ========= */
.auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; background: var(--paper);
}
.auth-card {
  width: 100%; max-width: 410px; background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 32px 28px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07);
}
.auth-mark {
  width: 46px; height: 46px; border-radius: var(--radius-s);
  background: var(--accent); color: var(--on-accent, #ffffff);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  margin-bottom: 18px;
}
.auth-card h1 {
  margin: 0 0 6px; font-family: var(--font-display); font-size: 25px; font-weight: 600;
}
.auth-card .lede { margin: 0 0 24px; color: var(--ink-500); font-size: 14px; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
  color: var(--ink-700);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; font-family: var(--font-body); font-size: 15px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--paper-raised); color: var(--ink-900);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); outline: none;
}
.field .hint { font-size: 12.5px; color: var(--ink-500); margin-top: 5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px; font-family: var(--font-body); font-size: 14.5px;
  font-weight: 600; border-radius: var(--radius-s); border: 1px solid transparent;
  cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast);
}
.btn-primary { background: var(--ink-700); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--ink-900); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--ink-700); border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--paper-sunken); }
.btn-danger { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.btn-small { padding: 6px 11px; font-size: 13px; }

.alert {
  padding: 11px 13px; border-radius: var(--radius-s); font-size: 13.5px;
  margin-bottom: 16px; border: 1px solid transparent;
}
.alert-error { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }

/* ===================================================== Charpente ======== */
.shell { display: flex; height: 100vh; width: 100%; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--sidebar-bg);
  color: var(--sidebar-text); display: flex; flex-direction: column;
  padding: 14px 10px; padding-top: calc(14px + env(safe-area-inset-top, 0px));
  transition: margin-left var(--t-normal);
}
.sidebar-head {
  display: flex; align-items: center; gap: 9px; padding: 2px 6px 14px;
}
.sidebar-head .mark {
  width: 30px; height: 30px; border-radius: 7px; background: var(--accent);
  color: var(--on-accent, #ffffff); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 16px; flex-shrink: 0;
}
.sidebar-head .names { min-width: 0; }
.sidebar-head .names strong { display: block; font-size: 14px; font-weight: 600; }
.sidebar-head .names span {
  display: block; font-size: 11.5px; color: var(--sidebar-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.new-conv-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px;
  border-radius: var(--radius-s); border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent; color: inherit; font-family: var(--font-body);
  font-size: 14px; font-weight: 500; cursor: pointer; margin-bottom: 10px;
  transition: background var(--t-fast);
}
.new-conv-btn:hover { background: var(--sidebar-hover); }

.conv-search {
  width: 100%; padding: 8px 11px; margin-bottom: 10px; font-size: 13px;
  border-radius: var(--radius-s); border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2); color: inherit; font-family: var(--font-body);
}
.conv-search::placeholder { color: var(--sidebar-muted); }

.conv-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.conv-item {
  display: flex; align-items: center; gap: 5px; padding: 8px 10px;
  border-radius: var(--radius-s); cursor: pointer; font-size: 13.5px;
  color: #c9d3e0; border: none; background: none; width: 100%;
  text-align: left; font-family: var(--font-body);
}
.conv-item:hover { background: var(--sidebar-hover); }
.conv-item.active { background: var(--sidebar-active); color: #fff; }
.conv-item .title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .act {
  opacity: 0; border: none; background: none; color: inherit; cursor: pointer;
  font-size: 13px; padding: 2px 4px; flex-shrink: 0; border-radius: 4px;
}
.conv-item:hover .act, .conv-item .act:focus-visible { opacity: 0.75; }
.conv-item .act:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.conv-item .act.pinned { opacity: 1; color: var(--accent); }
.conv-empty { padding: 10px; font-size: 12.5px; color: var(--sidebar-muted); }

.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 8px; padding-top: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-foot button {
  display: flex; align-items: center; gap: 7px; width: 100%; padding: 8px 10px;
  border: none; background: none; color: var(--sidebar-muted); cursor: pointer;
  font-size: 12.5px; border-radius: var(--radius-s); text-align: left;
  font-family: var(--font-body);
}
.sidebar-foot button:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }

.sidebar-backdrop { display: none; }

.main {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: var(--paper) var(--motif) repeat; background-size: 280px;
  height: 100%;
}

header.topbar {
  padding: 11px 18px; border-bottom: 1px solid var(--line);
  background: var(--paper-raised); display: flex; align-items: center; gap: 9px;
  flex-shrink: 0; flex-wrap: wrap; row-gap: 8px;
}
.hamburger {
  display: none; border: none; background: none; color: var(--ink-700);
  font-size: 19px; cursor: pointer; padding: 4px 6px;
}
.topbar h1 {
  margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600;
}
.topbar .spacer { flex: 1; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink-700); font-size: 12.5px;
  cursor: pointer; font-family: var(--font-body);
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #ffffff); font-weight: 600; }
.chip .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0;
}
.chip.warn .dot { background: var(--warn); }
.chip.off .dot { background: var(--ink-300); }

.model-select {
  padding: 6px 9px; font-size: 12.5px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--paper);
  color: var(--ink-900); max-width: 230px; font-family: var(--font-body);
}

/* ===================================================== Conversation ===== */
#chat { flex: 1; overflow-y: auto; padding: 22px 18px 8px; scroll-behavior: smooth; }
.thread { max-width: 760px; margin: 0 auto; }

.empty { max-width: 640px; margin: 8vh auto 0; text-align: center; }
.empty h2 {
  font-family: var(--font-display); font-size: 27px; font-weight: 600;
  margin: 0 0 10px; line-height: 1.3;
}
.empty p { color: var(--ink-500); margin: 0 0 24px; font-size: 14.5px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.suggestion {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--paper-raised); color: var(--ink-700); font-size: 13.5px;
  cursor: pointer; font-family: var(--font-body); text-align: left;
}
.suggestion:hover { border-color: var(--accent); background: var(--paper-sunken); }

.row { display: flex; margin-bottom: 20px; }
.row.user { justify-content: flex-end; }
.row.bot { justify-content: flex-start; }

.msg {
  max-width: 86%; padding: 13px 16px; border-radius: var(--radius-m);
  overflow-wrap: break-word; position: relative;
}
.row.user .msg {
  background: var(--ink-700); color: #fff; border-bottom-right-radius: 5px;
}
.row.bot .msg {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-bottom-left-radius: 5px; max-width: 100%; width: 100%;
}
.msg.error { background: var(--error-bg); border-color: var(--error); color: var(--error); }

.msg img.attached {
  display: block; max-width: 260px; border-radius: var(--radius-s); margin-top: 9px;
}
.msg img.generated {
  display: block; max-width: 100%; border-radius: var(--radius-s); margin: 12px 0 4px;
  border: 1px solid var(--line);
}

/* Trois points pendant l'attente du premier fragment. */
.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-300);
  animation: bounce 1.3s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.16s; }
.typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Curseur clignotant pendant le streaming : rend l'attente supportable. */
.cursor {
  display: inline-block; width: 2px; height: 1em; background: var(--accent);
  vertical-align: text-bottom; animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.tool-trace {
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px;
  font-size: 12.5px; color: var(--ink-500);
}
.tool-trace .step { display: flex; align-items: center; gap: 7px; }
.tool-trace .step::before { content: "›"; color: var(--accent); font-weight: 700; }

.notice {
  background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn);
  border-radius: var(--radius-s); padding: 9px 12px; font-size: 13px;
  margin-bottom: 10px;
}

.meta {
  margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 11.5px; color: var(--ink-500);
}
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; background: var(--ok-bg); color: var(--ok);
  font-weight: 600; font-size: 11px;
}
.badge.general, .badge.admin { background: var(--warn-bg); color: var(--warn); }

/* Régime de réponse (étape 10) : « ancré », « libre », « non sourcé ». */
.badge.regime-ancre {
  background: transparent; color: var(--cachet); font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
}
.badge.regime-libre { background: var(--paper-sunken); color: var(--ink-500); }
.badge.regime-nonsource {
  background: var(--warn-bg); color: var(--warn); font-weight: 600;
}
/* ================================================ Tuiles d'indicateurs ===
   Une RANGÉE DE TUILES, et pas un graphique : une poignée de nombres de tête
   se lit mieux en chiffres qu'en barres. Un histogramme à une barre par
   indicateur n'ajouterait rien qu'il faille lire.

   Chiffres en police PROPORTIONNELLE, pas tabulaire : `tabular-nums` donne à
   chaque chiffre la largeur d'un zéro, ce qui fait paraître « 121 » distendu
   à cette taille. Le tabulaire est réservé aux colonnes de nombres qui
   doivent s'aligner verticalement. */
.stat-row {
  display: grid; gap: 12px; margin-top: 4px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat {
  background: var(--paper-sunken); border: 1px solid var(--line);
  border-radius: var(--radius-m); padding: 12px 14px;
}
.stat .k {
  display: block; font-size: 12px; color: var(--ink-500); margin-bottom: 4px;
}
.stat .v {
  display: block; font-family: var(--font-body); font-size: 24px;
  font-weight: 600; color: var(--ink-900); line-height: 1.1;
}
/* La précision secondaire va SOUS le nombre, sur sa propre ligne : en ligne,
   elle se replie au milieu du chiffre dès que la tuile est étroite. */
.stat .u {
  display: block; margin-top: 2px;
  font-size: 12px; font-weight: 400; color: var(--ink-500);
}

/* Jauge : un ratio contre une limite. Le remplissage porte la sévérité, la
   piste vide est une teinte plus claire de la MÊME échelle, pour que l'état
   se lise sur toute la barre et pas seulement sur la partie remplie. */
.meter {
  height: 8px; border-radius: 999px; overflow: hidden; margin-top: 8px;
  /* La piste vide est une teinte CLAIRE DE LA MÊME échelle que le
     remplissage, et non un gris neutre : l'état se lit alors sur toute la
     barre, et pas seulement sur la partie remplie. */
  background: var(--ok-bg);
}
.meter > span { display: block; height: 100%; background: var(--ok); }
.meter.warn { background: var(--warn-bg); }
.meter.warn > span { background: var(--warn); }
.meter.bad { background: var(--error-bg); }
.meter.bad > span { background: var(--error); }

/* Modèle de raisonnement : l'état, jamais le raisonnement lui-même. */
.thinking-note {
  font-size: 13px; color: var(--ink-500); font-style: italic;
}
/* ===================================================== Page publique ====
   Lue sans être connecté : elle doit tenir sur un téléphone, se lire d'une
   traite, et ne rien promettre que le produit ne fasse. */
.public {
  max-width: 880px; margin: 0 auto; padding: 56px 18px 64px;
}
.public-head { text-align: center; margin-bottom: 44px; }
.public-head h1 {
  font-family: var(--font-display); font-size: 40px; margin: 18px 0 10px;
  color: var(--ink-900); line-height: 1.15;
}
.public-baseline {
  font-size: 17px; color: var(--ink-500); max-width: 520px;
  margin: 0 auto 26px; line-height: 1.55;
}
/* La pastille de la page publique ne réutilise PAS `.mark` : celle-ci n'a de
   fond que dans la barre latérale, et la page s'affichait avec un « É » nu —
   vu en ouvrant la page, pas en relisant la feuille de style. */
.mark-lg {
  width: 64px; height: 64px; margin: 0 auto;
  border-radius: var(--radius-m); background: var(--accent); color: var(--on-accent, #ffffff);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 30px;
}

/* `.btn-primary` fait 100 % de large, parce qu'il a été dessiné pour des
   formulaires. Sur une page de présentation, un bouton qui barre l'écran
   ressemble à une bannière. */
.public-head .btn { width: auto; min-width: 190px; text-decoration: none; }

.public-promises {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
/* Quatre promesses : 2×2 plutôt que 3+1, qui laisse une carte orpheline. */
@media (min-width: 720px) {
  .public-promises { grid-template-columns: repeat(2, 1fr); }
}
.public-promises article {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-m); padding: 20px 22px;
}
.public-promises h2 {
  font-family: var(--font-display); font-size: 18px; margin: 0 0 8px;
  color: var(--ink-900);
}
.public-promises p { margin: 0; color: var(--ink-700); line-height: 1.6; font-size: 14.5px; }
.public-body { margin-top: 36px; }
.public-body p { color: var(--ink-700); line-height: 1.7; margin: 0 0 14px; }
.public-foot {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  text-align: center; font-size: 13.5px; color: var(--ink-500);
}
.public-logo { max-height: 64px; max-width: 220px; margin: 0 auto; display: block; }

/* Logo d'entreprise dans la barre latérale et les cartes d'authentification :
   il REMPLACE la pastille, il ne s'y ajoute pas. */
.brand-logo {
  max-height: 36px; max-width: 150px; display: block;
  border-radius: var(--radius-s); object-fit: contain;
}
.auth-logo { max-height: 56px; max-width: 200px; margin-bottom: 14px; }

/* Secret TOTP : recopié à la main dans une application, donc en monospace et
   assez grand pour qu'on ne confonde pas deux caractères. */
.totp-secret {
  font-family: var(--font-mono); font-size: 16px; letter-spacing: 1px;
  background: var(--paper-sunken); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 10px 12px; margin: 10px 0;
  word-break: break-all; color: var(--ink-900);
}

/* Message sous un formulaire : confirmation, avertissement ou refus. Un bloc
   et non une pastille — une phrase entière dans une pastille est illisible. */
.form-note {
  margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-s);
  font-size: 13px; border-left: 3px solid transparent;
}
.form-note.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.form-note.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.form-note.err { background: var(--error-bg); color: var(--error); border-color: var(--error); }

/* Aperçu de ce que le modèle recevra d'une requête nommée : du texte brut,
   monospace, pour qu'on voie exactement ce qui part — pas une mise en forme
   qui laisserait croire à autre chose. */
.query-preview {
  background: var(--code-bg); border: 1px solid var(--code-border);
  border-radius: var(--radius-s); padding: 10px 12px; margin: 8px 0 0;
  font-family: var(--font-mono); font-size: 12px;
  white-space: pre; overflow-x: auto; color: var(--ink-700);
}
.memory-note {
  margin: 8px 0 0; font-size: 12px; color: var(--ink-500);
  border-left: 2px solid var(--line); padding-left: 8px;
}
.badge.web { background: var(--paper-sunken); color: var(--ink-700); }

.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.source-link {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink-700); font-size: 11.5px;
  cursor: pointer; text-decoration: none; font-family: var(--font-body);
}
.source-link:hover { border-color: var(--accent); background: var(--paper-sunken); }
.source-link.outdated { border-color: var(--warn); color: var(--warn); }

.msg-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.msg-actions button {
  border: 1px solid transparent; background: none; color: var(--ink-500);
  font-size: 12px; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-s);
  font-family: var(--font-body);
}
/* « Brouillon Word » est un lien de téléchargement, habillé comme ses voisins. */
.msg-actions .msg-action-link {
  color: var(--ink-500); font-size: 12px; padding: 4px 8px; text-decoration: none;
  border-radius: var(--radius-s);
}
.msg-actions .msg-action-link:hover { color: var(--accent-lien); background: var(--paper-sunken); }

/* Menu « Rédiger… » dans la zone de saisie. */
.redaction-select {
  align-self: center; max-width: 9.5rem; padding: 6px 8px; font: inherit; font-size: 13px;
  color: var(--ink-700); background: var(--paper-raised);
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); cursor: pointer;
}
/* Pouce haut/bas : l'avis posé reste visible, sinon on ne sait plus si le
   clic a été pris en compte. */
.msg-actions button.voted {
  background: var(--paper-sunken);
  border-color: var(--accent); color: var(--ink-900);
}
.msg-actions button:hover { background: var(--paper-sunken); color: var(--ink-900); }

/* Les quatre raisons d'un pouce bas, demandées APRÈS que l'avis est
   enregistré : qui ignore la question a quand même voté.

   `flex-basis: 100%` passe le bloc à la ligne sous les pouces, et la règle
   `[hidden]` est indispensable — sans elle, `display: flex` l'emporterait sur
   l'attribut `hidden` et le bloc resterait visible en permanence. */
.msg-reasons {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  flex-basis: 100%; margin-top: 6px;
  font-size: 12px; color: var(--ink-500);
}
.msg-reasons[hidden] { display: none; }
.msg-reasons button {
  border: 1px solid var(--line); background: var(--paper-raised);
  color: var(--ink-500); font-size: 12px; cursor: pointer;
  padding: 3px 8px; border-radius: var(--radius-s);
  font-family: var(--font-body);
}
.msg-reasons button:hover { background: var(--paper-sunken); color: var(--ink-900); }

/* ===================================================== Composeur ======== */
.composer {
  padding: 12px 18px 16px; border-top: 1px solid var(--line);
  background: var(--paper-raised); flex-shrink: 0;
}
.composer-inner { max-width: 760px; margin: 0 auto; }

.attachments { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.attachment-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px;
  border-radius: var(--radius-s); background: var(--paper-sunken);
  border: 1px solid var(--line); font-size: 12.5px;
}
.attachment-chip button {
  border: none; background: none; cursor: pointer; color: var(--ink-500);
  font-size: 13px; padding: 0 2px;
}
.image-preview { position: relative; display: inline-block; margin-bottom: 9px; }
.image-preview img {
  max-height: 92px; border-radius: var(--radius-s); border: 1px solid var(--line);
  display: block;
}
.image-preview button {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--paper-raised); color: var(--ink-700); cursor: pointer;
  font-size: 12px; line-height: 1; display: flex; align-items: center;
  justify-content: center;
}

.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea {
  flex: 1; resize: none; min-height: 46px; max-height: 190px; padding: 12px 14px;
  font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  background: var(--paper); color: var(--ink-900);
}
.composer textarea:focus { border-color: var(--accent); outline: none; }

.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--paper);
  color: var(--ink-700); cursor: pointer; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn.has-content { border-color: var(--accent); color: var(--accent-lien); }
.icon-btn.listening { background: var(--error-bg); color: var(--error); border-color: var(--error); }

.send-btn {
  padding: 0 20px; height: 44px; flex-shrink: 0; border: none;
  border-radius: var(--radius-s); background: var(--ink-700); color: #fff;
  font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: var(--font-body);
}
.send-btn:hover { background: var(--ink-900); }
.send-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.stop-btn { background: var(--error); }
.stop-btn:hover { background: var(--error); filter: brightness(0.92); }

.composer-foot {
  margin-top: 7px; font-size: 11.5px; color: var(--ink-300);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}

/* ===================================================== Markdown ========= */
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md p { margin: 0 0 11px; }
.md h1, .md h2, .md h3, .md h4 {
  font-family: var(--font-display); line-height: 1.3; margin: 18px 0 9px; font-weight: 600;
}
.md h1 { font-size: 21px; }
.md h2 { font-size: 18.5px; }
.md h3 { font-size: 16.5px; }
.md h4 { font-size: 15px; }
.md ul, .md ol { margin: 0 0 11px; padding-left: 23px; }
.md li { margin-bottom: 4px; }
.md li > ul, .md li > ol { margin-top: 4px; margin-bottom: 0; }
.md blockquote {
  margin: 0 0 11px; padding: 2px 0 2px 14px; border-left: 3px solid var(--accent);
  color: var(--ink-500);
}
.md hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.md strong { font-weight: 600; }
.md a { color: var(--accent-lien); text-decoration: underline; }

.md code.inline {
  font-family: var(--font-mono); font-size: 0.89em; padding: 1px 5px;
  border-radius: 4px; background: var(--code-bg); border: 1px solid var(--code-border);
}

.md .code-block {
  margin: 0 0 13px; border: 1px solid var(--code-border);
  border-radius: var(--radius-s); overflow: hidden; background: var(--code-bg);
}
.md .code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 11px; border-bottom: 1px solid var(--code-border);
  font-size: 11.5px; color: var(--ink-500); font-family: var(--font-mono);
}
.md .code-head button {
  border: 1px solid var(--line-strong); background: var(--paper-raised);
  color: var(--ink-700); font-size: 11.5px; padding: 2px 9px; border-radius: 5px;
  cursor: pointer; font-family: var(--font-body);
}
.md .code-head button:hover { border-color: var(--accent); }
.md pre {
  margin: 0; padding: 12px; overflow-x: auto; font-family: var(--font-mono);
  font-size: 13px; line-height: 1.55;
}
.md pre code { font-family: inherit; }

.md .table-wrap { overflow-x: auto; margin: 0 0 13px; }
.md table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.md th, .md td {
  border: 1px solid var(--line); padding: 7px 11px; text-align: left; vertical-align: top;
}
.md th { background: var(--paper-sunken); font-weight: 600; }

/* ===================================================== Administration == */
.admin-page { max-width: 1020px; margin: 0 auto; padding: 26px 18px 60px; }
.admin-page h1 {
  font-family: var(--font-display); font-size: 25px; margin: 0 0 4px; font-weight: 600;
}
.admin-page .lede { color: var(--ink-500); margin: 0 0 26px; font-size: 14px; }

.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px;
  overflow-x: auto;
}
.tab {
  padding: 9px 15px; border: none; background: none; color: var(--ink-500);
  font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; font-family: var(--font-body);
}
.tab:hover { color: var(--ink-900); }
.tab.active { color: var(--ink-900); border-bottom-color: var(--accent); font-weight: 600; }

.card {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-m); padding: 20px; margin-bottom: 18px;
}
.card h2 {
  font-family: var(--font-display); font-size: 17px; margin: 0 0 4px; font-weight: 600;
}
.card .sub { color: var(--ink-500); font-size: 13px; margin: 0 0 16px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td {
  padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left;
  vertical-align: middle;
}
table.data th { font-size: 12px; text-transform: uppercase; color: var(--ink-500); font-weight: 600; }
table.data tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }

.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  font-weight: 600;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.err { background: var(--error-bg); color: var(--error); }
.pill.neutral { background: var(--paper-sunken); color: var(--ink-500); }

.switch-row {
  display: flex; align-items: flex-start; gap: 11px; padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.switch-row:last-child { border-bottom: none; }
.switch-row input[type="checkbox"] { margin-top: 3px; width: 17px; height: 17px; flex-shrink: 0; }
.switch-row .label { font-weight: 600; font-size: 14px; }
.switch-row .desc { font-size: 12.5px; color: var(--ink-500); margin-top: 2px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.progress {
  height: 7px; border-radius: 999px; background: var(--paper-sunken);
  overflow: hidden; margin-top: 7px;
}
.progress > div { height: 100%; background: var(--accent); transition: width var(--t-normal); }

.secret-reveal {
  background: var(--ok-bg); border: 1px solid var(--ok); color: var(--ok);
  padding: 13px; border-radius: var(--radius-s); margin-top: 13px; font-size: 13.5px;
}
.secret-reveal code {
  font-family: var(--font-mono); font-size: 14px; background: var(--paper-raised);
  padding: 3px 7px; border-radius: 4px; display: inline-block; margin-top: 5px;
  color: var(--ink-900);
}

/* ===================================================== Dialogue ========= */
dialog {
  border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px;
  background: var(--paper-raised); color: var(--ink-900); max-width: 540px;
  width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog h3 { font-family: var(--font-display); margin: 0 0 12px; font-size: 18px; font-weight: 600; }
dialog .dialog-body { max-height: 56vh; overflow-y: auto; font-size: 14px; }
dialog .dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.passage {
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 11px;
  margin-bottom: 9px; font-size: 13.5px; white-space: pre-wrap;
}
.passage.highlight { border-color: var(--accent); background: var(--warn-bg); }
.passage .ref { font-size: 11.5px; color: var(--ink-500); margin-bottom: 5px; font-weight: 600; }

/* ===================================================== Mobile =========== */
@media (max-width: 860px) {
  .sidebar {
    position: fixed; z-index: 30; height: 100%; margin-left: calc(-1 * var(--sidebar-w));
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  }
  .shell.sidebar-open .sidebar { margin-left: 0; }
  .shell.sidebar-open .sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 20;
  }
  .hamburger { display: block; }
  .msg { max-width: 94%; }
  #chat { padding: 16px 12px 6px; }
  .composer { padding: 10px 12px 14px; }
  .model-select { max-width: 150px; }
  .empty { margin-top: 5vh; }
  .empty h2 { font-size: 22px; }
}

/*
 * Polices auto-hébergées (facultatif).
 *
 * Pour retrouver l'identité visuelle d'origine sans appel à un serveur
 * externe : télécharge Fraunces et Inter (licence SIL Open Font), place les
 * .woff2 dans erudit/static/fonts/, puis décommente ce bloc.
 *
 * @font-face {
 *   font-family: "Inter"; src: url("/static/fonts/inter.woff2") format("woff2");
 *   font-weight: 400 600; font-display: swap;
 * }
 * @font-face {
 *   font-family: "Fraunces"; src: url("/static/fonts/fraunces.woff2") format("woff2");
 *   font-weight: 500 600; font-display: swap;
 * }
 * :root {
 *   --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
 *   --font-display: "Fraunces", Georgia, serif;
 * }
 */

/* ---------------------------------------------------------------------------
   Utilitaires de mise en page
   ---------------------------------------------------------------------------
   La politique de sécurité du contenu (CSP) est stricte : « style-src 'self' »,
   sans 'unsafe-inline'. Les attributs style="..." des gabarits sont donc
   REFUSÉS par le navigateur, en silence pour l'utilisateur mais bruyamment
   dans la console. Les styles correspondants n'étaient tout simplement pas
   appliqués, et la mise en page était subtilement cassée en production sans
   que rien ne le signale.

   Ces classes les remplacent. Règle à tenir : aucun attribut style= dans un
   gabarit. Dans le JavaScript, l'affectation `element.style.x = y` reste
   permise — elle passe par le CSSOM, que la CSP ne bloque pas. */
.stack-xs { margin-top: 8px; }
.stack-sm { margin-top: 12px; }
.stack    { margin-top: 14px; }
.stack-md { margin-top: 16px; }
.stack-lg { margin-top: 18px; }

.text-small { font-size: 13px; }
.text-tiny  { font-size: 11.5px; color: var(--ink-500); }
.text-muted { font-size: 12.5px; color: var(--ink-500); }

.row-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}
.row-inline-wide {
  margin: 0 0 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.checkbox-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.centered { text-align: center; }

/* Ligne de détail d'un document : les champs du §6 et les droits. */
.detail-row > td {
  background: var(--surface-2, rgba(0, 0, 0, .03));
  padding: 14px 16px;
}

/* Bandeau d'avertissement au-dessus de la conversation (modèle sans vision,
   image ignorée, budget atteint…). */
.chat-notice { margin: 10px 18px 0; }

/* Tâches planifiées (erudit/taches.py). */
#taches-dialog { width: min(560px, calc(100vw - 32px)); }
.taches-intro { color: var(--ink-500); font-size: 14px; margin: 0 0 12px; }
.taches-liste { list-style: none; margin: 0 0 16px; padding: 0; display: flex;
  flex-direction: column; gap: 8px; }
.taches-liste li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); }
.taches-liste li span { grid-column: 1; color: var(--ink-500); font-size: 13px; }
.taches-liste li button { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.taches-form { display: flex; flex-direction: column; gap: 6px; }
.taches-form label { font-size: 13px; font-weight: 700; color: var(--ink-700); }
.taches-form input, .taches-form textarea, .taches-form select {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); background: var(--paper-raised); color: var(--ink-900); }
.taches-quand { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.taches-quand > div { display: flex; flex-direction: column; gap: 6px; }
.taches-erreur { color: var(--error); font-size: 13px; min-height: 1em; }

/* ===================================================================
 * Icônes et mouvement (finitions du 14/11/2026).
 *
 * Doctrine : le mouvement RÉPOND à un geste ou dit ce qui change — un
 * message qui arrive, un bouton qui s'enfonce, une fenêtre qui s'ouvre.
 * Rien ne bouge pour décorer. Un seul moment signature : le cachet qui se
 * pose comme un vrai tampon sur une réponse vérifiée. Le tout est coupé
 * pour qui a demandé moins d'animations (règle prefers-reduced-motion plus
 * haut dans ce fichier).
 * =================================================================== */
.icone {
  width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em;
}
button .icone, a .icone { pointer-events: none; }
.sidebar-foot button, .new-conv-btn, .chip, .msg-actions button,
.msg-actions .msg-action-link, .source-link {
  display: inline-flex; align-items: center; gap: 6px;
}

/* Un message qui arrive glisse à sa place. */
@keyframes apparition {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.row { animation: apparition 240ms cubic-bezier(.2, .8, .2, 1) both; }

/* Le cachet se pose : un coup de tampon, une seule fois. */
@keyframes tampon {
  0%   { opacity: 0; transform: scale(1.9) rotate(-14deg); }
  60%  { opacity: 1; transform: scale(.92) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.badge.regime-ancre .cachet { animation: tampon 520ms cubic-bezier(.2, .9, .3, 1.3) both; }

/* Les boutons s'enfoncent sous le doigt. */
button, .btn, .send-btn, .chip, .msg-action-link {
  transition: transform 120ms ease, background var(--t-fast),
              border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
button:active:not(:disabled), .btn:active, .msg-action-link:active {
  transform: scale(.96);
}

/* La zone de saisie s'éclaire quand on y écrit. */
#composer-form { transition: box-shadow var(--t-normal), border-color var(--t-normal); }
#composer-form:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Les fenêtres s'ouvrent, elles n'apparaissent pas d'un coup. */
@keyframes ouverture {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
dialog[open] { animation: ouverture 200ms cubic-bezier(.2, .8, .2, 1); }
dialog[open]::backdrop { animation: voile 200ms ease; }
@keyframes voile { from { opacity: 0; } to { opacity: 1; } }

/* Une conversation de la liste se soulève au survol. */
.conv-item { transition: background var(--t-fast), transform var(--t-fast); }
.conv-item:hover { transform: translateX(2px); }

/* Écran étroit : « Rédiger… » passe sur sa propre ligne, au-dessus de la
   saisie, plutôt que de l'écraser (constaté à l'écran le 14/11/2026). */
@media (max-width: 720px) {
  #composer-form { flex-wrap: wrap; }
  .redaction-select { order: -1; flex-basis: 100%; max-width: none; }
}

/* Fraîcheur des documents (lot C) : l'état se lit aussi sans la couleur. */
.etat-perime { color: var(--error); font-weight: 700; }
.etat-bientot { color: var(--warn); font-weight: 700; }

/* Écran de vérification (plan 4.3). */
.verification-liste { display: grid; gap: 14px; margin-top: 12px; }
.verif-carte {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; display: grid; gap: 10px;
}
.verif-validee { border-left: 4px solid var(--ok); }
.verif-rejetee { opacity: .7; border-left: 4px solid var(--error); }
.verif-proposee { border-left: 4px solid var(--warn); }
.verif-tete { margin: 0; font-size: 13.5px; color: var(--ink-500); }
.verif-champ { display: grid; gap: 4px; font-size: 13.5px; }
.verif-champ input, .verif-champ textarea { width: 100%; font: inherit; }
.verif-extrait { white-space: pre-wrap; font-size: 13.5px; margin: 8px 0 0; }
.verif-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Citation phrase par phrase (H.4) : le renvoi et son numéro dans la liste. */
sup.renvoi {
  display: inline-block; vertical-align: .35em; line-height: 1.25;
  min-width: 1.35em; padding: 0 4px; border-radius: 5px; text-align: center;
  font-size: .68em; font-weight: 700;
  background: var(--paper-sunken); color: var(--ink-700);
}
.source-numero {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.5em; padding: 0 4px; margin-right: 6px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
  background: var(--paper-sunken); color: var(--ink-700);
}

