/* National CRVS Partner Mapping: the whole design system in one file.
   Nigerian flag green (#008751 shading to #006b40) for the masthead and heroes, gold accents, light panels on a warm off-white canvas.
   Fraunces for headlines and big numbers, Plus Jakarta Sans for everything else.
   Every colour resolves from the tokens in section 1, light by default and dark under data-theme="crvs-dark".
   Templates carry no colours of their own.
   Contents: 1 tokens, 2 base, 3 layout, 4 masthead and footer, 5 heroes and page heads, 6 cards, 7 buttons,
   8 badges and chips, 9 notices, 10 forms, 11 tables, 12 dashboard (KPIs, filters, matrix, map), 13 lists and
   detail blocks, 14 auth, empty and error pages, 15 utilities, 16 print. */

/* 1. Tokens ------------------------------------------------------------------------------------------------ */
:root {
  color-scheme: light;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Type scale */
  --fs-xs: .75rem; --fs-sm: .84375rem; --fs-md: .9375rem; --fs-base: 1rem; --fs-lg: 1.125rem;
  --fs-xl: 1.3125rem; --fs-2xl: 1.625rem; --fs-3xl: clamp(1.75rem, 1.2rem + 1.8vw, 2.375rem);
  --fs-hero: clamp(2.25rem, 1.3rem + 3.6vw, 4rem); --fs-num: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);

  /* Spacing, radii, page width */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-8: 2rem; --sp-10: 2.5rem; --sp-12: 3rem; --sp-16: 4rem;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --page-max: 76rem;

  /* Surfaces and ink */
  --canvas: #f7f4ec;
  --surface: #ffffff;
  --surface-sunk: #fbf9f4;
  --surface-muted: #f2eee3;
  --line: #e7e1d3;
  --line-strong: #8d8672;
  --card-edge: rgba(21, 33, 26, .07);
  --ink: #15211a;
  --ink-soft: #48524b;
  --ink-faint: #5e665f;

  /* Brand */
  --brand: #008751;
  --brand-strong: #006b40;
  --brand-ink: #ffffff;
  --brand-soft: #e3f2ea;
  --link: #006b40;
  --gold: #e1af19;
  --gold-strong: #c99a0f;
  --gold-ink: #1f1600;
  --gold-text: #8a6408;
  --gold-line: #a87b09;
  --gold-soft: #fbf3da;
  --danger: #b3261e;
  --danger-line: #c62828;
  --danger-soft: #fcedec;
  --focus: #a87b09;

  /* Masthead, heroes and footer: Nigerian flag green #008751 shading to #006b40; #005c37 for the footer.
     Text sits on the #006b40 side, where white, the soft tint and the light gold all clear 4.5:1. */
  --hero-bg: #006b40;
  --hero-bg-hi: #008751;
  --foot-bg: #005c37;
  --hero-ink: #ffffff;
  --hero-soft: #e3f1e8;
  --hero-gold: #f5d77a;
  --hero-line: rgba(255, 255, 255, .14);
  --hero-panel: rgba(255, 255, 255, .06);
  --hero-panel-edge: rgba(255, 255, 255, .13);
  --hero-glow-gold: rgba(225, 175, 25, .14);
  --seal-plate: #fbf8ef;

  /* Groups: NPC green, Government gold, Partners slate blue. Marks clear 3:1 on the surface. */
  --grp-npc: #008751; --grp-npc-fill: #008751; --grp-npc-ink: #ffffff;
  --grp-gov: #a87b09; --grp-gov-fill: #e1af19; --grp-gov-ink: #1f1600;
  --grp-partner: #3b5b6e; --grp-partner-fill: #3b5b6e; --grp-partner-ink: #ffffff;
  /* The same groups drawn on the dark hero */
  --grp-npc-on-dark: #a8ecc6; --grp-gov-on-dark: #e1af19; --grp-partner-on-dark: #9cc3db;

  /* Map, five steps from none to many */
  --map-0: #ebe6d8; --map-1: #c4e5d2; --map-2: #6cbf93; --map-3: #008751; --map-4: #005c37;
  --map-line: #ffffff; --map-hover: #a87b09;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(21, 33, 26, .05), 0 1px 1px rgba(21, 33, 26, .03);
  --shadow-md: 0 1px 2px rgba(21, 33, 26, .04), 0 6px 16px -6px rgba(21, 33, 26, .08), 0 18px 40px -18px rgba(6, 46, 26, .14);
  --shadow-lg: 0 2px 4px rgba(21, 33, 26, .04), 0 14px 32px -10px rgba(21, 33, 26, .14), 0 36px 72px -28px rgba(6, 46, 26, .28);
  --scroll-thumb: #c9c2b0;
  --scroll-track: transparent;
}

