/* AfterTaxMoney — Système visuel premium (thème sombre cinématographique + variante claire automatique).
   Polices auto-hébergées (Geist / Geist Mono, OFL 1.1, sous-ensembles latins) : aucune requête externe, CSP intacte. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ Jetons */
:root {
  color-scheme: dark;
  --bg: #05070b;
  --bg-raise: #080c12;
  --panel: #0b1018;
  --panel-2: #0f1520;
  --field: #080d14;
  --line: rgba(148, 163, 184, 0.13);
  --line-2: rgba(148, 163, 184, 0.24);
  --hair-hi: rgba(255, 255, 255, 0.11);
  --ink: #f1f5f9;
  --ink-2: #a5b2c3;
  --ink-3: #74839a;
  --accent: #3ee6a8;
  --accent-2: #22d3ee;
  --accent-ink: #03140d;
  --accent-soft: rgba(62, 230, 168, 0.1);
  --accent-line: rgba(62, 230, 168, 0.34);
  --warn: #f5b84a;
  --warn-soft: rgba(245, 184, 74, 0.1);
  --warn-line: rgba(245, 184, 74, 0.34);
  --danger: #ff7a7a;
  --danger-soft: rgba(255, 122, 122, 0.1);
  --danger-line: rgba(255, 122, 122, 0.36);
  --tone-fed: #6aa8ff;
  --tone-prov: #a78bfa;
  --tone-payroll: #f5b84a;
  --tone-ded: #94a3b8;
  --tone-net: #3ee6a8;
  --tone-housing: #ff8fab;
  --tone-debt: #fb923c;
  --tone-a: #3ee6a8;
  --tone-b: #6aa8ff;
  --tone-c: #a78bfa;
  --header-bg: rgba(5, 7, 11, 0.72);
  --shadow-lg: 0 44px 100px -48px rgba(0, 0, 0, 0.9), 0 20px 44px -28px rgba(0, 0, 0, 0.65);
  --shadow: 0 22px 54px -34px rgba(0, 0, 0, 0.8);
  --ring: 0 0 0 3px rgba(62, 230, 168, 0.26);
  --radius-xl: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --maxw: 1200px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --muted: var(--ink-2); /* compatibilité : styles en ligne existants */
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f6f9;
    --bg-raise: #eceff4;
    --panel: #ffffff;
    --panel-2: #f8fafc;
    --field: #ffffff;
    --line: rgba(15, 23, 42, 0.09);
    --line-2: rgba(15, 23, 42, 0.17);
    --hair-hi: rgba(15, 23, 42, 0.07);
    --ink: #0b1220;
    --ink-2: #475569;
    --ink-3: #64748b;
    --accent: #047857;
    --accent-2: #0e7490;
    --accent-ink: #ffffff;
    --accent-soft: rgba(4, 120, 87, 0.08);
    --accent-line: rgba(4, 120, 87, 0.3);
    --warn: #b45309;
    --warn-soft: rgba(245, 158, 11, 0.11);
    --warn-line: rgba(180, 83, 9, 0.3);
    --danger: #b91c1c;
    --danger-soft: rgba(239, 68, 68, 0.09);
    --danger-line: rgba(185, 28, 28, 0.3);
    --tone-fed: #3b82f6;
    --tone-prov: #8b5cf6;
    --tone-payroll: #f59e0b;
    --tone-ded: #94a3b8;
    --tone-net: #10b981;
    --tone-housing: #f43f5e;
    --tone-debt: #f97316;
    --tone-a: #10b981;
    --tone-b: #3b82f6;
    --tone-c: #8b5cf6;
    --header-bg: rgba(255, 255, 255, 0.82);
    --shadow-lg: 0 34px 80px -46px rgba(15, 23, 42, 0.38), 0 12px 32px -22px rgba(15, 23, 42, 0.22);
    --shadow: 0 16px 42px -30px rgba(15, 23, 42, 0.32);
    --ring: 0 0 0 3px rgba(4, 120, 87, 0.2);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-raise: #eceff4;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --field: #ffffff;
  --line: rgba(15, 23, 42, 0.09);
  --line-2: rgba(15, 23, 42, 0.17);
  --hair-hi: rgba(15, 23, 42, 0.07);
  --ink: #0b1220;
  --ink-2: #475569;
  --ink-3: #64748b;
  --accent: #047857;
  --accent-2: #0e7490;
  --accent-ink: #ffffff;
  --accent-soft: rgba(4, 120, 87, 0.08);
  --accent-line: rgba(4, 120, 87, 0.3);
  --warn: #b45309;
  --warn-soft: rgba(245, 158, 11, 0.11);
  --warn-line: rgba(180, 83, 9, 0.3);
  --danger: #b91c1c;
  --danger-soft: rgba(239, 68, 68, 0.09);
  --danger-line: rgba(185, 28, 28, 0.3);
  --tone-fed: #3b82f6;
  --tone-prov: #8b5cf6;
  --tone-payroll: #f59e0b;
  --tone-ded: #94a3b8;
  --tone-net: #10b981;
  --tone-housing: #f43f5e;
  --tone-debt: #f97316;
  --tone-a: #10b981;
  --tone-b: #3b82f6;
  --tone-c: #8b5cf6;
  --header-bg: rgba(255, 255, 255, 0.82);
  --shadow-lg: 0 34px 80px -46px rgba(15, 23, 42, 0.38), 0 12px 32px -22px rgba(15, 23, 42, 0.22);
  --shadow: 0 16px 42px -30px rgba(15, 23, 42, 0.32);
  --ring: 0 0 0 3px rgba(4, 120, 87, 0.2);
}

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-feature-settings: "ss01" 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(62, 230, 168, 0.28); color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 1.18rem; font-weight: 620; }
h3 { font-size: 1rem; font-weight: 620; }
p { margin: 0 0 12px; }
code { font-family: var(--mono); font-size: 0.86em; padding: 1px 6px; border-radius: 6px; background: var(--line); }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }

