:root {
  /* Ink scale (warm neutrals) */
  --ink-900: #0a0a0a;
  --ink-700: #262626;
  --ink-500: #525252;
  --ink-400: #737373;
  --ink-300: #a3a3a3;
  --ink-100: #f5f5f4;
  --ink-50:  #fafaf9;
  --line:    #e7e5e4;

  /* Aliases used through the app */
  --bg: #ffffff;
  --panel: #ffffff;
  --panel2: var(--ink-50);
  --panel3: var(--ink-100);
  --fg: var(--ink-900);
  --fg-soft: var(--ink-700);
  --muted: var(--ink-400);
  --muted2: var(--ink-300);
  --border: var(--line);
  --border-soft: var(--line);
  --accent: var(--ink-900);

  /* Status accents kept subtle */
  --ok: #047857;
  --warn: #92400e;
  --err: #b91c1c;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04), 0 1px 3px rgba(10, 10, 10, 0.04);
  --shadow: 0 2px 6px rgba(10, 10, 10, 0.05), 0 8px 24px -10px rgba(10, 10, 10, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
  font-feature-settings: "ss01", "cv11";
}
body::selection, ::selection { background: var(--ink-900); color: #fff; }

/* Subtle dotted grid background, matches vosagents.vercel.app */
.bg-glow {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse at top, rgba(0,0,0,1) 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at top, rgba(0,0,0,1) 30%, transparent 80%);
}

/* ----------- Topbar ----------- */
#topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 0;
  font-weight: 700; font-size: 18px;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink-900);
}
.brand-mark { color: var(--ink-900); }
.brand-dot { color: var(--ink-400); font-weight: 600; }

nav#nav { display: flex; gap: 2px; flex-wrap: wrap; }
nav button {
  background: transparent; color: var(--ink-700); border: 1px solid transparent;
  padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit;
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
nav button:hover { color: var(--ink-900); background: var(--ink-100); }
nav button.active {
  color: var(--ink-900);
  background: var(--ink-100);
  border-color: var(--line);
}

#user-box {
  color: var(--ink-500); font-size: 13px;
  display: flex; gap: 14px; align-items: center;
}
#user-box a { color: var(--ink-700); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
#user-box button {
  background: transparent; color: var(--ink-700); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
#user-box button:hover { background: var(--ink-100); color: var(--ink-900); border-color: var(--ink-300); }

/* ----------- Layout ----------- */
main#app {
  position: relative; z-index: 1;
  padding: 32px 28px 80px;
  max-width: 1200px; margin: 0 auto;
}

/* ----------- Cards ----------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  margin: 0 0 16px 0; font-size: 22px; font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-900);
}
.card h3 {
  margin: 0 0 10px;
  font-size: 11px; color: var(--ink-500); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Stats grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stat {
  background: var(--ink-50);
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  transition: background .12s ease, border-color .12s ease;
}
.stat:hover { background: var(--ink-100); border-color: var(--ink-300); }
.stat .k {
  color: var(--ink-500); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.stat .v {
  font-size: 26px; font-weight: 700; margin-top: 6px;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

/* ----------- Forms ----------- */
form.stack { display: flex; flex-direction: column; gap: 12px; max-width: 440px; }
form.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label {
  font-size: 12px; color: var(--ink-700); font-weight: 500;
  display: flex; flex-direction: column; gap: 6px;
}
input, select, textarea {
  background: var(--panel); color: var(--ink-900);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; font: inherit;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink-900);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06);
}
input::placeholder, textarea::placeholder { color: var(--ink-300); }

/* ----------- Buttons ----------- */
button.primary {
  background: var(--ink-900);
  color: #fff;
  border: 1px solid var(--ink-900);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: -0.005em;
  transition: background .12s ease, transform .12s ease;
}
button.primary:hover { background: var(--ink-700); border-color: var(--ink-700); }
button.primary:active { transform: translateY(0.5px); }
button.primary:disabled { opacity: .45; cursor: not-allowed; }

button.ghost {
  background: var(--panel); color: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 16px; cursor: pointer;
  font-weight: 500; font-size: 13px; font-family: inherit;
  transition: background .12s ease, border-color .12s ease;
}
button.ghost:hover { background: var(--ink-100); border-color: var(--ink-300); }