[data-theme="crvs-dark"] {
  color-scheme: dark;
  --canvas: #08130d;
  --surface: #0f1e16;
  --surface-sunk: #0c1912;
  --surface-muted: #15291e;
  --line: #233a2c;
  --line-strong: #66806f;
  --card-edge: rgba(255, 255, 255, .06);
  --ink: #edf2ec;
  --ink-soft: #b5c3b9;
  --ink-faint: #9dada2;

  --brand: #2fb47a;
  --brand-strong: #4cc791;
  --brand-ink: #03140b;
  --brand-soft: #0f3324;
  --link: #63d3a0;
  --gold-strong: #ecc552;
  --gold-text: #ecc552;
  --gold-line: #e1af19;
  --gold-soft: #2a2410;
  --danger: #f28b82;
  --danger-line: #ef6b60;
  --danger-soft: #2c1513;
  --focus: #e1af19;

  --hero-bg: #00452a;
  --hero-bg-hi: #006b40;
  --foot-bg: #003a23;

  --grp-npc: #3fbf85; --grp-npc-fill: #3fbf85; --grp-npc-ink: #03140b;
  --grp-gov: #e1af19; --grp-gov-fill: #e1af19; --grp-gov-ink: #1f1600;
  --grp-partner: #8db4cb; --grp-partner-fill: #8db4cb; --grp-partner-ink: #06141c;

  --map-0: #1a2c22; --map-1: #134a33; --map-2: #007a4a; --map-3: #2fb47a; --map-4: #9fe6c2;
  --map-line: #0f1e16; --map-hover: #e1af19;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 20px 48px -16px rgba(0, 0, 0, .7);
  --scroll-thumb: #2e4a3a;
}

/* 2. Base -------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--scroll-thumb) var(--scroll-track); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--canvas); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--fs-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--font-mono); font-size: .92em; }
strong, b { font-weight: 700; }
::selection { background: var(--gold); color: var(--gold-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: var(--r-pill); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-corner { background: transparent; }
[hidden] { display: none !important; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; padding: .6rem 1rem; background: var(--surface); color: var(--ink); border-radius: 0 0 var(--r-md) 0; font-weight: 700; }
.skip-link:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 3. Layout ------------------------------------------------------------------------------------------------ */
.container { width: 100%; max-width: var(--page-max); margin: 0 auto; padding-inline: var(--gutter); }
main { flex: 1; }
.page { padding-block: var(--sp-10) var(--sp-16); }
.page-narrow { max-width: 50rem; }
.page-tuck { padding-top: 0; }
.page-tuck > .flashes { margin-top: var(--sp-8); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-3) var(--sp-6); }
.grid-2, .grid-3, .grid-side, .grid-aside { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .grid-side { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: var(--sp-8); align-items: start; }
  .grid-aside { grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); gap: var(--sp-8); align-items: start; }
}
.col-stack { display: grid; gap: var(--sp-5); align-content: start; min-width: 0; }
.section { margin-top: var(--sp-12); }

/* 4. Masthead and footer ----------------------------------------------------------------------------------- */
.masthead { position: relative; color: var(--hero-ink); background: radial-gradient(900px 300px at 100% -60%, var(--hero-bg-hi), transparent 70%), var(--hero-bg); }
.masthead::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--hero-line); }
.masthead-top { display: flex; align-items: center; gap: var(--sp-4); padding-block: var(--sp-5) var(--sp-3); }
.brand { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-plate { display: flex; align-items: center; gap: .4rem; flex: none; padding: .35rem .6rem .35rem .45rem; background: var(--seal-plate); border-radius: var(--r-lg); box-shadow: 0 0 0 1px rgba(225, 175, 25, .55), 0 6px 18px -6px rgba(0, 0, 0, .45); }
.brand-coa { height: 44px; width: auto; }
.brand-seal { height: 44px; width: 44px; border-radius: var(--r-pill); }
.brand-text { min-width: 0; }
.brand-gov { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-gold); }
.brand-name { display: block; margin-top: .1rem; font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
.brand-with { display: block; margin-top: .2rem; font-size: var(--fs-sm); color: var(--hero-soft); }
.masthead-tools { margin-left: auto; flex: none; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .4rem .95rem;
  border: 1px solid var(--hero-panel-edge); border-radius: var(--r-pill); background: var(--hero-panel);
  color: var(--hero-ink); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: background .15s;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .12); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="crvs-dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="crvs-dark"] .theme-toggle .icon-moon { display: none; }
.mainnav-inner { display: flex; flex-wrap: wrap; column-gap: var(--sp-6); }
.mainnav a { position: relative; display: inline-flex; align-items: center; padding: .65rem 0 .85rem; color: var(--hero-soft); font-weight: 600; font-size: var(--fs-md); text-decoration: none; }
.mainnav a:hover { color: var(--hero-ink); }
.mainnav a[aria-current="page"] { color: var(--hero-ink); }
.mainnav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--gold); }
@media (max-width: 640px) {
  .masthead-top { align-items: flex-start; gap: var(--sp-3); padding-top: var(--sp-4); }
  .brand { gap: var(--sp-3); }
  .brand-plate { padding: .25rem .4rem .25rem .3rem; border-radius: var(--r-md); gap: .25rem; }
  .brand-coa, .brand-seal { height: 34px; }
  .brand-seal { width: 34px; }
  .brand-gov { font-size: .625rem; letter-spacing: .08em; }
  .brand-name { font-size: 1.2rem; }
  .brand-with { display: none; }
  .theme-toggle { padding: .4rem .65rem; }
  .theme-toggle .toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mainnav-inner { column-gap: var(--sp-5); }
  .mainnav a { font-size: var(--fs-sm); }
}

