/* SPS-CARBON application: macOS-style window, sidebar, toolbar, cards. */

/* Seen only while the platform's files are still arriving: a fast load skips it. */
.boot { position: fixed; inset: 0; display: grid; place-items: center; color: var(--label-3); opacity: 0; animation: boot-in var(--m-300) var(--ease-out) 500ms forwards; }
@keyframes boot-in { to { opacity: 1; } }
.boot-error { max-width: 640px; margin: 15vh auto; padding: 2rem; }
.boot-error h1 { font-size: 1.5rem; margin-bottom: 0.75rem; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; }
.logo img { height: auto; }
.logo-on-dark { display: none !important; }
.sp-logo { display: inline-flex; }
.sp-logo img { width: auto; height: 3.1rem; }
.cobrand { display: inline-flex; align-items: center; gap: 0.9rem; }
.cobrand > i { flex: none; width: 1px; height: 2.4rem; background: var(--sep-2); }
.pz-sp { width: auto; height: 1.9rem; margin-left: 0.4rem; }
.sp-full { display: inline-flex; flex: none; }
.sp-full img { width: 150px; height: auto; }
.report-brand-left { display: grid; justify-items: start; gap: 0.9rem; }
.exec-head .sp-logo img, .letter-head .sp-logo img { height: 3.5rem; }
html[data-theme="dark"] .logo-on-light { display: none !important; }
html[data-theme="dark"] .logo-on-dark { display: block !important; }

/* ---------- Window ---------- */
.window { min-height: 100vh; }
.content { margin-left: var(--sidebar-w); min-width: 0; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: var(--sidebar); border-right: 0.5px solid var(--sep-2);
  overflow: hidden;
}
.side-top { display: flex; align-items: center; justify-content: space-between; height: var(--toolbar-h); padding: 0 0.6rem 0 1.1rem; flex: none; }
.side-logo img { width: 128px; }
.side-close { display: none; }
.side-context {
  display: flex; align-items: center; gap: 0.5rem; margin: 0.15rem 0.6rem 0.5rem; padding: 0.5rem 0.6rem;
  border-radius: var(--r-s); background: var(--surface); box-shadow: var(--card-shadow);
  transition: background var(--m-100) var(--ease);
}
a.side-context:hover { background: var(--surface-2); }
.side-context.is-static { background: transparent; box-shadow: none; padding-top: 0.2rem; }
.side-context-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.side-context-text b { font-size: var(--t-callout); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-context-text span { font-size: var(--t-foot); color: var(--label-2); }
.side-context > .i { color: var(--label-3); width: 14px; height: 14px; }
.side-context { flex: none; }
/* The head and the foot stay in place; only the list of pages scrolls between them. */
.side-nav { flex: 1 1 auto; min-height: 0; padding: 0 0.6rem; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.side-section { padding: 0.35rem 0; }
.side-heading { display: flex; justify-content: space-between; align-items: baseline; padding: 0.55rem 0.55rem 0.25rem; font-size: var(--t-cap); font-weight: 600; color: var(--label-3); }
.side-heading-value { font-weight: 500; }
.side-item {
  display: flex; align-items: center; gap: 0.55rem; height: 30px; padding: 0 0.55rem;
  border-radius: var(--r-s); color: var(--label); font-size: var(--t-callout);
  transition: background var(--m-100) var(--ease);
}
.side-item .i { color: var(--label-3); width: 16px; height: 16px; }
.side-item.is-active .i { color: var(--accent-text); }
.side-item:hover { background: var(--fill-2); }
.side-item.is-active { background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep); font-weight: 600; }
.side-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-trail { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--label-2); font-size: var(--t-foot); }
.side-flag { width: 6px; height: 6px; border-radius: 50%; }
.side-flag[data-state="warn"] { background: var(--orange); }
.side-flag[data-state="error"] { background: var(--red); }
.side-soon { padding: 0.15rem 0.55rem 0.3rem; color: var(--label-3); font-size: var(--t-foot); line-height: 1.4; }
.side-foot { flex: none; margin-top: auto; padding: 0.35rem 0.6rem 0.75rem; display: grid; gap: 0.15rem; }
.side-foot::before { content: ""; margin: 0 0.55rem 0.3rem; border-top: 0.5px solid var(--sep-2); }
/* The person: a card that answers the bilan card at the top. Name and role
 * have the whole width; the session tools sit on its lower edge. */
.side-user { display: grid; margin-top: 0.35rem; border-radius: var(--r-s); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--sep); overflow: hidden; }
.side-me { display: flex; align-items: center; gap: 0.6rem; min-width: 0; padding: 0.55rem 0.6rem; color: var(--label); transition: background var(--m-100) var(--ease); }
.side-me:hover { background: var(--fill-2); }
.side-me:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.side-me .avatar { width: 32px; height: 32px; }
.side-user-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.side-user-text b { font-size: var(--t-callout); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text span { font-size: var(--t-foot); color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-tools { display: flex; border-top: 0.5px solid var(--sep); }
.side-tools .btn-icon { flex: 1; width: auto; height: 34px; border-radius: 0; color: var(--label-3); }
.side-tools .btn-icon + .btn-icon { border-left: 0.5px solid var(--sep); }
.side-tools .btn-icon:hover { color: var(--label); }
.side-tools .btn-icon:active { transform: none; background: var(--fill); }
.side-tools .btn-icon:focus-visible { outline-offset: -2px; }
.scrim { display: none; }
/* Where the browser can tie a style to scrolling, the list fades at an edge
 * only while there is more behind it, and its scrollbar steps aside. */
@property --side-fade-t { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --side-fade-b { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes side-fade { 0% { --side-fade-t: 0px; --side-fade-b: 28px; } 6% { --side-fade-t: 28px; } 94% { --side-fade-b: 28px; } 100% { --side-fade-t: 28px; --side-fade-b: 0px; } }
@supports (animation-timeline: scroll()) {
  .side-nav {
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(#0000, #000 var(--side-fade-t), #000 calc(100% - var(--side-fade-b)), #0000);
    mask-image: linear-gradient(#0000, #000 var(--side-fade-t), #000 calc(100% - var(--side-fade-b)), #0000);
    animation-name: side-fade; animation-duration: auto; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: scroll(self);
  }
  .side-nav::-webkit-scrollbar { display: none; }
  /* Tied to scrolling, not to time: the in-app "reduce motion" leaves it alone. */
  html.reduce-motion .side-nav { animation-duration: auto !important; }
}
/* A short window (a phone held sideways): the whole bar scrolls again, so the list keeps room. */
@media (max-height: 560px) {
  .sidebar { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .side-nav { flex: none; overflow: visible; -webkit-mask-image: none; mask-image: none; animation: none; }
}

/* ---------- Toolbar ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: 1rem;
  height: var(--toolbar-h); padding: 0 var(--gutter);
  background: var(--toolbar); border-bottom: 0.5px solid var(--sep-2);
}
.toolbar-lead { display: flex; align-items: center; gap: 0.5rem; min-width: 0; overflow: hidden; container-type: inline-size; }
.toolbar-menu { display: none; }
.crumbs { display: flex; align-items: center; gap: 0.3rem; min-width: 0; font-size: var(--t-callout); color: var(--label-2); }
/* The page you are on is never cut while an ancestor can still give way. */
.crumbs a, .crumbs-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color var(--m-100) var(--ease); }
.crumbs-sep { flex: none; }
.crumbs a:hover { color: var(--label); }
.crumbs [aria-current] { flex: none; max-width: 100%; color: var(--label); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The trail follows the room it really has (the actions on the right differ
 * from page to page): the organisation leaves first, then every ancestor. */
@container (max-width: 20rem) { .crumbs > a:first-child, .crumbs > a:first-child + .crumbs-sep { display: none; } }
@container (max-width: 15rem) { .crumbs > :not(:last-child) { display: none; } }
.crumbs-sep .i { width: 12px; height: 12px; color: var(--label-4); }
.capsule {
  display: inline-flex; align-items: center; gap: 0.7rem; height: 34px; padding: 0 0.5rem 0 1rem;
  border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep);
  font-size: var(--t-foot); color: var(--label-2); white-space: nowrap;
}
.capsule-name { font-weight: 560; color: var(--label); }
.capsule-sep { width: 0.5px; height: 14px; background: var(--sep-3); }
.capsule-total b { color: var(--label); font-weight: 600; font-stretch: var(--figure-stretch); font-size: var(--t-body); }
.toolbar-trail { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.search-field {
  display: inline-flex; align-items: center; gap: 0.4rem; height: 34px; width: 180px; padding: 0 0.5rem 0 0.75rem;
  border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep); color: var(--label-3); font-size: var(--t-callout);
  transition: background var(--m-100) var(--ease);
}
.search-field:hover { background: var(--fill); }
.search-field span { flex: 1; text-align: left; }
.search-field kbd { font-size: 10px; padding: 0 0.35em; background: var(--surface); }
.topbar-note { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--label-2); font-size: var(--t-foot); }
.topbar-note .i { width: 14px; height: 14px; }

/* ---------- Page ---------- */
.page { padding: 1.75rem var(--gutter) 4rem; max-width: 1380px; }
.page-enter { animation: enter var(--m-200) var(--ease-out); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.kicker { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.4rem; color: var(--label-2); font-size: var(--t-foot); font-weight: 560; }
.where { display: flex; gap: 0.45rem; margin-top: 0.6rem; max-width: 74ch; color: var(--label-2); font-size: var(--t-foot); }
.where .i { margin-top: 0.1rem; width: 14px; height: 14px; color: var(--label-3); }
.where b { font-weight: 600; color: var(--label); }
.foot-note { display: flex; align-items: center; gap: 0.4rem; margin-top: 1rem; color: var(--label-3); font-size: var(--t-foot); }
.foot-note .i { width: 14px; height: 14px; }

.notice { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 1.25rem; padding: 0.8rem 1rem; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--card-shadow); }
.notice > .i { margin-top: 0.1rem; color: var(--blue); }
.notice > div { flex: 1; }
.notice b { font-weight: 600; }
.notice p { color: var(--label-2); font-size: var(--t-callout); margin-top: 0.1rem; }
.notice-check > .i { color: var(--orange); }

/* Cards (System Settings style grouped surfaces) */
.card, .panel { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--card-shadow); padding: 1.35rem 1.5rem; min-width: 0; }
.card + .card, .card + .grid-2, .grid-2 + .card, .summary + *, .panel + .panel, .dash-grid + .panel { margin-top: 1rem; }
.card-head, .panel-head { margin-bottom: 1rem; }
.card-head p, .panel-head p { color: var(--label-2); font-size: var(--t-foot); margin-top: 0.15rem; }
.card-head-row, .panel-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.card-sub, .panel-sub { margin: 1.2rem 0 0.4rem; font-size: var(--t-callout); }
.card-note, .panel-note { margin-top: 0.85rem; font-size: var(--t-callout); color: var(--label-2); }
.card-note b, .panel-note b { color: var(--label); }
.grid-2, .dash-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.grid-2 > *, .dash-grid > * { margin-top: 0 !important; }

.empty { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 0.4rem; padding: 4rem 1rem; }
.empty > * { max-width: 100%; }
.empty-icon { width: 32px; height: 32px; color: var(--label-4); stroke-width: 1.3px; margin-bottom: 0.4rem; }
.empty p { max-width: 44ch; color: var(--label-2); font-size: var(--t-callout); }
.empty .btn { margin-top: 0.8rem; }

/* Login: see auth.css (same frame as the website's sign-in page). */

/* ---------- Bilan lists: the ledgers (frame.css, "Ledgers") ---------- */
.pips { display: flex; gap: 3px; }
.pips i { width: 12px; height: 4px; border-radius: 2px; background: var(--fill); }
.pips i.on { background: var(--accent); }
.down, .is-down { color: var(--accent-text); }
.up, .is-up { color: var(--red); }
.is-up.is-mild { color: var(--orange); } /* a slight rise: to check, not a problem (trendClass) */

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi { padding: 0.9rem 1rem; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--card-shadow); display: grid; gap: 0.15rem; }
.kpi span { color: var(--label-2); font-size: var(--t-foot); }
.kpi b { font-size: 1.9rem; font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.035em; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; background: transparent; margin-bottom: 1rem; }
.seg button { height: 30px; border: 0; background: transparent; padding: 0 0.85rem; border-radius: 999px; font-size: var(--t-foot); font-weight: 560; color: var(--label-3); box-shadow: inset 0 0 0 1px var(--sep); transition: background var(--m-150) var(--ease), color var(--m-150) var(--ease); }
.seg button:hover { color: var(--label); }
.seg button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.seg button small { margin-left: 0.35rem; opacity: 0.7; }

/* ---------- Saisie ---------- */
.page-head-poste { align-items: flex-start; }
.poste-total { flex: none; display: grid; justify-items: end; gap: 0.2rem; padding-top: 0.2rem; }
.poste-total-label { color: var(--label-2); font-size: var(--t-foot); }
.poste-total-value { display: flex; align-items: baseline; gap: 0.35rem; font-weight: 560; font-stretch: var(--figure-stretch); font-size: 2rem; letter-spacing: -0.035em; line-height: 1.1; }
.poste-total-value small { font-size: var(--t-foot); color: var(--label-2); font-weight: 500; letter-spacing: 0; }

.saisie { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.saisie-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.sheet-block { min-width: 0; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--window-shadow); padding: 0.25rem 0 0.75rem; overflow: hidden; }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.1rem 0.25rem; }
.sheet-head h2 { font-size: var(--t-body); }
.sheet-sub { color: var(--label-2); font-size: var(--t-foot); }
.sheet-note { display: flex; gap: 0.45rem; margin: 0.35rem 1.1rem 0.5rem; color: var(--label-2); font-size: var(--t-foot); }
.sheet-note .i { margin-top: 0.1rem; width: 14px; height: 14px; color: var(--label-3); }
.sheet-scroll { overflow-x: auto; }
.sheet { min-width: 800px; font-size: var(--t-callout); }
.sheet th { padding: 0.7rem 0.55rem 0.45rem; text-align: left; font-size: var(--t-cap); font-weight: 560; color: var(--label-3); border-bottom: 0.5px solid var(--sep-2); white-space: nowrap; }
.sheet th.num { text-align: right; }
.sheet th:first-child, .sheet td:first-child { padding-left: 1.1rem; }
.sheet th:last-child, .sheet td:last-child { padding-right: 0.9rem; }
.sheet td { padding: 0.45rem 0.35rem; border-bottom: 0.5px solid var(--sep); vertical-align: top; }
.sheet tbody tr:last-child td { border-bottom: 0; }
.sheet-row { transition: background var(--m-100) var(--ease); }
.sheet-row:hover { background: var(--fill-3); }
.sheet-row.is-selected { background: var(--accent-soft); }
.sheet-row[data-state="error"] td:first-child { box-shadow: inset 2px 0 0 var(--red); }
.sheet-row[data-state="warn"] td:first-child { box-shadow: inset 2px 0 0 var(--orange); }
.sheet .input { box-shadow: none; background: transparent; height: 30px; padding: 0 0.45rem; }
.sheet .input:hover { box-shadow: inset 0 0 0 0.5px var(--sep-3); background: var(--surface); }
.sheet .input:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-ring); background: var(--surface); }
.cell-source { width: 30%; min-width: 220px; }
.input-label { font-weight: 560; }
.input-site { font-size: var(--t-foot) !important; color: var(--label-2) !important; height: 24px !important; }
.cell-sub { display: block; color: var(--label-2); font-size: var(--t-foot); }
.cell-source > b { display: block; padding: 0.35rem 0.45rem 0; font-weight: 560; }
.cell-source > .cell-sub { padding-left: 0.45rem; }
.cell-factor { width: 26%; min-width: 200px; }
.factor-btn {
  width: 100%; display: flex; align-items: center; gap: 0.4rem; text-align: left; min-height: 46px; padding: 0.3rem 0.45rem;
  border: 0; border-radius: var(--r-xs); background: transparent; transition: background var(--m-100) var(--ease);
}
.factor-btn:hover { background: var(--fill-2); }
.factor-btn > span { flex: 1; min-width: 0; display: grid; }
.factor-btn b, .factor-read b { font-weight: 500; font-size: var(--t-callout); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.factor-btn small, .factor-read small { color: var(--label-2); font-size: var(--t-cap); }
.factor-btn .i { color: var(--label-3); width: 14px; height: 14px; }
.factor-btn.is-empty { box-shadow: inset 0 0 0 0.5px var(--sep-3); }
.factor-btn.is-empty b { color: var(--accent-text); }
.factor-read { display: grid; padding: 0.3rem 0.45rem; }
.cell-typ { min-width: 175px; }
.cell-typ .input { font-size: var(--t-foot); }
.sheet-inventaire { min-width: 0; }
.sheet-inventaire .cell-source { min-width: 170px; width: 22%; }
.sheet-inventaire .cell-factor { min-width: 120px; width: 13%; }
.sheet-inventaire .cell-qty { min-width: 112px; }
.sheet-inventaire .cell-q { min-width: 125px; }
.sheet-inventaire .cell-result { min-width: 92px; }
.sheet-inventaire .cell-tools .btn-icon { width: 24px; }
.cell-qty { width: 15%; min-width: 150px; }
.qty { display: flex; align-items: center; gap: 0.2rem; }
.input-qty { text-align: right; font-weight: 600; }
.qty > b { flex: 1; text-align: right; padding: 0.35rem 0.4rem; font-weight: 600; }
.qty-unit { flex: none; max-width: 7.5em; color: var(--label-2); font-size: var(--t-cap); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.cell-derived { display: block; text-align: right; padding-right: 0.45rem; color: var(--label-3); font-size: var(--t-cap); }
.cell-q { width: 13%; min-width: 150px; }
.input-q { font-size: var(--t-foot) !important; }
.input-q[data-q="none"] { color: var(--orange); font-weight: 560; }
.q-read { display: inline-block; padding: 0.35rem 0.45rem; font-size: var(--t-foot); }
.q-read[data-q="none"] { color: var(--orange); font-weight: 560; }
.cell-result { width: 11%; min-width: 110px; text-align: right; }
.cell-result b { display: block; padding-top: 0.3rem; font-size: var(--t-body); font-weight: 650; }
.cell-result small { color: var(--label-3); font-size: var(--t-cap); }
.cell-score { display: flex; justify-content: flex-end; margin-top: 0.25rem; }
.cell-tools { white-space: nowrap; text-align: right; width: 1%; padding-top: 0.55rem !important; }
.cell-tools .btn-icon { opacity: 0.55; transition: opacity var(--m-100) var(--ease), background var(--m-100) var(--ease); }
.sheet-row:hover .cell-tools .btn-icon, .cell-tools .btn-icon:focus-visible, .cell-tools .btn-icon.has-badge, .cell-tools .btn-icon.is-on { opacity: 1; }
/* When the sheet is wider than its card (tablets, narrow windows), each line's
 * tools stay pinned at the right edge instead of scrolling out of reach. Only
 * the tools: pinning the result too would cover the quantity being typed, and
 * the poste's total stays in the page head. Phones keep the plain scroll, as
 * pinned buttons would take half the width. The pinned cell repaints its row's
 * tint over an opaque surface; a soft edge shows while columns pass under it. */
.sheet-block { container-type: inline-size; }
@container (min-width: 36rem) {
  .sheet th:last-child, .sheet .cell-tools {
    position: sticky; right: 0; z-index: 1;
    background: linear-gradient(var(--row-tint, transparent), var(--row-tint, transparent)) var(--surface);
  }
}
.sheet-row:hover { --row-tint: var(--fill-3); }
.sheet-row.is-selected { --row-tint: var(--accent-soft); }
@supports (animation-timeline: scroll()) {
  @container (min-width: 36rem) { .sheet th:last-child, .sheet .cell-tools { animation: sheet-edge linear both; animation-timeline: scroll(nearest inline); } }
  @keyframes sheet-edge { from, 97% { box-shadow: -12px 0 12px -12px rgb(var(--shade, 6 33 41) / 0.4); } to { box-shadow: none; } }
}
.evidence-read { display: inline-grid; place-items: center; width: 28px; height: 28px; color: var(--accent-text); }
.sheet-msg td { padding: 0 0.6rem 0.55rem 1.1rem !important; border-bottom: 0.5px solid var(--sep); }
.sheet-row:has(+ .sheet-msg) td { border-bottom: 0; }
.msg { display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 1rem; font-size: var(--t-cap); font-weight: 500; }
.msg .i { width: 14px; height: 14px; }
.msg-error { color: var(--red); }
/* Which platform this window shows (ui/shell.js): the demonstration says so, the online platform needs no label. */
.mode-chip { display: inline-flex; align-items: center; flex: none; height: 28px; padding: 0 0.75rem; border-radius: 999px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--sep); color: var(--label-2); font-size: var(--t-foot); font-weight: 620; white-space: nowrap; cursor: default; }
/* The one-time invitation code (console-users.js): read aloud or copied, never retyped wrong. */
.invite-code { margin: 0.9rem 0; padding: 0.8rem 1rem; border-radius: var(--r-m); background: var(--accent-soft); color: var(--accent-text); font-size: 1.5rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: 0.12em; text-align: center; user-select: all; }
.msg-warn { color: var(--orange); }
.sheet-empty { padding: 0.9rem 1.1rem; color: var(--label-2); font-size: var(--t-callout); }
.btn-add { margin: 0.6rem 0 0 0.75rem; background: transparent; box-shadow: none; color: var(--accent-text); }
.btn-add:hover { background: var(--accent-soft); }
.poste-nav { display: flex; justify-content: space-between; gap: 1rem; }

/* Inspector (calculation detail) */
.detail {
  position: fixed; z-index: 25; top: calc(var(--toolbar-h) + 0.75rem); right: 0.75rem; bottom: 0.75rem; width: min(380px, calc(100vw - 1.5rem));
  overflow-y: auto; background: var(--surface-raised); border-radius: var(--r-xl); box-shadow: var(--pop-shadow);
  padding: 1rem 1.15rem; animation: inspector-in var(--m-200) var(--ease-out);
}
@keyframes inspector-in { from { opacity: 0; transform: translateX(12px); } }
@media (min-width: 1680px) {
  .saisie.has-detail { grid-template-columns: minmax(0, 1fr) 360px; }
  .detail { position: sticky; top: calc(var(--toolbar-h) + 1rem); right: auto; bottom: auto; width: auto; max-height: calc(100vh - var(--toolbar-h) - 2rem); box-shadow: var(--card-shadow); border-radius: var(--r-l); }
}
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.5rem; }
.detail-kicker { color: var(--label-2); font-size: var(--t-cap); font-weight: 560; }
.detail-head h2 { font-size: var(--t-title-2); margin-top: 0.1rem; }
.detail-sec { padding: 0.8rem 0; border-top: 0.5px solid var(--sep); }
.detail-sec h3 { font-size: var(--t-foot); color: var(--label-2); font-weight: 600; margin-bottom: 0.45rem; }
.formula { padding: 0.7rem 0.8rem; border-radius: var(--r-m); background: var(--fill-2); font-size: var(--t-foot); line-height: 1.6; color: var(--label-2); }
.formula + .formula { margin-top: 0.4rem; }
.formula span { display: block; margin-top: 0.15rem; font-weight: 650; font-size: var(--t-title-2); color: var(--label); }
.dl { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0.3rem 0.75rem; font-size: var(--t-foot); }
.dl dt { color: var(--label-2); }
.dl dd { overflow-wrap: anywhere; }
.unc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.unc > div { padding: 0.55rem 0.6rem; border-radius: var(--r-m); background: var(--fill-3); display: grid; gap: 0.1rem; }
.unc span { font-size: var(--t-cap); color: var(--label-2); }
.unc b { font-size: var(--t-body); font-weight: 650; }
.unc small { font-size: var(--t-cap); color: var(--label-3); line-height: 1.3; }
.unc-score { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.55rem; font-size: var(--t-foot); color: var(--label-2); }
.detail .muted.small { margin-top: 0.5rem; }
.comments { display: grid; gap: 0.7rem; margin-bottom: 0.7rem; }
.comments li { display: flex; gap: 0.55rem; font-size: var(--t-callout); }
.comments li.is-resolved { opacity: 0.55; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.45rem; font-size: var(--t-cap); color: var(--label-3); margin-bottom: 0.1rem; }
.comment-meta b { color: var(--label); font-size: var(--t-foot); font-weight: 600; }
.comments .btn { margin-top: 0.3rem; margin-left: -0.5rem; }
.comment-form { display: grid; gap: 0.45rem; justify-items: end; }
.detail-foot { margin-top: 0.6rem; color: var(--label-3); font-size: var(--t-cap); }

