:root {
  --dark: #102538;
  --dark-2: #2D4E67;
  --blue: #0695D7;
  --blue-hover: #0683BC;
  --blue-deep: #0675D7;
  --blue-light: #8EDDFF;
  --blue-wash: #E7F5FB;
  --gray-bg: #ECF0F3;
  --gray-2: #D8DCDF;
  --gray-line: #B6BEC7;
  --gray-deep: #8F98A1;
  --text-2: #5B5B5B;
  --white: #FFFFFF;
  --red: #FF4758;
  --green: #4FCDA6;
  --yellow: #F2C94C;
  --radius: 9px;
  --shadow: 2px 0 36px rgba(125, 125, 125, .10);
  --shadow-btn: 0 4px 4px rgba(6, 149, 215, .30);
  --font: 'Stratos LC Web', -apple-system, BlinkMacSystemFont, 'Roboto', system-ui, sans-serif;
  --pad: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--dark);
  background: var(--gray-bg);
  -webkit-font-smoothing: antialiased;
}
main { outline: none; min-height: 100dvh; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.boot { display: grid; place-items: center; min-height: 100dvh; color: var(--gray-deep); }

.logo { width: 30px; height: 34px; display: block; }
.logo-lg { width: 52px; height: 59px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px;
  border: 0; border-radius: var(--radius);
  background: var(--blue); color: var(--white);
  font-weight: 500; font-size: 17px; letter-spacing: .01em;
  box-shadow: var(--shadow-btn);
  cursor: pointer; text-decoration: none;
  transition: background-color .15s;
}
.btn:hover { background: var(--blue-hover); }
.btn:disabled { background: var(--gray-2); color: var(--gray-deep); box-shadow: none; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--dark); box-shadow: none; border: 1px solid var(--gray-line); }
.btn-ghost:hover { background: var(--white); border-color: var(--gray-deep); }
.btn-light { background: var(--white); color: var(--dark); box-shadow: none; }
.btn-light:hover { background: var(--gray-bg); }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- стартовый экран ---------- */
.hero {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: calc(28px + env(safe-area-inset-top, 0px)) var(--pad) calc(24px + var(--safe-b));
  background: linear-gradient(160deg, var(--dark-2) 0%, #112538 62%);
  color: var(--white);
  position: relative; overflow: hidden;
}
.hero-inner { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; flex: 1; position: relative; }
.hero .logo-lg { color: var(--white); }
.hero h1 {
  margin-top: auto; padding-top: 48px;
  font-size: clamp(34px, 9vw, 52px); line-height: 1.04; font-weight: 700; letter-spacing: -.015em;
}
.hero .lead { margin-top: 18px; font-size: 18px; line-height: 1.45; color: rgba(255,255,255,.82); max-width: 36ch; }
.hero .note { margin-top: 22px; padding-left: 14px; border-left: 2px solid var(--blue); color: rgba(255,255,255,.72); font-size: 15px; max-width: 42ch; }
.hero-actions { margin-top: 32px; display: grid; gap: 14px; }
.hero .fine { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.4; }
/* фон-«волны сигнала» за заголовком */
.hero-bars {
  position: absolute; right: -8px; top: 96px; display: flex; align-items: flex-end; gap: 10px;
  opacity: .14; pointer-events: none;
}
.hero-bars i { display: block; width: 26px; border-radius: 6px 6px 0 0; background: var(--blue-light); }

/* ---------- общая раскладка шагов ---------- */
.screen { max-width: 600px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--pad) 12px;
}
.topbar .logo { color: var(--dark); }
.topbar .step-label { font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.progress { height: 4px; margin: 0 var(--pad); background: var(--gray-2); border-radius: 2px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); border-radius: 2px; transition: width .3s ease; }
.body { flex: 1; padding: 24px var(--pad) 24px; }
.body h1 { font-size: 24px; line-height: 1.22; font-weight: 700; letter-spacing: -.005em; }
.sub { margin-top: 8px; color: var(--text-2); font-size: 15px; }

.navbar {
  position: sticky; bottom: 0;
  display: grid; grid-template-columns: auto 1fr; gap: 10px;
  padding: 12px var(--pad) calc(12px + var(--safe-b));
  background: linear-gradient(to top, var(--gray-bg) 72%, rgba(236,240,243,0));
}
.navbar .btn-ghost { min-width: 96px; }

