/* Mobile-first: base styles are for phones (ads run on mobile only); desktop is an enhancement. */
:root {
  --bg: #ffffff;
  --band: #f3f6fa;
  --ink: #13202d;
  --muted: #5a6776;
  --line: #dfe5ec;
  --brand: #1557d6;
  --brand-dark: #0f44a8;
  --ok: #157a3a;
  --warn: #b0500a;
  --radius: 16px;
  --tap: 54px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h1 { font-size: 29px; line-height: 1.13; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 24px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
a { color: var(--brand); }

/* header */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top .row { min-height: 52px; }
.logo { font-weight: 750; font-size: 16px; }
.logo-mark { color: var(--brand); }
.price-pill { font-size: 14px; font-weight: 700; color: var(--brand); background: #e9f0fe; border-radius: 999px; padding: 4px 10px; }

/* buttons: big thumb targets */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: var(--tap); padding: 12px 18px;
  background: var(--brand); color: #fff; border: 2px solid var(--brand); border-radius: 14px;
  font: 650 18px/1.2 inherit; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--brand); }
.btn-ghost:active { background: #eef3fe; }
.btn-big { min-height: 58px; font-size: 19px; }
.stack { display: grid; gap: 10px; }
.link { display: block; margin: 8px auto 0; background: none; border: 0; color: var(--brand); text-decoration: underline; font: inherit; font-size: 15px; padding: 8px; cursor: pointer; }

/* hero */
.hero { padding: 18px 0 24px; background: linear-gradient(180deg, #edf3ff 0%, #fff 100%); }
.hero-grid { display: grid; gap: 14px; }
.hero-grid > * { min-width: 0; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 26px; margin: 5px 0; font-weight: 600; font-size: 16px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

/* tool */
.tool { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 8px 24px rgba(19, 32, 45, 0.08); scroll-margin-top: 12px; }
.tool > div[class^="state-"] { display: none; }
.tool.is-start .state-start, .tool.is-busy .state-busy, .tool.is-done .state-done, .tool.is-error .state-error { display: grid; gap: 10px; }
.hint { font-size: 14px; color: var(--muted); text-align: center; margin: 2px 0 0; }
.state-busy { text-align: center; padding: 30px 0; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin: 0 auto; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: var(--warn); font-weight: 600; text-align: center; }

.result { display: grid; gap: 12px; }
.preview { max-width: 64%; margin: 0 auto; }
.checks .more { display: block; color: var(--muted); }
.checks .more summary { cursor: pointer; color: var(--ok); font-weight: 600; padding: 4px 0; }
.checks .more ul { list-style: none; padding: 6px 0 0; margin: 0; }
@media (min-width: 900px) { .result { grid-template-columns: 45% 1fr; align-items: start; } .preview { max-width: none; } }
.preview { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 6px; }
.summary { font-weight: 750; font-size: 16px; text-align: left; margin: 0 0 6px; line-height: 1.3; }
.summary.ok { color: var(--ok); }
.summary.warn { color: var(--warn); }
.checks { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1.35; }
.checks li { display: flex; gap: 6px; margin: 0 0 6px; }
.checks li span { font-weight: 800; width: 12px; flex: none; }
.checks li.ok { color: var(--muted); }
.checks li.ok span { color: var(--ok); }
.checks li.warn { color: var(--warn); font-weight: 600; }

/* sections */
.sec { padding: 36px 0; }
.band { background: var(--band); }
.steps, .tips { list-style: none; padding: 0; margin: 0; counter-reset: n; display: grid; gap: 10px; }
.steps li, .tips li { counter-increment: n; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 14px 58px; }
.steps li::before, .tips li::before { content: counter(n); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 750; font-size: 15px; }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 15px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px 11px 38px; font-size: 16px; }
.checklist li::before { content: "✓"; position: absolute; left: 13px; color: var(--ok); font-weight: 800; }

/* comparison as cards (no sideways scrolling on phones) */
.cmp { display: grid; gap: 10px; }
.cmp-row { display: grid; grid-template-columns: 1fr 1fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 14px; }
.cmp-label { grid-column: 1 / -1; padding: 9px 12px; font-weight: 700; background: var(--band); border-bottom: 1px solid var(--line); }
.cmp-them, .cmp-us { padding: 9px 10px; line-height: 1.3; }
.cmp-them { color: var(--muted); border-right: 1px solid var(--line); }
.cmp-us { background: #eaf1ff; font-weight: 700; color: var(--ink); }
.cmp-row span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.cmp-us span { color: var(--brand); }

.cards { display: grid; gap: 10px; margin-top: 16px; }
.card { background: var(--band); border-radius: 14px; padding: 16px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.faq summary { font-weight: 650; cursor: pointer; padding: 14px 16px; min-height: 50px; list-style-position: inside; }
.faq p { color: var(--muted); padding: 0 16px 14px; margin: 0; font-size: 16px; }

.final { text-align: center; }
.final .btn { max-width: 420px; margin: 0 auto; }
.foot { border-top: 1px solid var(--line); padding: 20px 0 96px; font-size: 13px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 14px; }
.foot a { color: var(--muted); padding: 6px 0; }

/* sticky CTA for phones */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px;
  background: var(--brand); color: #fff; border-radius: 14px; font-weight: 700; font-size: 18px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(21, 87, 214, 0.35);
  transform: translateY(150%); transition: transform .2s ease;
}
.sticky-cta.show { transform: none; }

/* desktop enhancement */
@media (min-width: 900px) {
  h1 { font-size: 44px; }
  h2 { font-size: 30px; }
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .checklist { grid-template-columns: 1fr 1fr; }
  .tips { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cmp-row { grid-template-columns: 160px 1fr 1fr 1fr; }
  .cmp-label { grid-column: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .sticky-cta { display: none; }
  .foot { padding-bottom: 24px; }
  .sec { padding: 56px 0; }
}

/* legal pages */
.legal { padding-top: 20px; padding-bottom: 32px; max-width: 720px; }
.legal h1 { font-size: 28px; }
.legal h2 { font-size: 19px; margin: 24px 0 8px; }
.legal p { color: #2b3846; font-size: 16px; }
.legal .updated { color: var(--muted); font-size: 14px; }
.legal .btn { margin-top: 28px; }
a.logo { color: var(--ink); text-decoration: none; }