/* ---------- Dashboard ---------- */
.summary { display: grid; grid-template-columns: 1.15fr 0.9fr 0.9fr 1.2fr; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--window-shadow); }
.summary-cell { padding: 1.1rem 1.25rem; min-width: 0; }
.summary-cell + .summary-cell { border-left: 0.5px solid var(--sep); }
.summary-label { color: var(--label-2); font-size: var(--t-foot); font-weight: 500; margin-bottom: 0.3rem; }
.summary-value { display: flex; align-items: baseline; gap: 0.35rem; font-size: 2.2rem; font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.035em; line-height: 1.1; }
.summary-value small { font-size: var(--t-foot); font-weight: 500; letter-spacing: 0; color: var(--label-2); }
.summary-value.is-muted { color: var(--label-3); }
.summary-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.75rem; margin-top: 0.45rem; color: var(--label-2); font-size: var(--t-foot); }
.summary-scopes .stackbar { margin-top: 0.75rem; }

.stackbar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--fill-2); }
.stackbar-seg { background: var(--c); min-width: 3px; }
@keyframes fade-in { from { opacity: 0; } }
.legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.6rem; font-size: var(--t-foot); color: var(--label-2); }
.legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend-item i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.legend-item b { font-weight: 600; color: var(--label); }
.legend-item i.lk-line { width: 16px; height: 0; border-radius: 0; background: none; border-top: 2px solid var(--c); }
.legend-item i.lk-dash { border-top-style: dashed; }
.legend-item i.lk-dot { border-top-style: dotted; }

.card-flow { padding-bottom: 0.75rem; }
.flow-wrap { overflow-x: auto; }
.flow { width: 100%; min-width: 640px; height: auto; }
.flow-band { fill: var(--c); opacity: 0.22; transition: opacity var(--m-150) var(--ease); }
.flow-band:hover { opacity: 0.5; }
.flow:has(.flow-band:hover) .flow-band:not(:hover) { opacity: 0.1; }
.flow-node rect { fill: var(--c); }
/* Labels sit on the bands: a halo of the card's colour keeps every word readable. */
.flow-label, .flow-value { paint-order: stroke fill; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.flow-label { font-size: 12px; font-weight: 560; fill: var(--label); }
.flow-value { font-size: 11px; fill: var(--label-2); font-variant-numeric: tabular-nums; }
.flow-label .flow-value { stroke-width: 4px; }
.flow-lead { fill: none; stroke: var(--sep-3); stroke-width: 1; }
.flow-head { font-size: 11px; font-weight: 600; fill: var(--label-3); }

/* ---------- Emissions year after year (historyChart) ----------
 * HTML columns, so the text keeps its size on a phone. Columns at most 24 px,
 * square at the baseline, 4 px rounded cap; a 2 px surface gap between scopes;
 * hairline grid; the target as a dashed 2 px path ending on a ringed dot. */
.hist-card { margin-bottom: 1rem; }
.hist { margin: 0.4rem 0 0; }
.hist-plot { position: relative; height: 220px; margin: 1.6rem 0 0 2.6rem; }
.hist-grid > span { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--sep); }
.hist-grid > span:first-child { border-top-color: var(--sep-2); }
.hist-grid small { position: absolute; right: calc(100% + 0.5rem); top: 0; transform: translateY(-50%); color: var(--label-3); font-size: var(--t-cap); white-space: nowrap; }
.hist-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.hist-col { position: relative; }
.hist-hit { position: absolute; inset: 0; display: block; border-radius: var(--r-s); color: inherit; text-decoration: none; }
.hist-hit:hover, .hist-hit:focus-visible { background: var(--fill-3); }
.hist-hit:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.hist-stack { position: absolute; left: 50%; bottom: 0; width: min(34px, 56%); height: calc(var(--h) * 100%); translate: -50% 0; display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; transform-origin: bottom; }
.hist-stack i { flex: var(--g) 1 0; min-height: 2px; background: var(--c); }
.hist-col.is-prov .hist-stack { opacity: 0.5; }
/* Figures keep a halo of the card's colour: the dashed target line passes behind them, never through. */
.hist-val { position: absolute; z-index: 1; left: 50%; bottom: calc(var(--h) * 100% + 0.35rem); translate: -50% 0; color: var(--label); font-size: var(--t-foot); font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 0 0 2px var(--surface), 0 0 4px var(--surface), 2px 0 3px var(--surface), -2px 0 3px var(--surface), 0 2px 3px var(--surface), 0 -2px 3px var(--surface); }
.hist-hit:hover .hist-val, .hist-hit:focus-visible .hist-val { text-shadow: none; } /* the hover tint would show the halo as a patch */
.hist-goal span { text-shadow: 0 0 2px var(--surface), 0 0 4px var(--surface), 2px 0 3px var(--surface), -2px 0 3px var(--surface); }
.hist-col.is-prov .hist-val { color: var(--label-2); font-weight: 560; }
.hist-year { position: absolute; left: 0; right: 0; top: calc(100% + 0.45rem); text-align: center; color: var(--label-2); font-size: var(--t-foot); font-weight: 560; }
.hist-note { position: absolute; left: 0; right: 0; top: calc(100% + 1.55rem); text-align: center; color: var(--label-3); font-size: var(--t-cap); white-space: nowrap; }
.hist { padding-bottom: 2.6rem; }
.hist-goal-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hist-goal-line path { fill: none; stroke: var(--label-2); stroke-width: 2; stroke-dasharray: 5 5; stroke-linecap: round; }
.hist-goal { position: absolute; z-index: 1; display: flex; align-items: center; gap: 0.45rem; translate: -5px 50%; color: var(--label-2); font-size: var(--t-cap); white-space: nowrap; }
.hist-goal i { width: 10px; height: 10px; border-radius: 50%; background: var(--label); box-shadow: 0 0 0 2px var(--surface); flex: none; }
/* Below the dot: the dashed path arrives from above on the left. */
.hist-goal span { display: grid; line-height: 1.25; translate: 0 1.35rem; }
.hist-goal b { color: var(--label); font-size: var(--t-foot); font-weight: 650; }
.hist-goal.is-end { flex-direction: row-reverse; translate: calc(-100% + 5px) 50%; text-align: right; }
.legend-item i.hist-key-goal { width: 16px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--label-2); }
.page-enter .hist-stack { animation: hist-grow 640ms var(--ease-out) both; animation-delay: calc(var(--i) * 55ms); }
.page-enter .hist-val, .page-enter .hist-goal, .page-enter .hist-goal-line { animation: hist-fade 420ms var(--ease-out) both; animation-delay: 380ms; }
@keyframes hist-grow { from { transform: scaleY(0); } }
@keyframes hist-fade { from { opacity: 0; } }
@media (max-width: 560px) {
  .hist-plot { height: 180px; margin-left: 2.1rem; }
  .hist-val { font-size: var(--t-cap); }
  .hist-year { font-size: var(--t-cap); }
  .hist-note { display: none; }
  .hist { padding-bottom: 1.6rem; }
}

.rankbars { display: grid; }
.rankbars li + li .rankbars-row { border-top: 0.5px solid var(--sep); }
.rankbars-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 5rem 3.25rem; align-items: center; gap: 0.9rem; padding: 0.6rem 0.2rem; font-size: var(--t-callout); transition: background var(--m-100) var(--ease); border-radius: var(--r-xs); }
.rankbars-row:hover { background: var(--fill-3); }
.rankbars-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rankbars-label .i { color: var(--label-3); }
.rankbars-track { height: 10px; border-radius: 999px; background: var(--fill-2); overflow: hidden; }
.rankbars-bar { display: block; height: 100%; width: 100%; border-radius: 999px; background: var(--c); transform-origin: left; transform: scaleX(var(--w)); }
.page-enter .rankbars-bar { animation: grow var(--m-300) var(--ease-out) both; }
@keyframes grow { from { transform: scaleX(0); } }
.rankbars-value { text-align: right; font-weight: 600; }
.rankbars-aside { display: flex; justify-content: flex-end; }

.todo { display: grid; }
.todo li + li a { border-top: 0.5px solid var(--sep); }
.todo a { display: flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.2rem; font-size: var(--t-callout); border-radius: var(--r-xs); transition: background var(--m-100) var(--ease); }
.todo a:hover { background: var(--fill-3); }
.todo span { display: grid; flex: 1; }
.todo small { color: var(--label-2); font-size: var(--t-cap); }
.todo-go { color: var(--label-4); width: 13px; height: 13px; }

.table-iso { font-size: var(--t-foot); }
.table-iso th, .table-iso td { padding: 0.45rem 0.6rem; }
.iso-id { display: inline-block; min-width: 2rem; color: var(--label-3); font-weight: 500; }
.iso-cat th, .iso-cat td { font-weight: 600; }
.iso-sub th { font-weight: 400; padding-left: 1.2rem !important; color: var(--label); }
.iso-sub.is-zero th, .iso-sub.is-zero td { color: var(--label-3); }
.table-iso tbody.is-empty .iso-cat th { color: var(--label-3); font-weight: 500; }
.table-iso tfoot td { font-weight: 650; }

/* ---------- History ---------- */
.timeline { max-width: 720px; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--card-shadow); padding: 0.4rem 1.1rem; }
.timeline li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0.75rem; padding: 0.75rem 0; }
.timeline li + li { border-top: 0.5px solid var(--sep); }
/* .timeline-icon: an icon tile (frame.css, "Icon tiles"). */
.timeline-body p:first-child { font-size: var(--t-callout); }
.timeline-meta { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.25rem; color: var(--label-2); font-size: var(--t-foot); }

/* ---------- Lists, library, method ---------- */
.list { display: grid; }
.list li { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0; }
.list li + li { border-top: 0.5px solid var(--sep); }
.list li > span:not(.avatar):not(.tag) { display: grid; flex: 1; min-width: 0; }
.list small { color: var(--label-2); font-size: var(--t-foot); }
.list .i { color: var(--label-3); }
.list li.is-pending { opacity: 0.75; }

.lib { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; align-items: start; }
.lib-nav { position: sticky; top: calc(var(--toolbar-h) + 1rem); display: grid; gap: 1px; }
.lib-tab { display: flex; align-items: center; gap: 0.55rem; height: 30px; padding: 0 0.6rem; border: 0; border-radius: var(--r-xs); background: transparent; text-align: left; font-size: var(--t-callout); color: var(--label); transition: background var(--m-100) var(--ease); }
.lib-tab:hover { background: var(--fill-2); }
.lib-tab.is-active { background: var(--fill); font-weight: 560; }
.lib-tab span { flex: 1; }
.lib-tab small { color: var(--label-3); }
.lib-main { min-width: 0; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--card-shadow); padding: 0.9rem 1rem; }
.lib-search, .picker-search { position: relative; }
.lib-search .i, .picker-search .i { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); color: var(--label-3); pointer-events: none; width: 14px; height: 14px; }
.lib-search .input, .picker-search .input { padding-left: 1.9rem; height: 32px; background: var(--fill-2); box-shadow: none; border-radius: var(--r-s); }
.lib-search .input:focus, .picker-search .input:focus { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-ring); }
.lib-meta { margin: 0.7rem 0 0.35rem; color: var(--label-2); font-size: var(--t-foot); }
.table-lib tbody tr { transition: background var(--m-100) var(--ease); }
.table-lib tbody tr:hover { background: var(--fill-3); }
.table-lib tbody tr.is-open { background: var(--accent-soft); }
.table-lib .src { color: var(--label-2); max-width: 22rem; }

.prose { display: grid; gap: 1rem; max-width: 960px; }
.prose .panel h2 { margin-bottom: 0.6rem; }
.prose .panel > p { color: var(--label-2); max-width: 72ch; margin-bottom: 0.7rem; }
.prose .formula { margin-bottom: 0.9rem; font-size: var(--t-callout); }
.scale { display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; margin-top: 0.9rem; }
.scale > div { display: grid; gap: 0.25rem; }
.scale small { color: var(--label-3); font-size: var(--t-cap); }
.report-list { list-style: decimal; padding-left: 1.2rem; display: grid; gap: 0.45rem; color: var(--label-2); max-width: 78ch; font-size: var(--t-callout); }
ul.report-list { list-style: disc; }
.prose .notice { margin: 0.9rem 0 0; background: var(--orange-soft); box-shadow: none; }

