/* Elastiq MVP. Radiussysteem: kaarten 16, knoppen/velden 10, pills 999. */
:root {
  --navy: #0e1526;
  --navy-tile: #1a2439;
  --navy-line: rgba(255, 255, 255, 0.07);
  --body-bg: #f6f6f7;
  --card: #ffffff;
  --ink: #171a21;
  --ink-2: #565c68;
  --ink-3: #8a909c;
  --line: #e6e8ee;
  --accent: #e8641f;
  --accent-deep: #b84a10;
  --accent-tint: #fdeee2;
  --accent-text: #93400c;
  --ok-tint: #e5f4e7;
  --ok-text: #17691f;
  --blue-tint: #e7effb;
  --blue-text: #1c5cab;
  --gray-tint: #ecedf1;
  --red-tint: #fbe9e9;
  --red-text: #a02c2c;
  --wait-tint: #fdf3d9;
  --wait-text: #7c5a08;
  --sale-tint: #fce7f1;
  --sale-text: #a2246d;
  --r-card: 16px;
  --r-ctl: 10px;
  --shadow: 0 1px 2px rgba(23, 26, 33, 0.05);
}

:root {
  color-scheme: light;
  --chart-grid: #e6e8ee;
  --chart-muted: #898f9c;
  --chart-axis: #c6cad3;
  --chart-own: #eb6834;
  --chart-comps: #2a78d6 #1baf7a #4a3aa7 #eda100;
  --tip-bg: #131a2b;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--body-bg);
  color: var(--ink);
  padding: 14px 16px 40px;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; }

