@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ─── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font); }
html { scroll-behavior: smooth; font-size: 16px; }

/* ─── Design tokens ─────────────────────────────────────────────── */
:root {
  --font:      'Inter', sans-serif;
  --bg:        #fbfbfa;
  --bg-alt:    #f3f4f1;
  --surface:   #ffffff;
  --fg:        #111714;
  --fg-muted:  #5d6762;
  --fg-faint:  #8d958f;
  --border:    #e6e8e4;
  --accent:    #2f7a4d;
  --accent-fg: #ffffff;
  --accent-soft: #e8f2ec;
  --warn:      #b4541d;
  --warn-soft: #fbeee5;
  --track:     #eceee9;
  --shadow:    0 1px 2px rgba(17,23,20,0.04), 0 8px 24px rgba(17,23,20,0.06);
  --radius:    14px;
  /* land-cover colours, identical to the canopy map image */
  --c-tree:     #22783c;
  --c-low:      #aad278;
  --c-building: #c84632;
  --c-ground:   #969696;
  --c-water:    #3c82d2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0e1210;
    --bg-alt:    #131815;
    --surface:   #171d19;
    --fg:        #eef1ee;
    --fg-muted:  #9aa59e;
    --fg-faint:  #6c766f;
    --border:    #252d28;
    --accent:    #5fbf85;
    --accent-fg: #0b130e;
    --accent-soft: #1b2c21;
    --warn:      #ec9a63;
    --warn-soft: #2e1f15;
    --track:     #232a25;
    --shadow:    0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:        #0e1210;
  --bg-alt:    #131815;
  --surface:   #171d19;
  --fg:        #eef1ee;
  --fg-muted:  #9aa59e;
  --fg-faint:  #6c766f;
  --border:    #252d28;
  --accent:    #5fbf85;
  --accent-fg: #0b130e;
  --accent-soft: #1b2c21;
  --warn:      #ec9a63;
  --warn-soft: #2e1f15;
  --track:     #232a25;
  --shadow:    0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.25);
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body:has(.modal[open]) { overflow: hidden; }
section[id] { scroll-margin-top: 4.5rem; }
[hidden] { display: none !important; }
code { font-family: var(--font); font-size: 0.875em; background: var(--track); padding: 0.1em 0.35em; border-radius: 4px; }
button { color: inherit; font-size: inherit; background: none; border: 0; cursor: pointer; }

.inner {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (max-width: 600px) { .inner { padding-inline: 1rem; } }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ─── Navbar ────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin-inline: auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (max-width: 600px) { .nav-inner { padding-inline: 1rem; } }
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}
.logo-mark {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50% 50% 50% 0;
  background: var(--accent);
  transform: rotate(-45deg);
}
.tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--track);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.tab:hover { color: var(--fg); }
.tab.is-active { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.375rem;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { color: var(--fg); border: 1px solid var(--border); background: var(--surface); }
.btn-ghost:hover { background: var(--bg-alt); }

.more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0;
}
.more::after { content: '→'; transition: transform 0.15s; }
.more:hover::after { transform: translateX(3px); }
.more-center { display: flex; margin: 2rem auto 0; }

