/* ---------- tokens ---------- */
:root {
  --page: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --ink: #0e1116;
  --ink-2: #4b5563;
  --muted: #8b93a1;
  --hairline: #e6e8ee;
  --border: rgba(14, 17, 22, 0.10);
  --accent: #2a78d6;
  --accent-2: #1baf7a;
  --accent-weak: #e3eefc;
  --good: #0ca30c;
  --good-text: #067d06;
  --danger: #d03b3b;
  --grad: linear-gradient(135deg, #2a78d6 0%, #1baf7a 100%);
  --ring: rgba(42, 120, 214, 0.22);
  --glow-a: rgba(42, 120, 214, 0.12);
  --glow-b: rgba(27, 175, 122, 0.10);
  --head-bg: rgba(255, 255, 255, 0.78);
  --card-shadow: 0 1px 2px rgba(14, 17, 22, 0.04), 0 10px 30px rgba(14, 17, 22, 0.06);
  --card-shadow-hover: 0 2px 4px rgba(14, 17, 22, 0.05), 0 16px 40px rgba(14, 17, 22, 0.10);
  --c-contrib: #eda100;
  --c-tax: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b0d10;
    --surface: #15181d;
    --surface-2: #1c2027;
    --ink: #f4f6f8;
    --ink-2: #b9c0cc;
    --muted: #7e8694;
    --hairline: #262b33;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #4c93ea;
    --accent-2: #22c58b;
    --accent-weak: #14283f;
    --good: #22c55e;
    --good-text: #34d399;
    --danger: #ef6a6a;
    --grad: linear-gradient(135deg, #4c93ea 0%, #22c58b 100%);
    --ring: rgba(76, 147, 234, 0.30);
    --glow-a: rgba(76, 147, 234, 0.20);
    --glow-b: rgba(34, 197, 139, 0.13);
    --head-bg: rgba(11, 13, 16, 0.72);
    --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 34px rgba(0, 0, 0, 0.45);
    --card-shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 44px rgba(0, 0, 0, 0.55);
    --c-contrib: #d99b1a;
    --c-tax: #ef6a6a;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(760px 480px at 10% -120px, var(--glow-a), transparent 70%),
    radial-gradient(640px 440px at 92% -140px, var(--glow-b), transparent 70%),
    var(--page);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 0 22px; }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.025em; font-weight: 800; }
h1 .grad, .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: 20px; margin: 0 0 16px; font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}
button { -webkit-tap-highlight-color: transparent; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--head-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.head-row { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  font-size: 18px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-weak), transparent);
  border: 1px solid var(--border);
}