/* ---------- вопрос ---------- */
.hint { margin-top: 10px; }
.hint-text { margin-top: 8px; padding: 12px 14px; background: var(--blue-wash); border-radius: var(--radius); font-size: 15px; color: var(--dark); }
.multi-note { margin-top: 10px; font-size: 14px; color: var(--text-2); }
.options { margin-top: 20px; display: grid; gap: 10px; }
.opt {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start;
  width: 100%; padding: 15px 16px; min-height: 60px;
  text-align: left; line-height: 1.35; font-size: 16px;
  background: var(--white); border: 1.5px solid transparent; border-radius: var(--radius);
  box-shadow: var(--shadow); cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.opt:hover { border-color: var(--gray-line); }
.opt[aria-checked="true"] { background: var(--blue-wash); border-color: var(--blue); }
.mark {
  width: 22px; height: 22px; margin-top: 1px; border: 2px solid var(--gray-line); background: var(--white);
  display: grid; place-items: center;
}
.mark.radio { border-radius: 50%; }
.mark.check { border-radius: 6px; }
.opt[aria-checked="true"] .mark { border-color: var(--blue); background: var(--blue); }
.opt[aria-checked="true"] .mark.radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--white); }
.opt[aria-checked="true"] .mark.check::after {
  content: ""; width: 10px; height: 6px; border-left: 2.5px solid var(--white); border-bottom: 2.5px solid var(--white);
  transform: translateY(-1px) rotate(-45deg);
}
.opt.exclusive { margin-top: 6px; }