.site-foot { background: var(--foot-bg); color: var(--hero-soft); font-size: var(--fs-sm); }
.site-foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-5) var(--sp-8); padding-block: var(--sp-8); }
.site-foot-brand { display: flex; align-items: center; gap: var(--sp-3); max-width: 40rem; }
.site-foot-brand img { width: 40px; height: 40px; flex: none; border-radius: var(--r-pill); background: var(--seal-plate); padding: 2px; }
.site-foot strong { display: block; color: var(--hero-ink); font-weight: 700; }
.site-foot a, .site-foot .link-button { color: var(--hero-gold); font-weight: 600; }
.foot-account { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); }
.foot-account form { display: inline; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* 5. Heroes and page heads --------------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; color: var(--hero-ink);
  background:
    radial-gradient(1000px 520px at 96% -10%, var(--hero-bg-hi), transparent 60%),
    radial-gradient(600px 300px at 100% 120%, var(--hero-glow-gold), transparent 60%),
    var(--hero-bg);
}
.hero-inner { position: relative; padding-block: var(--sp-12) var(--sp-16); }
.hero .eyebrow { color: var(--hero-gold); }
.hero-title { margin-top: var(--sp-4); font-family: var(--font-display); font-size: var(--fs-hero); line-height: 1.04; font-weight: 500; letter-spacing: -.025em; max-width: 15ch; }
.hero-title em { font-style: italic; font-weight: 400; color: var(--hero-gold); }
.hero-lead { margin-top: var(--sp-6); max-width: 38rem; font-size: var(--fs-lg); line-height: 1.7; color: var(--hero-soft); }
.hero-actions { margin-top: var(--sp-8); }
.hero-grid { display: grid; gap: var(--sp-10); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.hero-art { display: none; justify-self: center; width: min(100%, 27rem); }
@media (min-width: 1000px) { .hero-art { display: block; } }
.hero-art svg { width: 100%; height: auto; }
.hero-art path { fill: rgba(255, 255, 255, .07); stroke: rgba(245, 215, 122, .6); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero-art path:nth-child(3n) { fill: rgba(255, 255, 255, .18); }
.hero-art path:nth-child(7n) { fill: rgba(245, 215, 122, .42); }
.hero-art figcaption { margin-top: var(--sp-4); text-align: center; font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--hero-soft); }
.hero-dash .hero-inner { padding-block: var(--sp-10) calc(var(--sp-16) + var(--sp-8)); }
.hero-dash .hero-title { font-size: var(--fs-3xl); max-width: none; margin-top: var(--sp-2); }
.hero-dash .hero-lead { font-size: var(--fs-md); margin-top: var(--sp-3); max-width: 50rem; line-height: 1.6; }

.eyebrow { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.page-head { margin-bottom: var(--sp-8); }
.page-title { margin-top: var(--sp-2); font-family: var(--font-display); font-size: var(--fs-3xl); line-height: 1.12; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.page-head > .page-title:first-child { margin-top: 0; }
.page-lead { margin-top: var(--sp-3); max-width: 46rem; font-size: var(--fs-lg); line-height: 1.6; color: var(--ink-soft); }
.page-meta { margin-top: var(--sp-3); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); color: var(--ink-soft); font-size: var(--fs-md); overflow-wrap: anywhere; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: var(--sp-5); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.back-link svg { width: 16px; height: 16px; }
.section-head { margin-bottom: var(--sp-5); }
.section-title { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.2; font-weight: 600; letter-spacing: -.015em; }
.section-sub { margin-top: var(--sp-2); max-width: 48rem; color: var(--ink-soft); font-size: var(--fs-md); }

/* 6. Cards ------------------------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--card-edge); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: var(--sp-8); min-width: 0; }
.card-tight { padding: var(--sp-6); }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-5); }
.card-title { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.25; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.card-sub { margin-top: var(--sp-1); font-size: var(--fs-sm); color: var(--ink-soft); }
.card-foot { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
a.card:hover .card-title { color: var(--link); }
.card-group { position: relative; overflow: hidden; }
.card-group::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--grp); }
@media (max-width: 640px) { .card { padding: var(--sp-5); border-radius: var(--r-lg); } .card-tight { padding: var(--sp-5); } }

/* 7. Buttons ----------------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.875rem; padding: .65rem 1.3rem;
  border: 1px solid transparent; border-radius: var(--r-md); font-size: var(--fs-md); font-weight: 700; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(6, 46, 26, .25), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 8px 20px -10px rgba(225, 175, 25, .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-gold:hover { background: var(--gold-strong); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-muted); }
.btn-on-dark { background: transparent; color: var(--hero-ink); border-color: rgba(255, 255, 255, .5); }
.btn-on-dark:hover { background: rgba(255, 255, 255, .1); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 2.375rem; padding: .45rem .95rem; font-size: var(--fs-sm); border-radius: 10px; }
.btn-xs { min-height: 2rem; padding: .3rem .7rem; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }

/* 8. Badges and chips -------------------------------------------------------------------------------------- */
.grp-npc { --grp: var(--grp-npc); --grp-fill: var(--grp-npc-fill); --grp-ink: var(--grp-npc-ink); }
.grp-government { --grp: var(--grp-gov); --grp-fill: var(--grp-gov-fill); --grp-ink: var(--grp-gov-ink); }
.grp-partner { --grp: var(--grp-partner); --grp-fill: var(--grp-partner-fill); --grp-ink: var(--grp-partner-ink); }
.on-dark .grp-npc, .on-dark.grp-npc { --grp: var(--grp-npc-on-dark); }
.on-dark .grp-government, .on-dark.grp-government { --grp: var(--grp-gov-on-dark); }
.on-dark .grp-partner, .on-dark.grp-partner { --grp: var(--grp-partner-on-dark); }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .7rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; white-space: nowrap; line-height: 1.5; background: var(--grp-fill, var(--surface-muted)); color: var(--grp-ink, var(--ink)); }
.swatch { display: inline-block; flex: none; width: .7rem; height: .7rem; border-radius: var(--r-pill); background: var(--grp); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .7rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; background: var(--surface-muted); color: var(--ink-soft); border: 1px solid var(--line); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip-ok { background: var(--brand-soft); color: var(--link); border-color: transparent; font-weight: 700; }
.chip-warn { background: var(--gold-soft); color: var(--gold-text); border-color: transparent; font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: var(--fs-sm); }
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: var(--r-pill); background: currentColor; }
.status-ok { color: var(--link); }
.status-wait { color: var(--gold-text); }
.status-no { color: var(--danger); }
.private-note { display: flex; align-items: flex-start; gap: .45rem; font-size: var(--fs-sm); font-weight: 600; color: var(--gold-text); }
.private-note svg { width: 15px; height: 15px; margin-top: .2rem; flex: none; }
span.private-note { display: inline-flex; }

/* 9. Notices and flash messages ---------------------------------------------------------------------------- */
.flashes { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-8); }
.flash, .notice { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); font-size: var(--fs-md); color: var(--ink); }
.flash svg, .notice svg { width: 20px; height: 20px; flex: none; margin-top: .15rem; }
.flash-success, .notice-ok { background: var(--brand-soft); }
.flash-success svg, .notice-ok svg { color: var(--link); }
.flash-error, .notice-error { background: var(--danger-soft); }
.flash-error svg, .notice-error svg { color: var(--danger); }
.notice-wait { background: var(--gold-soft); }
.notice-wait svg { color: var(--gold-text); }
.flash { font-weight: 600; box-shadow: var(--shadow-sm); }
.form-errors { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-6); border-radius: var(--r-lg); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.form-errors svg { width: 20px; height: 20px; flex: none; margin-top: .15rem; }

