/* DoubleTaxation — текстовий інтерфейс без зображень. Розміри в rem: масштабується разом із налаштуваннями тексту. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #15171c;
  --muted: #545b67;
  --line: #dcd9d1;
  --accent: #1c47c4;
  --accent-ink: #ffffff;
  --accent-soft: #e8eefc;
  --ok: #136332;
  --ok-bg: #e2f3e8;
  --warn: #7a4f00;
  --warn-bg: #fbefd5;
  --bad: #9b2218;
  --bad-bg: #fbe4e1;
  --focus: #1c47c4;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --surface: #191c22;
    --surface-2: #20242b;
    --ink: #eef0f3;
    --muted: #a3abb7;
    --line: #2f343d;
    --accent: #8aaaff;
    --accent-ink: #0b0f1e;
    --accent-soft: #1d2640;
    --ok: #86d9a2;
    --ok-bg: #15301e;
    --warn: #f2c875;
    --warn-bg: #33280f;
    --bad: #ffa398;
    --bad-bg: #3a1a17;
    --focus: #8aaaff;
    color-scheme: dark;
  }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--ink); --line: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 100%; }
html[data-text="l"] { font-size: 115%; }
html[data-text="xl"] { font-size: 130%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.0625rem/1.6 var(--font); }
a { color: var(--accent); text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; z-index: 10; font-weight: 600; }
.skip:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }

/* Шапка */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 3.75rem; }
.brand { font-weight: 750; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand .dot { color: var(--accent); }
.tag { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; }
.top .spacer { flex: 1; }
.textsize { font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 10px; min-height: 44px; min-width: 44px; padding: 0 10px; cursor: pointer; }

main { padding: 24px 0 48px; min-height: 60vh; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; padding: 20px 0 36px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.foot a { color: var(--ink); }
.foot p { margin: 4px 0; }

/* Типографіка */
h1 { font-size: clamp(1.75rem, 6vw, 2.4rem); line-height: 1.15; letter-spacing: -0.025em; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.5rem 0 0.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.4rem; }
p { margin: 0.6rem 0; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.5rem; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0; }

/* Лендинг */
.hero { padding: 1.5rem 0 0.5rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.note { color: var(--muted); font-size: 0.9375rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 1.75rem; }
.ticks li::before { content: "✓"; position: absolute; left: 0.2rem; color: var(--accent); font-weight: 800; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: st; }
.steps li { counter-increment: st; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 16px 4rem; position: relative; }
.steps li::before { content: counter(st); position: absolute; left: 16px; top: 16px; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; }
.steps b { display: block; }
.steps span { color: var(--muted); }
.panel { background: var(--surface-2); border-radius: var(--radius); padding: 18px; }

/* Картки й форми */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
label.field { display: block; margin: 18px 0 6px; font-weight: 650; }
label.field:first-child { margin-top: 0; }
select, input[type="number"], input[type="text"], input[type="url"], input[type="date"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
textarea { min-height: 6rem; resize: vertical; line-height: 1.5; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  font: inherit; font-weight: 650; border-radius: 12px; min-height: 52px; padding: 0 22px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 0.9375rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.error { color: var(--bad); font-weight: 600; }

/* Питання */
.progress { font-size: 0.875rem; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.bar { height: 4px; background: var(--line); border-radius: 4px; margin: 8px 0 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend.q { padding: 0; }
.q { font-size: 1.45rem; line-height: 1.3; font-weight: 700; margin: 0.75rem 0 0.5rem; letter-spacing: -0.01em; }
.hint { color: var(--muted); font-size: 0.9375rem; margin: 0; }
.options { display: grid; gap: 10px; margin-top: 18px; }
.option {
  text-align: left; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-height: 56px; cursor: pointer;
}
.option:hover { border-color: var(--accent); background: var(--accent-soft); }
.back { background: none; border: none; color: var(--muted); font: inherit; min-height: 44px; padding: 0 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }

/* Результат */
.badge { display: inline-block; font-size: 0.8125rem; font-weight: 750; padding: 3px 10px; border-radius: 99px; }
.badge.determined { background: var(--ok-bg); color: var(--ok); }
.badge.probable { background: var(--warn-bg); color: var(--warn); }
.badge.disputed { background: var(--bad-bg); color: var(--bad); }
.result-head { font-size: 1.65rem; line-height: 1.25; font-weight: 750; margin: 0.5rem 0 0.5rem; letter-spacing: -0.015em; }
.notice { border-left: 4px solid var(--warn); background: var(--warn-bg); padding: 12px 14px; border-radius: 8px; font-size: 0.9375rem; margin: 14px 0; }
.disclaimer { border-left: 4px solid var(--line); padding: 4px 14px; color: var(--muted); font-size: 0.9375rem; }
ul.clean { padding-left: 1.25rem; margin: 8px 0; }
ul.clean li { margin: 6px 0; }
.trail { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.trail li { counter-increment: s; position: relative; padding: 0 0 14px 34px; border-left: 1px solid var(--line); margin-left: 11px; }
.trail li:last-child { border-left-color: transparent; }
.trail li::before { content: counter(s); position: absolute; left: -12px; top: 0; width: 23px; height: 23px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 0.75rem; display: grid; place-items: center; color: var(--muted); }
.norm { font-size: 0.875rem; color: var(--muted); margin-top: 4px; }
.norm b { color: var(--ink); font-weight: 650; }
details { border-top: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 650; min-height: 32px; }
.faq details p { color: var(--muted); }
.partner { display: block; text-decoration: none; color: var(--ink); }
.partner .name { font-weight: 750; }
.partner .price { color: var(--muted); font-size: 0.9375rem; }
.ad { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }

/* Юридичні сторінки */
.doc h2 { margin-top: 1.75rem; }