.site-main { display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 80px; }
.container.doc { max-width: 880px; padding-top: 56px; }

/* ------------------------------------------------------------------ En-tête */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(170%) blur(18px);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 650; font-size: 1.06rem; letter-spacing: -0.025em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #03140d;
  background: linear-gradient(135deg, #3ee6a8 0%, #22d3ee 100%);
  box-shadow: 0 8px 22px -8px rgba(62, 230, 168, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.12; }
.brand-sub { font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.top-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.top-nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-size: 0.88rem; font-weight: 500; white-space: nowrap; transition: color 0.2s, background 0.2s; }
.top-nav a:hover { color: var(--ink); background: var(--line); text-decoration: none; }
.top-nav a.active { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------ Boutons */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  font: 600 0.86rem/1 var(--font);
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.25s, filter 0.2s;
}
.pill-btn:hover { background: var(--line); border-color: var(--ink-3); text-decoration: none; }
.pill-btn:active { transform: translateY(1px); }
.pill-btn .ico { width: 16px; height: 16px; }
.pill-btn.primary {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 10px 28px -12px rgba(62, 230, 168, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.pill-btn.primary:hover { filter: brightness(1.07) saturate(1.05); transform: translateY(-1px); box-shadow: 0 16px 34px -14px rgba(62, 230, 168, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4); }

/* ------------------------------------------------------------------ Héros (toujours sombre) */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f1f5f9;
  background: #05070b;
  padding: 64px 0 148px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(62, 230, 168, 0.26), transparent 62%),
    radial-gradient(760px 460px at 92% -4%, rgba(34, 211, 238, 0.2), transparent 62%),
    radial-gradient(900px 560px at 62% 130%, rgba(124, 92, 255, 0.24), transparent 62%),
    linear-gradient(180deg, #05070b 0%, #070b12 100%);
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 25%, transparent 78%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  left: 38%;
  top: -42vmax;
  background: conic-gradient(from 160deg, rgba(62, 230, 168, 0), rgba(62, 230, 168, 0.16), rgba(34, 211, 238, 0.14), rgba(124, 92, 255, 0.12), rgba(62, 230, 168, 0));
  border-radius: 50%;
  filter: blur(40px);
  animation: aurora 26s ease-in-out infinite alternate;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(180deg, rgba(5, 7, 11, 0), var(--bg));
  pointer-events: none;
}
.hero-inner { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.hero-inner > * { animation: fadeUp 0.8s var(--ease) both; }
.hero-inner > :nth-child(2) { animation-delay: 0.05s; }
.hero-inner > :nth-child(3) { animation-delay: 0.1s; }
.hero-inner > :nth-child(4) { animation-delay: 0.16s; }
.hero-inner > :nth-child(5) { animation-delay: 0.22s; }
.breadcrumb { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; color: rgba(203, 213, 225, 0.55); margin-bottom: 26px; }
.breadcrumb a { color: rgba(226, 232, 240, 0.78); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6ff0c0;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ee6a8;
  box-shadow: 0 0 0 4px rgba(62, 230, 168, 0.18), 0 0 14px rgba(62, 230, 168, 0.8);
  animation: pulse 2.6s ease-in-out infinite;
}
.hero h1 {
  max-width: 21ch;
  margin: 0 0 18px;
  font-size: clamp(2.25rem, 5.2vw, 4.1rem);
  font-weight: 650;
  line-height: 1.03;
  letter-spacing: -0.045em;
  color: #fff;
  background: linear-gradient(180deg, #ffffff 35%, rgba(226, 232, 240, 0.62) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lead { max-width: 64ch; margin: 0; font-size: clamp(1.02rem, 1.4vw, 1.16rem); line-height: 1.65; color: rgba(214, 224, 236, 0.74); }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; }
.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}
.trust .ico { width: 16px; height: 16px; color: #6ff0c0; }

/* ------------------------------------------------------------------ Corps de page */
.page-body { position: relative; z-index: 2; max-width: var(--maxw); margin: -104px auto 0; padding: 0 24px 72px; }
.layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }

.card {
  position: relative;
  margin: 0 0 22px;
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(160deg, var(--hair-hi), transparent 38%, var(--line) 100%) border-box;
  box-shadow: var(--shadow);
}
.card > h2 { display: flex; align-items: center; gap: 10px; }
.card > h2 .ico { color: var(--accent); }
.section-note { margin: -4px 0 16px; font-size: 0.9rem; color: var(--ink-3); }
.insight { margin: 0 0 12px; color: var(--ink-2); line-height: 1.75; }
.insight:last-child { margin-bottom: 0; }

/* Calculateur */
.card.calc { padding: 30px; box-shadow: var(--shadow-lg); }
.card.calc::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.75;
}
.calc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.calc-head h2 { margin: 0; font-size: 1.28rem; }
.calc-kicker { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px 18px; margin-bottom: 8px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--field);
  color: var(--ink);
  font: 560 1rem/1 var(--font);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b98a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
.field input:hover, .field select:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field[hidden] { display: none; }
.field-echo { display: block; min-height: 1.2em; margin-top: 6px; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }
.field-echo.warn { color: var(--warn); font-weight: 600; }

/* Bandeau d'état */
.status-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.status-banner strong { color: var(--ink); font-weight: 620; }
.status-banner .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--accent); }
.status-banner.status-SEUIL_CRITIQUE { background: var(--warn-soft); border-color: var(--warn-line); }
.status-banner.status-SEUIL_CRITIQUE .ico { color: var(--warn); }
.status-banner.status-HORS_BAREME { background: var(--danger-soft); border-color: var(--danger-line); }
.status-banner.status-HORS_BAREME .ico { color: var(--danger); }

/* Indicateurs */
.kpi-grid { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.kpi {
  position: relative;
  flex: 1 1 170px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
  min-width: 0;
}
.kpi-label { font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.kpi-value { margin-top: 8px; font-size: clamp(1.35rem, 2.2vw, 1.62rem); font-weight: 640; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); overflow-wrap: anywhere; }
.kpi-sub { margin-top: 6px; font-size: 0.8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.kpi.highlight {
  flex-basis: 100%;
  order: -1;
  padding: 22px 24px;
  border-color: var(--accent-line);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(62, 230, 168, 0.17), transparent 55%),
    radial-gradient(90% 140% at 100% 100%, rgba(34, 211, 238, 0.1), transparent 60%),
    var(--panel-2);
}
.kpi.highlight .kpi-value {
  font-size: clamp(2.4rem, 5.4vw, 3.6rem);
  font-weight: 660;
  letter-spacing: -0.05em;
  background: linear-gradient(110deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.kpi.highlight .kpi-sub { font-size: 0.88rem; }
.kpi-value.bump { animation: bump 0.42s var(--ease); }

/* Graphiques */
.viz { margin: 4px 0 8px; padding: 18px 20px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.viz:empty { display: none; }
.viz-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.viz-title, .viz-max { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.stack { display: flex; gap: 3px; height: 16px; border-radius: 999px; overflow: hidden; background: var(--line); }
.seg { display: block; height: 100%; min-width: 3px; transform-origin: left center; }
.seg:first-child { border-radius: 999px 0 0 999px; }
.seg:last-child { border-radius: 0 999px 999px 0; }
.legend { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 22px; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--ink-2); }
.dot { width: 10px; height: 10px; border-radius: 3px; }
.lg-val { font-weight: 620; color: var(--ink); font-variant-numeric: tabular-nums; }
.lg-pct { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); min-width: 4.6em; text-align: right; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 32%) minmax(0, 1fr) auto; align-items: center; gap: 14px; font-size: 0.88rem; color: var(--ink-2); }
.bar-track { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; transform-origin: left center; }
.bar-val { font-weight: 620; color: var(--ink); font-variant-numeric: tabular-nums; }
.area { display: block; width: 100%; height: 190px; color: var(--accent); }
.area-axis { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); }
.tone-fed { background: var(--tone-fed); }
.tone-prov { background: var(--tone-prov); }
.tone-payroll { background: var(--tone-payroll); }
.tone-ded { background: var(--tone-ded); }
.tone-net { background: linear-gradient(90deg, var(--tone-net), var(--accent-2)); }
.tone-housing { background: var(--tone-housing); }
.tone-debt { background: var(--tone-debt); }
.tone-a { background: linear-gradient(90deg, var(--tone-a), var(--accent-2)); }
.tone-b { background: var(--tone-b); }
.tone-c { background: var(--tone-c); }
.dot.tone-net, .dot.tone-a { background: var(--tone-net); }
.viz-enter .seg, .viz-enter .bar-fill { animation: growX 1s var(--ease) both; }
.viz-enter .area { animation: fadeUp 0.9s var(--ease) both; }

/* Tableau */
.data-table { width: 100%; margin-top: 16px; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; }
.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-2);
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.data-table td:first-child { color: var(--ink); }
.data-table .num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.num { color: var(--ink); font-weight: 560; }
.data-table tbody tr { transition: background 0.2s; }
.data-table tbody tr:hover { background: var(--line); }
.data-table tr.total-row td { border-bottom: 0; background: var(--accent-soft); color: var(--ink); font-weight: 640; }
.data-table tr.total-row td:first-child { border-radius: 12px 0 0 12px; }
.data-table tr.total-row td:last-child { border-radius: 0 12px 12px 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Exportation */
.export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--panel-2);
  border: 1px solid var(--line);
}
.export-bar strong { font-weight: 620; }
.export-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Décisions liées */
.raf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.raf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.raf-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx, 0%) var(--my, 0%), rgba(62, 230, 168, 0.16), transparent 62%);
  opacity: 0;
  transition: opacity 0.28s;
  pointer-events: none;
}
.raf-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--accent-line); box-shadow: 0 24px 44px -28px rgba(62, 230, 168, 0.55); }
.raf-card:hover::after { opacity: 1; }
.raf-tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.raf-tag .ico { width: 16px; height: 16px; }
.raf-title { font-weight: 600; font-size: 0.95rem; }
.raf-metric { font-size: 1.65rem; font-weight: 650; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.raf-desc { font-size: 0.82rem; color: var(--ink-3); }
.raf-go { position: absolute; top: 18px; right: 18px; color: var(--ink-3); transition: transform 0.3s var(--ease), color 0.3s; }
.raf-go .ico { width: 18px; height: 18px; }
.raf-card:hover .raf-go { color: var(--accent); transform: translateX(3px); }

/* Sources et avertissement */
.source-list { list-style: none; display: grid; gap: 8px; margin: 14px 0; padding: 0; }
.source-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.88rem;
  transition: border-color 0.2s, color 0.2s;
}
.source-list li a:hover { color: var(--ink); border-color: var(--accent-line); text-decoration: none; }
.source-list .ico { width: 16px; height: 16px; color: var(--accent); flex: none; }
.source-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.source-date { font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.disclaimer-box { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.82rem; line-height: 1.6; color: var(--ink-3); background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent-line); }