/* ─── Progress bar ──────────────────────────────────────────────── */
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.4s ease;
}
.bar-muted > span { background: var(--fg-faint); }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero { padding-block: 5rem 4.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
@media (max-width: 600px) { .hero { padding-block: 3rem; } }
.hero-title {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin-bottom: 1.25rem;
}
.hero-title span { color: var(--accent); }
.hero-lead {
  font-size: 1.125rem;
  color: var(--fg-muted);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.status-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.status-label { font-size: 0.875rem; font-weight: 600; }
.status-date { font-size: 0.8125rem; color: var(--fg-faint); }
.status-phase, .status-next { display: flex; flex-direction: column; gap: 0.125rem; }
.status-progress { display: flex; flex-direction: column; gap: 0.5rem; }
.status-row { display: flex; justify-content: space-between; align-items: baseline; }
.status-k { font-size: 0.75rem; font-weight: 500; color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.status-card strong { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.status-sub { font-size: 0.8125rem; color: var(--fg-muted); }

/* ─── Sections ──────────────────────────────────────────────────── */
.section { padding-block: 5rem; }
.section-alt { background: var(--bg-alt); }
@media (max-width: 600px) { .section { padding-block: 3.5rem; } }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 0.75rem;
}
.section-lead { font-size: 1.0625rem; color: var(--fg-muted); }

/* ─── Benefit cards ─────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.375rem;
}
.card-title { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.card-text { font-size: 0.9rem; color: var(--fg-muted); line-height: 1.55; }
.card-stat {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
}
.card .more { margin-top: 0.25rem; }

/* ─── Label ─────────────────────────────────────────────────────── */
.label-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1rem;
  align-items: stretch;
}
@media (max-width: 860px) { .label-grid { grid-template-columns: 1fr; } }
.definition {
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.definition-k { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.definition-text { font-size: 1.25rem; font-weight: 500; line-height: 1.45; letter-spacing: -0.01em; }
.definition-text strong { font-weight: 700; }
.definition .more { color: inherit; margin-top: auto; }

.criteria {
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.criteria li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1.5rem;
}
.criteria li + li { border-top: 1px solid var(--border); }
.criterion-num {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.criteria h3 { font-size: 0.9375rem; font-weight: 600; }
.criteria p { font-size: 0.875rem; color: var(--fg-muted); }

/* ─── Pilotage : KPIs ───────────────────────────────────────────── */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .kpis { grid-template-columns: 1fr; } }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.kpi-k { font-size: 0.8125rem; color: var(--fg-muted); }
.kpi-v {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.kpi-v.small { font-size: 1.0625rem; letter-spacing: -0.01em; }
.kpi-v.late { color: var(--warn); }
.kpi-sub { font-size: 0.8125rem; color: var(--fg-faint); }

/* ─── Pilotage : Gantt ──────────────────────────────────────────── */
.gantt {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem 1.5rem;
  margin-bottom: 2.5rem;
}
.gantt-row {
  display: grid;
  grid-template-columns: 18rem 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 2.25rem;
}
@media (max-width: 700px) {
  .gantt-row { grid-template-columns: 1fr; gap: 0.25rem; margin-bottom: 0.625rem; }
  .gantt-row.gantt-axis-row > .gantt-name { display: none; }
}
.gantt-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding: 0;
}
.gantt-name:hover { color: var(--fg); }
.gantt-track { position: relative; height: 1.25rem; }
.gantt-axis { position: relative; height: 1.25rem; }
.gantt-year {
  position: absolute;
  top: 0;
  font-size: 0.75rem;
  color: var(--fg-faint);
  transform: translateX(-50%);
  font-variant-numeric: tabular-nums;
}
.gantt-grid {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.gantt-bar {
  position: absolute;
  top: 0.25rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.gantt-bar > span { display: block; height: 100%; background: var(--accent); }
.gantt-bar.is-late > span { background: var(--warn); }
.gantt-bar.is-current { box-shadow: 0 0 0 2px var(--accent-soft); }
.gantt-today {
  position: absolute;
  top: -0.5rem; bottom: -0.5rem;
  width: 2px;
  margin-left: -1px;
  background: var(--warn);
  pointer-events: none;
  z-index: 1;
}
.gantt-axis .gantt-today { top: 0; }
.gantt-today.with-label::before {
  content: "Aujourd'hui";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--warn);
  white-space: nowrap;
  background: var(--surface);
  padding: 0 0.25rem;
}

/* ─── Pilotage : milestone cards ────────────────────────────────── */
.milestones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}
.milestone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.milestone.is-current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.milestone-top { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.milestone-num { font-size: 0.8125rem; font-weight: 600; color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.milestone-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.milestone-dates { font-size: 0.8125rem; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.milestone-summary { font-size: 0.9rem; color: var(--fg-muted); line-height: 1.55; }
.milestone-progress { display: flex; flex-direction: column; gap: 0.375rem; margin-top: auto; padding-top: 0.5rem; }
.milestone-progress-row { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--fg-muted); }
.milestone-next { font-size: 0.8125rem; color: var(--fg-muted); }
.milestone-next strong { color: var(--fg); font-weight: 500; }
.milestone-next.late strong { color: var(--warn); }

.badge {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-done     { background: var(--accent-soft); color: var(--accent); }
.badge-current  { background: var(--accent); color: var(--accent-fg); }
.badge-upcoming { background: var(--track); color: var(--fg-muted); }
.badge-late     { background: var(--warn-soft); color: var(--warn); }

/* ─── Modal ─────────────────────────────────────────────────────── */
.modal {
  margin: auto;
  width: min(640px, calc(100% - 2rem));
  max-height: min(85vh, 900px);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  padding: 0;
  overflow: hidden;
  flex-direction: column;
}
.modal[open] { display: flex; animation: modal-in 0.2s ease; }
.modal::backdrop { background: rgba(10,14,12,0.45); backdrop-filter: blur(3px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}
.modal-head .eyebrow { margin-bottom: 0.375rem; }
.modal-title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.modal-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  background: var(--bg-alt);
}
.modal-close:hover { color: var(--fg); }
.modal-body {
  padding: 1.25rem 1.5rem 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
}
.modal-body strong { color: var(--fg); font-weight: 600; }
.modal-stat {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent) !important;
  padding: 0.75rem 1rem;
  background: var(--accent-soft);
  border-radius: 10px;
}
.modal-list { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.modal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 0.875rem; }
.modal-note {
  font-size: 0.9rem;
  padding: 1rem 1.125rem;
  border-radius: 10px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
}
.modal-h { font-size: 0.8125rem; font-weight: 600; color: var(--fg); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.25rem; }

/* Checklist (inside milestone modal) */
.checklist { list-style: none; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; }
.checklist li + li { border-top: 1px solid var(--border); }
.checklist label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--fg);
}
.checklist input {
  appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15rem;
  border: 1.5px solid var(--fg-faint);
  border-radius: 5px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.checklist input:checked { background: var(--accent); border-color: var(--accent); }
.checklist input:checked::after {
  content: '';
  width: 0.3rem;
  height: 0.55rem;
  border: solid var(--accent-fg);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.checklist input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.checklist input:checked ~ .task { color: var(--fg-faint); text-decoration: line-through; }
.checklist .due { font-size: 0.8125rem; color: var(--fg-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.checklist .due.late { color: var(--warn); font-weight: 600; }
@media (max-width: 480px) {
  .checklist label { grid-template-columns: auto 1fr; }
  .checklist .due { grid-column: 2; }
}

/* ─── Communes list (project hero) ─────────────────────────────── */
.commune-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.commune-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.875rem 1rem;
  margin-inline: -0.5rem;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}
.commune-item:hover { background: var(--bg-alt); }
.commune-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.commune-canopy { font-size: 0.8125rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.commune-item .status-row { align-items: center; gap: 0.75rem; }
.commune-item .bar { flex: 1; }
.commune-pct { font-size: 0.8125rem; color: var(--fg-muted); font-variant-numeric: tabular-nums; }

/* ─── How-to (project view) ─────────────────────────────────────── */
.howto {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 1rem;
}
.howto li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.howto-num {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}
.howto h3 { font-size: 1rem; font-weight: 600; }
.howto p { font-size: 0.9rem; color: var(--fg-muted); line-height: 1.55; }
.howto .more { margin-top: auto; padding-top: 0.25rem; }

/* ─── Commune view ──────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.chips span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}
.hero-commune .hero-title { margin-bottom: 1rem; }

/* gauge with label threshold marker */
.gauge { position: relative; padding-bottom: 1.25rem; }
.gauge-mark {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: var(--fg);
  border-radius: 1px;
}
.gauge-mark span {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  color: var(--fg-faint);
  white-space: nowrap;
  padding-top: 0.125rem;
}

.diag-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}
@media (max-width: 900px) { .diag-grid { grid-template-columns: 1fr; } }

.map-card, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.map-card { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.map-card img { display: block; width: 100%; height: auto; border-radius: 8px; }
.map-card figcaption { font-size: 0.75rem; color: var(--fg-faint); padding-inline: 0.25rem; }
.map-toggle { display: inline-flex; align-self: flex-start; gap: 0.25rem; padding: 0.25rem; background: var(--track); border-radius: 999px; }
.map-toggle button {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}
.map-toggle button.is-active { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.diag-side { display: flex; flex-direction: column; gap: 1rem; }
.panel { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.875rem; }
.panel-title { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-muted); }
.panel-title:not(:first-child) { margin-top: 0.5rem; }

.stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; }
.stack span { display: block; height: 100%; }
.legend { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.legend li {
  display: grid;
  grid-template-columns: auto 1fr auto 3rem;
  gap: 0.625rem;
  align-items: center;
  font-size: 0.875rem;
}
.swatch { width: 10px; height: 10px; border-radius: 3px; }
.legend-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend-p { color: var(--fg-faint); text-align: right; font-variant-numeric: tabular-nums; }

.rows { list-style: none; display: flex; flex-direction: column; }
.rows li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}
.rows li + li { border-top: 1px solid var(--border); }
.rows small { color: var(--fg-faint); font-size: 0.8125rem; margin-left: 0.375rem; }
.rows strong { font-weight: 600; font-variant-numeric: tabular-nums; }

.empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.empty h3 { font-size: 1.0625rem; font-weight: 600; }
.empty p { color: var(--fg-muted); }

.label-score { font-size: 0.9375rem; color: var(--fg-muted); margin-bottom: 1rem; }
.label-score strong { color: var(--fg); font-size: 1.25rem; font-weight: 700; margin-right: 0.25rem; }
.criteria-status li { align-items: center; }
.criteria-status li > div { flex: 1; min-width: 0; }
.criteria-status .criterion-num { align-self: baseline; }

/* ─── Footer ────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding-block: 2rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--fg-faint);
}

/* References inside benefit modals */
.modal-refs { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--track); }
.ref-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; font-size: 0.875rem; }
.ref-list a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.ref-source { display: block; margin: 0.125rem 0; font-size: 0.8125rem; font-style: italic; }
.ref-note { font-size: 0.8125rem; }

/* Legal page and footer link */
.footer-inner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal { max-width: 760px; color: var(--fg-muted); line-height: 1.65; }
.legal h2 { margin: 2rem 0 0.5rem; font-size: 1.125rem; font-weight: 600; color: var(--fg); }
.legal p { margin-bottom: 0.75rem; }
.legal ul { display: flex; flex-direction: column; gap: 0.5rem; margin: 0 0 0.75rem 1.25rem; }
.legal strong { color: var(--fg); font-weight: 600; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.legal-date { font-size: 0.875rem; color: var(--fg-faint); }
.legal-back { margin-top: 2rem; }
.legal h1 { color: var(--fg); }

/* SRU section */
.sru-close { max-width: 720px; margin-top: 2rem; font-weight: 500; color: var(--fg); line-height: 1.6; }
#loi-sru .cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.label-commitment { margin-top: 2rem; }