/* ---------- topbar (lichte Polaris-shell) ---------- */
.topbar {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 20px;
  min-height: 58px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: block; flex: 0 0 auto; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.topnav { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.topnav a {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13.5px;
  padding: 8px 14px; border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.topnav a:hover { color: var(--ink); background: var(--gray-tint); }
.topnav a.active { color: var(--ink); background: var(--gray-tint); }
.topbar-actions { display: flex; gap: 10px; }

/* ---------- dashboardkop (licht) ---------- */
.hero-band { padding: 4px 4px 20px; }
.hero-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.hero-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.btn-band { background: #1a1a1a; color: #fff; }
.btn-band:hover { background: #303030; }
.hero-sub { color: var(--ink-3); margin: 4px 0 0; font-size: 13.5px; }
.kpi-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 18px;
}
.kpi-good { color: var(--ok-text); }
.kpi-tile {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 18px 14px;
  box-shadow: var(--shadow);
}
.kpi-label { color: var(--ink-2); font-size: 12.5px; font-weight: 600; padding-right: 44px; }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-icon {
  position: absolute; right: 14px; bottom: 14px;
  width: 34px; height: 34px; border-radius: 999px;
  display: grid; place-items: center; font-size: 17px;
}
.chip-orange { background: var(--accent-tint); color: var(--accent-deep); }
.chip-green  { background: var(--ok-tint);  color: var(--ok-text); }
.chip-blue   { background: var(--blue-tint); color: var(--blue-text); }
.chip-red    { background: var(--red-tint); color: var(--red-text); }

/* ---------- layout ---------- */
.page-body { display: flex; gap: 22px; align-items: flex-start; }
.page-detail { display: block; }
.filter-rail {
  width: 248px; flex: 0 0 auto;
  background: var(--card); border-radius: var(--r-card);
  padding: 20px; box-shadow: var(--shadow);
  position: sticky; top: 16px;
}
.filter-rail h2 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.filter-group { margin-top: 16px; }
.filter-group h3 { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent-deep); }
.filter-toggle { border-top: 1px solid var(--line); padding-top: 14px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: #cdd2db; transition: background 0.15s;
}
.slider::before {
  content: ""; position: absolute; width: 16px; height: 16px;
  left: 3px; top: 3px; border-radius: 999px; background: #fff;
  transition: transform 0.15s;
}
.switch input:checked + .slider { background: var(--accent-deep); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ---------- productkaarten ---------- */
.card-grid {
  flex: 1;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px;
  align-content: start;
}
.product-card {
  background: var(--card); border-radius: var(--r-card);
  padding: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-top h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.card-top h3 a { text-decoration: none; }
.card-top h3 a:hover { color: var(--accent-deep); }
.card-meta { color: var(--ink-3); font-size: 12.5px; margin: 3px 0 0; }
.auto-tag {
  display: inline-block; margin-left: 4px; padding: 1px 8px;
  border-radius: 999px; background: var(--ok-tint); color: var(--ok-text);
  font-size: 11px; font-weight: 700;
}
.auto-box {
  background: var(--card); border-radius: var(--r-ctl);
  box-shadow: var(--shadow); padding: 12px 16px; min-width: 260px;
}
.auto-box .hint { margin: 6px 0 0; max-width: 300px; }
.auto-title {
  margin: 0; font-weight: 700; font-size: 13.5px;
  display: flex; align-items: center; gap: 7px;
}
.auto-title i { color: var(--accent); }

.pill {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 4px 11px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pill-action   { background: var(--accent-tint); color: var(--accent-text); }
.pill-optimal  { background: var(--blue-tint); color: var(--blue-text); }
.pill-learning { background: var(--gray-tint); color: var(--ink-2); }
.pill-ok      { background: var(--ok-tint); color: var(--ok-text); }
.pill-error   { background: var(--red-tint); color: var(--red-text); }
.pill-warning { background: var(--red-tint); color: var(--red-text); }
.pill-wait    { background: var(--wait-tint); color: var(--wait-text); }
.pill-sale    { background: var(--sale-tint); color: var(--sale-text); }
#sale-scope-category[hidden], #sale-scope-product[hidden] { display: none; }
.pill-btn { border: 0; cursor: pointer; }

.price-row { display: flex; align-items: center; gap: 14px; }
.price-block { display: flex; flex-direction: column; }
.price-label { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.price-value { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-accent { color: var(--accent-deep); }
.price-muted { color: var(--ink-3); }
.price-arrow { color: var(--ink-3); font-size: 15px; }
.spark { margin-left: auto; width: 88px; height: 34px; }

.card-facts { display: flex; flex-direction: column; gap: 4px; min-height: 42px; }
.fact { margin: 0; font-size: 13px; }
.muted { color: var(--ink-3); }
.delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.delta-up { color: #17691f; }
.delta-down { color: var(--red-text); }
.uplift { color: var(--ink-2); margin-left: 6px; }

.card-cta {
  margin-top: auto;
  justify-content: center;
}
.empty-note { color: var(--ink-3); padding: 30px 10px; }

body.compact .spark, body.compact .card-facts { display: none; }

/* ---------- knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: var(--r-ctl); cursor: pointer;
  font: inherit; font-weight: 700; font-size: 13.5px;
  padding: 10px 16px; text-decoration: none;
  transition: background 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent-deep); color: #fff; }
.btn-accent:hover { background: #a03f0c; }
.btn-dark { background: #131a2b; color: #fff; }
.btn-dark:hover { background: #1f2940; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--gray-tint); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 13px 20px; font-size: 14.5px; }

/* ---------- detailpagina's ---------- */
.detail-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; margin: 6px 2px 20px;
}
.detail-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
.hero-sub-dark { color: var(--ink-2); margin: 6px 0 0; font-size: 13.5px; }
.backlink {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13px;
  margin-bottom: 10px;
}
.backlink:hover { color: var(--ink); }

.detail-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 16px; }
.card {
  background: var(--card); border-radius: var(--r-card);
  padding: 22px; box-shadow: var(--shadow);
}
.card h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.card-wide { grid-column: 1 / -1; }

.advice-summary { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.advice-summary .price-value { font-size: 26px; }
.uplift-line { margin: 6px 0 0; font-size: 13.5px; }
.steps-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 18px 0 8px; }
.advice-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.advice-steps li {
  display: grid; grid-template-columns: 22px 1fr auto; grid-template-rows: auto auto;
  column-gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line);
  counter-increment: step; align-items: baseline;
}
.advice-steps li:last-child { border-bottom: 0; }
.advice-steps li::before {
  content: counter(step);
  grid-row: 1 / 3;
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--gray-tint); color: var(--ink-2);
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center; align-self: center;
}
.step-label { font-weight: 700; font-size: 13.5px; }
.step-note { grid-column: 2; color: var(--ink-3); font-size: 12.5px; }
.step-price { grid-row: 1 / 3; align-self: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.rule-ref { margin: 14px 0 0; font-size: 12.5px; }

.stat-strip {
  display: flex; gap: 26px; flex-wrap: wrap;
  padding: 12px 14px; background: var(--gray-tint); border-radius: 12px; margin-bottom: 14px;
}
.stat-strip > div { display: flex; flex-direction: column; }
.stat-label { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.stat-value { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }

.chart { position: relative; height: 280px; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--tip-bg); color: #fff;
  border-radius: 10px; padding: 8px 11px;
  font-size: 12px; line-height: 1.5; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(13, 17, 28, 0.25);
  transform: translate(-50%, calc(-100% - 12px));
}
.chart-tip .tip-row { display: flex; align-items: center; gap: 7px; }
.chart-tip .dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }

/* ---------- tabellen ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
.notice-error {
  background: var(--red-tint); color: var(--red-text);
  border-radius: var(--r-ctl); padding: 10px 16px; margin: 0 0 16px;
  font-weight: 600; font-size: 13.5px;
}
.stat-label[title] { cursor: help; text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-2);
  padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line);
}
.table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td a { font-weight: 600; text-decoration: none; }
.table td a:hover { color: var(--accent-deep); }
.table-tight td, .table-tight th { padding-top: 7px; padding-bottom: 7px; }
.url-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.error-hint { display: block; }

/* ---------- regels ---------- */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.rule-card .card-top { margin-bottom: 8px; }
.rule-inactive { opacity: 0.6; }
.rule-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 10px 0 4px; }
.rule-facts > div { display: flex; flex-direction: column; }
.rule-facts dt { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.rule-facts dd { margin: 0; font-size: 13.5px; font-weight: 600; }
.notice {
  background: var(--ok-tint); color: var(--ok-text);
  border-radius: var(--r-ctl); padding: 10px 16px; margin: 0 0 16px;
  font-weight: 600; font-size: 13.5px;
}
.plain-list { list-style: none; margin: 10px 0 4px; padding: 0; }
.plain-list li {
  position: relative; padding: 6px 0 6px 22px; font-size: 13.5px;
}
.plain-list li::before {
  content: ""; position: absolute; left: 4px; top: 13px;
  width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
}
.plain-list code, .scope {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px; background: var(--gray-tint);
  border-radius: 6px; padding: 2px 7px;
}
.code-block {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px; line-height: 1.55;
  background: var(--navy); color: #d7deeb;
  border-radius: 12px; padding: 14px 16px;
  overflow-x: auto; margin: 0;
}
.rule-facts-col { flex-direction: column; gap: 12px; }
.rule-edit { margin: 14px 0 0; }
.rule-edit summary { list-style: none; }
.rule-edit summary::-webkit-details-marker { display: none; }
.rule-edit-btn { width: 100%; justify-content: center; }
.rule-edit[open] .rule-edit-btn { margin-bottom: 14px; }
.rule-switch { display: flex; align-items: center; gap: 9px; }
.switch-state { font-size: 12.5px; font-weight: 600; min-width: 34px; text-align: right; }
.switch-green input:checked + .slider { background: #18b254; }
.landing {
  max-width: 520px; margin: 14vh auto 0; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 0 20px;
}
.landing h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.landing p { margin: 0; color: var(--ink-2); }
.brand-mark-lg { width: 52px; height: 52px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.anchor-choice { display: flex; flex-direction: column; gap: 4px; }
.anchor-choice .check { align-items: baseline; font-weight: 500; }
.anchor-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 2px; }
.inline-form { display: flex; gap: 10px; margin-top: 14px; max-width: 560px; }
.inline-form input { flex: 1; }
.inline-form .btn { white-space: nowrap; }
.plan-card { display: flex; flex-direction: column; }
.plan-card form { margin-top: auto; }
.plan-card .btn { width: 100%; justify-content: center; margin-top: 14px; }
.plan-price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 6px; }

/* ---------- onboarding-tour ---------- */
.tour-wrap { display: grid; place-items: center; min-height: calc(100vh - 160px); padding: 20px 0; }
.tour-card { width: 100%; max-width: 620px; padding: 28px 34px 26px; }
.tour-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.tour-dots { display: flex; gap: 8px; }
.tour-dot {
  width: 26px; height: 6px; border-radius: 999px;
  background: var(--gray-tint); transition: background 0.2s;
}
.tour-dot.active { background: var(--accent); }
.tour-skip {
  border: 0; background: none; color: var(--ink-3); font: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px;
}
.tour-skip:hover { color: var(--ink); }
.tour-step { display: flex; flex-direction: column; gap: 12px; min-height: 220px; }
.tour-step[hidden], #tour-back[hidden], #tour-next[hidden], #tour-finish[hidden] { display: none; }
.tour-step h1 { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.tour-step p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); max-width: 52ch; }
.tour-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-size: 23px; margin-bottom: 2px;
}
.tour-note {
  background: var(--wait-tint); color: var(--wait-text);
  border-radius: var(--r-ctl); padding: 10px 14px; font-size: 13px !important;
  display: flex; gap: 8px; align-items: baseline; max-width: none !important;
}
.tour-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 26px; gap: 12px;
}
.tour-count { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tour-step p.tour-estimate {
  color: var(--ok-text); font-weight: 800; font-size: 38px; line-height: 1.1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 6px 0 0;
}
.tour-step p.tour-estimate-label {
  color: var(--ok-text); font-weight: 700; font-size: 14px; margin: 0;
}
.tour-step p.tour-estimate-sub { font-size: 13px; margin-top: 2px; }
.tour-preview {
  position: relative;
  border: 1px dashed var(--chart-axis); border-radius: 12px;
  padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 6px;
  background: var(--gray-tint); max-width: 480px;
}
.preview-tag {
  position: absolute; top: -9px; right: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 1px 10px; font-size: 11px; font-weight: 700; color: var(--ink-3);
}
.preview-row {
  margin: 0; display: flex; align-items: baseline; gap: 9px;
  font-size: 13px; color: var(--ink-2);
}
.preview-dot {
  flex: 0 0 auto; width: 11px; height: 11px; border-radius: 999px;
  border: 2px solid var(--chart-axis); position: relative; top: 1px;
}
.preview-dot-on { border-color: var(--accent-deep); background: var(--accent-deep); box-shadow: inset 0 0 0 2px var(--card); }
.preview-caption { font-size: 12px !important; margin: 2px 0 0 !important; }
#tour-arrow {
  position: fixed; z-index: 40; color: var(--accent);
  font-size: 26px; transform: translateX(-50%); pointer-events: none;
}
#tour-arrow[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  #tour-arrow { animation: arrow-bob 1.1s ease-in-out infinite; }
  @keyframes arrow-bob {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 6px); }
  }
}
.topnav a.nav-attn, .topnav a.guide-attn { color: #fff !important; background: var(--accent-deep) !important; }
.guide-attn { outline: 2px solid var(--accent); outline-offset: 2px; }
.topnav a.guide-attn { outline: none; }
@media (prefers-reduced-motion: no-preference) {
  .topnav a.nav-attn, .guide-attn { animation: nav-pulse 1.6s ease-out infinite; }
  @keyframes nav-pulse {
    0% { box-shadow: 0 0 0 0 rgba(232, 100, 31, 0.45); }
    100% { box-shadow: 0 0 0 12px rgba(232, 100, 31, 0); }
  }
}

/* ---------- setup-gids ---------- */
#setup-guide[hidden] { display: none; }
.guide-balloon {
  position: absolute; z-index: 45; width: 290px;
  background: #ffffff; color: #171a21; border-radius: 12px;
  padding: 12px 14px 10px;
  box-shadow: 0 6px 16px rgba(13, 17, 28, 0.18), 0 18px 44px rgba(13, 17, 28, 0.28);
  font-size: 13px; line-height: 1.55;
}
.guide-balloon::before {
  content: ""; position: absolute; top: -6px; left: calc(var(--guide-ax, 50%) - 6px);
  width: 12px; height: 12px; background: #ffffff; transform: rotate(45deg);
  box-shadow: -3px -3px 8px rgba(13, 17, 28, 0.06);
}
.guide-balloon.side-right::before {
  top: calc(var(--guide-ay, 28px) - 6px); left: -6px;
}
.guide-balloon.side-left::before {
  top: calc(var(--guide-ay, 28px) - 6px); left: auto; right: -6px;
}
.guide-step { display: block; font-size: 11.5px; font-weight: 800; color: var(--accent-deep); margin-bottom: 3px; }
#guide-text { margin: 0 0 10px; color: #3c414d; }
.guide-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.guide-buttons { display: flex; gap: 8px; align-items: center; }
#guide-next { padding: 6px 14px; }
#guide-next[hidden], #guide-keep[hidden] { display: none; }
.guide-balloon .btn-ghost { background: #fff; color: #171a21; border-color: #d6dae2; }
.guide-dismiss {
  background: none; border: 0; color: #8a909c; font: inherit;
  font-size: 12px; cursor: pointer; padding: 2px 0;
}
.guide-dismiss:hover { color: #171a21; }

/* ---------- help & support ---------- */
.help-steps .step-note { max-width: 56ch; }
.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq:last-of-type { border-bottom: 0; }
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 13.5px;
  padding: 9px 0; list-style-position: outside;
}
.faq summary:hover { color: var(--accent-deep); }
.faq p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); max-width: 60ch; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.support-title {
  margin: 0 0 4px; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.support-title i { color: var(--accent); font-size: 17px; }
.linklike {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--accent-deep); font-weight: 700;
}
.linklike:hover { text-decoration: underline; }

/* ---------- supportchat-widget ---------- */
#support-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 48;
  width: 52px; height: 52px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent-deep); color: #fff; font-size: 25px;
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(13, 17, 28, 0.3);
  transition: transform 0.1s, background 0.15s;
}
#support-launcher:hover { background: #a03f0c; }
#support-launcher:active { transform: scale(0.96); }
#support-launcher[hidden] { display: none; }
#support-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 48;
  width: 344px; height: 480px; max-height: calc(100vh - 44px);
  background: var(--card); border-radius: var(--r-card);
  box-shadow: 0 10px 24px rgba(13, 17, 28, 0.2), 0 24px 60px rgba(13, 17, 28, 0.3);
  display: flex; flex-direction: column; overflow: hidden;
}
#support-panel[hidden] { display: none; }
.support-head {
  background: var(--navy); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
}
.support-head .support-title { color: #fff; margin: 0; font-size: 14.5px; }
.support-head .support-title i { color: var(--accent); }
#support-close {
  background: none; border: 0; color: #9aa4b8; cursor: pointer;
  font-size: 16px; padding: 4px;
}
#support-close:hover { color: #fff; }
#support-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.support-msg {
  max-width: 85%; padding: 8px 12px; border-radius: 12px;
  font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: break-word;
}
.support-msg-bot { background: var(--gray-tint); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.support-msg-user { background: var(--accent-deep); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.support-typing { color: var(--ink-3); letter-spacing: 2px; }
#support-form {
  display: flex; gap: 8px; padding: 10px;
  border-top: 1px solid var(--line);
}
#support-form input { flex: 1; }
#support-form .btn { padding: 9px 13px; }
@media (max-width: 480px) {
  #support-panel { right: 8px; bottom: 8px; left: 8px; width: auto; }
}

.earned { font-weight: 700; font-variant-numeric: tabular-nums; }
/* optimalisatiescore: hoe ver een product op weg is naar zijn beste prijs */
.kpi-sub { font-size: 15px; font-weight: 600; color: var(--ink-3); margin-left: 4px; }
.score-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; }
.score-bar {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.score-fill { display: block; height: 100%; background: var(--accent); }
.score-fill-on { background: var(--ok-text); }
.score-value {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
}
.score-caption { margin-top: 0; }

.profit-line { color: var(--ok-text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- formulieren ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.form-grid label.check { flex-direction: row; align-items: center; font-weight: 600; color: var(--ink); }
.span-2 { grid-column: 1 / -1; }
.optional { font-weight: 500; color: var(--ink-3); }
input, select, textarea {
  font: inherit; font-size: 13.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 9px 12px; background: var(--card); width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(184, 74, 16, 0.35); outline-offset: 1px;
  border-color: var(--accent-deep);
}
.hint { font-size: 12px; color: var(--ink-3); font-weight: 500; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(13, 17, 28, 0.55);
  display: grid; place-items: center; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--card); border-radius: var(--r-card);
  width: 100%; max-width: 580px; max-height: 90vh; overflow: auto;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px 0;
}
.modal-head h2 { font-size: 17px; font-weight: 800; }
.modal-close {
  border: 0; background: var(--gray-tint); color: var(--ink-2);
  width: 32px; height: 32px; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; font-size: 15px;
}
.modal-body { padding: 18px 24px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- responsief ---------- */
@media (max-width: 1080px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .page-body { flex-direction: column; }
  .filter-rail { width: 100%; position: static; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { padding: 8px 8px 30px; }
  .topnav { display: none; }
  .kpi-row { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- model playground ---------- */
.pg-layout { display: flex; gap: 22px; align-items: flex-start; }
.pg-rail {
  width: 300px; flex: 0 0 auto;
  background: var(--card); border-radius: var(--r-card);
  padding: 20px; box-shadow: var(--shadow);
}
.pg-rail label { display: block; font-size: 12.5px; font-weight: 600; margin-top: 10px; }
.pg-rail label.check { display: flex; font-size: 13px; }
.pg-rail input[type="number"], .pg-rail select {
  width: 100%; margin-top: 4px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  font: inherit; font-size: 13px; background: var(--card); color: var(--ink);
}
.pg-rail input[type="range"] { width: 100%; accent-color: var(--accent-deep); }
.pg-group { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.pg-group:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.pg-group h3 { font-size: 13px; font-weight: 700; }
.pg-hidden-tag {
  font-size: 10.5px; font-weight: 700; color: var(--sale-text);
  background: var(--sale-tint); border-radius: 999px; padding: 1px 8px; margin-left: 6px;
}
.pg-advanced summary { cursor: pointer; list-style: none; }
.pg-advanced summary h3 { display: inline; }
.pg-advanced summary::after { content: " ▸"; color: var(--ink-3); }
.pg-advanced[open] summary::after { content: " ▾"; }
.pg-comp-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.pg-comp-row input[type="number"] { flex: 1; margin-top: 0; }
.pg-comp-row .check { margin-top: 0; white-space: nowrap; }
.pg-reset-btn { width: 100%; margin-top: 16px; }
.pg-readout { font-variant-numeric: tabular-nums; color: var(--accent-deep); }

.pg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pg-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.pg-today { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pg-today-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.pg-price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pg-units-edit { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.pg-units-edit input {
  width: 76px; margin-left: 6px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: var(--r-ctl); font: inherit;
}
.pg-time { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pg-shock { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.pg-shock input { width: 120px; accent-color: var(--accent-deep); }

.pg-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; font-weight: 600; margin: 6px 0 10px; }
.pg-status { margin-bottom: 10px; }
.pg-note {
  font-size: 13px; background: var(--gray-tint); border-radius: var(--r-ctl);
  padding: 9px 12px; margin: 8px 0;
}
.pg-note-wait { background: var(--wait-tint); color: var(--wait-text); }
.pg-note-bad { background: var(--red-tint); color: var(--red-text); }
.pg-note-ok { background: var(--ok-tint); color: var(--ok-text); }
.pg-steps { margin: 10px 0; padding: 0; list-style: none; counter-reset: pgstep; }
.pg-steps li {
  counter-increment: pgstep;
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; align-items: baseline;
}
.pg-steps li::before {
  content: counter(pgstep); grid-row: span 2;
  width: 20px; height: 20px; border-radius: 999px; background: var(--accent-tint);
  color: var(--accent-text); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; align-self: center;
}
.pg-step-label { font-weight: 700; }
.pg-step-note { grid-column: 2; color: var(--ink-2); font-size: 12.5px; }
.pg-step-price { grid-column: 3; grid-row: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.pg-final { font-size: 15px; margin-top: 6px; }
.pg-kv { font-size: 13px; margin: 6px 0; }
.pg-truth { color: var(--sale-text); }
.pg-gates { list-style: none; margin: 0 0 10px; padding: 0; }
.pg-gates li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 13px; }
.pg-gate-ok i { color: var(--ok-text); }
.pg-gate-bad i { color: var(--red-text); }
.pg-profit-big { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.pg-log { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.pg-log li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px;
}
.pg-log li:first-child { border-top: 0; }
.pg-log-day { color: var(--ink-3); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-log-chip { font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.pg-week-units {
  width: 84px; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 13px;
}
@media (max-width: 1080px) {
  .pg-layout { flex-direction: column; }
  .pg-rail { width: 100%; position: static; }
  .pg-two { grid-template-columns: 1fr; }
}
.pg-profit-since { font-size: 12.5px; color: var(--ink-2); margin: 0 0 10px; }
.pg-spec-title {
  font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-3); margin: 14px 0 6px; border-top: 1px solid var(--line); padding-top: 12px;
}
.band-gap {
  background: var(--gray-tint); border-radius: var(--r-ctl);
  padding: 11px 14px; margin: 12px 0; font-size: 13px;
}
.band-gap-warn { background: var(--wait-tint); color: var(--wait-text); }
.band-gap p { margin: 0 0 4px; }
.band-gap summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.band-gap ul { margin: 4px 0 0; }
.band-gap .hint { margin-top: 6px; }
.track-line { display: flex; align-items: center; gap: 6px; color: var(--blue-text); }
.track-line i { font-size: 13px; }
.track-bad { color: var(--wait-text); }

/* concurrentband hoort visueel bij de ankerkeuze */
.anchor-sub { margin-left: 26px; }
.anchor-warning {
  margin: 4px 0 0 26px;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: var(--accent-tint, #fdf1e9);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}
.anchor-warning[hidden] { display: none; }

.gain-line { font-weight: 700; font-variant-numeric: tabular-nums; }

.countdown-line { font-style: italic; }

/* de twee bodems horen bij elkaar: hoogste wint */
.floor-group { border-top: 1px solid var(--line); padding-top: 14px; }
.floor-intro { margin: 4px 0 10px; }
.floor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .floor-fields { grid-template-columns: 1fr; } }

/* dag / week / jaar onder de vraagcurve */
.scale-switch { display: inline-flex; gap: 0; margin: 0 0 12px; }
.scale-switch button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
}
.scale-switch button + button { border-left: none; }
.scale-switch button:first-child { border-radius: 6px 0 0 6px; }
.scale-switch button:last-child { border-radius: 0 6px 6px 0; }
.scale-switch button.on { background: var(--ink-1, #1c2029); color: #fff; border-color: var(--ink-1, #1c2029); }

/* productpagina: grenzen in euro's en de gevoeligheid in gewone taal */
.limit-list { list-style: none; margin: 8px 0 0; padding: 0; }
.limit-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.limit-label { font-weight: 600; font-size: 13.5px; }
.limit-value { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.limit-why { grid-column: 1 / -1; color: var(--ink-3); font-size: 12.5px; }
.capped-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: var(--accent-tint, #fdf1e9);
  font-size: 13px;
  line-height: 1.5;
}
.sensitivity { font-size: 15px; line-height: 1.55; margin: 0 0 4px; }