/* ---------- Report ---------- */
.report { max-width: 920px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.25rem); background: var(--surface); border-radius: var(--r-l); box-shadow: var(--card-shadow); }
.report-draft { display: flex; align-items: center; gap: 0.45rem; margin: -0.5rem 0 1.5rem; padding: 0.55rem 0.8rem; border-radius: var(--r-m); background: var(--orange-soft); color: var(--orange); font-size: var(--t-foot); font-weight: 560; }
.report-cover { padding-bottom: 1.75rem; border-bottom: 1px solid var(--label); }
.report-brand { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; color: var(--label-3); font-size: var(--t-cap); font-weight: 600; letter-spacing: 0.04em; }
.report-brand .logo img { width: 150px; }
/* The cover's photograph (assets/photos/feuille: the user's leaf): a band under the brands, never behind figures. */
.report-photo { display: block; width: 100%; height: clamp(120px, 18vw, 168px); margin: -0.25rem 0 1.75rem; object-fit: cover; object-position: center 40%; border-radius: var(--r-m); }
.report-kicker { color: var(--accent-text); font-weight: 600; font-size: var(--t-callout); }
.report-cover h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem); margin: 0.3rem 0 0.35rem; }
.report-period { color: var(--label-2); }
.report-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.report-facts dt { color: var(--label-2); font-size: var(--t-cap); font-weight: 500; margin-bottom: 0.25rem; }
.report-facts dd { font-size: var(--t-callout); }
.report-facts dd b { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; }
.report-sec { padding: 1.75rem 0 0.25rem; }
.report-sec h2 { display: flex; align-items: baseline; gap: 0.7rem; font-size: var(--t-title-2); margin-bottom: 0.75rem; padding-top: 0.7rem; border-top: 1px solid var(--label); }
.report-sec h2 span { color: var(--label-3); font-weight: 500; }
.report-sec > p { color: var(--label-2); margin-bottom: 0.9rem; max-width: 78ch; font-size: var(--t-callout); }
.report-sign { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2.25rem; padding-top: 1rem; border-top: 0.5px solid var(--sep-2); font-size: var(--t-foot); }

/* ---------- Overlays ---------- */
#tooltip {
  position: fixed; left: 0; top: 0; z-index: 100; max-width: 280px;
  padding: 0.35rem 0.55rem; border-radius: var(--r-xs);
  background: var(--surface-raised); color: var(--label); box-shadow: var(--pop-shadow);
  font-size: var(--t-foot); line-height: 1.4; pointer-events: none; white-space: pre-line;
}
#toasts { position: fixed; right: 1rem; top: calc(var(--toolbar-h) + 0.75rem); z-index: 110; display: grid; gap: 0.5rem; justify-items: end; }
.toast {
  display: flex; align-items: center; gap: 0.55rem; max-width: 380px; padding: 0.65rem 0.9rem;
  border-radius: var(--r-l); background: var(--surface-raised); color: var(--label); box-shadow: var(--pop-shadow); font-size: var(--t-callout);
  animation: toast-in var(--m-200) var(--ease-out);
}
.toast .i { color: var(--good); }
.toast-error .i { color: var(--red); }
.toast.out { opacity: 0; transform: translateX(8px); transition: opacity var(--m-150) var(--ease-in), transform var(--m-150) var(--ease-in); }
@keyframes toast-in { from { opacity: 0; transform: translateX(10px); } }

.dialog { width: min(460px, calc(100vw - 2rem)); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--surface-raised); color: var(--label); box-shadow: var(--pop-shadow); }
.dialog-wide { width: min(680px, calc(100vw - 2rem)); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.22); animation: fade-in var(--m-200) var(--ease-out); }
.dialog[open] { animation: sheet-in var(--m-200) var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.dialog-form { display: grid; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1rem 0.35rem 1.25rem; }
.dialog-head h2 { font-size: var(--t-title-2); }
.dialog-body { padding: 0.2rem 1.25rem 0.4rem; color: var(--label-2); font-size: var(--t-callout); display: grid; gap: 0.55rem; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.9rem 1.1rem 1.1rem; }
.dialog-foot .btn { min-width: 84px; }
.checklist { display: grid; gap: 0.35rem; margin-top: 0.2rem; }
.checklist li { display: flex; gap: 0.45rem; align-items: flex-start; }
.checklist .ok .i { color: var(--good); }
.checklist .warn .i { color: var(--orange); }

.picker .picker-search { margin: 0.2rem 1.25rem 0; }
.picker-meta { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 1.25rem 0.35rem; color: var(--label-3); font-size: var(--t-cap); }
.picker-list { max-height: min(56vh, 520px); overflow-y: auto; padding: 0 0.6rem 0.8rem; }
.picker-list [role="option"] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 1rem; padding: 0.55rem 0.65rem; border-radius: var(--r-s); }
.picker-list [aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.picker-list [aria-selected="true"] .picker-value, .picker-list [aria-selected="true"] .picker-src, .picker-list [aria-selected="true"] .picker-value b, .picker-list [aria-selected="true"] em { color: rgba(255, 255, 255, 0.85); }
.picker-label { font-weight: 500; font-size: var(--t-callout); }
.picker-label em { font-style: normal; color: var(--accent-text); font-size: var(--t-cap); font-weight: 600; }
.picker-value { text-align: right; font-size: var(--t-foot); color: var(--label-2); white-space: nowrap; }
.picker-value b { color: var(--label); }
.picker-src { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; color: var(--label-3); font-size: var(--t-cap); }
.picker-none { padding: 1.4rem 0.7rem; color: var(--label-2); }

/* Command bar (Spotlight-like) */
.command { width: min(620px, calc(100vw - 2rem)); margin-top: 14vh; }
.command::backdrop { background: rgba(0, 0, 0, 0.12); }
.command-input { display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; border-bottom: 0.5px solid var(--sep-2); }
.command-input .i { width: 18px; height: 18px; color: var(--label-3); }
.command-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1.05rem; color: var(--label); }
.command-input input::placeholder { color: var(--label-4); }
.command-list { max-height: min(52vh, 440px); overflow-y: auto; padding: 0.35rem 0.5rem 0.6rem; }
.command-group { padding: 0.6rem 0.6rem 0.25rem; font-size: var(--t-cap); font-weight: 600; color: var(--label-3); }
.command-list [role="option"] { display: flex; align-items: center; gap: 0.6rem; height: 36px; padding: 0 0.6rem; border-radius: var(--r-s); font-size: var(--t-callout); }
.command-list [role="option"] .i { color: var(--label-3); }
.command-list [aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.command-list [aria-selected="true"] .i, .command-list [aria-selected="true"] small { color: rgba(255, 255, 255, 0.85); }
.command-label { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 0.6rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.command-label small { color: var(--label-3); font-size: var(--t-cap); overflow: hidden; text-overflow: ellipsis; }
.command-enter { margin-left: auto; }
.command-none { padding: 1.2rem 0.6rem; color: var(--label-2); font-size: var(--t-callout); }

/* ---------- Responsive ---------- */
@media screen and (max-width: 1400px) {
  .search-field { width: 30px; padding: 0; justify-content: center; }
  .search-field span, .search-field kbd { display: none; }
  .crumbs > a:first-child, .crumbs > a:first-child + .crumbs-sep { display: none; }
}
@media screen and (max-width: 1240px) {
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-cell:nth-child(3) { border-left: 0; }
  .summary-cell:nth-child(n + 3) { border-top: 0.5px solid var(--sep); }
  .search-field { width: 34px; padding: 0; justify-content: center; }
  .search-field span, .search-field kbd { display: none; }
}
@media screen and (max-width: 1000px) {
  .content { margin-left: 0; }
  /* The drawer slides in and out; closed, it is hidden, so the keyboard cannot wander into it. */
  .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform var(--m-300) var(--ease-out), visibility 0s linear var(--m-300); box-shadow: var(--pop-shadow); }
  .rail-open .sidebar { transform: none; visibility: visible; transition-delay: 0s; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, 0.2); opacity: 0; visibility: hidden; transition: opacity var(--m-300) var(--ease-out), visibility 0s linear var(--m-300); }
  .rail-open .scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
  .side-close, .toolbar-menu { display: inline-flex; }
  .grid-2, .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .lib { grid-template-columns: minmax(0, 1fr); }
  .lib-nav { position: static; display: flex; overflow-x: auto; gap: 0.25rem; padding-bottom: 0.25rem; }
  .lib-tab { flex: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  /* Two columns here: the capsule, or its empty stand-in outside a bilan, leaves the grid. */
  .capsule, .toolbar-gap { display: none; }
}
@media screen and (max-width: 760px) {
  .toolbar-trail .btn:not(.btn-icon) { padding: 0 0.6rem; font-size: var(--t-foot); }
  .topbar-note { display: none; }
  .page { padding-top: 1.25rem; }
  .page-head { flex-direction: column; align-items: stretch; gap: 0.9rem; }
  .poste-total { justify-items: start; }
  .rankbars-row { grid-template-columns: 7rem minmax(0, 1fr) 4.5rem; }
  .rankbars-aside { display: none; }
  .report-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-sign { grid-template-columns: minmax(0, 1fr); }
  .unc { grid-template-columns: minmax(0, 1fr); }
  .detail { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82vh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
}

/* ---------- Print: the report only ---------- */

/* ---------- Website platform language: equation, rows, tabs ---------- */
.equation { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.25rem 0 0.5rem; }
.equation > div { display: grid; gap: 0.15rem; padding: 0.6rem 0.75rem; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--sep-2); min-width: 0; }
.equation strong { font-size: 1.15rem; font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.03em; line-height: 1.1; }
.equation small { color: var(--label-3); font-size: var(--t-cap); }
.equation b { color: var(--label-3); font-weight: 300; font-size: 1.1rem; }
.equation .eq-result { background: var(--signal); color: var(--petrol); box-shadow: none; }
.equation .eq-result small { color: rgba(6, 33, 41, 0.72); }
.page-enter .equation > div { animation: panel-in var(--m-300) var(--ease-out) both; }
.page-enter .equation > div:nth-of-type(2) { animation-delay: 60ms; }
.page-enter .equation > div:nth-of-type(3) { animation-delay: 120ms; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

/* Lists read like a ledger: flush rows separated by hairlines, not a stack of boxed cards. */
.row-list { display: grid; gap: 0; border-top: 0.5px solid var(--sep); }
.row-item { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.8rem 0.25rem; border-bottom: 0.5px solid var(--sep); transition: background var(--m-150, 150ms) ease; }
a.row-item:hover, .row-item:hover { background: color-mix(in srgb, var(--fill-3) 70%, transparent); }
.row-item small { color: var(--label-3); font-size: var(--t-foot); }
.page-enter .row-item { animation: panel-in var(--m-300) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.progress { height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 100%; border-radius: 999px; background: var(--signal); transform-origin: left; transform: scaleX(var(--v)); }
.page-enter .progress > span { animation: grow var(--m-300) var(--ease-out) both; }

/* Issues: a severity word, the finding, the action; hairlines, no tinted boxes. */
.alert-card { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) auto; gap: 0.15rem 1rem; align-items: start; padding: 0.8rem 0; border-top: 0.5px solid var(--sep); }
.alert-card:last-child { border-bottom: 0.5px solid var(--sep); }
.alert-card::before { content: "À vérifier"; grid-row: 1 / span 2; padding-top: 0.15rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--orange); }
.alert-card.miss::before { content: "Bloquant"; color: var(--red); }
.alert-card.info::before { content: "Information"; color: var(--label-3); }
.alert-card.ok::before { content: "Conforme"; color: var(--accent-text); }
.alert-card > .i { display: none; }
.alert-card strong { font-weight: 600; font-size: var(--t-callout); line-height: 1.35; }
.alert-card span { grid-column: 2; color: var(--label-2); font-size: var(--t-foot); line-height: 1.5; }
.alert-card .btn { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.row-list:has(> .alert-card) { gap: 0; border-top: 0; }
.page-enter .alert-card { animation: panel-in var(--m-300) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }

.window-card { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--window-shadow); overflow: hidden; }
.window-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--sep); background: var(--surface-2); }
.window-tabs button { height: 30px; padding: 0 0.85rem; border: 0; border-radius: 999px; background: transparent; color: var(--label-3); font-size: var(--t-foot); font-weight: 560; transition: background var(--m-150) var(--ease), color var(--m-150) var(--ease); }
.window-tabs button:hover { color: var(--label); background: var(--fill-2); }
.window-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.window-tabs button small { margin-left: 0.35rem; opacity: 0.75; font-weight: 500; }
.window-body { padding: 1.25rem 1.4rem; }

/* ---------- Modules: shared pieces ---------- */
.side-subheading { display: flex; justify-content: space-between; align-items: baseline; padding: 0.45rem 0.55rem 0.15rem 0.7rem; font-size: var(--t-cap); color: var(--label-3); }
.side-subheading span:last-child { font-weight: 560; color: var(--label-2); }
.side-off { font-size: var(--t-cap); color: var(--label-4, var(--label-3)); font-style: italic; }
.cell-selects { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.2rem; }
.cell-selects .input { width: auto; max-width: 12rem; height: 26px; font-size: var(--t-cap); color: var(--label-2); }
.input-mini { height: 30px; width: auto; min-width: 0; padding: 0 0.6rem; font-size: var(--t-foot); }
.inline-inputs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
.inline-inputs > .field { margin-top: 0; min-width: min(12rem, 100%); }
/* A select sizes itself to its longest option: on a phone it must still fit the line. */
.inline-inputs > .input { width: auto; flex: 1 1 10rem; min-width: 0; max-width: 100%; }
.field-inline { max-width: 34rem; }

.collect-main { display: flex; align-items: flex-start; gap: 0.7rem; min-width: 0; }
.collect-main > .i { flex: none; margin-top: 1px; width: 18px; height: 18px; color: var(--accent-text); } /* centred on the first line */
.collect-main > span { display: grid; gap: 0.12rem; min-width: 0; }
.collect-main b { font-weight: 600; font-size: var(--t-callout); overflow-wrap: anywhere; }
.collect-main b a { color: inherit; }
.collect-main b a:hover { color: var(--accent-text); }
.collect-main small .i { width: 12px; height: 12px; vertical-align: -2px; }
/* The status column has one width on every row, so the fields line up down the list. */
.collect-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 15.5rem; }
.collect-owner { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.collect-owner .input { flex: 1 1 8rem; }
.collect-status { display: flex; align-items: center; justify-content: space-between; gap: 0.35rem; }
.collect-caption { margin: 0.45rem 0 0.9rem; }
.month-grid td, .month-grid th { text-align: center; }
.month-grid td:first-child, .month-grid th:first-child { text-align: left; }
.mcell { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--signal); }
.mcell.miss { background: transparent; box-shadow: inset 0 0 0 1.5px var(--orange); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); gap: 0.6rem; }
.choice-grid-s { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin-top: 0.4rem; }
.choice { position: relative; display: grid; gap: 0.2rem; padding: 0.85rem 0.95rem 0.85rem 2.4rem; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--sep-2); cursor: pointer; transition: box-shadow var(--m-150) var(--ease-out), background var(--m-150) var(--ease-out); }
.choice:hover { background: var(--fill-3); }
.choice input { position: absolute; left: 0.95rem; top: 0.95rem; accent-color: var(--accent-text); }
.choice b { font-weight: 600; font-size: var(--t-callout); }
.choice span { color: var(--label-2); font-size: var(--t-foot); }
.choice.is-on, .choice:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--accent-text); background: var(--accent-soft); }
.check-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; cursor: pointer; }
.check-row input { accent-color: var(--accent-text); margin-right: 0.35rem; }
.q-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; }
.q-text { display: flex; gap: 0.7rem; align-items: flex-start; min-width: 0; }
.q-text > .i { flex: none; margin-top: 0.15rem; color: var(--accent-text); }
.q-text > span { display: grid; gap: 0.1rem; }
.q-text b { font-size: var(--t-callout); font-weight: 600; }
.yn { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--fill-2); gap: 2px; }
.yn button { height: 28px; min-width: 3.4rem; padding: 0 0.8rem; border: 0; border-radius: 999px; background: transparent; color: var(--label-2); font-size: var(--t-foot); font-weight: 560; transition: background var(--m-150) var(--ease-out), color var(--m-150) var(--ease-out); }
.yn button:hover:not(:disabled) { color: var(--label); }
.yn button.is-on { background: var(--surface); color: var(--label); box-shadow: 0 1px 2px rgba(6, 33, 41, 0.12), inset 0 0 0 1px var(--sep); }
.yn button.is-on.is-bad { color: var(--red); }
.yn button:disabled { opacity: 0.45; cursor: not-allowed; }

.switch { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch > span { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--fill); transition: background var(--m-200) var(--ease-out); }
.switch > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(6, 33, 41, 0.3); transition: transform var(--m-200) var(--ease-out); }
.switch input:checked + span { background: var(--accent-text); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--focus, var(--accent-text)); outline-offset: 2px; }
.switch em { font-style: normal; font-size: var(--t-foot); color: var(--label-2); }

.detail-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.6rem; }
.months label { display: grid; gap: 0.2rem; }
.months span { font-size: var(--t-cap); color: var(--label-3); }
.months .input { height: 30px; font-size: var(--t-foot); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.9rem; }
.form-grid > .field { grid-column: 1 / -1; }
.form-grid > .field-half { grid-column: auto; }
.field-help { color: var(--label-3); font-size: var(--t-cap); }
.bell { position: relative; }
.plain-list { display: grid; gap: 0.25rem; margin-top: 0.6rem; padding-left: 1.1rem; list-style: disc; color: var(--label-2); font-size: var(--t-foot); }
.c-good { color: var(--good); }
.org-switch .input { height: 34px; width: auto; max-width: 14rem; border-radius: 999px; }