/* 10. Forms ------------------------------------------------------------------------------------------------ */
.form-section { background: var(--surface); border: 1px solid var(--card-edge); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: var(--sp-8); margin-bottom: var(--sp-6); min-width: 0; }
.form-section > legend { float: left; width: 100%; padding: 0; margin-bottom: var(--sp-6); display: flex; align-items: center; gap: var(--sp-3); font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; }
.form-section > legend + * { clear: both; }
.step { display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: var(--r-pill); background: var(--hero-bg); color: var(--hero-gold); font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; }
.form-section .section-note { margin-bottom: var(--sp-5); }
@media (max-width: 640px) { .form-section { padding: var(--sp-5); border-radius: var(--r-lg); } }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); }
.form-actions .hint { font-size: var(--fs-sm); color: var(--ink-soft); }

.field { margin-bottom: var(--sp-6); min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; margin-bottom: var(--sp-2); font-weight: 700; font-size: var(--fs-md); color: var(--ink); }
.req { color: var(--danger); font-weight: 700; }
.help { margin-top: var(--sp-2); font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-soft); }
.help ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.errors { margin-top: var(--sp-2); font-size: var(--fs-sm); font-weight: 700; color: var(--danger); }
.field-row { display: grid; gap: 0 var(--sp-5); grid-template-columns: minmax(0, 1fr); }
.field-row > .field { margin-bottom: var(--sp-6); }
.form-section > .field-row:last-child { margin-bottom: calc(var(--sp-6) * -1); }
@media (min-width: 640px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field-row.amount { grid-template-columns: minmax(0, 1fr) 12rem; } }

