/* CongreXpert design tokens and primitives — direction D (owner's decision,
   30 September 2026): a clear product surface (white, KPI cards, soft shadows,
   the petrol → sea-green gradient) set in an editorial voice (Newsreader for
   headlines and large figures, Public Sans for text and interface).

   Colour roles, which every rule below keeps:
   - Petrol (--petrol) carries action and selection: buttons, the active nav
     item, the chosen option, links.
   - Sea green (--signal) carries progress and "verified": the end of the
     gradient on progress bars, the dots of the trail. A fill, never body text;
     where it has to be read it is --positive, its darker step.
   - Amber (--attention…) still means one thing only: "this needs a human
     decision". It never decorates and never enters the gradient; a progress
     bar that is blocked turns solid amber instead.
   See CLAUDE.md, "Design fidelity". */

/* --- fonts (self-hosted, SIL OFL 1.1 — licences in static/fonts/) --------- */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-latin.woff2?v=1') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-latin-ext.woff2?v=1') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-latin-italic.woff2?v=1') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-latin-ext-italic.woff2?v=1') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/public-sans-latin.woff2?v=1') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/public-sans-latin-ext.woff2?v=1') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/public-sans-latin-italic.woff2?v=1') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/public-sans-latin-ext-italic.woff2?v=1') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ink and text — every step that carries text is AA on white and on the band */
  --ink: #0d1b24;
  --body: #33424c;
  --muted: #4b5862;
  --soft: #5d6b75;
  --faint: #647079;
  --disabled: #8d98a2;          /* disabled controls only; exempt from AA */
  --dot: #b7c0c8;
  --quiet-figure: #6b7883;      /* the "/ 42" beside a large figure */

  /* petrol: action and selection */
  --petrol: #14506a;
  --petrol-hover: #0f4258;
  --petrol-50: #e9f2f5;
  --petrol-100: #cfe2ea;
  --link: #1b6280;
  --link-hover: #14506a;

  /* sea green: progress and "verified" — a fill; read as --positive */
  --signal: #2f9c8c;
  --signal-50: #e4f3ef;
  --positive: #1d6f62;
  --gradient: linear-gradient(90deg, var(--petrol) 10%, var(--signal));
  --gradient-deep: linear-gradient(135deg, var(--petrol), #1f6c78);  /* bands that carry white text */

  /* amber: "this needs a human decision", and nothing else */
  --attention: oklch(0.66 0.15 60);        /* fills and rules on blocking alerts */
  --attention-text: oklch(0.50 0.13 45);   /* "cannot be assigned" */
  --attention-deep: oklch(0.44 0.13 45);   /* the same, one step down */
  --attention-50: #fdf1e1;                 /* the surface of a blocked card */
  --attention-25: #fffaf2;
  --attention-line: #f2d4a6;
  --danger-text: oklch(0.45 0.13 30);      /* revoke, recuse */

  /* surfaces */
  --paper: #ffffff;
  --paper-alt: #f9fafb;
  --band: #f6f8fa;
  --deep-band: #eef2f5;
  --reading: #eef2f5;
  --tint: var(--petrol-50);
  --row-highlight: var(--attention-25);

  /* lines */
  --hairline: #edf0f3;
  --rule: #e3e8ec;
  --rule-strong: #d3dae0;
  --field-border: #bfc8d0;

  /* depth: soft, and only on cards that sit on a band */
  --shadow-sm: 0 1px 2px rgba(13, 27, 36, .06), 0 1px 1px rgba(13, 27, 36, .04);
  --shadow: 0 2px 4px rgba(13, 27, 36, .04), 0 12px 28px -12px rgba(13, 27, 36, .16);
  --shadow-lg: 0 2px 4px rgba(13, 27, 36, .04), 0 24px 48px -12px rgba(13, 27, 36, .18);

  /* radii */
  --r-sm: 8px;
  --r: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* structure */
  --page-width: 1200px;
  --sidebar-width: 240px;
  --serif: 'Newsreader', Georgia, serif;
  --display: var(--serif);
  --sans: 'Public Sans', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .6, .3, 1);
}

/* --- reset --------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 400 15px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;   /* digits align, including while sorting */
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* No monospace anywhere, including numbers. */
* { font-variant-numeric: tabular-nums; }

h1, h2, h3, h4, p, figure { margin: 0; }

a { color: var(--link); text-decoration: none; transition: color 140ms var(--ease); }
a:hover { color: var(--link-hover); }

button, input, select, textarea { font: inherit; color: inherit; }

img { max-width: 100%; display: block; }

/* Focus is always visible: a 2px petrol ring, offset from the control. */
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- the logo (templates/_logo.html) ------------------------------------- */
/* Concept D, "Intersección vacía": an SVG lockup, drawn in paths. Minimum
   height 18px; below that, the favicon alone. */