/* Quality control and coach */
.coach-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.9rem; color: var(--label-2); font-size: var(--t-foot); }
.coach-head > .i { color: var(--label-3); }
.coach-list .row-item { grid-template-columns: minmax(0, 1.4fr) auto auto; }

/* Reduction plan */
/* Charts are drawn at a card's width; on a phone they keep a readable size and scroll sideways. */
.chart-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .chart-wrap svg { min-width: 600px; } }
.traj-grid { stroke: var(--sep); stroke-width: 1; }
.traj-grid.strong { stroke: var(--sep-3); }
.traj-tick { fill: var(--label-3); font-size: 11px; font-family: var(--font); }
/* Each line as its legend key shows it (plan.js): measured = ink dots, scenario = viridian, objective = dashes. */
.traj-goal { fill: none; stroke: var(--label-2); stroke-width: 1.5; stroke-dasharray: 5 5; }
.traj-bau { fill: none; stroke: var(--sep-3); stroke-width: 1.5; }
.traj-offset { fill: none; stroke: var(--label-3); stroke-width: 1.5; stroke-dasharray: 2 3; }
.traj-scen { fill: none; stroke: var(--accent-text); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.traj-dot { fill: var(--label); stroke: var(--surface); stroke-width: 2.5; }
.traj-goal-dot { fill: var(--label-2); stroke: var(--surface); stroke-width: 2.5; }
.page-enter .traj-scen { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 760ms var(--ease-out) 160ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.macc-bar { fill: var(--scope-1); transition: opacity var(--m-150) var(--ease-out); }
.macc-bar.is-gain { fill: var(--accent-text); }
.macc-bar:hover { opacity: 0.8; }
.action-row { grid-template-columns: minmax(0, 1.6fr) minmax(9rem, auto) auto; transition: opacity var(--m-200) var(--ease-out); }
.action-row.is-off { opacity: 0.5; }
.action-row .collect-main small .pill-tag { margin-right: 0.25rem; }
.action-figures { display: grid; gap: 0.1rem; text-align: right; }
.action-figures b { font-weight: 600; font-size: var(--t-callout); font-stretch: var(--figure-stretch); }
.action-tools { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.35rem; flex-wrap: wrap; }

/* Deliverables and client kit */
/* Deliverables as a document register: one line per document, not a wall of cards. */
.deliverables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.75rem; margin-bottom: 1.25rem; padding: 0.35rem 1.1rem; border-radius: var(--r-l, 18px); background: var(--surface); box-shadow: var(--card-shadow); }
.deliverable { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; grid-template-rows: auto auto; grid-template-areas: "ic t tag" "ic d tag"; column-gap: 0.85rem; row-gap: 0.1rem; align-items: center; align-content: center; padding: 0.85rem 0.25rem; border: 0; border-bottom: 0.5px solid var(--sep); border-radius: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; transition: background var(--m-150, 150ms) ease; }
.deliverable:nth-last-child(-n + 2) { border-bottom: 0; }
.deliverable:hover { background: color-mix(in srgb, var(--fill-3) 70%, transparent); }
.deliverable > .i { grid-area: ic; align-self: start; margin-top: 1px; width: 18px; height: 18px; color: var(--label-2); } /* centred on the title line */
.deliverable b { grid-area: t; font-weight: 600; font-size: var(--t-callout); }
.deliverable span { grid-area: d; color: var(--label-2); font-size: var(--t-foot); line-height: 1.45; }
.deliverable > .pill-tag, .deliverable > em { grid-area: tag; justify-self: end; }
.deliverable.is-off { cursor: default; opacity: 0.55; }
.deliverable.is-off:hover { background: none; }
.deliverable:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
@media screen and (max-width: 760px) { .deliverables { grid-template-columns: minmax(0, 1fr); } .deliverable:nth-last-child(2) { border-bottom: 0.5px solid var(--sep); } }
.open-data .deliverable { border: 0.5px solid var(--sep); border-radius: var(--r-m); }
.kit-intro { margin-bottom: 0.9rem; max-width: 80ch; }
.kit-copy-all { margin-left: auto; }
.kit-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: start; padding: 0.85rem 0.25rem; border-bottom: 0.5px solid var(--sep); }
.kit-block b { font-size: var(--t-foot); font-weight: 600; color: var(--label-3); }
.kit-block p { margin-top: 0.2rem; font-size: var(--t-callout); line-height: 1.55; max-width: 92ch; }
.page-enter .kit-block { animation: panel-in var(--m-300) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.window-title { display: inline-flex; align-items: center; gap: 0.4rem; height: 30px; padding: 0 0.3rem; font-size: var(--t-foot); font-weight: 600; color: var(--label-2); }

/* Verification */
.verif-row { grid-template-columns: minmax(0, 1.6fr) minmax(8rem, 1fr) auto; }
.opinion { padding: 0.9rem 0 1rem; border-top: 1px solid var(--label); border-bottom: 0.5px solid var(--sep); font-size: var(--t-callout); line-height: 1.65; }
.dialog .opinion { margin-top: 0.75rem; }

/* MACF */
.timeline-h { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.9rem; }
.timeline-h li { position: relative; display: grid; gap: 0.25rem; padding-top: 1.1rem; }
.timeline-h li::before { content: ""; position: absolute; top: 0; left: 0; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--sep-3); background: var(--surface); }
.timeline-h li::after { content: ""; position: absolute; top: 4.5px; left: 14px; right: -0.9rem; height: 1px; background: var(--sep-2); }
.timeline-h li:last-child::after { display: none; }
.timeline-h li.is-done::before { background: var(--label-3); box-shadow: none; }
.timeline-h li.is-now::before { background: var(--signal); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline-h b { font-size: var(--t-callout); font-weight: 600; }
.timeline-h span { font-size: var(--t-foot); color: var(--label-2); }
.goods { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.good { display: inline-flex; align-items: center; gap: 0.3rem; height: 30px; padding: 0 0.85rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--sep-2); color: var(--label-2); font-size: var(--t-foot); font-weight: 560; }
.good.is-on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.good .i { width: 14px; height: 14px; }
.cbam-row { grid-template-columns: minmax(0, 1.2fr) auto auto; }
.sup-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.row-item > .pill-tag { justify-self: end; }
.cbam-row .equation { margin: 0; }
.sim-result { display: grid; gap: 0.2rem; padding: 0.55rem 1rem; border-radius: var(--r-m); background: var(--accent-soft); }
.sim-result b { font-size: 1.35rem; font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.02em; }

/* ISO and compliance */
.iso-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; }
.reg-theme + .reg-theme { margin-top: 0.4rem; }
.reg-theme .card-sub { display: flex; justify-content: space-between; align-items: baseline; }
.reg-theme .card-sub span { font-size: var(--t-foot); font-weight: 600; color: var(--accent-text); }
.reg-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.status-select { border-radius: 999px; font-weight: 560; }
.status-select.tone-miss { color: var(--red); background: var(--red-soft); box-shadow: none; }
.status-select.tone-wait { color: var(--orange); background: var(--orange-soft); box-shadow: none; }
.status-select.tone-ok { color: var(--accent-text); background: var(--accent-soft); box-shadow: none; }
.status-select.tone-info { color: var(--blue); background: var(--blue-soft); box-shadow: none; }
.checklist { margin-bottom: 0.9rem; }
.checklist li { gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid var(--sep); }
.checklist li:last-child { border-bottom: 0; }
.checklist li > .i { flex: none; width: 16px; height: 16px; margin-top: 0.1rem; color: var(--red); }
.checklist li.is-ok > .i { color: var(--accent-text); }
.checklist li > span { display: grid; gap: 0.1rem; }
.checklist li b { font-size: var(--t-callout); font-weight: 600; }
.checklist li small { color: var(--label-3); font-size: var(--t-foot); }

/* Public pages (attestation, supplier, survey) */
.public { min-height: 100vh; display: grid; place-items: center; padding: 2.5rem 1rem; background: var(--bg); }
.public-window { width: 100%; max-width: 560px; padding: 2rem 2rem 1.25rem; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--window-shadow); }
.public-window.is-wide { max-width: 720px; }
.public-head { display: grid; gap: 0.45rem; margin-bottom: 1.25rem; }
.public-head h1 { font-size: var(--t-title); line-height: 1.2; letter-spacing: -0.02em; }
.public-head p { color: var(--label-2); font-size: var(--t-callout); line-height: 1.55; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--accent-text) !important; font-size: var(--t-foot) !important; font-weight: 600; }
.eyebrow .i { width: 16px; height: 16px; }
.public-figure { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.25rem 0 0.9rem; }
.public-figure b { font-size: 3rem; font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.04em; line-height: 1; }
.public-figure span { color: var(--label-2); font-size: var(--t-body); font-weight: 560; }
.public .legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.7rem 0 1.1rem; }
.public .legend-item { white-space: nowrap; }
.public-facts { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--sep); }
.public-facts > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--sep); font-size: var(--t-callout); }
.public-facts dt { color: var(--label-3); }
.public-facts dd { margin: 0; }
.public-note { display: flex; gap: 0.45rem; margin-top: 1rem; color: var(--label-3); font-size: var(--t-foot); line-height: 1.5; }
.public-note .i { flex: none; width: 14px; height: 14px; margin-top: 0.1rem; }
.public-form > .form-grid:first-child > .field:first-child:not(.field-half) { margin-top: 0; }
.public-form fieldset { border: 0; padding: 0; margin: 0 0 0.4rem; }
.public-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; }
.public-foot { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--sep); }
.public-foot small { color: var(--label-3); font-size: var(--t-cap); line-height: 1.45; }
.public-logo { height: 22px; width: auto; }