/* ---------- форма ---------- */
.seg { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; background: var(--gray-2); padding: 4px; border-radius: 12px; gap: 4px; }
.seg button { min-height: 44px; border: 0; border-radius: var(--radius); background: transparent; cursor: pointer; font-weight: 500; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--dark); box-shadow: 0 1px 4px rgba(16,37,56,.12); }
.form { margin-top: 18px; display: grid; gap: 16px; }
.field label, .field .label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field .opt-mark { color: var(--gray-deep); font-weight: 400; }
.field input, .field select {
  width: 100%; height: 50px; padding: 0 14px;
  background: var(--white); border: 1.5px solid var(--gray-line); border-radius: var(--radius);
  font-size: 16px; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--dark) 50%), linear-gradient(135deg, var(--dark) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:hover, .field select:hover { border-color: var(--gray-deep); }
.field input:focus, .field select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(6,149,215,.18); }
.field.invalid input, .field.invalid select { border-color: var(--red); }
.field .err { margin-top: 6px; font-size: 13px; color: #C42F3D; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 42px; padding: 0 16px; border: 1.5px solid var(--gray-line); border-radius: 21px; background: var(--white); cursor: pointer; }
.chips button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-wash); }
details.more { border-top: 1px solid var(--gray-2); padding-top: 14px; }
details.more summary { cursor: pointer; color: var(--blue-deep); font-weight: 500; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 16px; }
details.more .form { margin-top: 0; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 0; accent-color: var(--blue); }
.alert { padding: 12px 14px; border-radius: var(--radius); background: #FFE9EB; color: #8A1E29; font-size: 15px; }
.alert.info { background: var(--blue-wash); color: var(--dark); }

/* ---------- индикатор сети ---------- */
.net {
  position: fixed; z-index: 10; left: 50%; transform: translateX(-50%);
  bottom: calc(84px + var(--safe-b));
  padding: 8px 14px; border-radius: 20px; font-size: 13px;
  background: var(--dark); color: var(--white); box-shadow: 0 4px 16px rgba(16,37,56,.25);
  max-width: calc(100% - 32px); text-align: center;
}
.net.warn { background: #7A5A00; }

/* ---------- результат ---------- */
.res-hero {
  background: linear-gradient(160deg, var(--dark-2) 0%, #112538 70%);
  color: var(--white);
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--pad) 28px;
}
.res-hero .inner { max-width: 720px; margin: 0 auto; }
.res-top { display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,.7); font-size: 14px; }
.res-top .logo { color: var(--white); }
.res-company { margin-top: 26px; font-size: 15px; color: rgba(255,255,255,.72); }
.res-title { margin-top: 4px; font-size: 20px; font-weight: 500; }
.res-score { margin-top: 18px; display: flex; align-items: flex-end; gap: 18px; }
.res-num { font-size: clamp(88px, 28vw, 132px); line-height: .82; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.res-of { padding-bottom: 6px; }
.res-of b { display: block; font-size: 22px; font-weight: 700; }
.res-of span { color: rgba(255,255,255,.72); font-size: 15px; }
.scale { margin-top: 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.scale span { height: 6px; border-radius: 3px; background: rgba(255,255,255,.16); }
.scale span.on { background: var(--blue-light); }
.res-desc { margin-top: 12px; font-size: 15px; color: rgba(255,255,255,.78); }

/* «уровень сигнала» по направлениям — главный визуальный элемент */
.signal {
  margin-top: -1px;
  background: var(--white);
  padding: 24px var(--pad) 22px;
}
.signal .inner { max-width: 720px; margin: 0 auto; }
.signal h2 { font-size: 18px; font-weight: 700; }
.bars { margin-top: 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; height: 190px; }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.bar .track { position: relative; background: var(--gray-bg); border-radius: 8px 8px 3px 3px; overflow: hidden; }
.bar .fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px 8px 0 0; transform-origin: bottom; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.bar .val { text-align: center; font-weight: 700; font-size: 18px; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.bar-labels { margin-top: 8px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; font-size: 12px; line-height: 1.25; text-align: center; color: var(--text-2); }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .bar .fill { animation: none; } .progress > span { transition: none; } }

.sections { max-width: calc(720px + 2 * var(--pad)); margin: 0 auto; padding: 8px var(--pad) calc(32px + var(--safe-b)); }
.sec { margin-top: 28px; }
.sec > h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.sec .sec-sub { margin: -6px 0 12px; color: var(--text-2); font-size: 14px; }
.panel { background: var(--white); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.summary { font-size: 17px; line-height: 1.55; }
.summary + .summary { margin-top: 12px; }
.ai-panel { box-shadow: 0 -1px 24px rgba(229,67,183,.14), 0 1px 24px rgba(6,149,215,.18); }
.skeleton { display: grid; gap: 10px; }
.skeleton i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--gray-bg), #F7F9FA, var(--gray-bg)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton i:nth-child(2) { width: 92%; } .skeleton i:nth-child(3) { width: 78%; } .skeleton i:nth-child(4) { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.pending-note { margin-top: 14px; font-size: 14px; color: var(--text-2); }

.list { display: grid; gap: 10px; }
.item { background: var(--white); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); border-left: 4px solid var(--gray-2); }
.item h3 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.item p { margin-top: 6px; font-size: 15px; color: #2B3A48; }
.item .ev { margin-top: 8px; font-size: 13px; color: var(--gray-deep); }
.item.good { border-left-color: var(--green); }
.item.gap-high { border-left-color: var(--red); }
.item.gap-medium { border-left-color: var(--yellow); }
.item.gap-low { border-left-color: var(--gray-line); }

.recs { counter-reset: rec; display: grid; gap: 12px; }
.rec { background: var(--white); border-radius: 14px; padding: 18px 18px 16px; box-shadow: var(--shadow); display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.rec .n { width: 36px; height: 36px; border-radius: 50%; background: var(--dark); color: var(--white); display: grid; place-items: center; font-weight: 700; }
.rec h3 { font-size: 17px; line-height: 1.3; }
.rec p { margin-top: 6px; font-size: 15px; color: #2B3A48; }
.rec ul { margin: 10px 0 0; padding-left: 18px; font-size: 15px; }
.rec li + li { margin-top: 4px; }
.rec .docs { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--blue-wash); color: var(--blue-deep); }

.roadmap { list-style: none; margin: 0; padding: 0; position: relative; }
.roadmap > li { position: relative; padding: 0 0 18px 28px; }
.roadmap > li::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--gray-2); }
.roadmap > li:last-child::before { display: none; }
.roadmap > li::after { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--blue); }
.roadmap .period { font-size: 14px; color: var(--blue-deep); font-weight: 500; }
.roadmap h3 { font-size: 16px; margin-top: 2px; }
.roadmap ul { margin: 6px 0 0; padding-left: 18px; font-size: 15px; color: #2B3A48; }

.docs-list { display: grid; gap: 8px; }
.doc { background: var(--white); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.doc .id { font-size: 12px; font-weight: 500; color: var(--blue-deep); background: var(--blue-wash); padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.doc h3 { font-size: 15px; line-height: 1.3; }
.doc p { margin-top: 4px; font-size: 14px; color: var(--text-2); }

.res-actions { margin-top: 24px; display: grid; gap: 10px; }
.foot { margin-top: 28px; font-size: 13px; color: var(--gray-deep); line-height: 1.45; }

/* ---------- инфо-экраны ---------- */
.center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 32px var(--pad); }
.center h1 { font-size: 26px; line-height: 1.2; }
.center p { color: var(--text-2); }

@media (min-width: 720px) {
  :root { --pad: 32px; }
  .body h1 { font-size: 28px; }
  .bars { height: 230px; gap: 18px; }
  .bar-labels { gap: 18px; font-size: 13px; }
  .res-actions { grid-template-columns: auto auto; justify-content: start; }
}

@media print {
  body { background: var(--white); }
  .net, .res-actions, .navbar, .no-print { display: none !important; }
  .res-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .panel, .item, .rec, .doc { box-shadow: none; border: 1px solid var(--gray-2); break-inside: avoid; }
  .bar .fill { animation: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
