:root {
  --paper: #f5f3ec;
  --surface: #ffffff;
  --ink: #0e1020;
  --ink-2: #454a60;
  --muted: #6b6f82;
  --line: rgb(14 16 32 / 0.1);
  --blue: #2340f5;
  --blue-deep: #1629b3;
  --on-blue: #ffffff;
  --on-blue-muted: rgb(255 255 255 / 0.72);
  --lemon: #ffd43b;
  --on-lemon: #0e1020;
  --green: #0f9d58;
  --green-bg: rgb(15 157 88 / 0.12);
  --red: #e5383b;
  --field: #ffffff;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c0e1a;
    --surface: #161a2c;
    --ink: #f2f1ec;
    --ink-2: #c3c5d2;
    --muted: #9a9db0;
    --line: rgb(255 255 255 / 0.1);
    --blue: #3551ff;
    --blue-deep: #1b2cc2;
    --green: #34c77b;
    --green-bg: rgb(52 199 123 / 0.14);
    --field: #0f1222;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
b, strong { font-weight: 600; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 32px; } }
.narrow { max-width: 820px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.15rem; line-height: 1.25; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 36em; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.xs { font-size: 13px; }

/* Кнопки — «пігулки» */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: 600 16px/1 var(--font-body); text-decoration: none; border: 0; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-lemon { background: var(--lemon); color: var(--on-lemon); }
.btn-lemon:hover { box-shadow: 0 8px 24px -8px rgb(255 212 59 / 0.7); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--lemon); outline-offset: 2px; }

/* Шапка */
.header { position: sticky; top: 0; z-index: 20; background: var(--blue); color: var(--on-blue); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--lemon); color: var(--on-lemon); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; opacity: .85; white-space: nowrap; }
.nav a:hover { opacity: 1; }
.nav .btn { opacity: 1; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } .nav { gap: 12px; } }

/* Hero */
.hero { background: var(--blue); color: var(--on-blue); padding: 40px 0 0; overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 720px; height: 720px; right: -200px; top: -160px; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 255 255 / 0.16), transparent); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: end; position: relative; }
.hero-copy { padding-bottom: 72px; }
.hero .lead { color: var(--on-blue-muted); margin-top: 24px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 20px; font-size: 14.5px; color: var(--on-blue-muted); }
.hero-note b { color: var(--on-blue); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; background: rgb(255 255 255 / 0.12); border-radius: 999px; padding: 6px 14px 6px 8px; margin-bottom: 24px; }
.kicker .flag { width: 22px; height: 16px; border-radius: 4px; background: linear-gradient(#2d6cff 50%, var(--lemon) 50%); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-copy { padding-bottom: 24px; }
}

/* Телефон */
.phone { width: min(340px, 100%); margin: 0 auto; background: #0b0c14; border-radius: 48px 48px 0 0; padding: 12px 12px 0; box-shadow: 0 -2px 0 1px rgb(255 255 255 / 0.12) inset, 0 30px 80px -20px rgb(0 0 0 / 0.5); }
.screen { background: #f6f5f0; color: #0e1020; border-radius: 38px 38px 0 0; padding: 14px 18px 22px; min-height: 520px; font-size: 14px; }
.status { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; padding: 2px 8px 14px; }
.status .notch { width: 90px; height: 24px; background: #0b0c14; border-radius: 999px; margin-top: -4px; }
.app-hello { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; margin: 4px 0 14px; }
.due { background: var(--blue); color: #fff; border-radius: 22px; padding: 16px 18px; }
.due .xs { color: rgb(255 255 255 / 0.75); }
.due-sum { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; margin: 2px 0 12px; font-variant-numeric: tabular-nums; }
.due-rows { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; border-top: 1px solid rgb(255 255 255 / 0.2); padding-top: 10px; }
.due-rows span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.due-cta { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; background: var(--lemon); color: #0e1020; border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: 13px; }
.inv-title { display: flex; justify-content: space-between; align-items: center; margin: 18px 2px 8px; font-weight: 600; }
.inv-title span:last-child { font-size: 12px; color: var(--blue); }
.inv { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 18px; }
.inv li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 11px 12px; }
.inv li + li { border-top: 1px solid rgb(14 16 32 / 0.07); }
.inv .av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: #eceaf9; color: var(--blue); }
.inv b { display: block; font-size: 13.5px; font-weight: 600; }
.inv small { color: #6b6f82; font-size: 11.5px; }
.inv .r { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; }
.inv .st { display: block; font-size: 10.5px; font-weight: 600; margin-top: 2px; color: #0f9d58; }
.inv .st.draft { color: #6b6f82; }

/* Смуга з відліком */
.countdown { background: var(--lemon); color: var(--on-lemon); }
.countdown .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 18px; font-weight: 500; }
.countdown .days { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.03em; margin-right: 10px; font-variant-numeric: tabular-nums; }
.countdown a { font-weight: 600; }

/* Секції */
section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }
.section-head { margin-bottom: 44px; max-width: 760px; }
.section-head p { margin: 16px 0 0; }
.eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }

/* Болі */
.pains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .pains { grid-template-columns: 1fr; } }
.pain { background: var(--surface); border-radius: var(--r-lg); padding: 28px; border: 1px solid var(--line); }
.pain .q { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.015em; }
.pain p { margin: 14px 0 0; color: var(--muted); font-size: 15.5px; }
.pain .fix { display: block; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--ink); font-weight: 500; font-size: 15.5px; }
.pain .fix::before { content: "→ "; color: var(--blue); font-weight: 700; }

/* Кроки */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 28px; } }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 20px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-display); font-weight: 600; font-size: 3rem; line-height: 1; color: var(--blue); margin-bottom: 18px; letter-spacing: -0.04em; }
.steps p { margin: 10px 0 0; color: var(--muted); font-size: 15.5px; }