@media screen and (max-width: 1000px) {
  .timeline-h { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .timeline-h li { padding: 0 0 0 1.4rem; }
  .timeline-h li::before { top: 0.3rem; }
  .timeline-h li::after { display: none; }
}
@media screen and (max-width: 760px) {
  .row-item, .collect-row, .q-row, .check-row, .action-row, .verif-row, .iso-row, .reg-row, .cbam-row, .coach-list .row-item { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .collect-status, .action-tools, .action-figures { justify-content: flex-start; text-align: left; }
  .row-item > .pill-tag, .row-item > .status-select { justify-self: start; }
  .poste-nav { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .cbam-row .equation { flex-wrap: wrap; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid > .field-half { grid-column: 1 / -1; }
  .alert-card { grid-template-columns: minmax(0, 1fr); }
  .alert-card::before { grid-row: auto; }
  .alert-card span { grid-column: 1; }
  .alert-card .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 0.4rem; }
  .public-window { padding: 1.5rem 1.15rem 1rem; }
  .public-facts > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .page-enter .traj-scen { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
  .deliverable:hover { transform: none; }
}
.cf-status { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }

/* ---------- Popover and notifications ---------- */
.popover { position: fixed; z-index: 60; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; border-radius: var(--r-l); background: var(--surface-raised); box-shadow: var(--pop-shadow), 0 0 0 0.5px var(--sep-2); overflow: hidden; transform-origin: var(--origin, right top); animation: pop-in var(--m-200) var(--ease-out) both; }
.popover:focus { outline: none; }
.popover.is-leaving { animation: pop-out 140ms var(--ease-in) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.notif { display: flex; flex-direction: column; min-height: 0; }
.notif-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.95rem 1.1rem 0.6rem; }
.notif-head h2 { font-size: var(--t-body); font-weight: 650; letter-spacing: -0.01em; }
.notif-count { font-size: var(--t-foot); color: var(--label-3); }
.link-btn { border: 0; padding: 0; background: none; color: var(--accent-text); font: inherit; font-size: var(--t-foot); font-weight: 560; cursor: pointer; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
.notif-scroll { overflow-y: auto; padding: 0 0.45rem 0.5rem; }
.notif-group h3 { padding: 0.55rem 0.65rem 0.25rem; font-size: var(--t-cap); font-weight: 600; color: var(--label-3); }
.notif-item { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 0.7rem; align-items: start; padding: 0.6rem 0.65rem; border-radius: var(--r-s); color: inherit; transition: background var(--m-100) var(--ease-out); }
.notif-item:hover, .notif-item:focus-visible { background: var(--fill-2); outline: none; }
.notif-item .avatar { margin-top: 1px; }
.notif-text { display: grid; gap: 0.15rem; min-width: 0; }
.notif-text b { font-size: var(--t-callout); font-weight: 500; line-height: 1.35; color: var(--label-2); }
.notif-text small { font-size: var(--t-cap); color: var(--label-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item.is-unread .notif-text b { color: var(--label); font-weight: 600; }
.notif-item time { font-size: var(--t-cap); color: var(--label-3); white-space: nowrap; padding-top: 1px; }
.notif-item.is-unread time::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 0.4rem; border-radius: 50%; background: var(--signal); vertical-align: 1px; }
.notif-group + .notif-group { border-top: 0.5px solid var(--sep); margin-top: 0.25rem; }
.notif-empty { display: grid; justify-items: center; gap: 0.5rem; padding: 1.5rem 1rem 1.75rem; color: var(--label-3); font-size: var(--t-callout); }
.dialog:focus { outline: none; }

/* ---------- Splash (after login) ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 30px; background: #ffffff; transition: opacity 320ms var(--ease-out); }
html[data-theme="dark"] .splash { background: var(--bg); }
.splash-mark { width: 76px; height: 76px; overflow: visible; }
.splash-stroke { fill: none; stroke: #062129; stroke-width: 1.4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: splash-draw 760ms cubic-bezier(0.4, 0, 0.2, 1) 80ms forwards; }
.splash-fill { fill: #062129; opacity: 0; transform-origin: 64px 64px; animation: splash-fill 380ms var(--ease-out) 620ms forwards; }
html[data-theme="dark"] .splash-stroke { stroke: #f5faf8; }
html[data-theme="dark"] .splash-fill { fill: #f5faf8; }
.splash-bar { width: 112px; height: 2px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.splash-bar span { display: block; height: 100%; border-radius: 2px; background: var(--signal); transform-origin: left; transform: scaleX(0); animation: splash-load 1150ms cubic-bezier(0.65, 0, 0.35, 1) 100ms forwards; }
.splash.is-done { opacity: 0; }
.splash.is-done .splash-mark { transform: scale(1.06); transition: transform 320ms var(--ease-out); }
@keyframes splash-draw { to { stroke-dashoffset: 0; } }
@keyframes splash-fill { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes splash-load { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .splash-stroke, .splash-bar span { animation: none; stroke-dashoffset: 0; transform: none; }
  .splash-fill { animation: none; opacity: 1; }
}

/* ---------- Theme reveal and tab transitions ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
[role="tablist"] { position: relative; }
[role="tablist"] > button { position: relative; z-index: 1; }
.tab-ghost { position: absolute; z-index: 0; border-radius: 999px; pointer-events: none; }
[role="tablist"] > button.tab-arriving { background: transparent !important; box-shadow: none !important; }
[role="tablist"] > button.tab-arriving-text { color: var(--label-2) !important; }
.swap-enter { animation: swap-in 240ms var(--ease-out) both; }
@keyframes swap-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------- Tasks, agenda, evidence, settings ---------- */
.side-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--fill); color: var(--label-2); font-size: var(--t-cap); font-weight: 600; line-height: 18px; text-align: center; }
.side-item.is-active .side-count { background: var(--surface); }
.task-group + .task-group { margin-top: 0.4rem; }
.task-group .card-sub, .agenda-month h3 { display: flex; align-items: baseline; justify-content: space-between; }
.task-group .card-sub:first-child { margin-top: 0; }
.task-group .card-sub span { font-size: var(--t-foot); color: var(--label-3); font-weight: 500; }
.task-row { grid-template-columns: minmax(0, 1fr) auto 7.5rem; color: inherit; transition: background var(--m-100) var(--ease-out), box-shadow var(--m-100) var(--ease-out); }
.task-row:hover { background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--sep-2); }
.task-due { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.35rem; font-size: var(--t-foot); color: var(--label-2); font-weight: 560; }
.task-due .i { width: 14px; height: 14px; color: var(--label-3); }
.task-due.is-late { color: var(--red); }
.task-due.is-soon { color: var(--orange); }
.agenda { display: grid; gap: 1.1rem; }
.agenda-month h3 { margin-bottom: 0.45rem; font-size: var(--t-callout); font-weight: 600; text-transform: capitalize; }
.agenda-month ul { display: grid; gap: 0.4rem; }
.agenda-item { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 0.85rem; align-items: center; padding: 0.55rem 0.75rem; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--sep); color: inherit; transition: background var(--m-100) var(--ease-out); }
.agenda-item:hover { background: var(--fill-3); }
.agenda-day { display: grid; justify-items: center; padding: 0.3rem 0; border-radius: var(--r-s); background: var(--fill-2); }
.agenda-day b { font-size: 1.15rem; font-weight: 600; font-stretch: var(--figure-stretch); line-height: 1.1; }
.agenda-day small { font-size: var(--t-cap); color: var(--label-3); text-transform: capitalize; }
.agenda-item.is-late .agenda-day { background: var(--red-soft); color: var(--red); }
.agenda-text { display: grid; gap: 0.1rem; min-width: 0; }
.agenda-text b { font-size: var(--t-callout); font-weight: 560; }
.agenda-text small { font-size: var(--t-foot); color: var(--label-3); }
.ev-row { grid-template-columns: minmax(0, 1.4fr) 7rem minmax(12rem, 1fr); }
.ev-figure { display: grid; gap: 0.1rem; text-align: right; }
.ev-figure b { font-size: var(--t-callout); font-weight: 600; font-stretch: var(--figure-stretch); }
.ev-file { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; min-width: 0; }
.ev-file .file-line { flex: 1; }
.ev-name { min-width: 0; font-size: var(--t-foot); color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.theme-card { display: grid; gap: 0.5rem; justify-items: start; padding: 0.6rem; border: 0; border-radius: var(--r-m); background: transparent; box-shadow: inset 0 0 0 1px var(--sep-2); font: inherit; color: inherit; cursor: pointer; transition: box-shadow var(--m-150) var(--ease-out); }
.theme-card b { font-size: var(--t-callout); font-weight: 560; padding: 0 0.2rem 0.1rem; }
.theme-card.is-on { box-shadow: inset 0 0 0 2px var(--accent-text); }
.theme-preview { display: grid; grid-template-columns: 30% 1fr; grid-template-rows: 1fr 1fr; gap: 5px; width: 100%; height: 76px; padding: 7px; border-radius: var(--r-s); }
.theme-preview i { border-radius: 5px; }
.theme-preview i:first-child { grid-row: 1 / span 2; }
.theme-light { background: #f5faf8; } .theme-light i { background: #fff; box-shadow: 0 0 0 0.5px rgba(6, 33, 41, 0.12); } .theme-light i:nth-child(2) { background: #25c691; }
.theme-dark { background: #062129; } .theme-dark i { background: #0d2a32; } .theme-dark i:nth-child(2) { background: #25c691; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-top: 1px solid var(--sep); }
.card-head + .setting-row { border-top: 0; padding-top: 0; }
.theme-cards + .setting-row { margin-top: 1rem; }
.setting-row > span:first-child { display: grid; gap: 0.15rem; }
.setting-row b { font-size: var(--t-callout); font-weight: 600; }
.setting-row small { font-size: var(--t-foot); color: var(--label-3); }
.shortcuts { display: grid; gap: 0; margin: 0; }
.shortcuts > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--sep); }
.shortcuts > div:last-child { border-bottom: 0; }
.shortcuts dt { display: inline-flex; gap: 0.25rem; order: 2; }
.shortcuts dd { margin: 0; font-size: var(--t-callout); color: var(--label-2); }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--fill-2); box-shadow: inset 0 -1px 0 var(--sep-2), inset 0 0 0 0.5px var(--sep-2); font: 600 var(--t-cap) / 1 var(--font); color: var(--label-2); }
.about-brand { display: grid; place-items: center; margin: 0 0 0.75rem; padding: clamp(1.25rem, 4vw, 2rem) 1rem; border-radius: var(--r-l); background: var(--surface-2); box-shadow: var(--card-shadow); }
.about-brand img { width: min(100%, 17.5rem); height: auto; }
.about { display: grid; margin: 0; }
.about > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--sep); font-size: var(--t-callout); }
.about > div:last-child { border-bottom: 0; }
.about dt { color: var(--label-3); }
.about dd { margin: 0; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
@media screen and (max-width: 760px) {
  .task-row, .ev-row { grid-template-columns: minmax(0, 1fr); }
  .task-due, .ev-file { justify-content: flex-start; }
  .ev-figure { text-align: left; }
  .about > div { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
}

/* ---------- Sidebar: full or compact rail ---------- */
.side-logo { display: inline-flex; align-items: center; min-width: 0; color: var(--label); }
.side-mark { display: none; width: 26px; height: 26px; }
.side-toggle .i { width: 18px; height: 18px; }
.side-context-badge { display: none; flex: none; place-items: center; width: 30px; height: 30px; border-radius: var(--r-s); background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 650; letter-spacing: 0.02em; }
@media (min-width: 1001px) {
  /* Here only: under 1001 px the bar is a drawer and slides (it would lose its slide to this rule). */
  .sidebar { transition: width 220ms var(--ease-out); }
  .content { transition: margin-left 220ms var(--ease-out); }
  html.side-compact { --sidebar-w: 68px; }
  .side-compact .sidebar { overflow-x: hidden; }
  /* A scrollbar would take a sixth of the rail and push the icons off centre. */
  .side-compact :is(.sidebar, .side-nav) { scrollbar-width: none; }
  .side-compact :is(.sidebar, .side-nav)::-webkit-scrollbar { display: none; }
  .side-compact .side-top { flex-direction: column; justify-content: center; gap: 0.35rem; height: auto; padding: 0.8rem 0 0.4rem; }
  .side-compact .side-wordmark { display: none; }
  .side-compact .side-mark { display: block; }
  .side-compact .side-context { justify-content: center; margin: 0.15rem 0.55rem 0.4rem; padding: 0.3rem; background: transparent; box-shadow: none; }
  .side-compact .side-context-badge { display: grid; }
  .side-compact .side-context-text, .side-compact .side-context > .i { display: none; }
  .side-compact .side-nav { padding: 0 0.55rem; }
  .side-compact .side-heading, .side-compact .side-subheading { height: 1px; margin: 0.45rem 0.35rem; padding: 0; overflow: hidden; background: var(--sep-2); font-size: 0; }
  .side-compact .side-section { padding: 0.15rem 0; }
  .side-compact .side-item { position: relative; justify-content: center; gap: 0; height: 36px; padding: 0; }
  .side-compact .side-item .i { width: 18px; height: 18px; }
  .side-compact .side-label { display: none; }
  .side-compact .side-trail { position: absolute; top: 5px; right: 6px; }
  .side-compact .side-trail > span:not(.side-count), .side-compact .side-off { display: none; }
  .side-compact .side-count { min-width: 15px; height: 15px; padding: 0 3px; font-size: 9px; line-height: 15px; background: var(--accent); color: var(--accent-ink); }
  .side-compact .side-foot { padding: 0.35rem 0.55rem 0.8rem; }
  .side-compact .side-foot::before { margin: 0 0.35rem 0.3rem; }
  /* The rail keeps the face and the two session keys, one under the other. */
  .side-compact .side-user { justify-items: center; gap: 0.2rem; margin-top: 0.2rem; background: transparent; box-shadow: none; overflow: visible; }
  .side-compact .side-me { padding: 0.2rem; border-radius: 50%; }
  .side-compact .side-me:focus-visible { outline-offset: 1px; }
  .side-compact .side-user-text, .side-compact .side-user [data-action="theme"] { display: none; }
  .side-compact .side-tools { flex-direction: column; align-items: center; gap: 0.2rem; border-top: 0; }
  .side-compact .side-tools .btn-icon { flex: none; width: 36px; height: 36px; border-left: 0; border-radius: 999px; }
  .side-compact .toolbar-menu { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .content, .scrim { transition: none; } }

/* ---------- Density ---------- */
.density-compact .card, .density-compact .panel { padding: 1rem 1.15rem; }
.density-compact .row-item { padding: 0.5rem 0.75rem; }
.density-compact .row-list { gap: 0.35rem; }
.density-compact .summary-cell { padding-top: 0.85rem; padding-bottom: 0.85rem; }
.density-compact .page { padding-top: 1.2rem; }
.density-compact .side-item { height: 28px; }
.density-compact .sheet-row td, .density-compact .table td { padding-top: 0.35rem; padding-bottom: 0.35rem; }

/* ---------- Settings (System Settings layout) ---------- */
.settings { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--toolbar-h) + 1rem); display: grid; gap: 2px; }
.settings-me { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.6rem 0.9rem; margin-bottom: 0.35rem; border-bottom: 1px solid var(--sep); }
.settings-me span { display: grid; min-width: 0; line-height: 1.3; }
.settings-me b { font-size: var(--t-callout); font-weight: 600; }
.settings-me small { font-size: var(--t-cap); color: var(--label-3); }
.settings-link { display: flex; align-items: center; gap: 0.6rem; height: 34px; padding: 0 0.55rem; border-radius: var(--r-s); color: var(--label); font-size: var(--t-callout); transition: background var(--m-100) var(--ease-out); }
.settings-link:hover { background: var(--fill-2); }
.settings-link.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 560; }
.settings-pane { min-height: 420px; }
.settings-title { font-size: var(--t-title); font-weight: 650; letter-spacing: -0.015em; margin-bottom: 0.75rem; }
.settings-pane .setting-row:first-of-type { border-top: 0; }
.settings-pane .theme-cards { width: min(100%, 22rem); }
.seg-inline { margin: 0; flex: none; flex-wrap: nowrap; }
.setting-row > span:first-child { flex: 1; min-width: 0; }
.profile-card { display: flex; align-items: center; gap: 0.9rem; padding: 0.4rem 0 1rem; border-bottom: 1px solid var(--sep); }
.profile-card span { display: grid; gap: 0.1rem; }
.profile-card b { font-size: var(--t-title-2); font-weight: 650; }
.profile-card small { font-size: var(--t-foot); color: var(--label-3); }
.avatar-xl { width: 56px; height: 56px; font-size: 19px; }
.integrations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); gap: 0.6rem; }
.integration { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 0.35rem 0.75rem; align-items: start; padding: 0.9rem 1rem; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--sep); }
.integration > .i { grid-row: 1 / span 2; width: 20px; height: 20px; margin-top: 0.1rem; color: var(--accent-text); }
.integration span { display: grid; gap: 0.15rem; }
.integration b { font-size: var(--t-callout); font-weight: 600; }
.integration small { font-size: var(--t-foot); color: var(--label-3); line-height: 1.45; }
.integration .pill-tag { grid-column: 2; justify-self: start; }
.journal-filters { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0.5rem; margin-bottom: 0.6rem; }
.journal { display: grid; margin-top: 0.6rem; }
.journal li { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--sep); }
.journal li:last-child { border-bottom: 0; }
.journal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); justify-self: center; }
.journal li > span:nth-child(2) { display: grid; gap: 0.1rem; min-width: 0; }
.journal b { font-size: var(--t-callout); font-weight: 560; }
.journal small { font-size: var(--t-cap); color: var(--label-3); }
.facts { display: grid; gap: 0.6rem; }
.facts li { display: flex; gap: 0.7rem; align-items: flex-start; }
.facts li > .i { flex: none; width: 16px; height: 16px; margin-top: 0.15rem; color: var(--accent-text); }
.facts li > span { display: grid; gap: 0.1rem; }
.facts b { font-size: var(--t-callout); font-weight: 600; }
.facts small { font-size: var(--t-foot); color: var(--label-3); line-height: 1.45; }
.perm-table th[scope="row"] { font-weight: 500; }
.perm-table thead th.num { font-size: var(--t-cap); white-space: normal; min-width: 6rem; }
.perm-yes { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.perm-yes .i { width: 12px; height: 12px; }
.perm-no { color: var(--label-4); }
@media screen and (max-width: 1000px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: relative; top: 0; display: flex; overflow-x: auto; gap: 0.3rem; padding-bottom: 0.3rem; }
  .settings-me { display: none; }
  .settings-link { flex: none; }
  .journal-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media screen and (max-width: 760px) {
  .setting-row { flex-direction: column; align-items: flex-start; }
  .journal-filters { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Variance analysis ---------- */
.grid-2-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.waterfall { display: block; width: 100%; height: auto; }
.wf-bar { transition: opacity var(--m-150) var(--ease-out); }
.wf-bar:hover { opacity: 0.82; }
.wf-total { fill: var(--label-3); } /* totals are data, neutral ink: only the changes carry good / to check */
.wf-down { fill: var(--good); }
.wf-up { fill: var(--orange); }
.wf-link { stroke: var(--sep-3); stroke-dasharray: 2 2; }
.wf-val { fill: var(--label-2); font-size: 11px; font-weight: 600; font-family: var(--font); }
.page-enter .wf-bar { animation: wf-in 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); transform-box: fill-box; transform-origin: bottom; }
@keyframes wf-in { from { transform: scaleY(0); } }
.effects { display: grid; gap: 0.7rem; }
.effects > div { display: grid; gap: 0.15rem; padding: 0.85rem 1rem; border-radius: var(--r-m); background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--sep); }
.effects span { font-size: var(--t-foot); color: var(--label-3); font-weight: 560; }
.effects b { font-size: 1.35rem; font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.02em; }
.effects small { font-size: var(--t-foot); color: var(--label-2); }
.c-warn { color: var(--orange); }
.var-row { grid-template-columns: minmax(0, 1.1fr) 7.5rem minmax(0, 1.4fr); }
.var-delta { display: grid; gap: 0.05rem; text-align: right; font-weight: 600; font-size: var(--t-callout); font-stretch: var(--figure-stretch); }
.var-delta small { font-weight: 500; }
.var-delta.is-up { color: var(--orange); }
.var-delta.is-down { color: var(--accent-text); }
.link-quiet { color: inherit; text-decoration: underline; text-decoration-color: var(--sep-3); text-underline-offset: 2px; }
.link-quiet:hover { color: var(--accent-text); }

/* ---------- Reporting datapoints ---------- */
.dp-table td, .dp-table th { vertical-align: top; }
.dp-table td b { display: block; font-weight: 560; }
.dp-table td small { display: block; color: var(--label-3); font-size: var(--t-cap); margin-top: 0.1rem; }
.dp-ref { white-space: nowrap; font-weight: 600; color: var(--accent-text); font-size: var(--t-foot); }
.dp-table td:nth-child(3) { max-width: 34rem; }

/* ---------- Product footprint ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.product-card { display: grid; gap: 0.9rem; margin: 0 !important; }
.product-card header { display: flex; align-items: flex-start; gap: 0.7rem; }
.product-card header > span:nth-child(2) { display: grid; gap: 0.1rem; flex: 1; min-width: 0; }
.product-card header b { font-size: var(--t-body); font-weight: 620; }
.product-card header small { font-size: var(--t-foot); color: var(--label-3); }
.product-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.product-figures > div { display: grid; gap: 0.1rem; padding: 0.65rem 0.7rem; border-radius: var(--r-m); background: var(--fill-3); }
.product-figures b { font-size: 1.3rem; font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.02em; line-height: 1.1; }
.product-figures span { font-size: var(--t-cap); color: var(--label-3); }
.page-enter .product-card { animation: panel-in var(--m-300) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }

/* ---------- Action library ---------- */
.lib-actions { display: grid; gap: 0.4rem; margin-top: 0.8rem; max-height: 56vh; overflow-y: auto; }
.lib-actions li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.8rem; align-items: center; padding: 0.6rem 0.75rem; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--sep); }

/* ---------- Help centre ---------- */
/* The hero carries the user's photograph of fields in motion (assets/photos/aide-*): it rises from
 * the right and fades into the surface, so the title, buttons and search always sit on the surface. */
.help-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 0.5rem; margin-bottom: 1.25rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--card-shadow); }
.help-hero > * { max-width: 38rem; }
.help-hero > .action-tools { justify-self: start; justify-content: flex-start; }
.help-hero::before { content: ""; position: absolute; inset: 0 0 0 auto; z-index: -1; width: 56%; background: url("../assets/photos/aide-clair.webp") center / cover no-repeat; -webkit-mask-image: linear-gradient(to right, transparent, #000 62%); mask-image: linear-gradient(to right, transparent, #000 62%); }
html[data-theme="dark"] .help-hero::before { background-image: url("../assets/photos/aide-sombre.webp"); filter: brightness(0.64) saturate(0.9); }
@media (max-width: 760px) {
  .help-hero { padding-top: 128px; }
  .help-hero::before { inset: 0 0 auto; width: auto; height: 150px; -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); }
}
.help-search { max-width: 34rem; margin-top: 0.4rem; }
.help-search .input { height: 40px; font-size: var(--t-body); padding-left: 2.2rem; }
.help-section { margin-bottom: 1.1rem; }
.help-section .card-sub { margin-top: 0.4rem; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 0.75rem; }
.help-card { display: grid; gap: 0.35rem; align-content: start; padding: 1rem 1.05rem; border-radius: var(--r-l, 16px); background: var(--surface); box-shadow: var(--card-shadow); color: inherit; transition: transform var(--m-150) var(--ease-out); }
.help-card:hover { transform: translateY(-2px); }
.help-card > .i { width: 20px; height: 20px; color: var(--accent-text); }
.help-card b { font-size: var(--t-body); font-weight: 600; }
.help-card span { font-size: var(--t-foot); color: var(--label-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.help-glossary dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); gap: 0.2rem 1.5rem; margin: 0; }
.help-glossary dl > div { padding: 0.6rem 0; border-bottom: 1px solid var(--sep); }
.help-glossary dt { font-weight: 620; font-size: var(--t-callout); }
.help-glossary dd { margin: 0.15rem 0 0; color: var(--label-2); font-size: var(--t-foot); line-height: 1.5; }
.help-article { max-width: 46rem; }
.help-article h1 { margin: 0.35rem 0 1rem; }
.help-steps { display: grid; gap: 0.75rem; counter-reset: step; }
.help-steps li { position: relative; padding-left: 2.2rem; font-size: var(--t-body); line-height: 1.6; counter-increment: step; }
.help-steps li::before { content: counter(step); position: absolute; left: 0; top: 0.05rem; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: var(--t-cap); font-weight: 650; }
.help-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--sep); }
.help-article .eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--accent-text); font-size: var(--t-foot); font-weight: 600; }
/* Below 1280 px the waterfall would shrink under its drawn size (6 px text): it takes the full width. */
@media screen and (max-width: 1280px) { .grid-2-wide { grid-template-columns: minmax(0, 1fr); } }
@media screen and (max-width: 760px) {
  .var-row, .lib-actions li { grid-template-columns: minmax(0, 1fr); }
  .var-delta { text-align: left; }
  .product-figures b { font-size: 1.1rem; }
}

