:root {
  --navy: #073b4c;
  --navy-2: #0b5263;
  --green: #348a77;
  --green-soft: #e7f3ef;
  --cream: #f7f5ef;
  --paper: #ffffff;
  --ink: #132f37;
  --muted: #6d7d82;
  --line: #dbe4e5;
  --warn: #a85e22;
  --warn-soft: #fff1df;
  --danger: #a53b45;
  --danger-soft: #fdecef;
  --success: #1f735e;
  --shadow: 0 22px 70px rgba(7, 59, 76, .17);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(52,138,119,.12), transparent 32rem),
    linear-gradient(135deg, #f9f8f3, #eef4f2);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.page-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 420px) 1fr; }
.desktop-rail { padding: 54px 50px; background: var(--navy); color: white; display: flex; flex-direction: column; }
.rail-logo { width: 200px; max-width: 100%; display: block; background: white; border-radius: 14px; padding: 10px 14px; margin-bottom: 42px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; color: #90cbbb; margin: 0 0 8px; }
.desktop-rail h1 { font-size: clamp(30px, 3vw, 46px); line-height: 1.04; margin: 0 0 14px; }
.muted { color: var(--muted); }
.desktop-rail .muted { color: #c9d8dc; line-height: 1.5; }
.test-progress { list-style: none; padding: 0; margin: 34px 0; display: grid; gap: 12px; }
.test-progress li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; color: #c9d8dc; font-size: 14px; }
.test-progress li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #63828b; }
.test-progress li.done { color: white; }
.test-progress li.done::before { content: "✓"; display: grid; place-items: center; background: var(--green); border-color: var(--green); font-weight: 900; }
.test-progress li.current::before { border: 6px solid #90cbbb; background: white; }
.security-note { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.15); border-radius: 16px; color: #c9d8dc; font-size: 13px; line-height: 1.45; }
.app-stage { padding: 36px; display: grid; place-items: center; }
.phone-frame { width: min(100%, 480px); height: min(900px, calc(100vh - 72px)); min-height: 660px; background: var(--paper); border: 1px solid rgba(7,59,76,.12); border-radius: 34px; box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-rows: auto auto 1fr auto; position: relative; }
.app-header { min-height: 56px; padding: 14px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.app-mark { display: none; }
.header-copy { display: none; }
.header-copy span { color: var(--green); font-size: 10px; letter-spacing: .12em; font-weight: 900; }
.header-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.icon-button { border: 0; background: var(--green-soft); color: var(--navy); border-radius: 12px; min-height: 40px; width: 40px; font-size: 20px; }
.app-content { overflow-y: auto; padding: 22px 18px 30px; scroll-behavior: smooth; }
.hero { padding: 8px 0 18px; }
.hero-mark { display: block; width: 320px; max-width: 90%; height: auto; object-fit: contain; margin: 0 auto 18px; }
.hero h2, .section-title { color: var(--navy); margin: 0 0 10px; line-height: 1.15; }
.hero h2 { font-size: 28px; }
.hero p, .lead { color: var(--muted); line-height: 1.55; margin: 0; }
.stack { display: grid; gap: 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button-row > * { flex: 1 1 140px; }
.primary, .secondary, .danger, .ghost { border-radius: 14px; min-height: 48px; padding: 0 16px; font-weight: 850; border: 1px solid transparent; }
.primary { color: white; background: var(--navy); }
.primary:hover { background: var(--navy-2); }
.secondary { color: var(--navy); background: var(--green-soft); border-color: #c7e2d9; }
.ghost { color: var(--navy); background: white; border-color: var(--line); }
.primary:disabled, .secondary:disabled { opacity: .5; cursor: wait; }
.card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: white; }
.card.soft { background: #f7faf9; }
.card.success { background: var(--green-soft); border-color: #c7e2d9; }
.card.warning { background: var(--warn-soft); border-color: #f0d2ad; }
.card.danger-card { background: var(--danger-soft); border-color: #f4cbd1; }
.card h3 { margin: 0 0 8px; color: var(--navy); font-size: 16px; }
.card p { margin: 0; line-height: 1.45; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 7px 11px; background: var(--green-soft); color: var(--success); font-size: 12px; font-weight: 850; }
.status-pill.warn { background: var(--warn-soft); color: var(--warn); }
.status-pill.danger { background: var(--danger-soft); color: var(--danger); }
.status-pill.gray { background: #edf1f2; color: #617176; }
.list { display: grid; gap: 10px; }
.list-item { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: white; display: grid; gap: 6px; }
.list-item-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-item strong { color: var(--navy); }
.list-item small { color: var(--muted); line-height: 1.4; display: block; }
.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 6px 0; }
.caption { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* --- чек-лист: специфичные классы --- */
.risk-hero { text-align: center; padding: 6px 0 4px; }
.risk-hero .big-number { font-size: 40px; font-weight: 900; color: var(--danger); line-height: 1; margin: 6px 0; }
.risk-hero.zero .big-number { color: var(--success); }
.risk-hero .big-label { font-size: 13px; color: var(--muted); }
.calc-details { margin-top: 14px; text-align: left; }
.calc-details summary { cursor: pointer; text-align: center; font-size: 13px; font-weight: 800; color: var(--green); list-style: none; }
.calc-details summary::-webkit-details-marker { display: none; }
.calc-details summary::after { content: " ▾"; }
.calc-details[open] summary::after { content: " ▴"; }
.calc-list { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; background: #f9fafa; }
.calc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink); }
.calc-row:last-child { border-bottom: 0; }
.calc-row strong { flex-shrink: 0; color: var(--danger); font-weight: 850; }
.calc-row.calc-total { font-weight: 850; }
.calc-row.calc-total strong { color: var(--navy); }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; cursor: pointer; }
.check-row input[type=checkbox] { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--green); flex-shrink: 0; }
.check-row span { font-size: 14px; color: var(--ink); line-height: 1.4; }
.section-card { padding: 14px 16px; }
.section-card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .03em; color: var(--green); margin: 0 0 4px; }
.check-list { display: grid; }
.item-row { border-top: 1px solid var(--line); padding: 12px 4px; display: flex; align-items: center; gap: 10px; }
.item-row:first-child { border-top: 0; }
.item-label { flex: 1; min-width: 0; font-size: 13px; color: var(--ink); line-height: 1.35; margin: 0; }
.item-row .answer-row { display: flex; gap: 4px; flex-shrink: 0; }
.item-row .answer-row button { min-height: 34px; padding: 6px 7px; border-radius: 8px; border: 1.5px solid var(--line); background: white; font-weight: 700; font-size: 11px; color: var(--ink); white-space: nowrap; }
.item-row .answer-row button.yes.picked { border-color: var(--green); background: var(--green-soft); color: var(--success); }
.item-row .answer-row button.no.picked { border-color: #f0b8bf; background: var(--danger-soft); color: var(--danger); }
.item-row .answer-row button.unknown.picked { border-color: #cfd6d5; background: #edf1f2; color: #617176; }
.cta-card { border-radius: 18px; padding: 18px; background: var(--navy); color: white; }
.cta-card h3 { color: white; margin: 0 0 6px; }
.cta-card p { color: #c9d8dc; margin: 0 0 14px; line-height: 1.5; }
.cta-card .primary { background: var(--green); }
.cta-card .primary:hover { background: #2c7566; }

@media (max-width: 900px) {
  .page-shell { display: block; }
  .desktop-rail { display: none; }
  .app-stage { padding: 0; }
  .phone-frame { width: 100%; height: 100dvh; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
}

@media (max-width: 390px) {
  .app-content { padding-left: 14px; padding-right: 14px; }
  .hero h2 { font-size: 24px; }
}