.logo { display: inline-flex; align-items: center; line-height: 0; }
.logo img { height: 27px; width: auto; }
.logo.is-sm img { height: 24px; }
.logo.is-footer img { height: 20px; }

/* --- typography ---------------------------------------------------------- */

.serif { font-family: var(--serif); font-weight: 400; }
.lead { font: 400 17px/1.65 var(--sans); color: var(--muted); text-wrap: pretty; }
.prose { text-wrap: pretty; }
.balance { text-wrap: balance; }

.meta { font: 400 13px var(--sans); color: var(--faint); }
.note { font: 400 13.5px/1.65 var(--sans); color: var(--soft); text-wrap: pretty; }
.aside { font-family: var(--serif); font-style: italic; }

.attention { color: var(--attention-text); }
.danger { color: var(--danger-text); }
.positive { color: var(--positive); }
.quiet { color: var(--soft); }
.fainter { color: var(--faint); }
.dash { color: var(--disabled); }

/* --- buttons ------------------------------------------------------------- */
/* Destructive actions are never primary. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  font: 600 13.5px var(--sans);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease),
              color 140ms var(--ease), box-shadow 140ms var(--ease), transform 140ms var(--ease);
}
.btn:hover { background: var(--band); color: var(--ink); box-shadow: var(--shadow); }

.btn-primary {
  background: var(--petrol);
  border-color: var(--petrol);
  color: #fff;
}
.btn-primary:hover { background: var(--petrol-hover); border-color: var(--petrol-hover); color: #fff; }

.btn-danger { color: var(--danger-text); }
.btn-danger:hover { color: var(--danger-text); }

.btn[disabled], .btn-disabled {
  background: var(--deep-band);
  border-color: var(--rule);
  color: var(--disabled);
  box-shadow: none;
  cursor: not-allowed;
}
.btn[disabled]:hover, .btn-disabled:hover { background: var(--deep-band); color: var(--disabled); box-shadow: none; }

.btn-lg { padding: 14px 24px; font-size: 15.5px; border-radius: var(--r-md); }
.btn-md { padding: 12px 22px; font-size: 14px; }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-block { width: 100%; }

.link-action {
  font: 500 13.5px var(--sans);
  color: var(--link);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.link-action:hover { color: var(--link-hover); }

/* --- form controls ------------------------------------------------------- */

.field { display: block; }
.field-label {
  display: block;
  font: 500 13.5px var(--sans);
  color: var(--ink);
  margin-bottom: 7px;
}
.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}
/* Sits under the control, in the hierarchy rather than above it. */
.field-hint {
  display: block;
  font: 400 13px/1.55 var(--sans);
  color: var(--soft);
  margin-top: 6px;
  text-wrap: pretty;
}

.input, .textarea, .select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: var(--r);
  padding: 11px 14px;
  font: 400 14.5px var(--sans);
  color: var(--body);
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--disabled); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--link);
  outline: 2px solid var(--link);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px var(--petrol-50);
}
.input[disabled], .textarea[disabled], .select[disabled] { background: var(--band); color: var(--soft); }
.textarea { min-height: 100px; line-height: 1.65; resize: vertical; }
.input-sm { padding: 9px 12px; font-size: 13.5px; }
.select { font-weight: 500; }

/* Search field, pushed right in a filter row. */
.search { min-width: 200px; margin-left: auto; padding: 9px 14px; font-size: 13px; }

/* Pills used as filters. */
.pill-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill {
  padding: 7px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 99px;
  background: #fff;
  color: var(--muted);
  font: 500 13px var(--sans);
  cursor: pointer;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.pill:hover { background: var(--band); color: var(--ink); }
.pill[aria-pressed="true"], .pill.is-active {
  background: var(--petrol);
  border-color: var(--petrol);
  color: #fff;
  font-weight: 600;
}

/* Role pills — the primary role is filled, the rest outlined. */
.role-pill {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 99px;
  background: #fff;
  color: var(--muted);
  font: 500 12.5px var(--sans);
}
.role-pill.is-primary {
  background: var(--petrol);
  border-color: var(--petrol);
  color: #fff;
  font-weight: 600;
}

/* Tags: a short state beside a name. Sea green reads "done"; amber reads
   "a person must decide". */
.tag {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 99px;
  font: 600 11.5px/1.7 var(--sans);
  background: var(--deep-band);
  color: var(--muted);
  white-space: nowrap;
}
.tag.is-done { background: var(--signal-50); color: var(--positive); }
.tag.is-attention { background: var(--attention-50); color: var(--attention-deep); }

/* Segmented control — three-way choices and license chips. */
.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.segmented > * {
  padding: 10px 18px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  background: #fff;
  color: var(--muted);
  font: 500 14px var(--sans);
  cursor: pointer;
  transition: background-color 140ms var(--ease);
}
.segmented > *:hover { background: var(--band); }
.segmented > [aria-pressed="true"], .segmented > .is-active {
  background: var(--petrol);
  border-color: var(--petrol);
  color: #fff;
  font-weight: 600;
}
.chip-row .segmented > * { padding: 8px 14px; font: 600 13px var(--sans); color: var(--soft); }
.chip-row .segmented > .is-active { color: #fff; }

/* Toggle — 34x20 pill, 16px knob, petrol when on. */
.toggle {
  width: 34px;
  height: 20px;
  border-radius: 99px;
  background: var(--field-border);
  border: 0;
  position: relative;
  flex: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 160ms var(--ease);
}
.toggle::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms var(--ease);
}
.toggle[aria-checked="true"] { background: var(--petrol); }
.toggle[aria-checked="true"]::after { transform: translateX(14px); }

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 400 13.5px var(--sans);
  color: var(--muted);
}