button.danger {
  background: var(--panel); color: var(--err);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 14px; cursor: pointer;
  font-weight: 500; font-size: 13px; font-family: inherit;
}
button.danger:hover { background: var(--err); color: #fff; border-color: var(--err); }

button.ok {
  background: var(--panel); color: var(--ok);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 14px; cursor: pointer;
  font-weight: 500; font-size: 13px; font-family: inherit;
}
button.ok:hover { background: var(--ok); color: #fff; border-color: var(--ok); }

/* ----------- Tables ----------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
th {
  color: var(--ink-500); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px;
  background: var(--ink-50);
}
tr:hover td { background: var(--ink-50); }

/* ----------- Badges ----------- */
.badge {
  display: inline-flex; align-items: center; padding: 2px 9px;
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 600;
  border: 1px solid var(--line); color: var(--ink-700);
  background: var(--panel);
}
.badge.ok { color: var(--ok); border-color: rgba(4, 120, 87, 0.3); background: rgba(4, 120, 87, 0.06); }
.badge.warn { color: var(--warn); border-color: rgba(146, 64, 14, 0.3); background: rgba(146, 64, 14, 0.06); }
.badge.err { color: var(--err); border-color: rgba(185, 28, 28, 0.3); background: rgba(185, 28, 28, 0.06); }
.badge.blue { color: #fff; background: var(--ink-900); border-color: var(--ink-900); }

/* ----------- Cytoscape canvas ----------- */
#cy {
  width: 100%; height: 580px;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.025) 1px, transparent 1px),
    linear-gradient(to right, rgba(0,0,0,.025) 1px, transparent 1px),
    var(--ink-50);
  background-size: 24px 24px, 24px 24px, auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
}

/* ----------- Pair (duplicates) ----------- */
.pair {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: start;
  background: var(--ink-50); padding: 16px; border-radius: var(--radius-xl);
  border: 1px solid var(--line); margin-bottom: 14px;
}
.pair .side {
  background: var(--panel); padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.pair .score {
  text-align: center; font-weight: 700; font-size: 26px;
  color: var(--ink-900); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pair .actions { display: flex; gap: 8px; justify-content: center; grid-column: 1 / -1; margin-top: 10px; }
.kv { font-size: 12px; color: var(--ink-500); }
.kv b { color: var(--ink-900); font-weight: 600; }

/* ----------- Toast ----------- */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink-900);
  color: #fff;
  border: 1px solid var(--ink-900);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
  box-shadow: var(--shadow);
  z-index: 100;
}
#toast.show { opacity: 1; transform: translateY(0); }

.small { color: var(--ink-500); font-size: 12px; }
.mono {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
}

/* ----------- Autocomplete ----------- */
.ac { position: relative; }
.ac-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); max-height: 280px; overflow: auto; margin-top: 4px;
  box-shadow: var(--shadow);
}
.ac-item {
  padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--ink-900);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active { background: var(--ink-100); }
.ac-item .small { display: block; }

/* ----------- Facts table ----------- */
table.facts td.v { font-weight: 500; color: var(--ink-900); }
table.facts td.prop { color: var(--ink-500); width: 140px; font-weight: 500; }
table.facts tr.dep td { opacity: 0.45; text-decoration: line-through; }

.cite-pill {
  display: inline-flex; align-items: center; padding: 1px 7px; margin-left: 6px;
  border-radius: var(--radius-pill);
  background: var(--panel); border: 1px solid var(--line);
  font-size: 11px; font-weight: 600; color: var(--ink-700);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.cite-pill.t1 { border-color: rgba(4, 120, 87, 0.3); color: var(--ok); background: rgba(4, 120, 87, 0.06); }
.cite-pill.t2 { border-color: var(--ink-300); color: var(--ink-900); background: var(--ink-50); }
.cite-pill.t3 { border-color: rgba(146, 64, 14, 0.3); color: var(--warn); background: rgba(146, 64, 14, 0.06); }
.cite-pill.t4 { border-color: rgba(185, 28, 28, 0.3); color: var(--err); background: rgba(185, 28, 28, 0.06); }

/* ----------- Modal ----------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10, 10, 10, 0.4);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 200;
  animation: fadein .15s ease;
}
.modal {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 24px;
  min-width: 440px; max-width: 640px;
  box-shadow: 0 24px 60px -20px rgba(10, 10, 10, 0.25);
  animation: pop .18s ease;
}
.modal h3 {
  margin-top: 0; font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink-900);
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: scale(0.97) translateY(4px) } to { opacity: 1; transform: scale(1) translateY(0) } }

/* ----------- Timeline ----------- */
.timeline {
  position: relative; padding: 12px 0 12px 28px;
  border-left: 1px solid var(--line);
}
.tl-event {
  position: relative; margin-bottom: 12px; padding: 12px 14px;
  background: var(--panel); border-radius: var(--radius);
  border: 1px solid var(--line);
}
.tl-event::before {
  content: ""; position: absolute; left: -34px; top: 16px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink-900);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line);
}
.tl-event.birth::before { background: var(--ok); }
.tl-event.death::before { background: var(--err); }
.tl-event.marriage::before { background: var(--ink-900); }
.tl-event.child_born::before { background: var(--warn); }
.tl-event .when { color: var(--ink-500); font-size: 12px; font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ----------- Progress ----------- */
.progress {
  width: 100%; height: 8px;
  background: var(--ink-100); border: 1px solid var(--line);
  border-radius: var(--radius-pill); overflow: hidden; margin-top: 8px;
}
.progress > div {
  height: 100%; background: var(--ink-900);
  width: 0%; transition: width .3s ease;
  border-radius: var(--radius-pill);
}
.progress.indeterminate > div {
  width: 30%;
  animation: indet 1.4s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, var(--ink-900) 50%, transparent);
}
@keyframes indet { 0%{margin-left:-30%} 100%{margin-left:100%} }