/* Порівняння */
.compare-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); -webkit-overflow-scrolling: touch; }
.compare { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 15.5px; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-size: 14px; font-weight: 600; color: var(--muted); }
.compare thead th.us { color: var(--blue); }
.compare td.us { background: rgb(35 64 245 / 0.06); font-weight: 600; }
.compare thead th.us { background: rgb(35 64 245 / 0.06); }
.compare tbody th { font-weight: 500; color: var(--ink-2); width: 26%; }
.yes { color: var(--green); font-weight: 600; }
.no { color: var(--red); font-weight: 600; }

/* Міні-калькулятор */
.mini { background: var(--ink); color: var(--paper); border-radius: 32px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 860px) { .mini { grid-template-columns: 1fr; } }
.mini h2 { color: var(--paper); }
.mini .muted { color: rgb(245 243 236 / 0.65); }
.mini-card { background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.1); border-radius: var(--r-lg); padding: 24px; }
.mini-card label { font-size: 14px; font-weight: 500; color: rgb(245 243 236 / 0.8); }
.mini-input { position: relative; margin-top: 8px; }
.mini-input input { width: 100%; height: 64px; border-radius: var(--r-md); border: 0; background: var(--paper); color: #0e1020; font: 600 26px/1 var(--font-display); padding: 0 64px 0 20px; letter-spacing: -0.02em; }
.mini-input span { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: #6b6f82; font-weight: 600; }
.mini-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.mini-out div { background: rgb(255 255 255 / 0.06); border-radius: var(--r-md); padding: 14px 16px; }
.mini-out small { display: block; font-size: 12.5px; color: rgb(245 243 236 / 0.6); }
.mini-out strong { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini-out .hl { background: var(--lemon); color: #0e1020; }
.mini-out .hl small { color: rgb(14 16 32 / 0.65); }

/* Ціна */
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: clamp(28px, 5vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
@media (max-width: 860px) { .price-card { grid-template-columns: 1fr; } }
.price { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 7vw, 4.5rem); letter-spacing: -0.04em; line-height: 1; margin: 18px 0 6px; }
.price small { font-family: var(--font-body); font-size: 17px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.old { text-decoration: line-through; color: var(--muted); }
.tag { display: inline-block; background: var(--lemon); color: var(--on-lemon); font-size: 13px; font-weight: 700; border-radius: 999px; padding: 5px 12px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 16px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.checklist li::before { content: "✓"; width: 24px; height: 24px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: grid; place-items: center; font-size: 13px; font-weight: 700; }

/* Форма */
.signup { background: var(--blue); color: var(--on-blue); }
.signup .eyebrow { color: var(--lemon); }
.signup .muted { color: var(--on-blue-muted); }
.form { display: grid; gap: 18px; }
.form-card { background: var(--surface); color: var(--ink); border-radius: 28px; padding: clamp(22px, 4vw, 40px); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.45); }
.field { display: grid; gap: 8px; }
.field label, .legend { font-size: 14.5px; font-weight: 600; }
.input, select.input { width: 100%; height: 52px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--field); color: var(--ink); font: inherit; font-size: 16px; }
.input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px rgb(35 64 245 / 0.15); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
select.input option { background: var(--surface); color: var(--ink); }
.row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 15px; font-weight: 500; transition: background .15s, border-color .15s; }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--lemon); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; cursor: pointer; color: var(--ink-2); }
.check input { margin-top: 2px; width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: 15px; font-weight: 500; min-height: 1.2em; margin: 0; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: var(--red); }
.signup-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .signup-grid { grid-template-columns: 1fr; gap: 32px; } }
.perks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.perks li { display: flex; gap: 12px; align-items: baseline; }
.perks li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--lemon); transform: translateY(-1px); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 22px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 500; font-size: 20px; }
details[open] summary::after { content: "−"; background: var(--ink); color: var(--paper); border-color: var(--ink); }
details p { margin: 12px 0 0; color: var(--ink-2); max-width: 44em; }