/* Checkbox in the author wizard — 16px, petrol, a character not an icon. */
.checkbox {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--petrol);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 10px var(--sans);
  flex: none;
  margin-top: 3px;
  border: 1px solid var(--petrol);
  cursor: pointer;
}
.checkbox[aria-checked="false"] { background: #fff; border-color: var(--field-border); color: transparent; }

/* --- tables -------------------------------------------------------------- */
/* A table is a white card with a banded header row. Rows are hoverable and
   open a detail view. Column widths come straight from the design as a --cols
   custom property. */

.tbl {
  display: block;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.tbl-head, .tbl-row {
  display: grid;
  grid-template-columns: var(--cols);
  gap: var(--gap, 14px);
  padding-left: 16px;
  padding-right: 16px;
}
.tbl-head {
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--band);
  border-bottom: 1px solid var(--rule);
  font: 500 12.5px var(--sans);
  color: var(--soft);
}
.tbl-head button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.tbl-head button:hover { color: var(--ink); }
.tbl-row {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
  font: 400 14px var(--sans);
  color: var(--body);
  transition: background-color 140ms var(--ease);
}
.tbl-row:last-child { border-bottom: 0; }
a.tbl-row { color: var(--body); }
.tbl-row:hover { background: var(--band); }
.tbl-row.is-centred { align-items: center; }
.tbl-row.is-selected { background: var(--petrol-50); }
.tbl-row.needs-attention { background: var(--row-highlight); }
.tbl-row.needs-attention:hover { background: var(--attention-50); }

.tbl-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  font: 400 13.5px var(--sans);
  color: var(--soft);
}

/* Empty states get a sentence, not an illustration. */
.empty {
  padding: 28px 0;
  font: 400 15px/1.65 var(--sans);
  color: var(--soft);
  text-wrap: pretty;
}
.tbl > .empty { padding: 28px 16px; }

/* --- structure ----------------------------------------------------------- */

.rule { height: 1px; background: var(--rule); }

/* A card: white, one 1px line, a soft shadow. Used on a band. */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

/* Blocking alert: an amber card with a dot, one sentence naming the problem,
   one naming the rule that will not be broken, and the ways out. Amber here
   means a person must decide. */
.alert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--attention-50);
  border: 1px solid var(--attention-line);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.alert::before {
  content: "";
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--attention);
  flex: none;
  margin-top: 8px;
}
.alert-statement { font: 500 15px/1.5 var(--sans); color: var(--ink); }
.alert-rule { font: 400 13.5px/1.55 var(--sans); color: var(--muted); margin-top: 4px; }
.alert-actions { display: flex; gap: 8px; flex: none; padding-top: 0; flex-wrap: wrap; }

/* KPI cards: a row of white cards, each a label, a large serif figure, a
   qualifier and, where it is a share of something, a progress bar. */
.stat-band {
  display: grid;
  gap: 16px;
}
.stat-cell {
  display: block;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 20px;
  transition: box-shadow 140ms var(--ease), border-color 140ms var(--ease);
}
a.stat-cell { color: inherit; }
a.stat-cell:hover { box-shadow: var(--shadow); border-color: var(--rule-strong); color: inherit; }
.stat-cell.is-attention { background: var(--attention-50); border-color: var(--attention-line); }
.stat-cell.is-attention .stat-figure { color: var(--attention-deep); }
.stat-label { font: 500 13px var(--sans); color: var(--muted); margin-bottom: 4px; }
.stat-figure { font: 400 40px/1.15 var(--serif); letter-spacing: -.01em; color: var(--ink); }
.stat-figure .of { font-size: 20px; color: var(--quiet-figure); }
.stat-qualifier { font: 400 12.5px/1.5 var(--sans); color: var(--faint); margin-top: 4px; }

