/* ── Tokens ────────────────────────────────────────────────────────────────── */

:root {
  /* Neutrals: cool gray so the single brand accent stands out. */
  --page: #f5f6f9;
  --card: #ffffff;
  --surface-2: #fafbfc;
  --subtle: #f0f2f6;
  --hover: #e8ebf1;
  --border: #e3e6ec;
  --border-strong: #cdd2dc;
  --text: #111827;
  --text-muted: #566072;
  --placeholder: #8a93a3;

  /* Brand accent (indigo): ≥4.5:1 against white for text and button labels. */
  --accent: #3d2b3f;
  --accent-hover: #2c1f2e;
  --accent-subtle: #f4eff5;
  --accent-border: #d9cddb;
  --accent-text: #3d2b3f;

  /* LeadMe green: #618346 on light backgrounds, #91ba54 on purple. */
  --brand-green: #618346;
  --brand-green-hover: #4f6c39;
  --brand-green-light: #91ba54;
  --brand-green-bg: #eef5e6;
  --brand-green-border: #cfe2b8;
  --on-accent: #ffffff;

  /* Status colors: always paired with a text label, never color alone. */
  --error: #b42318;
  --error-bg: #fdf0ef;
  --success: #167045;
  --success-bg: #e9f7ef;
  --warning: #8a5300;
  --warning-bg: #fdf4e1;
  --info: #175cad;
  --info-bg: #ebf3fd;
  --warm: #b4430c;
  --warm-bg: #fff0e6;
  --cold: #1663a8;
  --cold-bg: #e8f2fc;
  --neutral: #4b5565;
  --neutral-bg: #eef0f4;

  /* Section colors: orientation only (Leads / Aanvragen / Instellingen). */
  --sec-leads: #3d2b3f;
  --sec-leads-bg: #f4eff5;
  --sec-requests: #4f6c39;
  --sec-requests-bg: #eef5e6;
  --sec-settings: #566072;
  --sec-settings-bg: #eef0f4;

  /* Avatar tones per business type: dark text on a soft tint, all ≥4.5:1. */
  --tone-1-bg: #f4eff5; --tone-1-fg: #3d2b3f;
  --tone-2-bg: #eef5e6; --tone-2-fg: #4f6c39;
  --tone-3-bg: #fdf1e2; --tone-3-fg: #95500a;
  --tone-4-bg: #fdecf2; --tone-4-fg: #a3214f;
  --tone-5-bg: #e6f2fd; --tone-5-fg: #175cad;
  --tone-6-bg: #ecf6e4; --tone-6-fg: #3f6d14;
  --tone-7-bg: #f3ecfd; --tone-7-fg: #6b35b0;

  --focus-ring: 0 0 0 3px rgba(61, 43, 63, 0.24);
  --backdrop: rgba(17, 24, 39, 0.45);
  --shadow-overlay: 0 24px 64px rgba(17, 24, 39, 0.18);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;

  --nav-h: 60px;
  --bottom-nav-h: 64px;

  --z-sticky: 10;
  --z-nav: 100;
  --z-toast: 400;
}

/* ── Reset & base ──────────────────────────────────────────────────────────── */

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

/* Safety net: the page never scrolls sideways. clip (not hidden) keeps position: sticky working. */
html { font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  min-height: 100dvh;
}

a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 300;
  padding: 8px 12px; background: var(--accent); color: var(--on-accent);
  border-radius: var(--radius-sm); font-size: 14px; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* !important: component rules like .field input { width: 100% } must never resize hidden helpers
   (a full-width hidden file input once made the whole page scroll sideways). */
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; border: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important;
}

.muted { color: var(--text-muted); }
.tabular { font-variant-numeric: tabular-nums; }

.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

kbd {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--card);
  color: var(--text-muted);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out),
              color 150ms var(--ease-out), opacity 150ms var(--ease-out), transform 120ms var(--ease-out);
  touch-action: manipulation;
  user-select: none;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-danger { background: var(--card); color: var(--error); border-color: var(--border-strong); }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn-secondary:hover:not(:disabled) { background: var(--subtle); }
  .btn-ghost:hover:not(:disabled) { background: var(--hover); color: var(--text); }
  .btn-danger:hover:not(:disabled) { background: var(--error-bg); border-color: var(--error); }
}

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-full { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }

@media (pointer: coarse) {
  .btn, .btn-sm { min-height: 44px; }
  .btn-icon, .btn-sm.btn-icon { min-width: 44px; }
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card-pad { padding: var(--space-5) var(--space-4); }
@media (min-width: 768px) { .card-pad { padding: var(--space-5); } }

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.card-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── Form fields ───────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field-label { font-size: 13px; font-weight: 500; color: var(--text); }
.field .required { color: var(--error); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0 12px;
  height: 42px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.field select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23566072' 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 12px center;
}
.field textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.field input[type="color"] { padding: 4px; cursor: pointer; }

.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input[readonly], .field textarea[readonly] { background: var(--subtle); color: var(--text-muted); }

.field[data-invalid] input, .field[data-invalid] textarea { border-color: var(--error); }
.field-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 32px; }
.field-label-row .btn { margin-right: -8px; }
.ai-btn { color: var(--accent-text); }
.ai-btn .icon { color: var(--accent); }
.field textarea.mono-ish { font-size: 14px; line-height: 1.55; }

.ai-proposal {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--accent-subtle); border: 1px solid var(--accent-border); border-radius: var(--radius);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
@starting-style { .ai-proposal { opacity: 0; transform: translateY(-4px); } }
.ai-proposal-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent-text); }
.ai-proposal-head .icon { width: 15px; height: 15px; color: var(--accent); }
.ai-proposal-text { font-family: var(--font); font-size: 14px; line-height: 1.6; white-space: pre-wrap; color: var(--text); }
.field-error { font-size: 12px; color: var(--error); display: flex; gap: 4px; align-items: center; }
.field-error:empty { display: none; }

.field-row { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .field-row.cols-2 { grid-template-columns: 1fr 1fr; }
  .field-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; min-height: 42px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.day-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.day-picker label {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 40px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-size: 13px; font-weight: 500; cursor: pointer; background: var(--card);
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}
.day-picker label, .segmented label { position: relative; }
/* Visually hidden radios/checkboxes; explicit size so .field input { width: 100% } can't widen the page. */
.field .day-picker input, .field .segmented input, .day-picker input, .segmented input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none;
}
.day-picker label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day-picker label:has(input:focus-visible), .segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.segmented { display: inline-flex; flex-wrap: wrap; background: var(--subtle); border-radius: var(--radius); padding: 3px; gap: 2px; }
.segmented label {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  font-size: 13px; font-weight: 500; border-radius: 6px; cursor: pointer; color: var(--text-muted);
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.segmented label:has(input:checked) { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--border); }