/* ---------- Report document (screen and print) ---------- */
.report-wrap { position: relative; }
.report-hint { display: flex; align-items: center; gap: 0.5rem; max-width: 920px; margin: 0 auto 0.9rem; padding: 0.6rem 0.2rem; border-bottom: 0.5px solid var(--sep-2); color: var(--label-2); font-size: var(--t-foot); }
.report-hint .i { flex: none; color: var(--accent-text); }
.report { position: relative; overflow: hidden; }
.report-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-size: clamp(5rem, 14vw, 10rem); font-weight: 750; letter-spacing: 0.08em; color: var(--label); opacity: 0.035; transform: rotate(-24deg); z-index: 0; }
.report > :not(.report-watermark) { position: relative; z-index: 1; }
.report-cls { padding: 0.2rem 0.6rem; border-radius: 999px; font-size: var(--t-cap); font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; box-shadow: inset 0 0 0 1px currentColor; }
.cls-public { color: var(--accent-text); } .cls-interne { color: var(--blue); } .cls-confidentiel { color: var(--orange); } .cls-restreint { color: var(--red); }
.report-hero { display: flex; align-items: baseline; gap: 0.5rem; margin: 1.25rem 0 0.75rem; }
.report-hero b { font-size: clamp(2.6rem, 2rem + 2.5vw, 3.6rem); font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.04em; line-height: 1; }
.report-hero span { color: var(--label-2); font-weight: 560; }
.report-cover .legend { margin-bottom: 0.5rem; }
.report-doc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.1rem; align-items: center; margin-top: 1.5rem; padding: 0.9rem 1rem; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--sep-2); }
.report-doc-qr .qr { display: block; width: 96px; height: 96px; border-radius: 6px; }
.qr-placeholder { display: grid; place-items: center; width: 96px; height: 96px; border-radius: var(--r-xs); background: var(--fill-2); color: var(--label-3); }
.report-doc dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem 1.2rem; margin: 0; }
.report-doc dt { font-size: var(--t-cap); color: var(--label-3); }
.report-doc dd { margin: 0; font-size: var(--t-foot); font-weight: 560; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.report-front { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2.5rem; padding: 1.75rem 0 1.25rem; border-bottom: 0.5px solid var(--sep-2); }
.report-front h2 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; padding-bottom: 0.5rem; border-bottom: 1px solid var(--label); margin-bottom: 0; }
.report-toc ol { list-style: none; padding: 0; margin: 0; font-size: var(--t-callout); }
.report-toc li { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); padding: 0.48rem 0; border-bottom: 0.5px solid var(--sep); break-inside: avoid; }
.report-toc li span { color: var(--label-3); font-variant-numeric: tabular-nums; font-weight: 600; }
.report-toc a { color: inherit; } .report-toc a:hover { color: var(--accent-text); }
.control-table th { width: 34%; font-weight: 560; color: var(--label-2); vertical-align: top; }
.control-table th, .control-table td { padding: 0.45rem 0.5rem 0.45rem 0; font-size: var(--t-foot); border-bottom: 0.5px solid var(--sep); }
.control-table tr:first-child th, .control-table tr:first-child td { padding-top: 0.55rem; }
.control-hist td { font-size: var(--t-cap); }
@media screen and (max-width: 760px) { .report-front { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
.report-h3 { margin: 1rem 0 0.5rem; font-size: var(--t-callout); }
.report-note { margin-top: 0.4rem; font-size: var(--t-cap); color: var(--label-3); }
.report-ev { color: var(--accent-text); font-size: 0.6em; vertical-align: 2px; }
.report-quote { margin: 0.6rem 0 1rem; padding: 0.75rem 0; border-top: 0.5px solid var(--sep-2); border-bottom: 0.5px solid var(--sep-2); font-size: var(--t-callout); color: var(--label-2); line-height: 1.65; }
.report-annex { margin-top: 2rem; padding: 1rem 1.1rem; border-radius: var(--r-m); background: var(--fill-3); font-size: var(--t-foot); color: var(--label-2); }
.report-annex h2 { font-size: var(--t-callout); color: var(--label); margin-bottom: 0.5rem; }
.report-annex dl { display: grid; gap: 0.3rem; margin: 0 0 0.6rem; }
.report-annex dl > div { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 0.8rem; }
.report-annex dt { color: var(--label-3); }
.report-annex dd { margin: 0; color: var(--label); }
@media screen and (max-width: 760px) { .report-doc { grid-template-columns: minmax(0, 1fr); } .report-doc dl, .report-annex dl > div { grid-template-columns: minmax(0, 1fr); } .report-toc ol { columns: 1; } }

/* ---------- Documents register and verification ---------- */
.docs-table td small, .docs-table th small { display: block; color: var(--label-3); font-size: var(--t-cap); }
.docs-table td b { font-weight: 560; }
.docs-table tr.is-revoked td, .docs-table tr.is-revoked th { opacity: 0.6; }
.docs-actions { white-space: nowrap; text-align: right; }
.eyebrow-bad { color: var(--red) !important; }
.verify-checks { display: grid; gap: 0.75rem; margin-top: 1.1rem; }
.verify-check { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem 0.95rem; border-radius: var(--r-m); background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--sep); }
.verify-check > .i { flex: none; width: 18px; height: 18px; margin-top: 0.1rem; color: var(--label-3); }
.verify-check.is-ok { background: var(--accent-soft); box-shadow: none; } .verify-check.is-ok > .i { color: var(--accent-text); }
.verify-check.is-warn { background: var(--orange-soft); box-shadow: none; } .verify-check.is-warn > .i { color: var(--orange); }
.verify-check span { display: grid; gap: 0.15rem; }
.verify-check b { font-size: var(--t-callout); }
.verify-check small { font-size: var(--t-foot); color: var(--label-2); }
.verify-print { display: grid; gap: 0.5rem; padding: 0.8rem 0.95rem; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--sep); }
.verify-print label { display: grid; gap: 0.15rem; }
.verify-print label b { font-size: var(--t-callout); }
.verify-print label small { font-size: var(--t-foot); color: var(--label-3); }
.verify-print .inline-inputs .input { flex: 1; }
.verify-search { display: flex; gap: 0.5rem; margin-top: 1.1rem; }
.verify-search .input { flex: 1; }
.small { font-size: var(--t-foot); }
.session-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--sep); }
.session-row > .i { flex: none; color: var(--accent-text); }
.session-row > span:nth-child(2) { display: grid; gap: 0.1rem; flex: 1; min-width: 0; }
.session-row b { font-size: var(--t-callout); font-weight: 600; }
.session-row small { font-size: var(--t-foot); color: var(--label-3); }
.journal-dot.sec-verrouillage, .journal-dot.sec-deverrouillage { background: var(--blue); }
.journal-dot.sec-revocation { background: var(--red); }
.journal-dot.sec-document, .journal-dot.sec-verification { background: var(--orange); }

/* ---------- Insights (dashboard) ---------- */
.insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); gap: 0.6rem; }
.insight { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 0.95rem; border-radius: var(--r-m); background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--sep); color: inherit; transition: background var(--m-150) var(--ease-out), transform var(--m-150) var(--ease-out); }
.insight:hover { background: var(--fill-2); transform: translateY(-1px); }
.insight > span:last-child { display: grid; gap: 0.15rem; min-width: 0; }
.insight b { font-size: var(--t-callout); font-weight: 620; }
.insight small { font-size: var(--t-foot); color: var(--label-2); line-height: 1.45; }
.page-enter .insight { animation: panel-in var(--m-300) var(--ease-out) both; animation-delay: calc(120ms + var(--i, 0) * 50ms); }

/* ---------- Advanced analysis ---------- */
.heatmap { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: var(--t-foot); }
.heatmap th { font-weight: 560; color: var(--label-2); text-align: left; padding: 0.3rem 0.2rem; }
.heatmap th[scope="row"], .heatmap th.num { white-space: nowrap; padding-inline: 0.4rem; }
/* The site stays in view while the postes scroll under it. */
.heatmap tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.heatmap th small { display: block; color: var(--label-3); font-weight: 400; font-size: var(--t-cap); }
.heatmap td { padding: 0; }
.heatmap td.num { padding: 0.3rem 0.5rem; text-align: right; white-space: nowrap; }
.heatmap td.num small { display: block; color: var(--label-3); font-size: var(--t-cap); }
/* Each poste's total sits centred under its column of cells; the grand total stays right-aligned under "Total". */
.heatmap tfoot td.num:not(:last-child) { text-align: center; }
.hm-head { display: grid; justify-items: center; gap: 0.2rem; min-width: 3rem; text-align: center; }
.hm-head .i { width: 16px; height: 16px; color: var(--label-3); }
.hm-cell { display: grid; place-items: center; min-height: 2.6rem; border-radius: var(--r-xs); color: var(--label); font-weight: 560; background: color-mix(in srgb, #0f8a64 calc(var(--a) * 100%), var(--fill-3)); transition: transform var(--m-150) var(--ease-out); }
.hm-cell.is-strong { color: #fff; }
html[data-theme="dark"] .hm-cell { background: color-mix(in srgb, #25c691 calc(var(--a) * 80%), var(--fill-3)); }
html[data-theme="dark"] .hm-cell.is-strong { color: #062129; }
.hm-cell:hover { transform: scale(1.04); }
.hm-cell[style*="--a:0."] { color: var(--label); }
.sim-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(min(16rem, 100%), 1fr); gap: 1.25rem; align-items: start; }
.sim-sliders { display: grid; gap: 0.35rem; }
.sim-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 1.1fr) 3.6rem; gap: 0.8rem; align-items: center; padding: 0.45rem 0.6rem; border-radius: var(--r-s); }
.sim-row:hover { background: var(--fill-3); }
.sim-row input[type="range"] { width: 100%; accent-color: var(--accent-text); }
.sim-row output { text-align: right; font-weight: 600; font-size: var(--t-callout); font-stretch: var(--figure-stretch); }
.sim-result-card { position: sticky; top: calc(var(--toolbar-h) + 1rem); display: grid; gap: 0.6rem; padding: 1.1rem 1.2rem; border-radius: var(--r-l, 16px); background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--sep); }
.sim-total { display: flex; align-items: baseline; gap: 0.4rem; }
.sim-total b { font-size: 2.2rem; font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.03em; line-height: 1; }
.sim-total span { color: var(--label-2); font-weight: 560; }
.sim-delta { font-weight: 600; font-size: var(--t-callout); }
.sim-line { display: flex; align-items: center; gap: 0.6rem; }
.sim-goal { display: grid; gap: 0.3rem; padding-top: 0.6rem; border-top: 1px solid var(--sep); font-size: var(--t-foot); }
.sim-goal span { color: var(--label-3); } .sim-goal b { font-size: var(--t-body); }
.sim-goal small { color: var(--label-2); }
.sim-result-card .btn { justify-self: start; }
.pareto { display: grid; gap: 0.35rem; }
.pareto-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(8rem, 1fr) 5.5rem; gap: 0.8rem; align-items: center; padding: 0.5rem 0.7rem; border-radius: var(--r-s); color: inherit; }
.pareto-row:hover { background: var(--fill-3); }
.pareto-bar { height: 10px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.pareto-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--orange); transform-origin: left; transform: scaleX(var(--w)); }
.page-enter .pareto-bar > span, .swap-enter .pareto-bar > span { animation: grow 500ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.pareto-val { display: grid; text-align: right; } .pareto-val b { font-size: var(--t-callout); } .pareto-val small { color: var(--label-3); font-size: var(--t-cap); }

/* ---------- Impact / effort matrix ---------- */
.matrix { display: block; width: 100%; height: auto; }
.mx-win { fill: var(--accent-soft); }
.mx-quad { fill: var(--label-3); font-size: 11px; font-weight: 600; font-family: var(--font); }
.mx-dot circle { fill: var(--scope-1); fill-opacity: 0.85; stroke: var(--surface); stroke-width: 2; transition: transform var(--m-150) var(--ease-out); transform-box: fill-box; transform-origin: center; }
.mx-dot.lever-eviter circle { fill: var(--accent-text); }
.mx-dot:hover circle { transform: scale(1.12); }
.mx-dot text { fill: #fff; font-size: 10px; font-weight: 700; font-family: var(--font); pointer-events: none; }
.page-enter .mx-dot { animation: panel-in 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
.mx-num { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-right: 0.4rem; border-radius: 50%; background: var(--fill); color: var(--label-2); font-size: 10px; font-weight: 700; vertical-align: 1px; }
@media screen and (max-width: 1000px) { .sim-grid { grid-template-columns: minmax(0, 1fr); } .sim-result-card { position: static; } }
@media screen and (max-width: 760px) { .sim-row, .pareto-row { grid-template-columns: minmax(0, 1fr); } .sim-row output, .pareto-val { text-align: left; } }

/* ---------- Executive one-pager ---------- */
.exec { max-width: 900px; }
.exec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--label); }
.exec-head .logo img { width: 130px; }
.exec-head .report-kicker { margin-top: 0.9rem; }
.exec-head h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); margin-top: 0.2rem; }
.exec-doc { display: flex; gap: 0.6rem; align-items: center; text-align: right; }
.exec-doc span { display: grid; gap: 0.1rem; }
.exec-doc b { font-size: var(--t-foot); font-family: ui-monospace, Menlo, monospace; }
.exec-doc small { font-size: var(--t-cap); color: var(--label-3); }
.exec-doc .qr { width: 64px; height: 64px; }
.exec-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; margin: 1.2rem 0 0.9rem; }
.exec-kpis > div { display: grid; gap: 0.1rem; align-content: start; }
.exec-kpis span { font-size: var(--t-cap); color: var(--label-3); font-weight: 560; }
.exec-kpis b { font-size: 1.8rem; font-weight: 560; font-stretch: var(--figure-stretch); letter-spacing: -0.03em; line-height: 1.1; }
.exec-kpis b small { font-size: 0.55em; color: var(--label-3); }
.exec-kpis > div > small { font-size: var(--t-foot); color: var(--label-2); }
.exec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.6rem; margin-top: 1.2rem; }
.exec-grid h2 { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--label); padding-bottom: 0.45rem; border-bottom: 1px solid var(--label); margin-bottom: 0; }
.exec-grid .findings { border-top: 0; }
.exec-grid h2 + .exec-line { border-top: 0; }
.exec-grid h3 { font-size: 0.72rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--label-2); margin: 0.9rem 0 0.4rem; }
.exec-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.42rem 0; border-bottom: 0.5px solid var(--sep); font-size: var(--t-foot); }
.exec-line b { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.exec-line span { color: var(--label-2); }
.exec-actions, .exec-decisions { display: grid; gap: 0.4rem; padding-left: 1.1rem; list-style: decimal; font-size: var(--t-foot); }
.exec-actions li { display: grid; } .exec-actions span { color: var(--label-3); }
.exec-decisions { list-style: none; padding-left: 0; counter-reset: dec; gap: 0; }
.exec-decisions li { counter-increment: dec; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); padding: 0.5rem 0; border-bottom: 0.5px solid var(--sep); line-height: 1.5; }
.exec-decisions li::before { content: counter(dec, decimal-leading-zero); font-weight: 650; font-variant-numeric: tabular-nums; color: var(--label-3); }
.exec-foot { margin-top: 1.4rem; padding-top: 0.6rem; border-top: 1px solid var(--sep); font-size: var(--t-cap); color: var(--label-3); }
@media screen and (max-width: 760px) { .exec-kpis, .exec-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); } .exec-head { flex-direction: column; } .exec-doc { text-align: left; } }

/* ---------- Bilan journey stepper ---------- */
.journey { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; margin: -0.25rem 0 1rem; }
.journey li { position: relative; }
.journey li::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; border-radius: 2px; background: var(--sep-2); }
.journey li:first-child::before { display: none; }
.journey li.is-done::before, .journey li.is-current::before { background: var(--signal); }
.journey a { display: grid; justify-items: center; gap: 0.35rem; padding: 0 0.2rem; color: inherit; text-align: center; }
.journey-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--sep-3); color: var(--label-3); font-size: var(--t-cap); font-weight: 650; transition: transform var(--m-150) var(--ease-out); }
.journey a:hover .journey-dot { transform: scale(1.08); }
.journey li.is-done .journey-dot { background: var(--signal); box-shadow: none; color: #062129; }
.journey li.is-done .journey-dot .i { width: 14px; height: 14px; }
.journey li.is-current .journey-dot { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.journey-text { display: grid; gap: 0.05rem; }
.journey-text b { font-size: var(--t-foot); font-weight: 600; }
.journey-text small { font-size: var(--t-cap); color: var(--label-3); }
.journey li:not(.is-done):not(.is-current) .journey-text b { color: var(--label-2); font-weight: 500; }
.page-enter .journey li { animation: panel-in var(--m-300) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms); }
@media screen and (max-width: 1000px) { .journey { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 0.9rem; } .journey li:nth-child(5)::before { display: none; } }
@media screen and (max-width: 560px) { .journey { display: flex; overflow-x: auto; gap: 0.2rem; padding-bottom: 0.3rem; } .journey li { flex: 0 0 5.5rem; } }
.coach-list .row-item { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.25rem; }
.coach-list .row-item > small { grid-column: 1; grid-row: 2; padding-left: calc(18px + 0.7rem); }
.coach-list .row-item > .pill-tag { grid-column: 2; grid-row: 1 / span 2; }
.seg button { white-space: nowrap; }
@media screen and (max-width: 760px) {
  .seg-inline { flex-wrap: wrap; }
  .session-row { flex-wrap: wrap; }
  .session-row .action-tools { width: 100%; justify-content: flex-start; }
  .docs-table { min-width: 640px; }
}

/* Collection template import preview */
.import-delta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--sep); border-radius: var(--r-m); background: var(--surface-2); }
.import-delta > span { display: grid; gap: 2px; font-size: 12px; color: var(--label-2); }
.import-delta > span b { font-size: 18px; color: var(--label); font-variant-numeric: tabular-nums; }
.import-delta > svg { width: 16px; height: 16px; color: var(--label-2); }
.import-delta em { margin-left: auto; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Base-year recalculation test */
.recalc-test { display: grid; grid-template-columns: auto auto 1fr; gap: 12px 28px; align-items: center; padding: 14px 16px; margin-bottom: 12px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--sep); }
.recalc-test > div > span { display: block; font-size: 12px; color: var(--label-2); }
.recalc-test > div > b { font-size: 20px; font-variant-numeric: tabular-nums; }
.recalc-bar { position: relative; height: 8px; border-radius: 99px; background: var(--fill); }
.recalc-bar > span { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); border-radius: inherit; background: var(--good); transition: width 300ms ease; }
.recalc-test.is-required .recalc-bar > span { background: var(--orange); }
.recalc-bar > i { position: absolute; top: -4px; bottom: -4px; left: calc(var(--s) * 100%); width: 2px; border-radius: 2px; background: var(--label-2); }
.recalc-verdict { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--label-2); }
.recalc-verdict svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--good); }
.recalc-test.is-required .recalc-verdict { color: var(--label); }
.recalc-test.is-required .recalc-verdict svg { color: var(--orange); }
@media screen and (max-width: 760px) { .recalc-test { grid-template-columns: 1fr 1fr; } .recalc-bar { grid-column: 1 / -1; } }
.card-head-row > .action-tools { flex-wrap: nowrap; flex: none; }
.var-row > .btn-icon { justify-self: end; }
@media screen and (max-width: 760px) { .card-head-row > .action-tools { flex-wrap: wrap; } }

/* Carbon budgets */
.budget-years { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.budget-years > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-m); border: 1px solid var(--sep); background: var(--surface-2); }
.budget-years span { font-size: 12px; color: var(--label-2); }
.budget-years b { font-size: 20px; font-variant-numeric: tabular-nums; }
.budget-years small { font-size: 12px; color: var(--label-2); }
.budget-years .is-ok { border-color: color-mix(in srgb, var(--good) 40%, var(--sep)); }
.budget-years .is-ok small { color: var(--good); }
.budget-years .is-over { border-color: color-mix(in srgb, var(--orange) 45%, var(--sep)); }
.budget-years .is-over small { color: var(--orange); }