.input, .select, .textarea {
  display: block; width: 100%; min-height: 3rem; padding: .7rem .95rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  font-size: var(--fs-base); line-height: 1.4; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 5.5rem; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--focus) 35%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); opacity: 1; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger-line); }
.input:disabled, .select:disabled, .textarea:disabled, .input[readonly] { background: var(--surface-muted); color: var(--ink-soft); }
.input:disabled, .select:disabled, .textarea:disabled { cursor: not-allowed; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 1.3rem) 55%, calc(100% - .95rem) 55%;
  background-size: .35rem .35rem, .35rem .35rem; background-repeat: no-repeat;
}
.select option, .select optgroup { background: var(--surface); color: var(--ink); }
.input-sm { min-height: 2.5rem; padding-block: .45rem; font-size: var(--fs-md); }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; margin: 0; flex: none; accent-color: var(--brand); cursor: pointer; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: not-allowed; }

/* Checkbox and radio chips: areas, states, systems, support types, group */
.choices { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.choice {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: .5rem 1rem .5rem .85rem;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface-sunk); color: var(--ink);
  font-size: var(--fs-md); font-weight: 500; line-height: 1.3; cursor: pointer; transition: background .15s, border-color .15s;
}
.choice:hover { border-color: var(--line-strong); background: var(--surface); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 650; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choices.states { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.choices.states .choice { border-radius: var(--r-md); }
@media (max-width: 400px) { .choices.states { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choices-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.choices-tools .count { margin-left: auto; font-size: var(--fs-sm); color: var(--ink-soft); }
.choices.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.choices.tiles .choice { border-radius: var(--r-md); min-height: 3.25rem; font-weight: 600; }
.choices.tiles .choice .swatch { margin-left: auto; }
.switch { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-sunk); cursor: pointer; font-weight: 600; }
.switch:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.switch:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch input { margin-top: .2rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.link-once { margin-top: var(--sp-6); padding: var(--sp-6); border-radius: var(--r-xl); background: var(--gold-soft); border: 1px dashed var(--gold-line); }
.link-once label { display: block; margin-bottom: var(--sp-3); font-weight: 700; }
.link-once .input { font-family: var(--font-mono); font-size: var(--fs-sm); }
.link-once-row { display: flex; flex-direction: column; gap: var(--sp-3); }
.link-once p { margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--ink-soft); }
@media (min-width: 640px) { .link-once-row { flex-direction: row; } }

/* 11. Tables ----------------------------------------------------------------------------------------------- */
.table-wrap { overflow: auto; max-width: 100%; background: var(--surface); border: 1px solid var(--card-edge); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.table-wrap.tall { max-height: 36rem; }
.card .table-wrap { box-shadow: none; border-radius: var(--r-lg); border-color: var(--line); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.table th, .table td { padding: .9rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th {
  position: sticky; top: 0; z-index: 1; padding-block: .75rem; background: var(--surface-muted); color: var(--ink-soft);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; vertical-align: bottom;
}
.table tbody th { font-weight: 600; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:nth-child(even of :not(.band)) > * { background: var(--surface-sunk); }
.table tbody tr:not(.band):hover > * { background: color-mix(in oklab, var(--brand) 6%, var(--surface)); }
.table:not(.table-compact) { min-width: 42rem; }
.table .wide { min-width: 14rem; }
.table-compact tbody th { white-space: nowrap; }
.table .num { text-align: right; white-space: nowrap; }
.table .strong { font-weight: 800; }
.table .nowrap { white-space: nowrap; }
.table .small { font-size: var(--fs-sm); color: var(--ink-soft); }
.table .sub { margin-top: .2rem; font-size: var(--fs-sm); color: var(--ink-soft); }
.table td a, .table th a { font-weight: 700; text-decoration: none; }
.table td a:hover, .table th a:hover { text-decoration: underline; }
.table tr.band > th { padding-block: .6rem; background: color-mix(in oklab, var(--grp) 10%, var(--surface)); }
.table .grp-edge { box-shadow: inset 4px 0 0 var(--grp); }
.table .empty-row { padding: var(--sp-8); text-align: center; color: var(--ink-soft); }
.table .zero { color: var(--ink-faint); }
.diff { font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-soft); overflow-wrap: anywhere; }
.diff b { color: var(--ink); font-weight: 700; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-6); }
.pager .current { padding: .45rem .9rem; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); }
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-5); }
.toolbar .field { margin-bottom: 0; min-width: 14rem; }
.count-line { margin: var(--sp-6) 0 var(--sp-3); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); }

/* 12. Dashboard -------------------------------------------------------------------------------------------- */
.kpis { display: grid; gap: var(--sp-3); margin-top: var(--sp-8); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 999px) { .kpi:first-child, .kpi:last-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .kpi { padding: var(--sp-4); border-radius: var(--r-lg); } .kpi-note { font-size: var(--fs-xs); } }
@media (min-width: 1000px) { .kpis { grid-template-columns: 1.45fr 1fr 1fr 1fr; } }
.kpi { padding: var(--sp-5) var(--sp-6); border-radius: var(--r-xl); background: var(--hero-panel); border: 1px solid var(--hero-panel-edge); min-width: 0; }
.kpi-label { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-soft); }
.kpi-num { display: block; margin-top: var(--sp-3); font-family: var(--font-display); font-size: var(--fs-num); line-height: 1; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; color: var(--hero-ink); }
.kpi-num small { margin-left: .4rem; font-family: var(--font-sans); font-size: var(--fs-md); font-weight: 600; letter-spacing: 0; color: var(--hero-soft); }
.kpi-note { display: block; margin-top: var(--sp-3); font-size: var(--fs-sm); line-height: 1.5; color: var(--hero-soft); }
.kpi-bar { display: flex; gap: 3px; height: .5rem; margin-top: var(--sp-4); border-radius: var(--r-pill); overflow: hidden; background: rgba(255, 255, 255, .1); }
.kpi-bar span { display: block; background: var(--grp); }
.kpi-legend { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--hero-soft); }
.kpi-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.kpi-legend b { color: var(--hero-ink); font-weight: 700; }