/* ---------- hero ---------- */
.hero { padding: 52px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.hero-copy { max-width: 580px; }
.hero-art { flex: 0 0 auto; width: 224px; filter: drop-shadow(0 12px 30px var(--glow-a)); }
.hero-art svg { display: block; width: 100%; height: auto; }
.ha-gs { stop-color: var(--accent); }
.ha-track { stroke: var(--accent-weak); }
.ha-arc { stroke: var(--accent); }
.ha-coin-big { fill: var(--accent-weak); stroke: var(--accent); }
.ha-coin-inner { stroke: var(--accent); opacity: 0.45; }
.ha-coin-eur { fill: var(--accent); font-family: "Inter", system-ui, sans-serif; }
.ha-badge { fill: var(--good); }
.ha-badge-check { stroke: #fff; }
.ha-coin { fill: var(--accent-weak); stroke: var(--accent); }
.sub { color: var(--ink-2); font-size: 18px; max-width: 640px; margin: 0 0 18px; }
.badge-privacy {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--accent);
  background: var(--accent-weak);
  border: 1px solid transparent;
  border-radius: 999px; padding: 7px 15px; margin: 0 0 8px;
}

/* ---------- tabs (segmented control) ---------- */
.tabs {
  display: flex; gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 12px; padding: 4px;
  width: max-content; max-width: 100%;
  margin: 0 0 20px;
}
.tab {
  border: 0; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  padding: 9px 18px; border-radius: 9px;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.tab:hover { color: var(--ink); }
.tab.active {
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 14px var(--ring);
}
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.tiles-4 { grid-template-columns: repeat(4, 1fr); }
.tile {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 16px; padding: 16px 18px;
  box-shadow: var(--card-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.tile-ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px;
  background: var(--accent-weak);
  margin-bottom: 10px;
}
.tile-hero { background: linear-gradient(180deg, rgba(12, 163, 12, 0.08), transparent 60%), var(--surface); }
.tile-hero .tile-ico { background: rgba(12, 163, 12, 0.14); }
.tile-label { font-size: 13px; color: var(--ink-2); margin-bottom: 3px; font-weight: 600; }
.tile-value { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.tile-value.is-good { color: var(--good-text); }
.tile-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 18px; padding: 24px; margin: 0 0 22px;
  box-shadow: var(--card-shadow);
}

/* ---------- form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 1fr 1.1fr;
  gap: 14px; align-items: end;
}
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; min-width: 0; }
.form-grid label em { font-weight: 400; font-style: normal; color: var(--muted); }
input, select {
  font: inherit; color: var(--ink); background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: 11px; padding: 11px 13px;
  min-width: 0; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.form-error { color: var(--danger); font-size: 14px; margin: 10px 0 0; }
.empty { color: var(--muted); margin: 18px 0 4px; }
.disab-block { margin-top: 16px; }
.opts-row { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 16px; }
.check-row {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--ink-2); font-weight: 600;
  cursor: pointer; width: max-content; max-width: 100%;
}
.check-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex: 0 0 auto; }
.disab-pct {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 10px; font-size: 13px; color: var(--ink-2); font-weight: 600;
}
.disab-pct[hidden] { display: none; }
.disab-pct select { width: auto; min-width: 300px; max-width: 100%; }
.disab-pct em { font-weight: 400; font-style: normal; color: var(--muted); }

.delta-band {
  margin: 4px 0 16px; padding: 13px 17px; border-radius: 13px;
  background: linear-gradient(135deg, rgba(12, 163, 12, 0.13), rgba(27, 175, 122, 0.07));
  border: 1px solid rgba(12, 163, 12, 0.28);
  color: var(--good-text); font-size: 14.5px; font-weight: 600;
}
.share-row { margin-top: 16px; }

/* ---------- breakdown bar ---------- */
.break { margin: 8px 0 16px; }
.break-title { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-bottom: 8px; }
.bar {
  display: flex; gap: 2px; height: 22px; border-radius: 8px; overflow: hidden;
  background: var(--surface-2);
}
.bar-seg { display: block; height: 100%; min-width: 0; transition: width 0.35s ease; }
.seg-net { background: var(--accent); border-radius: 6px 0 0 6px; }
.seg-contrib { background: var(--c-contrib); }
.seg-tax { background: var(--c-tax); border-radius: 0 6px 6px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.leg b { color: var(--ink); font-weight: 700; margin-left: 4px; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 4px; margin-right: 7px; vertical-align: -1px; }
.dot-net { background: var(--accent); }
.dot-contrib { background: var(--c-contrib); }
.dot-tax { background: var(--c-tax); }

.note { font-size: 13.5px; color: var(--ink-2); margin: 8px 0 0; }

/* ---------- details table ---------- */
.details-block { margin-top: 16px; border-top: 1px solid var(--hairline); padding-top: 14px; }
.details-block summary { cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--ink-2); list-style: none; }
.details-block summary::-webkit-details-marker { display: none; }
.details-block summary::before { content: "▸ "; color: var(--accent); }
.details-block[open] summary::before { content: "▾ "; }
.details-block summary:hover { color: var(--accent); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.kv { margin-top: 12px; }
.kv td { padding: 9px 12px; border-bottom: 1px solid var(--hairline); }
.kv tr:last-child td { border-bottom: 0; }
.kv tr:hover td { background: var(--surface-2); }
.kv td:last-child { text-align: right; white-space: nowrap; }
.row-strong td { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }

/* scale table in FAQ */
.scale th, .scale td { padding: 8px 11px; border-bottom: 1px solid var(--hairline); text-align: right; white-space: nowrap; }
.scale th:first-child, .scale td:first-child { text-align: left; }
.scale th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.scale tr:hover td { background: var(--surface-2); }

/* ---------- FAQ ---------- */
.faq { margin: 40px 0 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 15px 19px; margin-bottom: 10px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.15s ease;
}
.faq details:hover { border-color: var(--accent); }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent);
  font-weight: 700; font-size: 15px;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "–"; transform: rotate(180deg); }
.faq p { color: var(--ink-2); font-size: 15px; margin: 12px 0 2px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--hairline); margin-top: 48px; padding: 26px 0 34px; }
.foot-note { color: var(--muted); font-size: 13px; max-width: 640px; }
.foot-meta { color: var(--muted); font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .tiles-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 30px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-art { width: 158px; align-self: center; }
}
@media (max-width: 470px) {
  .tiles-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