/* Toast with an action (Annuler) */
.toast.has-action { pointer-events: auto; position: relative; overflow: hidden; }
.toast.has-action::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent-text); opacity: 0.5; transform-origin: left; animation: toast-time 6s linear both; }
@keyframes toast-time { to { transform: scaleX(0); } }
.toast-action { margin-left: auto; padding: 0.25rem 0.6rem; border: 0; border-radius: var(--r-s, 8px); background: transparent; color: var(--accent-text); font: inherit; font-weight: 650; cursor: pointer; }
.toast-action:hover { background: var(--fill); }
.toast-action:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.open-data { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.open-data code { font-size: 0.85em; }
@media screen and (max-width: 640px) { .open-data { grid-template-columns: 1fr; } }

/* Collection bulk bar */
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; padding: 10px 12px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--sep); }
.bulk-bar > span:first-child { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.bulk-bar > span:first-child > svg { width: 16px; height: 16px; color: var(--label-2); }

/* Scope 2 location vs market */
.s2-compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.s2-compare > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--sep); }
.s2-compare span, .s2-compare small { font-size: 12px; color: var(--label-2); }
.s2-compare b { font-size: 20px; font-variant-numeric: tabular-nums; }
@media screen and (max-width: 760px) { .s2-compare { grid-template-columns: 1fr; } }
@media screen and (max-width: 760px) {
  .card-head-row { flex-wrap: wrap; }
  .card-head-row > div:first-child { flex: 1 1 100%; }
  /* Toolbar actions become icon buttons on phones; the label stays in the accessibility tree. */
  .toolbar-trail .btn:not(.btn-icon):not(.search-field) { font-size: 0; gap: 0; width: 36px; padding: 0; justify-content: center; }
  .toolbar-trail .btn:not(.btn-icon):not(.search-field) .i { margin: 0; }
  .toolbar-trail > .org-switch, .toolbar-trail select { max-width: 120px; }
}
.sim-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.sim-saved-empty { margin-top: 14px; }
.sim-saved th small { display: block; font-weight: 400; color: var(--label-2); }

/* ---------- Findings: editorial list (key figure | statement), hairlines only ---------- */
.findings { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--label); }
.findings > li { border-bottom: 0.5px solid var(--sep); }
.f-row { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; gap: 0 1.25rem; align-items: start; padding: 0.85rem 0.2rem; color: inherit; text-decoration: none; }
.f-fig b { display: block; font-size: 1.45rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.f-fig small { display: block; margin-top: 0.3rem; font-size: var(--t-cap); color: var(--label-3); line-height: 1.3; }
.f-body { display: grid; gap: 0.2rem; min-width: 0; }
.f-body > b { font-size: var(--t-callout); font-weight: 620; line-height: 1.35; }
.f-body > span { font-size: var(--t-foot); color: var(--label-2); line-height: 1.55; }
.f-good .f-fig b { color: var(--accent-text); }
.f-warn .f-fig b { color: var(--orange); }
a.f-row { border-radius: 6px; transition: background var(--m-150, 150ms) ease; }
a.f-row:hover { background: var(--fill-3); }
a.f-row:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.f-go { align-self: center; color: var(--label-4); opacity: 0; transition: opacity var(--m-150, 150ms) ease, transform var(--m-150, 150ms) ease; }
.f-go .i { width: 14px; height: 14px; }
a.f-row:hover .f-go { opacity: 1; transform: translateX(2px); }
/* Two columns in the dashboard: each item carries its own top rule. */
.findings.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; border-top: 0; }
.findings.cols-2 > li { border-bottom: 0; border-top: 0.5px solid var(--sep); }
.findings.is-compact .f-row { grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0 0.9rem; padding: 0.6rem 0; }
.findings.is-compact .f-fig b { font-size: 1.15rem; }
.page-enter .findings > li { animation: panel-in var(--m-300) var(--ease-out) both; animation-delay: calc(100ms + var(--i, 0) * 40ms); }
@media screen and (max-width: 760px) { .findings.cols-2 { grid-template-columns: minmax(0, 1fr); } .f-row { grid-template-columns: 5rem minmax(0, 1fr); } .f-go { display: none; } }
.choice-list { display: grid; gap: 0.5rem; margin-top: 0.9rem; border: 0; padding: 0; }
.choice > span { display: grid; gap: 0.15rem; }
.choice > span b { color: var(--label); }
.cell-prev { display: block; margin-top: 0.2rem; font-size: var(--t-cap); color: var(--label-3); font-variant-numeric: tabular-nums; }

/* ---------- Management representation letter ---------- */
.letter { max-width: 820px; font-size: var(--t-callout); line-height: 1.65; }
.letter > p { margin: 0 0 0.85rem; }
.letter-head { display: flex; justify-content: space-between; gap: 2rem; padding-bottom: 1.1rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--label); }
.letter-head .logo img { width: 120px; }
.letter-from { margin-top: 0.9rem; color: var(--label-2); font-size: var(--t-foot); line-height: 1.5; }
.letter-meta { text-align: right; font-size: var(--t-foot); color: var(--label-2); display: grid; gap: 0.6rem; align-content: start; }
.letter-object { padding: 0.6rem 0; border-top: 0.5px solid var(--sep); border-bottom: 0.5px solid var(--sep); }
.letter-list { list-style: none; padding: 0; margin: 0.4rem 0 1.1rem; display: grid; gap: 0.55rem; }
.letter-list li { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); }
.letter-list li > span { font-weight: 650; color: var(--label-3); font-variant-numeric: tabular-nums; }
.letter-list p { margin: 0; }
.letter-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 2rem 0 1rem; }
.letter-sign > div { display: grid; gap: 0.25rem; padding-top: 0.6rem; border-top: 1px solid var(--label); min-height: 8rem; align-content: start; }
.letter-sign span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.letter-sign i { margin-top: auto; color: var(--label-3); font-size: var(--t-cap); font-style: normal; }
@media screen and (max-width: 760px) { .letter-head { flex-direction: column; } .letter-meta { text-align: left; } .letter-sign { grid-template-columns: 1fr; } }
.factor-suggest { display: block; margin-top: 0.3rem; padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; font-size: var(--t-cap); text-align: left; cursor: pointer; }
.factor-suggest b { font-weight: 600; }
.factor-suggest:hover { text-decoration: underline; }
.convert { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.4rem; margin: 0.4rem 0 0.4rem; }
.convert select[name="d"] { grid-column: 1 / -1; }
.convert .btn { grid-column: 1 / -1; justify-self: start; }

/* Reduction roadmap */
.roadmap { display: grid; min-width: calc(16rem + var(--n) * 4.2rem); font-size: var(--t-foot); }
.roadmap > div { display: grid; grid-template-columns: 16rem repeat(var(--n), minmax(4.2rem, 1fr)); align-items: center; }
.rm-head { border-bottom: 1px solid var(--label); padding-bottom: 0.4rem; font-size: var(--t-cap); font-weight: 650; color: var(--label-2); }
.rm-head span:not(:first-child), .rm-foot span:not(:first-child) { text-align: center; font-variant-numeric: tabular-nums; }
.rm-row { border-bottom: 0.5px solid var(--sep); min-height: 2.9rem; }
.rm-name { display: grid; gap: 0.05rem; padding: 0.45rem 0.75rem 0.45rem 0; min-width: 0; }
.rm-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-name small { color: var(--label-3); font-size: var(--t-cap); }
.rm-cell { height: 100%; display: flex; align-items: center; }
.rm-bar { display: block; width: 100%; height: 8px; background: color-mix(in srgb, var(--accent-text) 55%, transparent); }
.rm-bar.lever-eviter { background: color-mix(in srgb, var(--blue) 55%, transparent); }
.rm-bar.is-start { border-radius: 4px 0 0 4px; margin-left: 15%; width: 85%; }
.rm-cell:last-child .rm-bar { border-radius: 0 4px 4px 0; }
.rm-cell:last-child .rm-bar.is-start { border-radius: 4px; }
.rm-bar.is-done { background: var(--accent-text); }
.rm-foot { padding: 0.5rem 0; border-top: 1px solid var(--label); font-weight: 650; }
.rm-foot + .rm-foot { border-top: 0; padding-top: 0; font-weight: 500; color: var(--label-3); }
.org-sheet { margin-bottom: 1rem; }
.org-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.5rem; margin: 0 0 0.5rem; border-top: 0.5px solid var(--sep); }
.org-facts > div { padding: 0.65rem 0; border-bottom: 0.5px solid var(--sep); }
.org-facts dt { font-size: var(--t-cap); color: var(--label-3); }
.org-facts dd { margin: 0.15rem 0 0; font-weight: 560; }
@media screen and (max-width: 760px) { .org-facts { grid-template-columns: minmax(0, 1fr); } }
.decl-title { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); margin: 0.2rem 0 1rem; }
.decl-h { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; margin: 1.3rem 0 0.4rem; padding-top: 0.5rem; border-top: 1px solid var(--label); }
.decl-qr .qr { width: 72px; height: 72px; }
.changed-tag { display: inline-block; margin: 0 0 0.25rem; font-style: normal; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--blue); }
.sheet-filter { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem; max-width: 30rem; }
.sheet-filter > .i { width: 16px; height: 16px; color: var(--label-3); }
.sheet-filter .input { flex: 1; }
.sheet-filter small { color: var(--label-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-match td:first-child { display: flex; gap: 0.75rem; align-items: center; font-size: var(--t-foot); }
.ev-match select { width: 100%; }
.digest { font-size: var(--t-callout); line-height: 1.6; }
.digest-meta { padding: 0.55rem 0; margin-bottom: 0.8rem; border-bottom: 0.5px solid var(--sep); color: var(--label-3); font-size: var(--t-foot); }
.digest h3 { margin: 1rem 0 0.35rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.digest ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.2rem; }
/* Report activity data: fixed column widths so long labels wrap in their column, not everywhere. */
.report-data { table-layout: fixed; width: 100%; }
.report-data th:nth-child(1) { width: 14%; } .report-data th:nth-child(2) { width: 23%; } .report-data th:nth-child(3) { width: 11%; }
.report-data th:nth-child(4) { width: 20%; } .report-data th:nth-child(5) { width: 12%; } .report-data th:nth-child(6) { width: 11%; } .report-data th:nth-child(7) { width: 9%; }
.report-data td { overflow-wrap: break-word; hyphens: auto; vertical-align: top; }
.start-carry { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem; }
.start-carry h2 { font-size: var(--t-title-3, 1.1rem); }
.start-carry p { color: var(--label-2); font-size: var(--t-callout); margin-top: 0.2rem; max-width: 70ch; }
.start-steps { list-style: none; margin: 0; padding: 0; }
.start-steps li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.9rem 0; border-bottom: 0.5px solid var(--sep); }
.start-steps li:first-child { border-top: 1px solid var(--label); }
.start-n { font-size: 1.15rem; font-weight: 650; color: var(--label-3); font-variant-numeric: tabular-nums; }
.start-body { display: grid; gap: 0.15rem; }
.start-body b { font-weight: 600; }
.start-body small { color: var(--label-2); font-size: var(--t-foot); }
@media screen and (max-width: 760px) { .start-carry { flex-direction: column; align-items: flex-start; } .start-steps li { grid-template-columns: 2rem minmax(0, 1fr); } .start-steps li .btn { grid-column: 2; justify-self: start; } }

/* ---------- Motion: sliding sidebar highlight ---------- */
.side-item { position: relative; z-index: 1; }
.side-ghost { position: absolute; z-index: 0; border-radius: var(--r-s); background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep); pointer-events: none; }
.side-item.is-active.side-arriving { background: transparent; box-shadow: none; }
/* Dialogs close with the reverse of their entrance. */
@keyframes sheet-out { to { opacity: 0; transform: translateY(6px) scale(0.985); } }
@keyframes fade-out { to { opacity: 0; } }
dialog.is-closing { animation: sheet-out 150ms var(--ease-out) forwards; }
dialog.is-closing::backdrop { animation: fade-out 150ms var(--ease-out) forwards; }
/* Bars added recently draw in on page entry, like the others. */
@keyframes grow-w { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.page-enter .rm-bar { animation: grow-w 520ms var(--ease-out) both; animation-delay: 120ms; }
.page-enter .recalc-bar > span { animation: grow-w 520ms var(--ease-out) both; }
.page-enter .budget-years > div, .page-enter .s2-compare > div, .page-enter .org-facts > div { animation: panel-in var(--m-300) var(--ease-out) both; }
.page-enter .start-steps li, .page-enter .alert-card, .page-enter .deliverable { animation: panel-in var(--m-300) var(--ease-out) both; }
.page-enter .start-steps li:nth-child(2), .page-enter .deliverable:nth-child(2) { animation-delay: 40ms; }
.page-enter .start-steps li:nth-child(3), .page-enter .deliverable:nth-child(3) { animation-delay: 80ms; }
.page-enter .start-steps li:nth-child(4), .page-enter .deliverable:nth-child(4) { animation-delay: 120ms; }
.page-enter .deliverable:nth-child(n + 5) { animation-delay: 160ms; }

/* ---------- Presentation mode: dark stage, large figures, one idea per slide ---------- */
.pz { --pz-bg: #062129; --pz-ink: #eef6f2; --pz-mute: rgba(238, 246, 242, 0.62); --pz-rule: rgba(238, 246, 242, 0.14); --pz-accent: #25c691;
  position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; background: var(--pz-bg); color: var(--pz-ink); z-index: 50; }
.pz-top { display: flex; align-items: center; gap: 0.6rem; padding: 1.1rem 2rem; color: var(--pz-mute); font-size: 0.8rem; font-weight: 650; letter-spacing: 0.08em; }
.pz-top .pz-mark { width: 18px; height: 18px; color: var(--pz-accent); }
.pz-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.pz-top .btn { color: var(--pz-ink); letter-spacing: 0; }
.pz-stage { display: grid; place-items: center; padding: 1rem clamp(2rem, 8vw, 9rem); overflow: auto; }
.pz-slide { width: min(1100px, 100%); animation: pz-in 380ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes pz-in { from { opacity: 0; transform: translateX(18px); } }
.pz[data-dir="-1"] .pz-slide { animation-name: pz-back; }
@keyframes pz-back { from { opacity: 0; transform: translateX(-18px); } }
.pz-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--pz-accent); transform: scaleX(var(--p)); transform-origin: left; transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1); }
.pz-kicker { color: var(--pz-accent); font-size: 0.85rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; }
.pz h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); letter-spacing: -0.03em; margin: 0.4rem 0 0; color: var(--pz-ink); }
.pz h2 { font-size: clamp(1.6rem, 1rem + 2.2vw, 2.8rem); letter-spacing: -0.025em; margin: 0.4rem 0 2rem; color: var(--pz-ink); max-width: 22ch; }
.pz-hero { display: flex; align-items: baseline; gap: 0.8rem; margin: 2.2rem 0 2.4rem; }
.pz-hero b { font-size: clamp(4rem, 2rem + 8vw, 9rem); font-weight: 560; letter-spacing: -0.05em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.pz-hero span { font-size: 1.4rem; color: var(--pz-mute); }
.pz-scopes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.pz-scopes > div { display: grid; gap: 0.2rem; padding-top: 0.8rem; border-top: 1px solid var(--pz-rule); }
.pz-scopes span { color: var(--pz-mute); font-size: 0.9rem; }
.pz-scopes b { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pz-scopes small { color: var(--pz-mute); }
.pz-scopes i { display: block; height: 6px; margin-top: 0.6rem; border-radius: 3px; background: var(--c); width: calc(var(--w) * 100%); min-width: 6px; animation: grow-w 700ms cubic-bezier(0.22, 1, 0.36, 1) both 150ms; }
.pz-foot { margin-top: 2.4rem; color: var(--pz-mute); font-size: 0.95rem; }
.pz-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pz-bars li { display: grid; grid-template-columns: minmax(10rem, 18rem) minmax(0, 1fr) 7rem 4rem; gap: 1.2rem; align-items: center; font-size: 1.05rem; }
.pz-bars i { display: block; height: 14px; border-radius: 7px; background: var(--pz-accent); width: calc(var(--w) * 100%); animation: grow-w 700ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(100ms + var(--i) * 70ms); }
.pz-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.pz-bars small { color: var(--pz-mute); text-align: right; }
.pz .pz-findings { border-top-color: var(--pz-rule); }
.pz .pz-findings > li { border-bottom-color: var(--pz-rule); }
.pz .pz-findings .f-row { grid-template-columns: 10rem minmax(0, 1fr); padding: 1.1rem 0; }
.pz .pz-findings .f-fig b { font-size: 2.4rem; color: var(--pz-ink); }
.pz .pz-findings .f-warn .f-fig b { color: #f2a65a; } .pz .pz-findings .f-good .f-fig b { color: var(--pz-accent); }
.pz .pz-findings .f-fig small, .pz .pz-findings .f-body > span { color: var(--pz-mute); }
.pz .pz-findings .f-body > b { font-size: 1.2rem; }
.pz .pz-findings .f-body > span { font-size: 1rem; }
.pz-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-bottom: 2.2rem; }
.pz-kpis > div { padding-top: 0.8rem; border-top: 1px solid var(--pz-rule); display: grid; gap: 0.2rem; }
.pz-kpis span { color: var(--pz-mute); }
.pz-kpis b { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pz-years { display: flex; align-items: flex-end; gap: 1.2rem; height: 220px; padding-bottom: 1.6rem; border-bottom: 1px solid var(--pz-rule); }
.pz-years > div { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.pz-years > div > span { position: absolute; bottom: -1.5rem; color: var(--pz-mute); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.pz-years > div > i:first-of-type { display: block; width: 60%; height: calc(var(--h) * 100%); border-radius: 6px 6px 0 0; background: rgba(238, 246, 242, 0.28); transform-origin: bottom; animation: wf-in 600ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.pz-years > div > i.is-ok { background: var(--pz-accent); }
.pz-years > div > b { position: absolute; bottom: 0.7rem; font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--pz-ink); }
.pz-budget { position: absolute; left: 12%; right: 12%; bottom: calc(var(--h) * 100%); height: 2px; background: #f2a65a; }
.pz-nav { display: flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 1rem; }
.pz-nav .btn { color: var(--pz-ink); }
.pz-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--pz-rule); cursor: pointer; transition: background 160ms ease, transform 160ms ease; }
.pz-dot.is-on { background: var(--pz-accent); transform: scale(1.25); }
@media screen and (max-width: 760px) { .pz-scopes, .pz-kpis { grid-template-columns: 1fr; gap: 1rem; } .pz-bars li { grid-template-columns: 1fr auto; } .pz-bars i { grid-column: 1 / -1; } .pz .pz-findings .f-row { grid-template-columns: 6rem minmax(0, 1fr); } }

/* Drop a file on a page that imports one */
.drop-veil { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1.5rem; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade-in 140ms ease both; pointer-events: none; }
.drop-veil::before { content: ""; position: absolute; inset: 14px; border: 2px dashed var(--accent-text); border-radius: var(--r-m); opacity: 0.55; }
.drop-card { position: relative; display: grid; justify-items: center; gap: 0.35rem; max-width: 26rem; padding: 1.6rem 2rem; text-align: center; background: var(--surface-raised); border: 1px solid var(--sep); border-radius: var(--r-m); box-shadow: var(--pop-shadow); animation: sheet-in 200ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.drop-card svg { width: 26px; height: 26px; color: var(--accent-text); margin-bottom: 0.3rem; }
.drop-card b { font-size: 1rem; }
.drop-card span { color: var(--label-2); font-size: 0.875rem; }

/* Since your last visit */
.since { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; padding: 0.6rem 0.6rem 0.6rem 0.9rem; border: 1px solid var(--sep); border-radius: var(--r-s); background: var(--surface); font-size: 0.875rem; animation: enter 260ms ease both; }
.since > svg { flex: none; width: 16px; height: 16px; color: var(--accent-text); }
.since p { flex: 1; margin: 0; }
.since .link-btn { white-space: nowrap; }

/* Mentions in comments */
.mention { color: var(--accent-text); font-weight: 600; }
.mention-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; font-size: 0.75rem; color: var(--label-3); }
.mention-pick > span { margin-right: 0.15rem; }
.mention-chip { padding: 0.12rem 0.5rem; border: 1px solid var(--sep); border-radius: 999px; background: var(--surface); color: var(--label-2); font: inherit; cursor: pointer; transition: border-color 120ms ease, color 120ms ease; }
.mention-chip:hover { border-color: var(--accent-text); color: var(--accent-text); }
.comment-form .mention-pick { justify-self: stretch; }

.macc-break { stroke: var(--surface); stroke-width: 2.5; fill: none; }
.macc-val { font-weight: 600; fill: var(--label-2); }

.mx-legend { list-style: none; margin: 0.75rem 0 0; padding: 0.75rem 0 0; border-top: 1px solid var(--sep); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 0.45rem 1.25rem; font-size: 0.8125rem; }
.mx-legend li { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); column-gap: 0.5rem; align-items: baseline; }
.mx-legend b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-legend small { grid-column: 2; color: var(--label-3); }
.mx-num { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--scope-1); color: #fff; font-size: 0.6875rem; font-weight: 650; }
.mx-num.lever-eviter { background: var(--accent-text); }

/* Cover: who the report is for, who prepared it, which version */
.report-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--sep-2); font-size: var(--t-foot); }
.report-parties dt { margin-bottom: 0.3rem; color: var(--label-3); font-size: var(--t-cap); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.report-parties dd { margin: 0; line-height: 1.45; }
.report-parties dd span { color: var(--label-3); }
@media screen and (max-width: 760px) { .report-parties { grid-template-columns: minmax(0, 1fr); } }

.report td.qty { display: table-cell; white-space: normal; }
.report td.qty small { display: block; color: var(--label-3); font-size: 0.92em; }

.offscreen-render { position: absolute; left: -10000px; top: 0; width: 920px; visibility: hidden; pointer-events: none; }
.deliverable-lead b { color: var(--accent-text); }
.deliverable-lead .i { color: var(--accent-text); }
.deliv-group { grid-column: 1 / -1; margin: 1.1rem 0 0.1rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--sep-2); font-size: var(--t-cap); font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--label-3); }
.deliv-group:first-child { margin-top: 0.6rem; }
.pz-top > span { white-space: nowrap; }
@media screen and (max-width: 560px) { .pz-top > span:not(.pz-count) { display: none; } .pz-top .btn { padding: 0 0.55rem; } }
/* Printed report: denser, document-grade tables */