/* ── Alerts, badges, spinner ───────────────────────────────────────────────── */

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; line-height: 1.5; }
.alert .icon { width: 16px; height: 16px; margin-top: 2px; }
.alert a { font-weight: 500; }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert:empty { display: none; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  font-size: 12px; font-weight: 500; line-height: 1;
  border-radius: 999px; background: var(--subtle); color: var(--text-muted); white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-accent { background: var(--accent-subtle); color: var(--accent-text); }
.badge-warm { background: var(--warm-bg); color: var(--warm); }
.badge-cold { background: var(--cold-bg); color: var(--cold); }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge-busy::before { display: none; }
.badge .spinner { width: 10px; height: 10px; border-width: 1.5px; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-banner {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 12px 16px; margin-bottom: var(--space-5);
  font-size: 14px; background: var(--accent-subtle);
  border: 1px solid var(--accent-border); border-radius: var(--radius-lg);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
@starting-style { .progress-banner { opacity: 0; transform: translateY(-4px); } }
.progress-banner .spinner { width: 18px; height: 18px; color: var(--accent); }
.progress-banner-text strong { color: var(--accent-text); }
.progress-banner-text { display: flex; flex-direction: column; min-width: 0; }
.progress-banner-text strong { font-weight: 600; }
.progress-banner-text span { font-size: 13px; color: var(--text-muted); }

/* ── App shell: top bar + bottom nav ───────────────────────────────────────── */

.navbar {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: 0 var(--space-4); height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .navbar { padding: 0 var(--space-5); } }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  font-size: 15px; font-weight: 700; letter-spacing: -0.04em;
}
.brand-tag { font-weight: 500; color: var(--text-muted); }

.nav-links { display: none; align-items: center; gap: 2px; }
@media (min-width: 1024px) { .nav-links { display: flex; } }

.nav-link {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  text-decoration: none; border-radius: var(--radius);
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.nav-link[aria-current="page"] { background: var(--accent-subtle); color: var(--accent-text); }
@media (hover: hover) and (pointer: fine) { .nav-link:hover { color: var(--text); background: var(--subtle); } }

.nav-count {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
}

.navbar-right { display: flex; align-items: center; gap: var(--space-2); }
.navbar-user { display: none; font-size: 13px; color: var(--text-muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1024px) { .navbar-user { display: inline; } }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav);
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
}
.bottom-nav a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; font-weight: 500; color: var(--text-muted); text-decoration: none;
  touch-action: manipulation;
}
.bottom-nav a .icon { width: 22px; height: 22px; }
.bottom-nav a[aria-current="page"] { color: var(--accent-text); }
.bottom-nav a[aria-current="page"] .icon { stroke-width: 2.25; }
.bottom-nav .nav-count { position: absolute; top: 8px; left: calc(50% + 6px); height: 18px; min-width: 18px; font-size: 10px; }
@media (min-width: 1024px) { .bottom-nav { display: none; } }

/* ── Page shell ────────────────────────────────────────────────────────────── */

.page-content { max-width: 1240px; margin: 0 auto; padding: var(--space-5) var(--space-4) calc(var(--bottom-nav-h) + 48px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .page-content { padding: var(--space-6) var(--space-5) 80px; } }
.page-admin .page-content { padding-bottom: 80px; }

.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
.page-header h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.page-header p { margin-top: 4px; font-size: 14px; color: var(--text-muted); max-width: 60ch; }
.page-header-spaced { margin-top: var(--space-4); }
@media (min-width: 768px) { .page-header h1 { font-size: 28px; } }

.section-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

/* ── Lead review ───────────────────────────────────────────────────────────── */

.review-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer; touch-action: manipulation;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}
.chip .tabular { color: inherit; opacity: 0.75; }
.chip[aria-pressed="true"] { background: var(--accent-subtle); color: var(--accent-text); border-color: var(--accent-border); }
@media (hover: hover) and (pointer: fine) { .chip:hover:not([aria-pressed="true"]) { border-color: var(--border-strong); color: var(--text); } }
@media (pointer: coarse) { .chip { min-height: 44px; } }

.shortcut-hint { display: none; font-size: 12px; color: var(--text-muted); gap: 12px; align-items: center; }
@media (min-width: 1024px) and (hover: hover) { .shortcut-hint { display: inline-flex; } }

/* minmax(0, …) and min-width: 0 stop long content (URLs, addresses) from widening the page. */
.review { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.review > *, .requests-layout > *, .settings-layout > * { min-width: 0; }
@media (min-width: 1024px) { .review { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: var(--space-5); } }

/* Mobile detail view: focus on the lead, hide the page chrome above it. */
@media (max-width: 1023px) {
  #view-leads:has(.review.show-detail) .page-header,
  #view-leads:has(.review.show-detail) .review-toolbar,
  #view-leads:has(.review.show-detail) #setupHint { display: none; }
}

.lead-pane { display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 1024px) {
  .lead-pane { position: sticky; top: calc(var(--nav-h) + 16px); max-height: calc(100dvh - var(--nav-h) - 32px); }
}

.list-tools { display: flex; gap: var(--space-2); padding: var(--space-3); border-bottom: 1px solid var(--border); }
.search-box { position: relative; flex: 1; min-width: 0; }
.search-box .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 16px; height: 16px; pointer-events: none; }
.search-box input, .list-tools select {
  width: 100%; height: 36px; font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--subtle); border: 1px solid transparent; border-radius: var(--radius); outline: none;
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.search-box input { padding: 0 10px 0 32px; }
.list-tools select {
  width: auto; padding: 0 30px 0 10px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23566072' 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 10px center;
}
.search-box input:focus, .list-tools select:focus { background-color: var(--card); border-color: var(--accent); }
@media (max-width: 767px) { .search-box input, .list-tools select { font-size: 16px; height: 44px; } }

.lead-list { overflow-y: auto; overscroll-behavior: contain; }

.lead-item {
  display: flex; flex-direction: column; gap: 3px;
  width: 100%; padding: 12px 16px;
  text-align: left; background: var(--card);
  border: none; border-bottom: 1px solid var(--border);
  cursor: pointer; touch-action: manipulation;
  transition: background-color 120ms var(--ease-out);
}
.lead-item:last-child { border-bottom: none; }
.lead-item[aria-current="true"] { background: var(--accent-subtle); box-shadow: inset 3px 0 0 var(--accent); }
@media (hover: hover) and (pointer: fine) { .lead-item:hover:not([aria-current="true"]) { background: var(--surface-2); } }

.lead-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lead-item-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-item-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); overflow: hidden; white-space: nowrap; }
.lead-item-meta span { overflow: hidden; text-overflow: ellipsis; }
.lead-item-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.list-footer { padding: 10px 16px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); background: var(--card); }

/* Detail */
.lead-detail { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }

.lead-head { padding: var(--space-5) var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
@media (min-width: 768px) { .lead-head { padding: var(--space-5); } }
.lead-title-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); align-items: flex-start; }
.lead-title-row h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; outline: none; }
.lead-title-row .muted { font-size: 14px; margin-top: 2px; }
.lead-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.contact-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-muted); }
.contact-links > * { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: 100%; }
.contact-links a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-links a:hover { text-decoration: underline; text-underline-offset: 2px; }
.contact-links .icon { width: 15px; height: 15px; color: var(--text-muted); }

.insight { border-top: 1px solid var(--border); padding-top: var(--space-4); }
.insight-title { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-2); }
.insight dl { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 14px; }
.insight dl > div { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-3); }
.insight dt { color: var(--text-muted); font-size: 13px; padding-top: 1px; }
.insight dd { line-height: 1.5; }
.insight dl > div.highlight { margin: 2px -10px; padding: 6px 10px; background: var(--accent-subtle); border-radius: var(--radius-sm); }
.insight .highlight dt { color: var(--accent-text); font-weight: 500; }
.insight .highlight dd { font-weight: 500; }

/* Composer */
.composer { overflow: hidden; }
.composer-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0 var(--space-4); min-height: 48px; border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .composer-row { padding: 0 var(--space-5); } }
.composer-row label { flex-shrink: 0; width: 72px; font-size: 13px; color: var(--text-muted); font-weight: 500; }
.composer-row input {
  flex: 1; min-width: 0; height: 46px; padding: 0;
  font-family: var(--font); font-size: 15px; color: var(--text);
  background: transparent; border: none; outline: none;
}
.composer-row:focus-within { background: var(--surface-2); }
.composer-row[data-invalid] { box-shadow: inset 3px 0 0 var(--error); }
.composer-row .field-error { flex-basis: 100%; }
.composer-error { padding: 6px var(--space-4) 0; }
@media (min-width: 768px) { .composer-error { padding: 6px var(--space-5) 0; } }

.composer-body { padding: var(--space-4); }
@media (min-width: 768px) { .composer-body { padding: var(--space-5); } }
.composer-body textarea {
  display: block; width: 100%; min-height: 300px; padding: 0;
  font-family: var(--font); font-size: 15px; line-height: 1.65; color: var(--text);
  background: transparent; border: none; outline: none; resize: vertical;
}
.composer-body textarea[readonly] { color: var(--text-muted); }

.composer-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: 10px var(--space-4); border-top: 1px solid var(--border); background: var(--surface-2);
  font-size: 12px; color: var(--text-muted);
}
@media (min-width: 768px) { .composer-meta { padding: 10px var(--space-5); } }
.word-count { font-variant-numeric: tabular-nums; display: inline-flex; gap: 6px; align-items: center; }
.word-count.over { color: var(--warning); font-weight: 500; }

.regen { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); border-top: 1px solid var(--border); }
@media (min-width: 768px) { .regen { padding: var(--space-4) var(--space-5) var(--space-5); } }
.regen-title { font-size: 13px; font-weight: 500; }
.regen-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.regen-chips .chip { height: 32px; }
.regen-row { display: flex; gap: var(--space-2); }
.regen-row input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  font-family: var(--font); font-size: 15px; color: var(--text);
  background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius); outline: none;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.regen-row input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
@media (max-width: 767px) { .regen-row input { height: 44px; font-size: 16px; } }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.actions .spacer { flex: 1; }

@media (max-width: 767px) {
  .actions.sticky-mobile {
    position: sticky; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); z-index: var(--z-sticky);
    margin: 0 calc(-1 * var(--space-4));
    padding: var(--space-3) var(--space-4);
    background: rgba(245, 246, 249, 0.96);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
  }
  .actions.sticky-mobile .btn-primary { flex: 1; }
  .actions .spacer { display: none; }
}

.back-to-list { align-self: flex-start; }
@media (min-width: 1024px) { .back-to-list { display: none; } }

@media (max-width: 1023px) {
  .review.show-detail .lead-pane { display: none; }
  .review:not(.show-detail) #leadDetail { display: none; }
}

/* Detail cross-fade when switching leads */
.lead-detail { transition: opacity 160ms var(--ease-out); }
@starting-style { .lead-detail { opacity: 0; } }

/* ── Requests ──────────────────────────────────────────────────────────────── */