/* Light stat tiles (coordinator completeness) */
.stats { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: block; padding: var(--sp-5) var(--sp-6); background: var(--surface); border: 1px solid var(--card-edge); border-radius: var(--r-xl); box-shadow: var(--shadow-md); color: inherit; text-decoration: none; min-width: 0; }
a.stat { transition: transform .18s, box-shadow .18s; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.stat-num { display: block; font-family: var(--font-display); font-size: var(--fs-num); line-height: 1; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.stat-num small { font-family: var(--font-sans); font-size: var(--fs-md); font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.stat-label { display: block; margin-top: var(--sp-3); font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-soft); }
a.stat .stat-label { color: var(--link); font-weight: 700; }
@media (max-width: 640px) { .stat { padding: var(--sp-4); border-radius: var(--r-lg); } }

/* Filter bar, overlapping the dashboard hero */
.filter-card { position: relative; z-index: 2; margin-top: calc((var(--sp-16) + var(--sp-2)) * -1); }
.filter-grid { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 720px) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filter-grid .span-all { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .filter-grid { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; } .filter-grid .span-all { grid-column: auto; } }
.filter-grid .field { margin-bottom: 0; }
.filter-grid.entries { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); }
.push { flex: 1; }
.verify-cell { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.filter-label { display: block; margin-bottom: var(--sp-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pill {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 3rem; padding: .4rem 1rem; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.pill:hover { background: var(--surface-muted); text-decoration: none; }
.pill[aria-current="true"] { background: var(--hero-bg); border-color: var(--hero-bg); color: var(--hero-ink); }
.pill[aria-current="true"] .swatch { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
[data-theme="crvs-dark"] .pill[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
[data-theme="crvs-dark"] .pill[aria-current="true"] .swatch { box-shadow: 0 0 0 2px var(--brand-ink); }
.filter-buttons { display: flex; gap: var(--sp-2); }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-soft); }
.active-filters a.chip { color: var(--ink); text-decoration: none; font-size: var(--fs-sm); padding: .3rem .5rem .3rem .8rem; }
.active-filters a.chip:hover { border-color: var(--line-strong); }

/* Who-does-what matrix: scrolls inside its own box, header row and first column stay put */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); font-size: var(--fs-sm); color: var(--ink-soft); }
.legend > span { display: inline-flex; align-items: center; gap: .45rem; }
.legend .tick { width: 16px; height: 16px; color: var(--link); }
.matrix-box { overflow: auto; max-width: 100%; max-height: min(80vh, 54rem); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.matrix th, .matrix td { padding: 0; border-bottom: 1px solid var(--line); text-align: center; }
.matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-muted); vertical-align: bottom; }
.matrix th.col { height: 9.5rem; min-width: 2.6rem; padding: .75rem 0 .7rem; }
.matrix th.col span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; }
.matrix th.org, .matrix td.org { position: sticky; left: 0; z-index: 1; min-width: 13rem; max-width: 16rem; padding: .7rem 1rem .7rem 1.2rem; text-align: left; background: var(--surface); border-right: 1px solid var(--line); }
.matrix thead th.org { z-index: 3; padding-bottom: .8rem; background: var(--surface-muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.matrix td.org { box-shadow: inset 4px 0 0 var(--grp); }
.matrix td.org a { font-weight: 700; text-decoration: none; color: var(--ink); }
.matrix td.org a:hover { color: var(--link); text-decoration: underline; }
.matrix td.org .tick { display: inline-block; vertical-align: -3px; margin-left: .3rem; width: 16px; height: 16px; color: var(--link); }
.matrix td.org .none { display: block; font-size: var(--fs-xs); color: var(--gold-text); font-weight: 600; }
.matrix td { height: 3rem; }
.matrix tr.band th { position: static; padding: .6rem 1.2rem; text-align: left; background: color-mix(in oklab, var(--grp) 10%, var(--surface)); }
.matrix tr.band .band-label { position: sticky; left: 1.2rem; display: inline-flex; align-items: center; gap: var(--sp-3); font-weight: 600; color: var(--ink-soft); font-size: var(--fs-sm); }
.matrix tbody tr:not(.band):hover > * { background: color-mix(in oklab, var(--brand) 6%, var(--surface)); }
.dot { display: inline-block; width: 1rem; height: 1rem; border-radius: var(--r-pill); background: var(--grp); box-shadow: 0 0 0 3px color-mix(in oklab, var(--grp) 20%, transparent); vertical-align: middle; }
.dot-none { display: inline-block; width: .3rem; height: .3rem; border-radius: var(--r-pill); background: var(--line-strong); opacity: .5; vertical-align: middle; }
.matrix tfoot th, .matrix tfoot td { position: sticky; bottom: 0; z-index: 1; height: auto; padding: .75rem .2rem; background: var(--surface-muted); font-weight: 800; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.matrix tfoot th.org { z-index: 3; padding-inline: 1.2rem 1rem; font-size: var(--fs-sm); color: var(--ink); }
.matrix tfoot td.zero { color: var(--ink-faint); font-weight: 600; }
.scroll-hint { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--ink-soft); }
@media (max-width: 640px) {
  .matrix th.org, .matrix td.org { min-width: 8.5rem; max-width: 9.5rem; padding-inline: .9rem .6rem; }
  .matrix th.col { min-width: 2.35rem; }
}

/* State map */
.map-layout { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .map-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.ng-map { width: 100%; height: auto; max-height: 30rem; margin-inline: auto; }
.ng-map path { stroke: var(--map-line); stroke-width: 1.1; stroke-linejoin: round; }
.ng-map path:hover { stroke: var(--map-hover); stroke-width: 2.5; }
.ng-map .b0 { fill: var(--map-0); } .ng-map .b1 { fill: var(--map-1); } .ng-map .b2 { fill: var(--map-2); }
.ng-map .b3 { fill: var(--map-3); } .ng-map .b4 { fill: var(--map-4); }
.map-key { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-soft); }
.map-key .key-title { font-weight: 700; color: var(--ink); }
.map-key span { display: inline-flex; align-items: center; gap: .4rem; }
.map-key i { display: inline-block; width: 1.4rem; height: .85rem; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.map-key .k0 { background: var(--map-0); } .map-key .k1 { background: var(--map-1); } .map-key .k2 { background: var(--map-2); }
.map-key .k3 { background: var(--map-3); } .map-key .k4 { background: var(--map-4); }
.national-note { display: flex; align-items: flex-start; gap: var(--sp-3); margin-top: var(--sp-5); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); background: var(--surface-sunk); border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-soft); }
.national-note b { color: var(--ink); }
.national-note svg { width: 20px; height: 20px; flex: none; color: var(--gold-text); }

/* Stacked bar in the areas table */
.bar-cell { width: 34%; min-width: 8rem; vertical-align: middle !important; }
.stack-bar { display: flex; gap: 2px; height: .6rem; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-muted); }
.stack-bar span { display: block; height: 100%; background: var(--grp); }

/* 13. Lists and detail blocks ------------------------------------------------------------------------------ */
.line-title { font-size: var(--fs-lg); font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.line-card .card-head { margin-bottom: 0; }
.line-dl .private-note { display: flex; margin-top: .4rem; }
.line-dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem var(--sp-6); margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); font-size: var(--fs-md); }
.line-dl dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding-top: .2rem; }
.line-dl dd { margin-bottom: var(--sp-3); overflow-wrap: anywhere; }
@media (min-width: 640px) { .line-dl { grid-template-columns: 9.5rem minmax(0, 1fr); row-gap: var(--sp-3); } .line-dl dd { margin-bottom: 0; } }
.line-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.lines { display: grid; gap: var(--sp-5); }
.kv { display: grid; gap: var(--sp-4); font-size: var(--fs-md); }
.kv > div { display: grid; gap: .15rem; }
.kv dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.kv dd { overflow-wrap: anywhere; }
.people { display: grid; gap: var(--sp-3); }
.people li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; padding-bottom: 0; }
.person { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.avatar { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--link); font-weight: 800; font-size: var(--fs-sm); text-transform: uppercase; }
.person-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.person-sub { display: block; font-size: var(--fs-sm); color: var(--ink-soft); overflow-wrap: anywhere; }
.org-grid { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .org-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .org-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.org-card { padding: var(--sp-6); }
.org-card .org-flag { margin-bottom: var(--sp-2); }
.org-card .card-title { font-family: var(--font-sans); font-size: var(--fs-base); font-weight: 700; letter-spacing: 0; }
.org-card .chips { margin-top: var(--sp-4); }
.group-block + .group-block { margin-top: var(--sp-10); }
.group-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-4); }
.group-head p { font-size: var(--fs-sm); color: var(--ink-soft); }
.group-head .count { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); }
.steps { display: grid; gap: var(--sp-5); }
.steps li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.steps .n { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--r-pill); background: var(--hero-bg); color: var(--hero-gold); font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; }
.steps strong { display: block; font-weight: 700; }
.steps span { color: var(--ink-soft); font-size: var(--fs-md); }
.feature-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--r-lg); background: var(--gold-soft); color: var(--gold-text); margin-bottom: var(--sp-5); }
.feature-icon svg { width: 22px; height: 22px; }
.group-card p { margin-top: var(--sp-3); color: var(--ink-soft); font-size: var(--fs-md); }
.group-card .group-name { margin-top: var(--sp-4); font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; }
.check-list { display: grid; gap: var(--sp-3); }
.check-list li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: var(--sp-3); }
.check-list svg { width: 20px; height: 20px; color: var(--link); margin-top: .15rem; }