/* Scénarios */
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.link-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
  transition: color 160ms ease-out, border-color 160ms ease-out, transform 160ms var(--ease);
}
.link-chip:hover { color: var(--ink); border-color: var(--accent-line); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .link-chip:hover { transform: translateX(2px); }
}
.link-chip:active { transform: scale(0.98); }
.link-chip-more { color: var(--accent); border-style: dashed; }
.link-chip-more .ico { width: 16px; height: 16px; margin-left: auto; flex: none; }

/* Annuaire des scénarios (accueil et pages des calculateurs) */
.scenario-dir .section-note { margin-top: -2px; }
.dir-group + .dir-group { margin-top: 24px; }
.dir-heading { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 0.95rem; color: var(--ink); }
.dir-count { margin-left: auto; padding-left: 8px; font-size: 0.78rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dir-heading .dir-count { margin-left: 0; padding-left: 0; }

/* Hypothèses et limites d'un scénario */
.insight-meta { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.insight-meta p { margin: 0; font-size: 0.88rem; line-height: 1.65; color: var(--ink-3); max-width: 75ch; }
.insight-meta strong { color: var(--ink-2); font-weight: 600; }

/* Barre latérale : les 9 calculateurs */
.sidebar { position: sticky; top: 86px; }
.sidebar .card { padding: 22px; }
.tool-list { display: grid; gap: 4px; margin-top: 12px; }
.tool-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.tool-link:hover { background: var(--line); color: var(--ink); text-decoration: none; }
.tool-link.active { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tool-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: var(--panel-2); border: 1px solid var(--line); }
.tool-ico .ico { width: 18px; height: 18px; }
.tool-go { color: var(--ink-3); opacity: 0; transition: opacity 0.2s, transform 0.2s var(--ease); }
.tool-go .ico { width: 16px; height: 16px; }
.tool-link:hover .tool-go { opacity: 1; transform: translateX(2px); }

.partner-box { margin-bottom: 16px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.partner-disclosure { margin-bottom: 8px; font-size: 0.74rem; color: var(--ink-3); }

/* Emplacements publicitaires : cachés tant que la publicité est désactivée (anti-CLS sinon) */
.ad-slot {
  display: none;
  margin: 16px 0;
  overflow: hidden;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-3);
  background: var(--panel-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
}
body[data-ad-mode]:not([data-ad-mode="off"]) .ad-slot { display: flex; align-items: center; justify-content: center; flex-direction: column; }
body[data-ad-mode]:not([data-ad-mode="off"]) .ad-slot-result { min-height: 280px; }
body[data-ad-mode]:not([data-ad-mode="off"]) .ad-slot-sidebar { min-height: 600px; }
body[data-ad-mode]:not([data-ad-mode="off"]) .ad-slot-incontent { min-height: 250px; }

/* Pages de contenu simple (méthodologie, confidentialité, conditions, 404) */
.doc .card { padding: 40px; }
.doc .card h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 650; letter-spacing: -0.04em; margin-bottom: 18px; }
.doc .card h2 { margin-top: 30px; font-size: 1.15rem; }
.doc .card p, .doc .card li { color: var(--ink-2); line-height: 1.7; }
.doc .card ul { padding-left: 20px; }
.doc .card li { margin: 8px 0; }
.doc .card strong { color: var(--ink); }

/* Pied de page */
.site-footer { margin-top: 24px; border-top: 1px solid var(--line); background: var(--bg-raise); color: var(--ink-3); font-size: 0.86rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 44px 24px 52px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--ink); font-weight: 650; letter-spacing: -0.02em; }
.footer-brand .brand-mark { width: 28px; height: 28px; border-radius: 9px; }
.footer-brand .brand-mark svg { width: 18px; height: 18px; }
.footer-note { max-width: 56ch; margin-top: 8px; font-size: 0.8rem; line-height: 1.6; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; align-content: start; }
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ Mouvement */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bump { 0% { opacity: 0.4; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes aurora { 0% { transform: translate3d(-8%, 0, 0) rotate(0deg); } 100% { transform: translate3d(6%, 6%, 0) rotate(40deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ Adaptatif */
@media (max-width: 1080px) {
  .layout-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .tool-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 1180px) {
  .header-inner { flex-wrap: wrap; gap: 10px 14px; padding: 10px 24px 0; min-height: 0; }
  .header-actions { margin-left: auto; }
  .top-nav {
    order: 3;
    width: 100%;
    margin: 0 -4px;
    padding: 2px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .top-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hero { padding: 40px 0 118px; }
  .hero-inner, .page-body { padding-left: 16px; padding-right: 16px; }
  .page-body { margin-top: -90px; }
  .container { padding: 0 16px 64px; }
  .card, .card.calc { padding: 20px 18px; border-radius: 18px; }
  .card.calc::before { left: 18px; right: 18px; }
  .doc .card { padding: 26px 20px; }
  .kpi-grid { gap: 10px; }
  .kpi { flex-basis: calc(50% - 5px); padding: 14px; }
  .kpi.highlight { padding: 18px; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .legend { grid-template-columns: minmax(0, 1fr); }
  .data-table { font-size: 0.86rem; }
  .data-table td, .data-table th { padding: 10px 8px; }
  .brand-sub { display: none; }
  .header-actions .pill-btn { min-height: 34px; padding: 0 12px; font-size: 0.8rem; }
  .header-actions .pill-btn.primary { display: none; } /* lien Pro conservé dans le pied de page */
  .hero { padding-top: 28px; }
  .breadcrumb { margin-bottom: 16px; }
  .hero .lead { font-size: 0.98rem; }
  /* Garanties sur une seule ligne défilante : le calculateur remonte dans le premier écran */
  .trust {
    flex-wrap: nowrap;
    margin-top: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
  .trust::-webkit-scrollbar { display: none; }
  .trust li { flex: none; }
}

/* ------------------------------------------------------------------ Studio Triple-A Controls & Charts */
.icon-btn { width: 38px; padding: 0; }

.session-hud {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: rgba(241, 245, 249, 0.9);
  background: rgba(62, 230, 168, 0.1);
  border: 1px solid rgba(62, 230, 168, 0.3);
  backdrop-filter: blur(10px);
}
.session-hud strong { color: #6ff0c0; font-variant-numeric: tabular-nums; }
.hud-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ee6a8; box-shadow: 0 0 10px #3ee6a8; }

.studio-control-bar {
  margin: 4px 0 18px;
  padding: 15px 18px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.slider-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.slider-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.slider-title .ico { width: 14px; height: 14px; color: var(--accent); }
.slider-val {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
input[type="range"].studio-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  outline: none;
  cursor: pointer;
}
input[type="range"].studio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--panel);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(62, 230, 168, 0.18), 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s var(--ease), box-shadow 0.2s;
}
input[type="range"].studio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.14);
  box-shadow: 0 0 0 6px rgba(62, 230, 168, 0.28), 0 6px 16px rgba(0, 0, 0, 0.5);
}
input[type="range"].studio-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--panel);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(62, 230, 168, 0.18);
}
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.preset-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--field);
  color: var(--ink-2);
  font: 600 0.78rem/1 var(--mono);
  cursor: pointer;
  transition: all 0.16s var(--ease);
}
.preset-chip:hover, .preset-chip.active {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: translateY(-1px);
}

/* Sélecteur de cadence de paie (N1) */
.cadence-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 4px;
}
.cadence-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.seg-pill {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  gap: 2px;
}
.seg-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: 600 0.78rem/1 var(--font);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

/* Studio Donut + Courbe des falaises fiscales */
.viz-studio-donut {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}
.donut-frame { display: grid; place-items: center; }
.donut-svg { display: block; overflow: visible; }
.donut-pct { font-family: var(--font); font-size: 21px; font-weight: 680; fill: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.donut-sub { font-family: var(--mono); font-size: 8.5px; font-weight: 500; fill: var(--ink-3); letter-spacing: 0.12em; }

.viz-cliff-wrap {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.cliff-legend {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-3);
}
.cliff-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cliff-svg { display: block; width: 100%; height: auto; overflow: visible; }
.curve-grid { stroke: var(--line); stroke-width: 1; }
.curve-axis { font-family: var(--mono); font-size: 10px; fill: var(--ink-3); }
.curve-cap { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.7; }
.curve-beacon { font-family: var(--mono); font-size: 10.5px; font-weight: 600; fill: var(--accent); }

/* Ruban de sensibilité -10% / Actuel / +10% / +20% */
.delta-wrap {
  margin: 16px 0 6px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.delta-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.delta-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.2s, background 0.2s;
}
.delta-tile:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--accent-soft); }
.delta-tile.current { border-color: var(--accent-line); background: var(--accent-soft); }
.delta-tag { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.delta-gross { font-size: 0.82rem; color: var(--ink-2); font-weight: 560; }
.delta-net { font-size: 1.06rem; font-weight: 660; letter-spacing: -0.02em; color: var(--ink); }
.delta-net small { font-size: 0.72rem; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.delta-diff { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); }

@media (max-width: 720px) {
  .viz-studio-donut { grid-template-columns: 1fr; justify-items: center; }
  .donut-body { width: 100%; }
  .delta-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ Impression */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #0b1220; }
  .site-header, .sidebar, .ad-slot, .export-bar, .raf-grid, .site-footer, .hero-bg, .trust, .studio-control-bar, .cadence-bar, .delta-wrap, .session-hud { display: none !important; }
  .hero { background: #fff; color: #0b1220; padding: 0 0 12px; }
  .hero h1 { color: #0b1220; background: none; -webkit-text-fill-color: #0b1220; }
  .page-body { margin-top: 0; }
  .layout-grid { display: block; }
  .card { box-shadow: none; border: 1px solid #cbd5e1; background: #fff; break-inside: avoid; }
}


/* ------------------------------------------------------------------ Studio Pro & Tarification */
body[data-pro-adfree="1"] .ad-slot { display: none !important; }

.pro-dev-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  font-size: 0.82rem;
}
.pro-dev-bar .dev-lbl { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--warn); font-weight: 600; }

.pro-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.pro-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.pro-badge.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.pricing-card.featured {
  border-color: var(--accent-line);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(62, 230, 168, 0.14), transparent 60%),
    var(--panel-2);
}
.pricing-tier { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); font-weight: 600; }
.pricing-price { font-size: 1.9rem; font-weight: 680; letter-spacing: -0.04em; color: var(--ink); line-height: 1.1; }
.pricing-price small { font-size: 0.82rem; font-weight: 500; color: var(--ink-3); }
.pricing-list { list-style: none; padding: 0; margin: 6px 0 14px; display: grid; gap: 7px; font-size: 0.86rem; color: var(--ink-2); }
.pricing-list li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.pricing-card .pill-btn { margin-top: auto; width: 100%; }

.key-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.key-form input {
  flex: 1 1 260px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--field);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.84rem;
}

.studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.studio-tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--ink-2);
  font: 600 0.86rem/1 var(--font);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.studio-tab:hover { color: var(--ink); border-color: var(--accent-line); }
.studio-tab.active {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.studio-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.studio-toolbar h3 { margin: 0 0 4px; font-size: 1.15rem; }
.studio-sep { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

.pro-lock-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  font-size: 0.86rem;
  color: var(--ink-2);
}
.pro-lock-bar strong { color: var(--ink); }
.pro-locked-preview { opacity: 0.58; pointer-events: none; user-select: none; filter: blur(1.2px); }

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.offer-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.offer-card-head { display: flex; gap: 8px; margin-bottom: 12px; }
.offer-title-inp {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--field);
  color: var(--ink);
  font: 640 0.92rem/1 var(--font);
}
.offer-fields { display: grid; gap: 10px; }

.vault-bar {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.vault-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.vault-inp {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--field);
  color: var(--ink);
  font-size: 0.84rem;
}
.vault-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vault-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--field);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.vault-load {
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 560 0.8rem/1 var(--font);
  cursor: pointer;
}
.vault-load:hover { color: var(--accent); }
.vault-del {
  padding: 6px 10px 6px 4px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}
.vault-del:hover { color: var(--danger); }
.vault-empty { margin-top: 8px; font-size: 0.8rem; color: var(--ink-3); }

.batch-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--field);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
}

.brand-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--ink-2);
}
.brand-preview img { max-height: 38px; max-width: 130px; object-fit: contain; border-radius: 6px; background: #fff; padding: 3px; }
.sweep-svg { display: block; width: 100%; height: auto; overflow: visible; }