.requests-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
@media (min-width: 1024px) { .requests-layout { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); } }

.stack { display: flex; flex-direction: column; gap: var(--space-5); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-4); }

.suggestions { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); background: var(--accent-subtle); border: 1px solid var(--accent-border); border-radius: var(--radius); margin-top: 2px; }
.suggestions-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.suggestions-title { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.suggestions-head .btn { color: var(--accent-text); }
.suggestions .term-presets .chip { border-color: var(--accent-border); }
.suggestions .term-presets .chip .icon { color: var(--accent); }
.term-presets .skeleton { background: var(--accent-border); }
.suggestions-head .btn { margin: -4px -8px -4px 0; }
.term-presets { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.term-presets .muted { font-size: 13px; }
.term-presets .skeleton { width: 84px; height: 30px; border-radius: 999px; background: var(--hover); }
.term-presets .chip { height: 30px; font-size: 12px; padding: 0 10px; }
.term-presets .chip .icon { width: 14px; height: 14px; }
@media (pointer: coarse) { .term-presets .chip { min-height: 40px; } }

.estimate { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; padding: 12px 14px; background: var(--subtle); border-radius: var(--radius); }
.estimate:empty { display: none; }
.estimate .icon { width: 16px; height: 16px; margin-top: 2px; }

.request-list { display: flex; flex-direction: column; }
.request-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.request-row:first-child { padding-top: 0; }
.request-row:last-child { border-bottom: none; padding-bottom: 0; }
.request-terms { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.request-where { font-size: 13px; color: var(--text-muted); grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.request-where .icon { width: 14px; height: 14px; }
.request-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.request-stats strong { color: var(--text); font-weight: 600; }
.request-error { font-size: 12px; color: var(--error); grid-column: 1 / -1; }
.request-toggle { grid-column: 1 / -1; justify-self: start; margin-left: -12px; }
.request-results-wrap { grid-column: 1 / -1; }
.request-results { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3); background: var(--subtle); border-radius: var(--radius); }
.request-results ul { list-style: none; display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.result-item .lead-badges { flex-shrink: 0; flex-wrap: nowrap; }
.request-results li + li { border-top: 1px solid var(--border); }
.request-results > .btn { align-self: flex-start; }
.result-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  width: 100%; min-height: 48px; padding: 8px 12px; text-align: left;
  background: var(--card); border: none; cursor: pointer; touch-action: manipulation;
  transition: background-color 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .result-item:hover { background: var(--surface-2); } }
.result-name { display: flex; flex-direction: column; min-width: 0; font-size: 13px; font-weight: 500; }
.result-name .muted { font-size: 12px; font-weight: 400; }

/* ── Settings ──────────────────────────────────────────────────────────────── */

.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
@media (min-width: 1024px) { .settings-layout { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-6); } }

.settings-nav { display: none; }
@media (min-width: 1024px) {
  .settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--nav-h) + 24px); }
}
.settings-nav a {
  display: flex; align-items: center; height: 36px; padding: 0 12px;
  font-size: 14px; color: var(--text-muted); text-decoration: none; border-radius: var(--radius);
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.settings-nav a[aria-current="true"] { background: var(--card); color: var(--text); font-weight: 500; box-shadow: 0 0 0 1px var(--border); }
@media (hover: hover) and (pointer: fine) { .settings-nav a:hover { color: var(--text); } }

.settings-form { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.settings-section { display: flex; flex-direction: column; gap: var(--space-4); scroll-margin-top: calc(var(--nav-h) + 16px); }
.settings-section h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.settings-hint { font-size: 13px; color: var(--text-muted); line-height: 1.6; max-width: 70ch; margin-top: -8px; }

.settings-footer {
  position: sticky; bottom: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
@media (max-width: 767px) { .settings-footer { bottom: calc(var(--bottom-nav-h) + 8px + env(safe-area-inset-bottom)); } }
.save-state { font-size: 13px; color: var(--text-muted); display: inline-flex; gap: 6px; align-items: center; }
.save-state.dirty { color: var(--warning); }

.preview-frame { width: 100%; min-height: 360px; border: 1px solid var(--border); border-radius: var(--radius); background: #ffffff; }

/* ── Admin ─────────────────────────────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin-bottom: var(--space-5); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); gap: var(--space-4); } }
.stat { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.stat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.stat-icon .icon { width: 18px; height: 18px; }
.stat-icon.tone-accent { background: var(--accent-subtle); color: var(--accent); }
.stat-icon.tone-info { background: var(--info-bg); color: var(--info); }
.stat-icon.tone-warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.tone-success { background: var(--success-bg); color: var(--success); }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* position: relative keeps absolutely positioned children (e.g. visually hidden labels) inside the scroller. */
.table-wrap { position: relative; width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 500;
  color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2);
}
td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }
tbody tr:last-child td { border-bottom: none; }
@media (hover: hover) and (pointer: fine) { tbody tr:hover td { background: var(--surface-2); } }
.client-cell { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-subtle); color: var(--accent-text); font-size: 13px; font-weight: 600;
}
.client-cell strong { font-weight: 500; display: block; }
.client-cell .muted { font-size: 13px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */

dialog.modal {
  margin: auto; width: calc(100% - 32px); max-width: 480px; max-height: calc(100dvh - 32px);
  border: none; border-radius: var(--radius-lg); background: var(--card); color: var(--text);
  box-shadow: var(--shadow-overlay);
  opacity: 1; transform: scale(1);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out),
              overlay 200ms allow-discrete, display 200ms allow-discrete;
}
dialog.modal.wide { max-width: 760px; }
dialog.modal:not([open]) { opacity: 0; transform: scale(0.96); transition-duration: 140ms; }
@starting-style { dialog.modal[open] { opacity: 0; transform: scale(0.96); } }
dialog.modal::backdrop { background: var(--backdrop); }

.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 0; }
.modal-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.modal-body { padding: 16px 24px 20px; display: flex; flex-direction: column; gap: 16px; font-size: 14px; color: var(--text-muted); }
.modal-body .field label { color: var(--text); }
.modal-footer { padding: 0 24px 20px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin: -8px -10px -8px 0;
  background: none; border: none; border-radius: var(--radius); color: var(--text-muted); cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--subtle); color: var(--text); } }
@media (pointer: coarse) { .icon-btn { width: 44px; height: 44px; } }

/* ── Toast ─────────────────────────────────────────────────────────────────── */