.phase-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-500); margin-top: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid var(--line); border-top-color: var(--ink-900);
  border-radius: 50%; animation: spin .8s linear infinite;
  vertical-align: -2px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.agent-heartbeat {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); margin-right: 6px;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ----------- Login screen polish ----------- */
.card hr { border: none; border-top: 1px solid var(--line); margin: 22px 0; }

/* =====================================================================
   Home / landing page
   ===================================================================== */

/* Home topbar variant — links instead of route buttons */
#topbar.home nav#nav { gap: 4px; }
.home-nav-link {
  color: var(--ink-700); text-decoration: none;
  font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: var(--radius-sm);
  transition: background .12s ease, color .12s ease;
}
.home-nav-link:hover { background: var(--ink-100); color: var(--ink-900); }
.home-nav-link.active {
  color: var(--ink-900);
  background: var(--ink-100);
  border: 1px solid var(--line);
  padding: 6px 11px;
}

/* When in home route, drop the inner padding so the hero spans full width */
main#app.home-main {
  max-width: none;
  padding: 0;
}

.home-main > section,
.home-main > footer { max-width: 1200px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* Eyebrow label */
.eyebrow {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; color: var(--ink-500); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--panel);
  margin-bottom: 18px;
}

/* Hero */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 80px 28px 96px;
  max-width: 1200px; margin: 0 auto;
}
.home-hero-inner h1 {
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 22px;
  color: var(--ink-900);
}
.home-hero-inner h1 .muted-headline { color: var(--ink-400); }
.home-hero-inner .lead {
  font-size: 17px; line-height: 1.55;
  color: var(--ink-700);
  margin: 0 0 32px;
  max-width: 560px;
}
.home-hero-inner .lead b { color: var(--ink-900); font-weight: 600; }

.home-cta-row {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  margin-bottom: 28px;
}
.home-cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink-900); color: #fff;
  border: 1px solid var(--ink-900);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background .12s ease, transform .12s ease;
}
.home-cta-primary:hover { background: var(--ink-700); border-color: var(--ink-700); }
.home-cta-primary:active { transform: translateY(0.5px); }
.home-cta-primary span { transition: transform .15s ease; }
.home-cta-primary:hover span { transform: translateX(3px); }

.home-cta-ghost {
  color: var(--ink-700);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 12px 8px;
  transition: color .12s ease;
}
.home-cta-ghost:hover { color: var(--ink-900); }

.home-hero-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-500);
}
.home-hero-meta .dot {
  width: 3px; height: 3px; border-radius: 50%; background: var(--ink-300);
}

.home-hero-graphic {
  background: var(--ink-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
}
.home-hero-graphic svg { width: 100%; height: auto; max-height: 100%; }

/* Sections rhythm */
.home-section {
  padding: 80px 28px;
  border-top: 1px solid var(--line);
}
.home-section h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 36px;
  color: var(--ink-900);
  max-width: 760px;
}
.home-section .lead {
  font-size: 17px; line-height: 1.6;
  color: var(--ink-700);
  max-width: 720px;
  margin: 0;
}

/* "Le constat" — pain points */
.home-3col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.home-pain {
  background: var(--panel);
  padding: 28px 26px;
}
.home-pain h3 {
  font-size: 16px; font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink-900);
  text-transform: none; letter-spacing: -0.01em;
}
.home-pain p {
  margin: 0; color: var(--ink-700); font-size: 14px; line-height: 1.55;
}

/* Features grid */
.home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.home-features .feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px 24px 26px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.home-features .feature:hover {
  background: var(--ink-50);
  border-color: var(--ink-300);
  transform: translateY(-1px);
}
.feature-num {
  font-size: 11px; color: var(--ink-400);
  letter-spacing: 0.08em; margin-bottom: 14px;
}
.home-features .feature h3 {
  font-size: 17px; font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink-900);
  text-transform: none; letter-spacing: -0.015em;
}
.home-features .feature p {
  margin: 0; color: var(--ink-700); font-size: 14px; line-height: 1.55;
}

/* Steps */
.home-steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.home-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding: 24px 26px;
  background: var(--panel);
  align-items: start;
}
.home-steps .step-num {
  font-size: 13px; color: var(--ink-400);
  font-weight: 500; letter-spacing: 0.04em;
  padding-top: 2px;
}
.home-steps h3 {
  font-size: 17px; font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink-900);
  text-transform: none; letter-spacing: -0.015em;
}
.home-steps p {
  margin: 0; color: var(--ink-700); font-size: 14px; line-height: 1.55;
}