/* 14. Auth, empty and error pages -------------------------------------------------------------------------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 62rem; margin-inline: auto; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); border: 1px solid var(--card-edge); }
@media (min-width: 860px) { .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.auth-side { display: none; padding: var(--sp-10); color: var(--hero-ink); background: radial-gradient(600px 300px at 100% 120%, var(--hero-bg-hi), transparent 70%), var(--hero-bg); }
@media (min-width: 860px) { .auth-side { display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-8); } }
.auth-side .eyebrow { color: var(--hero-gold); }
.auth-side .quote { margin-top: var(--sp-4); font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.2; font-weight: 500; letter-spacing: -.015em; }
.auth-side .quote em { font-style: italic; color: var(--hero-gold); }
.auth-side .check-list { color: var(--hero-soft); font-size: var(--fs-md); }
.auth-side .check-list svg { color: var(--hero-gold); }
.auth-main { padding: var(--sp-10); }
@media (max-width: 640px) { .auth-main { padding: var(--sp-6) var(--sp-5); } }
.auth-main .page-title { font-size: var(--fs-2xl); margin-top: var(--sp-2); }
.auth-main form { margin-top: var(--sp-6); }
.auth-alt { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line); font-size: var(--fs-md); color: var(--ink-soft); }
.solo { max-width: 34rem; margin-inline: auto; }
.empty { display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-10) var(--sp-6); text-align: center; }
.empty-mark { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: var(--r-pill); background: var(--gold-soft); color: var(--gold-text); }
.empty-mark.ok { background: var(--brand-soft); color: var(--link); }
.empty-mark svg { width: 24px; height: 24px; }
.empty-title { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; }
.empty p { max-width: 34rem; color: var(--ink-soft); }
.empty .btn { margin-top: var(--sp-3); }
.error-page { max-width: 38rem; margin: var(--sp-6) auto 0; text-align: center; }
.error-code { font-family: var(--font-display); font-size: clamp(4.5rem, 3rem + 6vw, 7.5rem); line-height: 1; font-weight: 500; letter-spacing: -.04em; color: var(--gold-line); }
.error-page .page-title { margin-top: var(--sp-4); }
.error-page .empty-mark { margin-inline: auto; }
.error-page .page-lead { margin-inline: auto; }
.error-page .actions { justify-content: center; margin-top: var(--sp-8); }

/* Coordinator tabs */
.tabs { display: flex; gap: var(--sp-1); margin-bottom: var(--sp-8); padding: .35rem; max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--card-edge); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); scrollbar-width: thin; }
.tabs a { flex: none; padding: .55rem 1rem; border-radius: 10px; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap; }
.tabs a:hover { background: var(--surface-muted); color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--hero-bg); color: var(--hero-ink); }
[data-theme="crvs-dark"] .tabs a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
@media (min-width: 720px) { .tabs { display: inline-flex; } }
.tabs-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0 var(--sp-4); }

/* 15. Utilities -------------------------------------------------------------------------------------------- */
.muted { color: var(--ink-soft); }
.small { font-size: var(--fs-sm); }
.text-ok { color: var(--link); }
.text-gold { color: var(--gold-text); }
.break { overflow-wrap: anywhere; }
.mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); } .mt-8 { margin-top: var(--sp-8); }
.sticky-aside { position: sticky; top: var(--sp-6); }

/* 16. Print: light, no chrome ------------------------------------------------------------------------------ */
@media print {
  .mainnav, .theme-toggle, .site-foot, .tabs, .filter-card { display: none !important; }
  .card, .table-wrap, .stat { box-shadow: none; }
  .matrix-box, .table-wrap.tall { max-height: none; overflow: visible; }
}