.toast-region {
  position: fixed; left: 16px; right: 16px; z-index: var(--z-toast);
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
@media (max-width: 767px) { .has-bottom-nav .toast-region { bottom: calc(var(--bottom-nav-h) + 12px + env(safe-area-inset-bottom)); } }
.toast {
  display: flex; align-items: center; gap: 12px;
  max-width: 440px; padding: 10px 10px 10px 16px; min-height: 44px;
  border-radius: var(--radius); background: var(--accent); color: var(--on-accent);
  font-size: 14px; box-shadow: var(--shadow-overlay); pointer-events: auto;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.toast:not(:has(button)) { padding-right: 16px; }
.toast.error { background: var(--error); }
.toast button {
  height: 30px; padding: 0 10px; border: none; border-radius: 6px; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: inherit; font-size: 13px; font-weight: 600; white-space: nowrap;
}
@starting-style { .toast { opacity: 0; transform: translateY(8px); } }
.toast.leaving { opacity: 0; transform: translateY(8px); transition-duration: 140ms; }

/* ── Login ─────────────────────────────────────────────────────────────────── */

.page-login { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 32px 24px; width: 100%; max-width: 400px; }
@media (min-width: 768px) { .login-card { padding: 40px; } }
.login-card .brand { margin-bottom: 28px; }
.login-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.login-subtitle { font-size: 14px; color: var(--text-muted); margin: 4px 0 28px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-footer { margin-top: 16px; text-align: center; }
.link-muted {
  font-size: 13px; color: var(--text-muted); text-decoration: none;
  background: none; border: none; cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center;
}
@media (hover: hover) and (pointer: fine) { .link-muted:hover { color: var(--text); } }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 72px; }
.password-toggle {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  height: 32px; padding: 0 10px; font-size: 12px; font-weight: 500;
  color: var(--text-muted); background: none; border: none; border-radius: 6px; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .password-toggle:hover { background: var(--subtle); color: var(--text); } }

/* ── Empty & loading ───────────────────────────────────────────────────────── */

.empty-state { display: flex; flex-direction: column; align-items: center; padding: 56px 24px; text-align: center; color: var(--text-muted); font-size: 14px; }
.empty-icon {
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-subtle); color: var(--accent);
}
.empty-icon .icon { width: 22px; height: 22px; }
.empty-state strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.empty-state p { max-width: 36ch; }
.empty-state .btn { margin-top: 18px; }

.skeleton { border-radius: var(--radius-sm); background: var(--subtle); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
.skeleton-item { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 12px; }
.w-60 { width: 60%; }
.w-40 { width: 40%; }

/* ── Reduced motion ────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  /* A loading indicator carries information, so it keeps turning, just slower. */
  .spinner { animation-duration: 1.5s !important; animation-iteration-count: infinite !important; }
  .btn:active:not(:disabled) { transform: none; }
  dialog.modal, dialog.modal:not([open]), .toast, .toast.leaving, .progress-banner { transform: none; }
  @starting-style { dialog.modal[open], .toast, .progress-banner { transform: none; } }
}

/* ── Color & motion layer ──────────────────────────────────────────────────── */

/* Section identity: icon tile next to each page title, tinted nav icons. */
.page-title { display: flex; align-items: center; gap: var(--space-3); }
.title-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.title-icon .icon { width: 20px; height: 20px; }
[data-section-tone="leads"] .title-icon { background: var(--sec-leads-bg); color: var(--sec-leads); }
[data-section-tone="aanvragen"] .title-icon { background: var(--sec-requests-bg); color: var(--sec-requests); }
[data-section-tone="instellingen"] .title-icon { background: var(--sec-settings-bg); color: var(--sec-settings); }

.nav-link[data-tab="aanvragen"][aria-current="page"] { background: var(--sec-requests-bg); color: var(--sec-requests); }
.nav-link[data-tab="instellingen"][aria-current="page"] { background: var(--sec-settings-bg); color: var(--sec-settings); }
.bottom-nav a[data-tab="aanvragen"][aria-current="page"] { color: var(--sec-requests); }
.bottom-nav a[data-tab="instellingen"][aria-current="page"] { color: var(--sec-settings); }

/* Requests page leans teal, settings amber, for the main action and tint panels. */
#view-aanvragen .btn-primary { background: var(--brand-green); border-color: var(--brand-green); }
@media (hover: hover) and (pointer: fine) { #view-aanvragen .btn-primary:hover:not(:disabled) { background: var(--brand-green-hover); border-color: var(--brand-green-hover); } }
#view-aanvragen .suggestions { background: var(--sec-requests-bg); border-color: var(--brand-green-border); }
#view-aanvragen .suggestions-title, #view-aanvragen .suggestions-head .btn { color: var(--sec-requests); }
#view-aanvragen .suggestions .term-presets .chip { border-color: var(--brand-green-border); }
#view-aanvragen .suggestions .term-presets .chip .icon { color: var(--sec-requests); }
#view-aanvragen .term-presets .skeleton { background: var(--brand-green-border); }
#view-instellingen .settings-nav a[aria-current="true"] { color: var(--sec-settings); box-shadow: inset 3px 0 0 var(--sec-settings), 0 0 0 1px var(--border); }

/* Lead avatars, colored by business type. */
.lead-avatar {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; letter-spacing: -0.02em;
}
.lead-avatar.lg { width: 48px; height: 48px; border-radius: 12px; font-size: 16px; }
.tone-1 { background: var(--tone-1-bg); color: var(--tone-1-fg); }
.tone-2 { background: var(--tone-2-bg); color: var(--tone-2-fg); }
.tone-3 { background: var(--tone-3-bg); color: var(--tone-3-fg); }
.tone-4 { background: var(--tone-4-bg); color: var(--tone-4-fg); }
.tone-5 { background: var(--tone-5-bg); color: var(--tone-5-fg); }
.tone-6 { background: var(--tone-6-bg); color: var(--tone-6-fg); }
.tone-7 { background: var(--tone-7-bg); color: var(--tone-7-fg); }

.lead-item { flex-direction: row; align-items: center; gap: var(--space-3); }
.lead-item-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.lead-title-main { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }

/* Staggered entrance for the first items of a freshly loaded list. */
@keyframes item-in { from { opacity: 0; transform: translateY(6px); } }
.lead-list.animate .lead-row { animation: item-in 260ms var(--ease-out) both; }
.lead-list.animate .lead-row:nth-child(2) { animation-delay: 30ms; }
.lead-list.animate .lead-row:nth-child(3) { animation-delay: 60ms; }
.lead-list.animate .lead-row:nth-child(4) { animation-delay: 90ms; }
.lead-list.animate .lead-row:nth-child(5) { animation-delay: 120ms; }
.lead-list.animate .lead-row:nth-child(6) { animation-delay: 150ms; }
.lead-list.animate .lead-row:nth-child(7) { animation-delay: 180ms; }
.lead-list.animate .lead-row:nth-child(n+8) { animation-delay: 210ms; }

/* A handled lead slides out before the next one opens. */
.lead-row.leaving { opacity: 0; transform: translateX(24px); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }

/* Nav counter bump when new leads arrive. */
@keyframes bump { 40% { transform: scale(1.3); } }
.nav-count.bump { animation: bump 260ms var(--ease-out); }

/* Word meter under the composer. */
.word-meter { width: 100%; height: 4px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.word-meter span {
  display: block; height: 100%; width: 100%; border-radius: inherit;
  background: var(--success); transform-origin: left; transform: scaleX(0);
  transition: transform 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.word-meter.over span { background: var(--warning); }

/* Indeterminate progress strip on the running-request banner. */
.progress-banner { position: relative; overflow: hidden; }
.progress-banner::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 40%;
  background: var(--brand-green-light); border-radius: 999px;
  animation: indeterminate 1.4s var(--ease-in-out) infinite;
}
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Interactive surfaces respond to the pointer. */
@media (hover: hover) and (pointer: fine) {
  .lead-item:hover:not([aria-current="true"]) { background: var(--surface-2); }
  .lead-item:hover .lead-avatar { transform: scale(1.06); }
  .result-item:hover { background: var(--sec-requests-bg); }
  .chip:hover:not([aria-pressed="true"]) { border-color: var(--accent-border); color: var(--accent-text); }
  .card.stat:hover { border-color: var(--accent-border); transform: translateY(-2px); }
  .btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
  .btn-primary:active:not(:disabled) { transform: scale(0.97); }
}
.lead-avatar { transition: transform 160ms var(--ease-out); }
.card.stat { transition: border-color 160ms var(--ease-out), transform 160ms var(--ease-out); }

/* Toggle card (settings). */
.toggle-card {
  display: flex; gap: var(--space-3); align-items: flex-start; cursor: pointer;
  padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.toggle-card:has(input:checked) { border-color: var(--accent-border); background: var(--accent-subtle); }
.toggle-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-switch {
  position: relative; flex-shrink: 0; width: 38px; height: 22px; margin-top: 1px;
  border-radius: 999px; background: var(--border-strong); transition: background-color 160ms var(--ease-out);
}
.toggle-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 1px 2px rgba(17, 24, 39, 0.25); transition: transform 160ms var(--ease-out);
}
.toggle-card input:checked + .toggle-switch { background: var(--accent); }
.toggle-card input:checked + .toggle-switch::after { transform: translateX(16px); }
.toggle-card input:focus-visible + .toggle-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-muted); }
.toggle-text strong { font-size: 14px; font-weight: 500; color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .lead-list.animate .lead-row, .nav-count.bump { animation: none; }
  .lead-item.leaving { transform: none; }
  .progress-banner::after { animation: none; width: 100%; opacity: 0.35; }
  .card.stat:hover, .btn-primary:hover:not(:disabled), .lead-item:hover .lead-avatar { transform: none; }
}

/* ── Email button style picker (settings) ──────────────────────────────────── */

.cta-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
@media (min-width: 768px) { .cta-styles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.cta-option {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 96px; padding: var(--space-4) var(--space-3);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; touch-action: manipulation;
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out), transform 120ms var(--ease-out);
}
.cta-option:active { transform: scale(0.98); }
.cta-option:has(input:checked) { border-color: var(--accent); background: var(--accent-subtle); box-shadow: inset 0 0 0 1px var(--accent); }
.cta-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .cta-option:hover:not(:has(input:checked)) { border-color: var(--accent-border); } }
/* Explicit size so the generic .field input { width: 100% } rule can't widen the page. */
.field .cta-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cta-option-name { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.cta-option:has(input:checked) .cta-option-name { color: var(--accent-text); }

/* Previews mirror ctaStyle() in lib/mailer.js. Colors come from the user's chosen button color. */
.cta-prev {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 8px 14px; font-size: 13px; font-weight: 600; line-height: 1.3; pointer-events: none;
}
.cta-filled { background: var(--cta); color: var(--cta-on); border-radius: 6px; }
.cta-pill { background: var(--cta); color: var(--cta-on); border-radius: 999px; padding: 8px 18px; }
.cta-square { background: var(--cta); color: var(--cta-on); border-radius: 0; }
.cta-outline { background: #ffffff; color: var(--cta-ink); border: 2px solid var(--cta-ink); border-radius: 6px; padding: 6px 12px; }
.cta-soft { background: var(--cta-soft); color: var(--cta-ink); border-radius: 8px; }
.cta-link { padding: 0; color: var(--cta-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── Signature upload (settings) ───────────────────────────────────────────── */

.sig-upload { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.sig-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 140px; padding: var(--space-4);
  background: var(--surface-2); border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  font-size: 13px; color: var(--text-muted); text-align: center; cursor: pointer; touch-action: manipulation;
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.sig-drop strong { font-size: 14px; font-weight: 500; color: var(--text); }
.sig-drop .empty-icon { margin-bottom: 4px; width: 40px; height: 40px; }
@media (hover: hover) and (pointer: fine) { .sig-drop:hover { border-color: var(--accent); background: var(--accent-subtle); } }
.sig-upload.dragging .sig-drop { border-color: var(--accent); background: var(--accent-subtle); }
.sig-preview {
  display: block; max-width: 100%; width: auto; height: auto; max-height: 140px;
  padding: var(--space-2); background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius);
}
.sig-loading { display: flex; align-items: center; gap: 8px; min-height: 140px; font-size: 13px; color: var(--text-muted); }
.sig-url { font-size: 13px; color: var(--text-muted); }
.sig-url summary { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }
.sig-url[open] summary { margin-bottom: var(--space-2); }
.field-warning { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--warning); }
.field-warning:empty { display: none; }
.field-warning .icon { margin-top: 2px; }

/* ── Provider help (mail server settings) ──────────────────────────────────── */

#smtpHelp { display: block; }
.provider-help { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.55; color: var(--text); }
.provider-help strong { font-weight: 600; color: var(--info); }
.provider-help ol { margin: 0 0 2px; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.provider-help li::marker { color: var(--info); font-weight: 600; }
.provider-note { display: flex; gap: 6px; align-items: flex-start; color: var(--warning); }
.provider-note .icon { margin-top: 3px; }
.provider-help .btn { align-self: flex-start; margin-top: 4px; }

/* ── Multi-select (lead list) ──────────────────────────────────────────────── */

.lead-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); background: var(--card); transition: background-color 120ms var(--ease-out); }
.lead-row:last-child { border-bottom: none; }
.lead-row .lead-item { flex: 1; min-width: 0; border-bottom: none; padding-left: 4px; }
.lead-row.is-selected, .lead-row.is-selected .lead-item:not([aria-current="true"]) { background: var(--accent-subtle); }

.lead-check, .select-all {
  flex-shrink: 0; width: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.select-all { width: 36px; height: 36px; border-radius: var(--radius); }
@media (hover: hover) and (pointer: fine) { .select-all:hover { background: var(--subtle); } }
.lead-check input, .select-all input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
@media (pointer: coarse) { .select-all { width: 44px; height: 44px; } }

.bulk-bar {
  position: sticky; top: calc(var(--nav-h) + 8px); z-index: var(--z-sticky);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
  margin-bottom: var(--space-4); padding: 10px 12px 10px 16px;
  background: var(--accent); color: var(--on-accent); border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(61, 43, 63, 0.28);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
@starting-style { .bulk-bar { opacity: 0; transform: translateY(-6px); } }
.bulk-count { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bulk-bar .btn-primary { background: #ffffff; color: var(--accent-text); border-color: #ffffff; }
.bulk-bar .btn-danger { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, 0.5); }
.bulk-bar .btn-ghost { color: rgba(255, 255, 255, 0.85); }
@media (hover: hover) and (pointer: fine) {
  .bulk-bar .btn-primary:hover:not(:disabled) { background: var(--accent-subtle); border-color: var(--accent-subtle); }
  .bulk-bar .btn-danger:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); border-color: #ffffff; }
  .bulk-bar .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
}
@media (max-width: 767px) {
  .bulk-bar { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(var(--bottom-nav-h) + 12px + env(safe-area-inset-bottom)); margin: 0; }
  .bulk-bar .actions { width: 100%; }
  .bulk-bar .btn-primary { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { @starting-style { .bulk-bar { transform: none; } } }

/* The open lead is marked on the whole row, so the bar sits left of the checkbox. */
.lead-row:has(.lead-item[aria-current="true"]) { background: var(--accent-subtle); box-shadow: inset 3px 0 0 var(--accent); }
.lead-row .lead-item[aria-current="true"] { box-shadow: none; }

/* ── Company profile questions (settings) ──────────────────────────────────── */

.profile-group {
  display: flex; flex-direction: column; gap: var(--space-4);
  margin: 0; padding: var(--space-4); min-width: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.profile-group legend { padding: 0 6px; margin-left: -6px; font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Request history: bounded height with its own scroll ───────────────────── */

.history-card { display: flex; flex-direction: column; min-height: 0; max-height: 65dvh; overflow: hidden; }
@media (min-width: 1024px) {
  .history-card { position: sticky; top: calc(var(--nav-h) + 16px); max-height: calc(100dvh - var(--nav-h) - 32px); }
}
.history-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-5) var(--space-4) var(--space-3); border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .history-head { padding: var(--space-5) var(--space-5) var(--space-3); } }
.history-card .request-list {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--space-3) var(--space-4) var(--space-4); scrollbar-width: thin;
}
@media (min-width: 768px) { .history-card .request-list { padding: var(--space-3) var(--space-5) var(--space-5); } }
.history-card .request-list:focus-visible { outline-offset: -2px; }
.history-card .request-row:first-child { padding-top: var(--space-2); }

/* ── LeadMe brand ──────────────────────────────────────────────────────────── */

.brand-logo { display: block; height: 28px; width: auto; }
@media (max-width: 380px) { .brand-logo { height: 24px; } }
.brand .brand-tag { margin-left: 2px; font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--accent-subtle); color: var(--accent-text); }

/* Login: brand purple background, white card with the full logo. */
.page-login { background: var(--accent); }
.login-card { border: none; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25); }
.login-logo { display: block; height: 36px; width: auto; margin-bottom: 28px; }
.page-login .btn-primary { background: var(--accent); border-color: var(--accent); }
.page-login .link-muted { color: var(--text-muted); }

/* ── Purple top bar ────────────────────────────────────────────────────────── */
/* Same purple as the dark logo's background, so the logo sits on it seamlessly. */

.navbar { background: var(--accent); border-bottom-color: var(--accent); backdrop-filter: none; -webkit-backdrop-filter: none; }
.navbar :focus-visible { outline-color: #ffffff; }
.navbar .nav-link { color: rgba(255, 255, 255, 0.72); }
.navbar .nav-link[aria-current="page"],
.navbar .nav-link[data-tab="aanvragen"][aria-current="page"],
.navbar .nav-link[data-tab="instellingen"][aria-current="page"] { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
.navbar .nav-count { background: var(--brand-green-light); color: var(--accent); }
.navbar-user { color: rgba(255, 255, 255, 0.7); }
.navbar .btn-ghost { color: rgba(255, 255, 255, 0.78); }
.navbar .brand .brand-tag { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
@media (hover: hover) and (pointer: fine) {
  .navbar .nav-link:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
  .navbar .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
}

/* ── Contacten ─────────────────────────────────────────────────────────────── */

[data-section-tone="contacten"] .title-icon { background: var(--accent-subtle); color: var(--accent); }
.contacts-card { overflow: hidden; margin-bottom: var(--space-5); }
.contacts-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3); border-bottom: 1px solid var(--border); }
.contacts-tools .search-box { flex: 1 1 240px; }
.contacts-tools select {
  height: 36px; padding: 0 30px 0 10px; font-family: var(--font); font-size: 14px; color: var(--text);
  background-color: var(--subtle); border: 1px solid transparent; border-radius: var(--radius); appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23566072' 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 10px center;
}
.contacts-tools select:focus { outline: none; border-color: var(--accent); background-color: var(--card); }
@media (max-width: 767px) { .contacts-tools select, .contacts-tools .search-box input { height: 44px; font-size: 16px; } }
.contact-count { margin-left: auto; font-size: 13px; }
.contacts-card td a { color: var(--text); text-decoration: none; }
.contacts-card td a:hover { text-decoration: underline; text-underline-offset: 2px; }
.contacts-card tr.is-unsubscribed td { color: var(--text-muted); }
.contact-more { border-radius: 0; border-top: 1px solid var(--border); height: 44px; }

.campaign-row { display: flex; flex-direction: column; gap: 8px; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.campaign-row:last-child { border-bottom: none; padding-bottom: 0; }
.campaign-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.campaign-top strong { font-weight: 500; overflow-wrap: anywhere; }
.campaign-progress { height: 6px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.campaign-progress span { display: block; height: 100%; background: var(--brand-green); transform-origin: left; transform: scaleX(0); transition: transform 300ms var(--ease-out); }
.campaign-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12px; color: var(--text-muted); }
.campaign-meta strong { color: var(--text); font-weight: 600; }
.campaign-meta .btn { margin-left: auto; }
.text-error { color: var(--error); }
.audience-options { display: flex; flex-wrap: wrap; gap: 4px 20px; }

/* ── LeadMe arrow cursor ───────────────────────────────────────────────────── */
/* The logo's arrow as the default pointer (hotspot = arrow tip). Links and buttons keep the hand
   and text fields the text cursor, so it's still clear what you can click or type in. */
@media (hover: hover) and (pointer: fine) {
  html { cursor: url("/brand/cursor.svg") 2 2, url("/brand/cursor.png") 2 2, auto; }
}

/* Tablets (768–1023px) also use the bottom nav: keep content and fixed bars clear of it. */
@media (min-width: 768px) and (max-width: 1023px) {
  .page-content { padding-bottom: calc(var(--bottom-nav-h) + 48px + env(safe-area-inset-bottom)); }
  .has-bottom-nav .toast-region { bottom: calc(var(--bottom-nav-h) + 12px + env(safe-area-inset-bottom)); }
  .settings-footer { bottom: calc(var(--bottom-nav-h) + 8px + env(safe-area-inset-bottom)); }
}

/* ── Landing page (login) ──────────────────────────────────────────────────── */

.page-landing { background: var(--page); }
.page-landing .login-card { border: none; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28); }
.page-landing .btn-primary { background: var(--accent); border-color: var(--accent); }

.landing-hero { background: var(--accent); color: #ffffff; padding: 32px 16px 48px; position: relative; overflow: hidden; }
/* Big faint arrow from the logo, as a playful backdrop. */
.landing-hero::before {
  content: ''; position: absolute; right: -120px; bottom: -160px; width: 520px; height: 520px; opacity: 0.07; pointer-events: none;
  background: url("/brand/leadme-mark.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
}
.landing-hero-inner { position: relative; max-width: 1120px; margin: 0 auto; display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) {
  .landing-hero { padding: 56px 24px 72px; min-height: min(760px, 100dvh); display: flex; align-items: center; }
  .landing-hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(340px, 400px); gap: 64px; width: 100%; }
}
.hero-logo { display: block; height: 32px; width: auto; margin-bottom: 28px; }
.hero-title { font-size: clamp(30px, 5.2vw, 52px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; max-width: 16ch; text-wrap: balance; }
.hero-title span { display: block; margin-top: 4px; color: var(--brand-green-light); }
.hero-lead { margin-top: 18px; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, 0.8); max-width: 48ch; }
.scroll-cue {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; min-height: 44px;
  font-size: 15px; font-weight: 600; color: #ffffff; text-decoration: none;
}
.scroll-cue .icon { animation: nudge 1.8s var(--ease-in-out) infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
@media (hover: hover) and (pointer: fine) { .scroll-cue:hover span { text-decoration: underline; text-underline-offset: 4px; } }

.landing-section { padding: 72px 16px; }
.landing-section.alt { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { .landing-section { padding: 96px 24px; } }
.landing-inner { max-width: 1120px; margin: 0 auto; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-green); margin-bottom: 10px; }
.section-heading { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; max-width: 26ch; text-wrap: balance; margin-bottom: 40px; }

.how-layout { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .how-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 64px; } }
.steps { list-style: none; display: flex; flex-direction: column; gap: 28px; counter-reset: none; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.step-num {
  width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--brand-green-light); font-size: 18px; font-weight: 800;
}
.step h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.step p { color: var(--text-muted); max-width: 52ch; }

.mail-demo { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 16px 40px rgba(61, 43, 63, 0.12); }
@media (min-width: 960px) { .mail-demo { position: sticky; top: 32px; } }
.mail-demo-bar { display: flex; gap: 6px; padding: 12px 14px; background: var(--subtle); border-bottom: 1px solid var(--border); }
.mail-demo-head { padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.mail-demo-head .muted { display: inline-block; width: 78px; }
.mail-demo-body { padding: 18px; font-size: 14px; line-height: 1.65; display: flex; flex-direction: column; gap: 10px; }
.mail-demo figcaption { padding: 12px 18px; font-size: 12px; color: var(--text-muted); background: var(--surface-2); border-top: 1px solid var(--border); }

.who-grid { list-style: none; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .who-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .who-grid { grid-template-columns: repeat(3, 1fr); } }
.who-card { padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--page); transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .who-card:hover { transform: translateY(-3px); border-color: var(--brand-green-border); } }
.who-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-green-bg); color: var(--brand-green); margin-bottom: 14px; }
.who-icon .icon { width: 22px; height: 22px; }
.who-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.who-card p { font-size: 14px; color: var(--text-muted); }

.why-grid { display: grid; gap: 28px 40px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
.why-item { padding-left: 18px; border-left: 3px solid var(--brand-green-light); }
.why-item h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.why-item p { color: var(--text-muted); max-width: 52ch; }

.landing-cta { background: var(--accent); color: #ffffff; text-align: center; padding: 72px 16px; }
.landing-cta .landing-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 640px; }
.cta-mark { width: 56px; height: 56px; border-radius: 14px; }
.landing-cta h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.landing-cta p { color: rgba(255, 255, 255, 0.8); max-width: 46ch; }
.btn-cta { margin-top: 8px; height: 48px; padding: 0 24px; font-size: 15px; background: var(--brand-green-light); color: var(--accent); border-color: var(--brand-green-light); }
@media (hover: hover) and (pointer: fine) { .btn-cta:hover { background: #a3c96a; border-color: #a3c96a; } }


/* Scroll reveal: only when JS confirmed motion is OK (class on <html>). */
.can-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
.can-reveal .reveal.is-visible { opacity: 1; transform: none; }
.can-reveal .steps .step:nth-child(2), .can-reveal .who-grid .who-card:nth-child(2), .can-reveal .why-grid .why-item:nth-child(2) { transition-delay: 60ms; }
.can-reveal .steps .step:nth-child(3), .can-reveal .who-grid .who-card:nth-child(3), .can-reveal .why-grid .why-item:nth-child(3) { transition-delay: 120ms; }
.can-reveal .steps .step:nth-child(4), .can-reveal .who-grid .who-card:nth-child(4), .can-reveal .why-grid .why-item:nth-child(4) { transition-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  .scroll-cue .icon { animation: none; }
  .mail-demo { transform: none; }
  .who-card:hover { transform: none; }
}
/* The hero sets white text; the login card inside it needs the normal dark text again. */
.page-landing .login-card { color: var(--text); }

/* ── Colorful demo mail (landing) ──────────────────────────────────────────── */

.mail-demo { border: none; box-shadow: 0 24px 56px rgba(61, 43, 63, 0.22); }
.mail-demo-bar { justify-content: space-between; align-items: center; background: var(--accent); border-bottom: none; padding: 12px 14px; }
.mail-demo-bar .dots { display: inline-flex; gap: 6px; }
.mail-demo-bar .dots span { width: 11px; height: 11px; border-radius: 50%; }
.mail-demo-bar .dots span:nth-child(1) { background: #ff6159; }
.mail-demo-bar .dots span:nth-child(2) { background: #ffbd2e; }
.mail-demo-bar .dots span:nth-child(3) { background: #28c941; }
.mail-demo-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; background: rgba(145, 186, 84, 0.18); color: var(--brand-green-light);
  font-size: 12px; font-weight: 600;
}
.mail-demo-badge .icon { width: 13px; height: 13px; }
.mail-demo-head { background: var(--card); gap: 6px; }
.mail-demo-from { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 14px; }
.mail-demo-avatar {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-green-light); color: var(--accent); font-weight: 800; font-size: 14px;
}
.mail-demo-head strong { font-weight: 600; }
/* The mail text itself stays plain, like a real mail. */
.mail-demo-body { background: var(--card); color: var(--text); }
.mail-demo figcaption { background: var(--card); }

/* Demo mail: button, website link and signature, in the same order as a real LeadMe mail. */
.mail-demo-btn {
  align-self: flex-start; display: inline-block; margin-top: 6px; padding: 11px 20px; border-radius: 6px;
  background: var(--accent); color: #ffffff; font-size: 14px; font-weight: 600;
}
.mail-demo-link { align-self: flex-start; font-size: 13px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.mail-demo-signature {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.mail-demo-sig-logo {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--text); color: #ffffff; font-size: 14px; font-weight: 800; letter-spacing: -0.02em;
}
.mail-demo-sig-text { display: flex; flex-direction: column; font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.mail-demo-sig-text strong { font-size: 13px; color: var(--text); font-weight: 700; }
.mail-demo-sig-site { color: var(--text); }

/* Two equal halves: steps left, demo mail centered in the right half (closer to the page center). */
.how-layout { align-items: start; }
.mail-demo-wrap { justify-self: center; width: 100%; max-width: 480px; }
.mail-demo { width: 100%; }
/* Caption sits outside the mail card, as a quiet note. */
.mail-demo-note { margin-top: 16px; padding: 0 8px; text-align: center; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
@media (min-width: 960px) {
  .how-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .mail-demo { position: static; }
}

/* ── Stack of demo mails (landing) ─────────────────────────────────────────── */

/* Right half, vertically centered next to the steps; room on the right/top for the cards behind. */
@media (min-width: 960px) { .mail-demo-wrap { justify-self: end; align-self: center; padding-right: 36px; } }
.mail-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 28px; }
.mail-tab {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--card); color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), border-color 150ms var(--ease-out), transform 120ms var(--ease-out);
}
.mail-tab:active { transform: scale(0.97); }
.mail-tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #ffffff; }
@media (hover: hover) and (pointer: fine) { .mail-tab:hover:not([aria-pressed="true"]) { border-color: var(--accent); color: var(--text); } }
@media (pointer: coarse) { .mail-tab { min-height: 44px; } }

.mail-stack { display: grid; }
.mail-stack .mail-demo {
  grid-area: 1 / 1; transform-origin: 50% 100%;
  transition: transform 450ms var(--ease-in-out), opacity 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.mail-stack .mail-demo[data-pos="0"] { z-index: 3; transform: rotate(-1deg); box-shadow: 0 24px 56px rgba(61, 43, 63, 0.22); }
.mail-stack .mail-demo[data-pos="1"] { z-index: 2; transform: translate(22px, -16px) rotate(3deg) scale(0.96); opacity: 0.92; cursor: pointer; }
.mail-stack .mail-demo[data-pos="2"] { z-index: 1; transform: translate(40px, -30px) rotate(6.5deg) scale(0.92); opacity: 0.8; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .mail-stack .mail-demo[data-pos="1"]:hover { transform: translate(30px, -22px) rotate(4deg) scale(0.96); opacity: 1; }
  .mail-stack .mail-demo[data-pos="2"]:hover { transform: translate(48px, -36px) rotate(7.5deg) scale(0.92); opacity: 1; }
}
/* On small screens the cards behind peek out less, so nothing runs off the edge. */
@media (max-width: 599px) {
  .mail-stack .mail-demo[data-pos="1"] { transform: translate(10px, -12px) rotate(2deg) scale(0.96); }
  .mail-stack .mail-demo[data-pos="2"] { transform: translate(18px, -22px) rotate(4deg) scale(0.92); }
}
@media (prefers-reduced-motion: reduce) {
  .mail-stack .mail-demo { transition: opacity 200ms linear; }
}

/* Desktop: cards slightly smaller; both columns share one height, the steps spread evenly over it,
   so step 1 lines up with the tabs and step 4 ends with the caption (no gap below). */
@media (min-width: 960px) {
  .how-layout { align-items: stretch; }
  .mail-demo-wrap { align-self: start; max-width: 440px; }
  .mail-demo-wrap .mail-tabs { margin-bottom: 20px; }
  .mail-stack { width: 420px; margin: 0 auto; zoom: 0.86; }
  .mail-demo-wrap .mail-demo-note { margin-top: 12px; }
  .steps { justify-content: space-between; }
}

/* ── Dotted path between the steps, with the travelling logo arrow ─────────── */

.steps { position: relative; }
.steps-path { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 0; }
.steps-path path { fill: none; stroke: var(--brand-green-light); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0 9; }
.step-num { position: relative; z-index: 2; box-shadow: 0 0 0 6px var(--page); }
.steps-arrow {
  position: absolute; left: 0; top: 0; z-index: 1; width: 30px; height: 30px; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(61, 43, 63, 0.25));
  will-change: transform;
}

/* Every card in the stack is clickable: the front one advances to the next example. */
.mail-stack .mail-demo[data-pos="0"] { cursor: pointer; }

/* ── Landing: anchor menu + "Wat onderscheidt ons?" ────────────────────────── */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.landing-section { scroll-margin-top: calc(var(--top-nav-h) + 16px); }

.diff-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-bottom: 40px; }
@media (min-width: 860px) { .diff-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.diff-card { padding: 28px; border-radius: 18px; background: var(--page); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.diff-card:nth-child(1) { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.diff-card:nth-child(1) p, .diff-card:nth-child(1) .diff-points li { color: rgba(255, 255, 255, 0.82); }
.diff-card:nth-child(2) { background: var(--brand-green-bg); border-color: var(--brand-green-border); }
.diff-icon { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.diff-card:nth-child(1) .diff-icon { background: rgba(145, 186, 84, 0.18); color: var(--brand-green-light); }
.diff-card:nth-child(2) .diff-icon { background: var(--card); color: var(--brand-green); }
.diff-icon .icon { width: 24px; height: 24px; }
.diff-card h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.diff-card p { color: var(--text-muted); max-width: 52ch; }
.diff-points { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.diff-points li { position: relative; padding-left: 28px; font-size: 14px; font-weight: 500; color: var(--text); }
.diff-points li::before {
  content: ''; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-green-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d2b3f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.compare { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--card); }
.compare-row { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.compare-row:last-child { border-bottom: none; }
@media (min-width: 720px) { .compare-row { grid-template-columns: 160px 1fr 1fr; gap: 16px; align-items: center; } }
.compare-head { background: var(--surface-2); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
@media (max-width: 719px) { .compare-head { display: none; } }
.compare-row [role="rowheader"] { font-weight: 700; }
.compare-old { color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.compare-old::before { content: '×'; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--subtle); color: var(--text-muted); font-weight: 700; }
.compare-new { color: var(--text); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.compare-new::before {
  content: ''; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-green-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d2b3f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
@media (max-width: 719px) {
  .compare-old::after { content: ' (klassiek)'; font-size: 12px; }
}

/* ── Landing: small top navbar ────────────────────────────────────────────── */
/* Sticky, same purple as the hero so it blends in at the top. Section links from 768px; below that logo + Inloggen. */

.page-landing { --top-nav-h: 56px; padding-top: var(--top-nav-h); }
.top-nav { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav); background: var(--accent); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.top-nav-inner { display: flex; align-items: center; gap: 16px; height: var(--top-nav-h); max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .top-nav-inner { padding: 0 24px; } }
.top-brand { display: inline-flex; border-radius: 6px; }
.top-brand img { display: block; height: 24px; width: auto; }
.top-links { display: none; gap: 2px; margin-left: auto; }
@media (min-width: 1200px) { .top-links { display: flex; } }
.top-links a, .top-login, .top-signin {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 999px;
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.top-links a, .top-signin { color: rgba(255, 255, 255, 0.78); }
.top-signin { margin-left: auto; }
@media (min-width: 1200px) { .top-signin { margin-left: 8px; } }
.top-links a[aria-current="true"] { color: #ffffff; background: rgba(255, 255, 255, 0.14); }
.top-login { padding: 0 16px; background: var(--brand-green-light); color: var(--accent); font-weight: 600; }
.top-login-long { display: none; }
@media (min-width: 560px) { .top-login-long { display: inline; } .top-login-short { display: none; } }
@media (hover: hover) and (pointer: fine) {
  .top-links a:hover, .top-signin:hover { color: #ffffff; background: rgba(255, 255, 255, 0.1); }
  .top-login:hover { background: #ffffff; }
}
.top-login:active { transform: scale(0.97); }

/* "Wat onderscheidt ons?" on the brand purple: both cards and the comparison share one translucent
   surface, white text, and the brand green as the single highlight (icons, checks, LeadMe column). */
.section-purple { background: var(--accent); color: #ffffff; }
.section-purple .eyebrow { color: var(--brand-green-light); }
.section-purple .section-heading { color: #ffffff; }
.section-purple .diff-card,
.section-purple .diff-card:nth-child(1),
.section-purple .diff-card:nth-child(2) { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); color: #ffffff; }
.section-purple .diff-card .diff-icon,
.section-purple .diff-card:nth-child(1) .diff-icon,
.section-purple .diff-card:nth-child(2) .diff-icon { background: var(--brand-green-light); color: var(--accent); }
.section-purple .diff-card h3 { color: #ffffff; }
.section-purple .diff-card p { color: rgba(255, 255, 255, 0.74); }
.section-purple .diff-points li,
.section-purple .diff-card:nth-child(1) .diff-points li { color: #ffffff; }

.section-purple .compare { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
.section-purple .compare-row { border-bottom-color: rgba(255, 255, 255, 0.1); }
.section-purple .compare-head { background: rgba(0, 0, 0, 0.16); color: rgba(255, 255, 255, 0.6); }
.section-purple .compare-head [role="columnheader"]:last-child { color: var(--brand-green-light); }
.section-purple .compare-row [role="rowheader"] { color: #ffffff; }
.section-purple .compare-old { color: rgba(255, 255, 255, 0.6); }
.section-purple .compare-old::before { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.6); }
.section-purple .compare-new { color: #ffffff; }

/* ── Landing: account request form ─────────────────────────────────────────── */

.request-section { background: var(--accent); color: #ffffff; }
.request-section .eyebrow { color: var(--brand-green-light); }
.request-section .section-heading { color: #ffffff; }
.request-layout { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .request-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; } }
.request-lead { color: rgba(255, 255, 255, 0.78); max-width: 46ch; margin-top: 4px; }
.request-points { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.request-points li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.request-points .icon, .request-done-icon .icon { width: 14px; height: 14px; stroke-width: 3.5; }
.request-points .icon {
  box-sizing: content-box; padding: 4px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-green-light); color: var(--accent);
}
.request-card { background: var(--card); color: var(--text); border-radius: 18px; padding: 24px; }
@media (min-width: 768px) { .request-card { padding: 32px; } }
.request-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .request-grid { grid-template-columns: 1fr 1fr; } .request-wide { grid-column: 1 / -1; } }
.request-card textarea { resize: vertical; min-height: 88px; }
.request-card .alert { margin-top: 16px; }
.request-submit { margin-top: 20px; height: 48px; font-size: 15px; }
.request-note { margin-top: 12px; font-size: 12px; color: var(--text-muted); text-align: center; }
/* Honeypot: off-screen for people, still filled in by naive bots. */
.request-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.request-done { text-align: center; padding: 24px 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; outline: none; }
.request-done-icon { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-green-bg); color: var(--brand-green); }
.request-done-icon .icon { width: 26px; height: 26px; stroke-width: 3; }
.request-done h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.request-done p { color: var(--text-muted); max-width: 36ch; }
.request-done:not([hidden]) { transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out); }
@starting-style { .request-done:not([hidden]) { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { @starting-style { .request-done:not([hidden]) { transform: none; } } }

.login-request { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; font-size: 14px; color: var(--text-muted); }
.login-request a { color: var(--accent); font-weight: 600; text-underline-offset: 2px; }

/* ── Admin: account requests ───────────────────────────────────────────────── */

.requests-card { margin-bottom: var(--space-5); }
.requests-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.requests-head .card-title { display: flex; align-items: center; gap: 8px; }
.requests-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; min-height: 44px; }
.request-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 24px; padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.request-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.request-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.request-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
.request-meta a { color: var(--accent); text-underline-offset: 2px; }
.request-message { font-size: 14px; color: var(--text); background: var(--subtle); border-radius: var(--radius); padding: 10px 12px; white-space: pre-line; overflow-wrap: anywhere; }
.requests-empty { padding-top: var(--space-3); border-top: 1px solid var(--border); font-size: 14px; }

/* ── Credits ───────────────────────────────────────────────────────────────── */

[data-section-tone="credits"] .title-icon { background: var(--brand-green-bg); color: var(--brand-green); }
.nav-count-credits { background: var(--brand-green-light); color: var(--accent); }
.credit-balance { display: flex; align-items: center; gap: var(--space-4); }
.credit-amount { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.credit-amount span { font-size: 16px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.credit-rules { list-style: none; display: grid; gap: 10px; padding: var(--space-4); border-radius: var(--radius-lg, 14px); background: var(--brand-green-bg); border: 1px solid var(--brand-green-border); }
@media (min-width: 768px) { .credit-rules { grid-template-columns: 1fr 1fr; } }
.credit-rules li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.credit-rules .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--brand-green); }
.credit-heading { margin-top: var(--space-3); }
.packs { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 768px) { .packs { grid-template-columns: repeat(3, 1fr); } }
.pack { position: relative; padding: var(--space-5); display: flex; flex-direction: column; gap: 4px; }
.pack.is-popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pack-flag { position: absolute; top: -11px; left: var(--space-5); padding: 2px 10px; border-radius: 999px; background: var(--accent); color: #ffffff; font-size: 12px; font-weight: 600; }
.pack-name { font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pack-credits { font-size: 16px; }
.pack-credits strong { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.pack-price { font-size: 20px; font-weight: 700; margin-top: 4px; }
.pack-unit { font-size: 13px; margin-bottom: var(--space-3); }
.pack .btn { margin-top: auto; }
.pack-note { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.credit-desc { overflow-wrap: anywhere; }
.credit-plus { color: var(--success); font-weight: 600; }
.credit-minus { color: var(--text-muted); }
.credit-hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.credit-hint .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--brand-green); }
.credit-hint.is-empty { color: var(--error); }
.credit-hint.is-empty .icon { color: var(--error); }
.credit-hint a { color: inherit; font-weight: 600; text-underline-offset: 2px; }
.regen-cost { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.regen-cost .icon { color: var(--brand-green); }

/* ── Landing: pricing ──────────────────────────────────────────────────────── */

.pricing-lead { max-width: 60ch; color: var(--text-muted); margin: -24px 0 40px; }
.price-grid { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 860px) { .price-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.price-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
}
.price-card.is-loading { min-height: 360px; background: var(--subtle); border-color: transparent; }
.price-card.is-popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 16px 40px rgba(61, 43, 63, 0.12); }
@media (min-width: 860px) { .price-card.is-popular { transform: translateY(-8px); } }
.price-flag { position: absolute; top: -12px; left: 28px; padding: 3px 12px; border-radius: 999px; background: var(--accent); color: #ffffff; font-size: 12px; font-weight: 600; }
.price-name { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.price-amount { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-top: 4px; }
.price-credits { font-size: 16px; color: var(--text); }
.price-credits strong { font-weight: 700; }
.price-per { font-size: 14px; color: var(--text-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.price-save { padding: 2px 8px; border-radius: 999px; background: var(--brand-green-bg); color: var(--brand-green); font-size: 12px; font-weight: 700; }
.price-points { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 18px 0 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.price-points li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.price-points .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--brand-green); stroke-width: 3; }
.price-card .btn { margin-top: auto; height: 48px; }

.credit-explain { margin-top: 64px; }
.credit-explain-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 24px; }
.credit-explain-grid { display: grid; gap: 24px 40px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .credit-explain-grid { grid-template-columns: repeat(2, 1fr); } }
.credit-item, .credit-example { display: flex; gap: 16px; align-items: flex-start; }
.credit-item h4, .credit-example h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.credit-item p, .credit-example p { font-size: 15px; line-height: 1.6; color: var(--text-muted); max-width: 52ch; }
.credit-item-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-subtle); color: var(--accent); }
.credit-item-icon .icon { width: 22px; height: 22px; }
.credit-example { margin-top: 32px; padding: 24px; border-radius: 16px; background: var(--brand-green-bg); border: 1px solid var(--brand-green-border); }
.credit-example .credit-item-icon { background: var(--card); color: var(--brand-green); }
.credit-example p { max-width: 72ch; color: var(--text); }

.price-vat, .pack-vat { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text-muted); }
.price-note { margin-top: 24px; font-size: 14px; color: var(--text-muted); text-align: center; }

/* ── Site footer (landing + legal pages) ───────────────────────────────────── */

.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: 48px 16px 32px; }
@media (min-width: 768px) { .site-footer { padding: 56px 24px 32px; } }
.site-footer-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .site-footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer-brand p { margin-top: 12px; font-size: 14px; color: var(--text-muted); }
.site-footer-col h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.site-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.site-footer-col a { display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; color: var(--text); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .site-footer-col a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; } }
.site-footer-legal { max-width: 1120px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.request-note a { color: inherit; text-underline-offset: 2px; }

/* ── Legal pages ───────────────────────────────────────────────────────────── */

.page-legal { background: var(--page); }
.legal-top { position: sticky; top: 0; z-index: var(--z-nav); background: var(--accent); }
.legal-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .legal-top-inner { padding: 0 24px; } }
.legal { max-width: 720px; margin: 0 auto; padding: 56px 16px 80px; }
@media (min-width: 768px) { .legal { padding: 72px 24px 96px; } }
.legal h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.legal-meta { margin-top: 8px; font-size: 14px; color: var(--text-muted); }
.legal h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 40px 0 12px; scroll-margin-top: 72px; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; color: var(--text); }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 12px 0 0 20px; display: flex; flex-direction: column; gap: 8px; }
.legal a { color: var(--accent); font-weight: 500; text-underline-offset: 2px; }
.legal > p:first-of-type + p, .legal .legal-meta + p { margin-top: 24px; }
.price-incl { font-size: 13px; color: var(--text-muted); margin-top: -2px; }
.pack-incl { font-size: 13px; margin-top: -2px; }

/* ── Billing details ───────────────────────────────────────────────────────── */

.billing-card { margin-top: var(--space-2); }
.billing-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.billing-intro { margin: 4px 0 16px; font-size: 14px; }
.billing-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 640px) { .billing-grid { grid-template-columns: 1fr 1fr; } .billing-wide { grid-column: 1 / -1; } }
.billing-grid select {
  width: 100%; height: 44px; padding: 0 36px 0 12px; font-family: var(--font); font-size: 16px; color: var(--text);
  background-color: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius); appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23566072' 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 12px center;
}
.billing-grid select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
[data-profile-error] { margin-top: 16px; }
.billing-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.billing-summary { font-style: normal; font-size: 14px; line-height: 1.7; color: var(--text); margin-top: 8px; }
#billingDialogIntro { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
