:root {
  --bg: #f5f7fa; --card: #ffffff; --text: #14202b; --muted: #55636f; --line: #dde3ea;
  --brand: #0b6bcb; --brand-ink: #ffffff; --brand-soft: #e6f0fb; --brand-text: #0a58a8;
  --good: #1d7a46; --good-soft: #e3f4ea; --warn: #8a5a00; --warn-soft: #fff3d6;
  --radius: 14px; --tap: 56px;
  font-size: 18px;
}
[data-theme="dark"] {
  --bg: #0f1720; --card: #17212c; --text: #eef2f6; --muted: #a3b0bc; --line: #2a3644;
  --brand: #4da3ff; --brand-ink: #06121f; --brand-soft: #16304d; --brand-text: #8cc4ff;
  --good: #5fd18f; --good-soft: #143424; --warn: #f2c25b; --warn-soft: #3a2e12;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5; -webkit-text-size-adjust: 100%;
}
a { color: var(--brand-text); }
img, svg { max-width: 100%; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar .wrap, .topbar .narrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.tools { display: flex; align-items: center; gap: 8px; }
.chip, select.chip {
  min-height: 42px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; white-space: nowrap;
}
.chip .lbl { margin-left: 4px; }
@media (max-width: 420px) { .chip .lbl { display: none; } .brand { font-size: 1rem; } select.chip { padding: 0 8px; max-width: 120px; } }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: var(--tap); padding: 12px 18px; border-radius: var(--radius);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink);
}
.btn.ghost { background: transparent; color: var(--brand-text); }
.btn.plain { background: var(--card); color: var(--text); border-color: var(--line); }
.btn:focus-visible, .opt:focus-visible, .chip:focus-visible, input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.btn-row { display: grid; gap: 10px; }

/* Landing */
.hero { padding: 42px 0 26px; }
.hero h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 12px; }
.hero p { color: var(--muted); font-size: 1.05rem; margin: 0 0 22px; }
.hero .btn-row { max-width: 420px; }
.grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hero h1 { font-size: 2.6rem; } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.tile .ico { font-size: 1.6rem; }
.tile b { display: block; margin: 6px 0 2px; }
.tile span { color: var(--muted); font-size: .9rem; }
.section { padding: 26px 0; }
.section h2 { font-size: 1.4rem; margin: 0 0 12px; }
.list { margin: 0; padding-left: 1.2em; }
.list li { margin: 6px 0; }
.note { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius); padding: 14px 16px; font-size: .95rem; }
.install-card { display: flex; gap: 16px; align-items: center; background: var(--brand-soft); border-radius: var(--radius); padding: 18px; }
.install-card img { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.install-card h3 { margin: 0 0 4px; }
.install-card p { margin: 0 0 12px; color: var(--muted); }
.msg { margin-top: 10px; font-size: .95rem; color: var(--brand-text); }
footer { padding: 26px 0 40px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); margin-top: 20px; }

/* App */
.app { padding-top: 18px; padding-bottom: 40px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 4px 0 6px; }
.progress > i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.step-label { color: var(--muted); font-size: .85rem; }
.q { font-size: 1.45rem; line-height: 1.3; margin: 14px 0 6px; }
.help { color: var(--muted); margin: 0 0 16px; }
.big-input {
  width: 100%; min-height: 64px; font: inherit; font-size: 1.6rem; text-align: center; letter-spacing: .05em;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); padding: 8px 12px;
}
.big-input:focus { border-color: var(--brand); outline: none; }
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--muted); }
.err { color: #c62828; font-size: .95rem; min-height: 1.4em; margin: 8px 0; }
[data-theme="dark"] .err { color: #ff8a80; }
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt {
  min-height: var(--tap); padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.opt.center { text-align: center; font-size: 1.4rem; font-weight: 600; }
.opt small { display: block; color: var(--muted); font-size: .85rem; }
.opt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.age-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.age-row label { flex: 1; font-weight: 600; }
.age-row input { width: 110px; min-height: 56px; font: inherit; font-size: 1.3rem; text-align: center; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); }
.nav-row { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 18px; }
.speak { background: none; border: 0; color: var(--brand-text); font: inherit; font-size: .9rem; cursor: pointer; padding: 6px 0; }

.banner { border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; font-size: .95rem; }
.banner.good { background: var(--good-soft); color: var(--good); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.info { background: var(--brand-soft); color: var(--brand-text); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--line); border-radius: var(--radius); padding: 4px; gap: 4px; margin: 12px 0; }
.seg button { min-height: 48px; border: 0; border-radius: 11px; font: inherit; font-weight: 600; background: transparent; color: var(--text); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--brand-text); }

.plan { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.plan.top { border-color: var(--brand); }
.plan.picked { border-color: var(--good); }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-text); }
.tag.lowest { background: var(--good-soft); color: var(--good); }
.tag.care { background: var(--warn-soft); color: var(--warn); }
.price { font-size: 2rem; font-weight: 800; margin: 8px 0 0; }
.price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan h3 { margin: 4px 0 0; font-size: 1.05rem; }
.plan .co { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 14px; }
.facts div { background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: .85rem; color: var(--muted); }
.facts b { display: block; color: var(--text); font-size: 1rem; }
.yearly { font-size: .9rem; color: var(--muted); margin: 0 0 12px; }
.row-plan { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; cursor: pointer; width: 100%; font: inherit; color: var(--text); text-align: left; }
.row-plan b { font-size: 1.1rem; white-space: nowrap; }
.row-plan span { font-size: .9rem; }
.row-plan small { display: block; color: var(--muted); }
.row-plan[aria-pressed="true"] { border: 2px solid var(--good); }

.sheet { background: var(--card); border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0 16px; }
.sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.sheet dt { color: var(--muted); }
.sheet dd { margin: 0; font-weight: 600; }
.spinner { width: 48px; height: 48px; border: 5px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 50px auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; }
[hidden] { display: none !important; }

@media print {
  .topbar, .no-print, footer { display: none !important; }
  body { background: #fff; color: #000; }
  .sheet { border-color: #000; }
}