/* Ambition */
.home-ambition h2 {
  max-width: 880px;
}

/* FAQ */
.home-faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--panel);
}
.home-faq details {
  border-bottom: 1px solid var(--line);
}
.home-faq details:last-child { border-bottom: none; }
.home-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 500; font-size: 15px;
  color: var(--ink-900);
  display: flex; align-items: center; justify-content: space-between;
  transition: background .12s ease;
}
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary::after {
  content: "+";
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--ink-400); font-size: 18px; font-weight: 400;
  transition: transform .2s ease;
}
.home-faq details[open] summary::after { transform: rotate(45deg); }
.home-faq summary:hover { background: var(--ink-50); }
.home-faq p {
  margin: 0; padding: 0 22px 20px;
  color: var(--ink-700); font-size: 14px; line-height: 1.6;
}

/* Final CTA */
.home-cta-final {
  text-align: center;
  background: var(--ink-50);
  border-top: 1px solid var(--line);
}
.home-cta-final h2, .home-cta-final .lead { margin-left: auto; margin-right: auto; }
.home-cta-final .home-cta-row { justify-content: center; margin-top: 28px; }

/* Footer */
.home-footer {
  border-top: 1px solid var(--line);
  padding: 36px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
  color: var(--ink-500); font-size: 13px;
}
.home-footer-row {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.home-footer .home-nav-link { padding: 4px 6px; }

/* Dedicated marketing pages — hero block */
.page-hero {
  max-width: 1200px; margin: 0 auto;
  padding: 80px 28px 56px;
}
.page-hero h1 {
  font-size: clamp(36px, 4.8vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0;
  color: var(--ink-900);
  max-width: 880px;
}
.page-hero .eyebrow { margin-bottom: 22px; }

/* "En savoir plus" link in home sections */
.home-readmore {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-900);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  margin-top: 28px;
  padding: 4px 0;
  border-bottom: 1px solid var(--ink-300);
  transition: border-color .12s ease, color .12s ease;
}
.home-readmore:hover { border-color: var(--ink-900); }
.home-readmore span { transition: transform .15s ease; }
.home-readmore:hover span { transform: translateX(3px); }

/* Bulleted lists used inside dedicated pages */
.home-bullets {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: grid; gap: 12px;
  max-width: 820px;
}
.home-bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-700);
  font-size: 15px; line-height: 1.6;
}
.home-bullets li::before {
  content: ""; position: absolute;
  left: 0; top: 11px;
  width: 8px; height: 1px;
  background: var(--ink-900);
}
.home-bullets b { color: var(--ink-900); font-weight: 600; }

/* Anchor IDs inside dedicated pages keep some headroom under the sticky topbar */
.home-section [id] { scroll-margin-top: 80px; }

/* ------------- Population page table ------------- */
.pop-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  background: var(--panel);
}
.pop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 760px;
}
.pop-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--ink-50);
  color: var(--ink-500);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
  font-size: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.pop-table th.pop-num { text-align: right; }
.pop-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.pop-table tbody tr:last-child td { border-bottom: none; }
.pop-table tbody tr:hover td { background: var(--ink-50); }
.pop-table .pop-period {
  color: var(--ink-900); font-weight: 500;
  white-space: nowrap;
}
.pop-table .pop-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--ink-700);
}
.pop-table td.pop-num { color: var(--ink-900); }
.pop-table .pop-bar {
  width: 26%;
  min-width: 120px;
  padding: 11px 14px;
}
.pop-table .pop-bar span {
  display: block; height: 6px;
  background: var(--ink-900);
  border-radius: var(--radius-pill);
  max-width: 100%;
}
.pop-table .pop-bar-head { width: 26%; }
.pop-table .pop-notes {
  color: var(--ink-500);
  font-style: italic;
  font-size: 12px;
}

/* Highlight the peak-growth row (1970, 2.079%) — find by data attr if needed,
   but no data attr here so keep generic */
@media (max-width: 720px) {
  .pop-table .pop-notes { display: none; }
  .pop-table .pop-bar { display: none; }
  .pop-table .pop-bar-head { display: none; }
}

/* Responsive */
@media (max-width: 880px) {
  .home-hero { grid-template-columns: 1fr; padding: 56px 24px 64px; gap: 32px; }
  .home-hero-graphic { order: -1; max-width: 420px; }
  .home-section { padding: 64px 24px; }
  .home-steps li { grid-template-columns: 1fr; gap: 6px; }
  #topbar { padding: 12px 20px; gap: 14px; }
  #topbar nav#nav { display: none; }
}

/* Scrollbar (subtle, light) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: var(--radius-pill); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-500); }