/* Калькулятор (окрема сторінка) */
.page-hero { background: var(--blue); color: var(--on-blue); padding: 56px 0 120px; }
.page-hero .lead { color: var(--on-blue-muted); margin-top: 18px; }
.page-hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.25rem); }
.calc-section { margin-top: -84px; padding-top: 0; }
.calc-layout { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .calc-layout { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card h3 + p { margin: 8px 0 0; color: var(--muted); font-size: 15.5px; }
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 680px) { .results { grid-template-columns: 1fr; } }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; position: relative; }
.result.best { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.result.best dt, .result.best .xs { color: rgb(245 243 236 / 0.65); }
.result .tag { position: absolute; top: -12px; left: 18px; }
.result h3 { font-size: 15px; font-family: var(--font-body); font-weight: 600; }
.result .net { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.03em; margin: 12px 0 2px; font-variant-numeric: tabular-nums; }
.result dl { margin: 16px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 14.5px; }
.result dt { color: var(--muted); }
.result dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 22px; font-size: 14px; color: var(--ink-2); margin-top: 14px; }
.note ul { margin: 8px 0; padding-left: 18px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--paper); border-radius: 999px; padding: 4px; gap: 4px; }
.seg label { text-align: center; font-size: 13.5px; font-weight: 500; padding: 9px 4px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--ink); color: var(--paper); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--lemon); }
.cta-band { background: var(--lemon); color: var(--on-lemon); border-radius: var(--r-lg); padding: 22px 24px; margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.cta-band p { margin: 4px 0 0; font-size: 15px; }

/* Футер */
.footer { background: var(--ink); color: rgb(245 243 236 / 0.7); padding: 40px 0; font-size: 14px; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer .logo { color: var(--paper); }
@media (max-width: 400px) { .logo { font-size: 15px; } .logo-mark { width: 30px; height: 30px; font-size: 11px; } }
@media (max-width: 420px) {
  .seg { grid-auto-flow: row; border-radius: var(--r-md); }
  .seg label { border-radius: var(--r-sm); }
}
[hidden] { display: none !important; }