/* Guided tour */
.tour { position: fixed; inset: 0; z-index: 95; pointer-events: none; }
.tour-spot { position: fixed; border-radius: var(--r-m); box-shadow: 0 0 0 9999px rgba(3, 21, 26, 0.48); outline: 2px solid var(--accent-text); outline-offset: 0; transition: top 260ms cubic-bezier(0.22, 1, 0.36, 1), left 260ms cubic-bezier(0.22, 1, 0.36, 1), width 260ms cubic-bezier(0.22, 1, 0.36, 1), height 260ms cubic-bezier(0.22, 1, 0.36, 1); }
.tour-card { position: fixed; pointer-events: auto; padding: 1rem 1.1rem 0.9rem; border-radius: var(--r-m); background: var(--surface-raised); color: var(--label); box-shadow: var(--pop-shadow); animation: sheet-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both; transition: top 260ms cubic-bezier(0.22, 1, 0.36, 1), left 260ms cubic-bezier(0.22, 1, 0.36, 1); }
.tour-card h2 { margin: 0.15rem 0 0.35rem; font-size: 1rem; }
.tour-card p { margin: 0; color: var(--label-2); font-size: var(--t-callout); line-height: 1.5; }
/* The walk's name: on its own, two lines at most (an SPS IA walk is named after its task), the full name in the tooltip. */
.tour-step { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: var(--t-cap) !important; font-weight: 600; letter-spacing: 0.04em; line-height: 1.4 !important; text-transform: uppercase; color: var(--accent-text) !important; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.9rem; }
.tour-actions span { display: flex; gap: 0.4rem; }
.help-hero .btn { margin-top: 0.75rem; }

/* Printing an application page (not a document): identification line, smaller scale, fewer blank pages */
.print-head { display: none; }
.side-new { padding: 0.05rem 0.4rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.6875rem; font-weight: 650; }
.side-compact .side-new { display: none; }

/* ---------- Sidebar: five steps that fold, next step, bilan switcher ---------- */
button.side-context { width: calc(100% - 1.2rem); border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.side-context:hover { background: var(--surface-2); }
button.side-context:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.side-next { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.05rem 0.4rem; margin: 0 0 0.3rem; padding: 0.5rem 0.65rem 0.55rem 0.7rem; border-radius: var(--r-s); background: var(--accent-soft); color: var(--label); transition: box-shadow var(--m-100) var(--ease); }
.side-next:hover { box-shadow: inset 0 0 0 1px var(--accent-ring); }
.side-next:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.side-next-k { font-size: var(--t-cap); font-weight: 650; color: var(--accent-text); }
.side-next-row { display: flex; align-items: baseline; gap: 0.4rem; min-width: 0; font-size: var(--t-callout); }
.side-next-row b { font-weight: 600; flex: none; }
.side-next-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--label-2); font-size: var(--t-foot); }
.side-next > .i { grid-column: 2; grid-row: 1 / span 2; width: 14px; height: 14px; color: var(--accent-text); transition: transform var(--m-100) var(--ease); }
.side-next:hover > .i { transform: translateX(2px); }

.side-steps { display: grid; gap: 1px; }
.side-step, .side-subhead { display: flex; align-items: center; gap: 0.55rem; width: 100%; border: 0; background: none; font: inherit; color: var(--label); text-align: left; cursor: pointer; border-radius: var(--r-s); transition: background var(--m-100) var(--ease); }
.side-step { height: 32px; padding: 0 0.55rem; font-size: var(--t-callout); font-weight: 600; }
.side-subhead { height: 26px; padding: 0 0.55rem 0 0.7rem; font-size: var(--t-cap); color: var(--label-3); }
.side-step:hover, .side-subhead:hover { background: var(--fill-2); }
.side-step:focus-visible, .side-subhead:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.side-step-n { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 10.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--label-2); box-shadow: inset 0 0 0 1.25px var(--sep-3); transition: background var(--m-200) var(--ease), color var(--m-200) var(--ease); }
.side-step-n[data-state="current"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.side-step-n[data-state="done"] { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
.side-step-n .i { width: 12px; height: 12px; }
.side-step-label, .side-subhead-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-subhead-value { font-weight: 560; color: var(--label-2); font-variant-numeric: tabular-nums; }
.side-chev { display: inline-flex; color: var(--label-3); transition: transform 260ms var(--ease-out); }
.side-chev .i { width: 12px; height: 12px; }
.side-group.is-open > button .side-chev { transform: rotate(90deg); }
.side-fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 300ms var(--ease-out); }
.side-instant .side-fold, .side-instant .side-fold-in { transition: none; }
.side-group.is-open > .side-fold { grid-template-rows: 1fr; }
.side-fold-in { min-height: 0; overflow: hidden; opacity: 0; transform: translateY(-3px); transition: opacity 200ms var(--ease), transform 300ms var(--ease-out); }
.side-group.is-open > .side-fold > .side-fold-in { opacity: 1; transform: none; }
.side-fold-pad { padding: 1px 0 0.3rem; }
.side-sub .side-fold-pad { padding-bottom: 0.15rem; }
.side-more { display: block; padding: 0.3rem 0.55rem 0.15rem 0.7rem; font-size: var(--t-cap); color: var(--label-3); }
.side-more:hover { color: var(--accent-text); }
@media (prefers-reduced-motion: reduce) { .side-fold, .side-fold-in, .side-chev { transition: none; } }
.reduce-motion .side-fold, .reduce-motion .side-fold-in, .reduce-motion .side-chev { transition: none; }
@media (min-width: 1001px) {
  .side-compact .side-next, .side-compact .side-more { display: none; }
  .side-compact .side-step, .side-compact .side-subhead { display: block; height: 1px; margin: 0.45rem 0.35rem; padding: 0; width: calc(100% - 0.7rem); border-radius: 0; overflow: hidden; background: var(--sep-2); font-size: 0; pointer-events: none; }
  .side-compact .side-step > *, .side-compact .side-subhead > * { display: none; }
}

/* Previous / next page, in the order of the five steps */
.step-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin: 2.75rem 0 0.25rem; padding-top: 1.1rem; border-top: 0.5px solid var(--sep-2); }
.step-nav-link { display: inline-flex; align-items: center; gap: 0.65rem; max-width: 100%; min-width: 0; padding: 0.55rem 0.85rem; border-radius: var(--r-m); color: var(--label); transition: background var(--m-100) var(--ease), box-shadow var(--m-100) var(--ease); }
.step-nav-link.is-prev { justify-self: start; }
.step-nav-link.is-next { justify-self: end; text-align: right; background: var(--surface); box-shadow: var(--card-shadow); }
.step-nav-link:hover { background: var(--fill-2); }
.step-nav-link.is-next:hover { background: var(--surface); box-shadow: var(--card-shadow), inset 0 0 0 1px var(--accent-ring); }
.step-nav-link:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.step-nav-link > span { display: grid; min-width: 0; line-height: 1.3; }
.step-nav-link small { font-size: var(--t-cap); font-weight: 600; color: var(--label-3); }
.step-nav-link b { font-size: var(--t-callout); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-nav-link > .i { flex: none; width: 16px; height: 16px; color: var(--label-3); transition: transform var(--m-100) var(--ease); }
.step-nav-link.is-next > .i { color: var(--accent-text); }
.step-nav-link.is-next:hover > .i { transform: translateX(2px); }
.step-nav-link.is-prev:hover > .i { transform: translateX(-2px); }
.step-nav-mid { font-size: var(--t-foot); color: var(--label-3); text-align: center; white-space: nowrap; }
@media (max-width: 720px) { .step-nav { grid-template-columns: 1fr 1fr; } .step-nav-mid { display: none; } }
@media print { .step-nav { display: none !important; } }

/* Bilan switcher (popover from the sidebar context) */
.switcher { display: flex; flex-direction: column; min-height: 0; }
.switcher-scroll { overflow-y: auto; padding: 0 0.5rem 0.45rem; }
.switcher h3 { padding: 0.5rem 0.6rem 0.25rem; font-size: var(--t-cap); font-weight: 600; color: var(--label-3); }
.switcher ul { list-style: none; margin: 0; padding: 0; }
.switcher-row { display: grid; grid-template-columns: 2.9rem auto 1fr 16px; align-items: center; gap: 0.6rem; height: 38px; padding: 0 0.6rem; border-radius: var(--r-s); color: var(--label); font-size: var(--t-callout); transition: background var(--m-100) var(--ease); }
.switcher-row:hover { background: var(--fill-2); }
.switcher-row:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.switcher-row.is-current { background: var(--accent-soft); }
.switcher-row b { font-weight: 650; font-variant-numeric: tabular-nums; }
.switcher-total { justify-self: end; color: var(--label-2); font-size: var(--t-foot); font-variant-numeric: tabular-nums; }
.switcher-check { display: inline-flex; }
.switcher-check .i { width: 14px; height: 14px; color: var(--accent-text); }
.switcher-foot { flex: none; padding: 0.35rem 0.5rem 0.45rem; border-top: 0.5px solid var(--sep); }
.switcher-foot a { display: flex; align-items: center; gap: 0.55rem; height: 34px; padding: 0 0.6rem; border-radius: var(--r-s); color: var(--accent-text); font-size: var(--t-callout); font-weight: 600; }
.switcher-foot a:hover { background: var(--fill-2); }
.switcher-foot .i { width: 16px; height: 16px; }

/* Welcome sheet (first sign-in) */
.welcome-lead { margin: 0 0 0.9rem; color: var(--label-2); line-height: 1.5; }
.welcome-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.welcome-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 0.1rem 0.75rem; padding: 0.5rem 0.45rem; border-radius: var(--r-s); animation: welcome-in 460ms var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 140ms); }
.welcome-steps .n { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: var(--t-foot); font-weight: 650; }
.welcome-steps b { font-weight: 600; }
.welcome-steps li > span:last-child { color: var(--label-2); font-size: var(--t-foot); line-height: 1.45; }
.welcome-tip { margin: 0.9rem 0 0; padding: 0.6rem 0.75rem; border-radius: var(--r-s); background: var(--fill-3); color: var(--label-2); font-size: var(--t-foot); line-height: 1.5; }
.welcome-tip kbd { font-size: 10.5px; padding: 0.05em 0.4em; border-radius: 5px; background: var(--surface); box-shadow: inset 0 0 0 0.5px var(--sep-2); }
@keyframes welcome-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .welcome-steps li { animation: none; } }
.reduce-motion .welcome-steps li { animation: none; }

/* Guided tour: the spotlight and card are moved by script on every frame (exact tracking). */
.tour-spot { transition: none; outline-color: transparent; box-shadow: 0 0 0 9999px rgba(3, 21, 26, 0.5); } /* the pen ring marks the element */
.tour-card { transition: none; animation: none; padding: 0.95rem 1.1rem 0.9rem; }
.tour-card.is-new > :not(.tour-arrow) { animation: tour-in 320ms var(--ease-out) both; }
@keyframes tour-in { from { opacity: 0; transform: translateY(4px); } }
.tour-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-top: 0.3rem; }
.tour-count, .tour-time { font-size: var(--t-cap) !important; color: var(--label-3) !important; white-space: nowrap; }
.tour-count { font-variant-numeric: tabular-nums; }
.tour-bar { height: 3px; margin: 0.5rem 0 0.7rem; border-radius: 99px; background: var(--fill); overflow: hidden; }
.tour-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent-text); transition: width 360ms var(--ease-out); }
.tour-card h2 { margin: 0 0 0.3rem; }
.tour-arrow { position: absolute; width: 12px; height: 12px; background: var(--surface-raised); transform: rotate(45deg); pointer-events: none; }
.tour-card[data-side="bottom"] .tour-arrow { top: -6px; left: calc(var(--ax) - 6px); }
.tour-card[data-side="top"] .tour-arrow { bottom: -6px; left: calc(var(--ax) - 6px); }
.tour-card[data-side="right"] .tour-arrow { left: -6px; top: calc(var(--ay) - 6px); }
.tour-card[data-side="left"] .tour-arrow { right: -6px; top: calc(var(--ay) - 6px); }
.tour-card[data-side="over"] .tour-arrow { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-card.is-new > * { animation: none; } .tour-bar i { transition: none; } }
/* SPS IA circles what it talks about: a pen ring drawn around the element at each stop. */
.tour-ring { position: fixed; overflow: visible; pointer-events: none; }
.tour-ring path { fill: none; stroke: var(--accent-text); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 50%, transparent)); }
.tour-ring.is-drawing path { animation: tour-draw 760ms cubic-bezier(0.33, 1, 0.68, 1) 140ms both; }
@keyframes tour-draw { from { stroke-dashoffset: 1; } }
/* A question during the walk: asked and answered in the card, the walk stays. */
.tour-ask { display: flex; gap: 0.4rem; margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--sep); }
.tour-ask .input { flex: 1; min-width: 0; height: 34px; padding: 0 0.85rem; border-radius: 999px; font-size: var(--t-callout); }
.tour-ask .btn-icon { flex: none; width: 34px; height: 34px; }
.tour-reply { margin-top: 0.75rem; max-height: min(40vh, 280px); overflow: auto; overscroll-behavior: contain; padding: 0.65rem 0.8rem; border-radius: var(--r-s); background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--sep); }
.tour-reply .tour-q { margin-bottom: 0.4rem; color: var(--label); font-weight: 600; }
.tour-a { color: var(--label-2); font-size: var(--t-callout); line-height: 1.5; }
.tour-a :is(p, ul, ol) { margin: 0 0 0.45rem; } .tour-a :is(p, ul, ol):last-child { margin-bottom: 0; }
.tour-a.is-writing { display: flex; align-items: center; gap: 0.45rem; }
div.tour-a.is-writing { display: block; }
.tour-a .ai-next { margin-top: 0.6rem; padding-top: 0.55rem; }
.tour-act { margin-top: 0.6rem; }
.reduce-motion .tour-card.is-new > * { animation: none; }