/* A share as a bar: <progress class="meter">, so it needs no inline width. */
.meter {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 12px;
  border: 0;
  border-radius: 99px;
  background: var(--deep-band);
  overflow: hidden;
  color: var(--petrol);
}
.meter::-webkit-progress-bar { background: var(--deep-band); border-radius: 99px; }
.meter::-webkit-progress-value { background: var(--gradient); border-radius: 99px; }
.meter::-moz-progress-bar { background: var(--gradient); border-radius: 99px; }
.meter.is-attention::-webkit-progress-value { background: var(--attention); }
.meter.is-attention::-moz-progress-bar { background: var(--attention); }

/* Progress: a 6px bar, the gradient fill, solid amber when the session is
   blocked. */
.progress { flex: 1; height: 6px; background: var(--deep-band); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 6px; background: var(--gradient); border-radius: 99px; }
.progress.at-risk > span { background: var(--attention); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-count { color: var(--soft); font-size: 13px; }

/* Ledger rows: label and amount separated by hairlines. */
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font: 400 14px var(--sans);
  color: var(--soft);
}
.ledger-row.is-head {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-weight: 500;
  font-size: 14.5px;
}
.ledger-figure { font: 500 15px var(--sans); color: var(--ink); }
.ledger-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--signal-50);
  border-radius: var(--r);
}
.ledger-total span:first-child { font: 600 14.5px var(--sans); color: var(--positive); }
.ledger-total span:last-child { font: 500 26px var(--serif); color: var(--positive); }

/* A dot list — small dots, never an icon set. */
.dot-list { display: flex; flex-direction: column; gap: 15px; }
.dot-item { display: flex; gap: 14px; align-items: flex-start; }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--petrol); margin-top: 9px; flex: none;
}
.dot.is-quiet { background: var(--dot); }

/* Image placeholders — a diagonal stripe and a sentence naming what belongs. */
.placeholder {
  border: 1px dashed var(--field-border);
  border-radius: var(--r-md);
  background: repeating-linear-gradient(135deg, #fff 0 10px, var(--band) 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 12.5px var(--sans);
  color: var(--faint);
  text-align: center;
  padding: 12px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.divider > span { font: 400 13px var(--sans); color: var(--faint); }

.avatar {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--petrol), #1d6f62);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 600 12px var(--sans); flex: none;
}

/* --- flash messages ------------------------------------------------------ */

.flash {
  border: 1px solid var(--petrol-100);
  border-radius: var(--r);
  padding: 11px 16px;
  font: 400 14px/1.55 var(--sans);
  color: var(--ink);
  background: var(--petrol-50);
}
.flash.is-attention { border-color: var(--attention-line); background: var(--attention-50); }

/* --- utilities ----------------------------------------------------------- */

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; }
.gap-20 { gap: 20px; } .gap-22 { gap: 22px; } .gap-24 { gap: 24px; }
.gap-26 { gap: 26px; } .gap-30 { gap: 30px; } .gap-34 { gap: 34px; }
.push { margin-left: auto; }
.mt-auto { margin-top: auto; }
.grow { flex: 1; min-width: 0; }
.wrap-row { flex-wrap: wrap; }
.contents { display: contents; }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- responsive ---------------------------------------------------------- */
/* Designed at 1200. Below about 720 tables become label/value rows. */

@media (max-width: 720px) {
  .tbl-head { display: none; }
  .tbl-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .tbl-row > [data-label]::before {
    content: attr(data-label);
    display: block;
    font: 500 12.5px var(--sans);
    color: var(--faint);
    margin-bottom: 2px;
  }
  .stat-band { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .stat-figure { font-size: 32px; }
  .alert { flex-wrap: wrap; }
  .alert-actions { padding-top: 6px; width: 100%; }
}
@media (max-width: 340px) {
  .stat-band { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* KPI rows of three or four; the meter beside a count in a table row. */
.stat-band.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-band.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-band.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.meter.is-inline { margin-top: 0; flex: 1; }
@media (max-width: 1000px) {
  .stat-band.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .stat-band.is-3, .stat-band.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-cell { padding: 14px 14px 16px; }
  .stat-figure { font-size: 28px; }
}
@media (max-width: 340px) {
  .stat-band.is-2, .stat-band.is-3, .stat-band.is-4 { grid-template-columns: 1fr; }
}

/* A required consent (app/legal.py), on any page: box beside its sentence. */
.consent-row { display: flex; gap: 10px; align-items: flex-start; font: 400 14px/1.55 var(--sans); color: var(--ink); cursor: pointer; }
.consent-row input { accent-color: var(--petrol); width: 16px; height: 16px; margin: 3px 0 0; flex: none; }
