:root {
  --bg: #fff; --bg-soft: #f3f7f8; --text: #13232b; --muted: #5d6f77; --accent: #0e7c86; --accent-dark: #0a5f67;
  --accent-soft: #dff1f2; --warm: #e8a33d; --line: #d9e3e6; --danger: #b3261e; --radius: 16px;
  --shadow: 0 1px 2px rgba(19, 35, 43, .06), 0 8px 24px rgba(19, 35, 43, .06);
  --font-head: 'Manrope', system-ui, sans-serif; --font: 'Inter', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--text); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3, .h3 { font-size: 1.15rem; font-family: var(--font-head); font-weight: 700; margin: 1.4em 0 .5em; }
.h4 { font-size: 1rem; font-family: var(--font-head); }
p { margin: 0 0 1em; }
a { color: var(--accent-dark); }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--muted); }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 32px 0 0; }
.section__head { max-width: 640px; margin-bottom: 28px; }
.icon { flex: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 12px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 2px solid transparent; font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--outline { background: #fff; color: var(--accent-dark); border-color: var(--accent); }
.btn--outline:hover { background: var(--accent-soft); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.btn--block { width: 100%; }
.btn[disabled] { background: #e3eaec; color: #6a7a81; border-color: transparent; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }

/* шапка */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.header__row { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 1.2rem var(--font-head); color: var(--text); text-decoration: none; margin-right: auto; }
.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; flex-direction: column; }
.nav.is-open { display: flex; }
.nav a { padding: 12px 4px; color: var(--text); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--bg-soft); }
.nav a[aria-current="page"], .nav a:hover { color: var(--accent-dark); }
.header__phone { display: none; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.header__cta { display: none; }
.burger { width: 44px; height: 44px; border: 0; background: none; display: grid; place-content: center; gap: 5px; cursor: pointer; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }
@media (min-width: 480px) { .header__cta { display: inline-flex; } }
@media (min-width: 1024px) {
  .burger { display: none; }
  .nav, .nav.is-open { display: flex; position: static; flex-direction: row; gap: 22px; border: 0; padding: 0; background: none; }
  .nav a { border: 0; padding: 8px 0; }
  .logo { margin-right: 0; }
  .header__row { gap: 24px; }
  .nav { margin-right: auto; margin-left: 12px; }
  .header__phone { display: flex; }
}

/* hero */
.hero { padding: 40px 0 48px; background: linear-gradient(180deg, var(--accent-soft), #fff 85%); }
.hero p.lead { max-width: 620px; color: var(--text); opacity: .8; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 32px; }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; padding: 0; margin: 0; }
.badges li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: .95rem; }
@media (min-width: 768px) { .badges { grid-template-columns: repeat(4, 1fr); } .hero { padding: 72px 0; } }

/* карточки */
.grid { display: grid; gap: 16px; }
@media (min-width: 480px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card--link { text-decoration: none; color: inherit; display: block; transition: transform .15s, border-color .15s; }
.card--link:hover { border-color: var(--accent); transform: translateY(-2px); }
.card__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-dark); margin-bottom: 14px; }
.card__price { font-weight: 700; color: var(--accent-dark); margin: 8px 0 0; }
.doc { padding: 0 0 16px; overflow: hidden; display: flex; flex-direction: column; }
.doc > *:not(.doc__photo) { margin-left: 16px; margin-right: 16px; }
.doc__photo { width: 100%; aspect-ratio: 6 / 7; object-fit: cover; background: var(--accent-soft); }
.doc h2, .doc h3 { margin: 14px 16px 4px; font-size: 1.05rem; }
.doc h2 a, .doc h3 a { color: var(--text); text-decoration: none; }
.doc .btn { margin-top: auto; width: calc(100% - 32px); }
.doc p { flex: 1; }
.doc__photo--big { border-radius: var(--radius); max-width: 420px; }
.promo { border-top: 4px solid var(--warm); }
.promo__until { display: inline-block; background: #fdf1dc; color: #7a4d00; font-weight: 600; font-size: .85rem; padding: 2px 10px; border-radius: 999px; }
.promo__price { font: 800 1.5rem var(--font-head); }
.promo__price s { font: 400 1rem var(--font); color: var(--muted); margin-left: 6px; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.why { display: flex; gap: 14px; }
.why h3 { margin: 0 0 4px; }
.why p { margin: 0; color: var(--muted); }
.why__check { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; }
@media (min-width: 768px) { .why-list { grid-template-columns: 1fr 1fr; gap: 28px 40px; } }

/* калькулятор */
.calc { display: grid; gap: 20px; }
.calc__group { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px 12px; margin: 0 0 12px; background: #fff; min-width: 0; }
.calc__group legend { font: 700 1rem var(--font-head); padding: 0 6px; }
.calc__row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--bg-soft); }
.calc__row:first-of-type { border-top: 0; }
.calc__price { font-weight: 600; white-space: nowrap; }
.qty { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 4px; }
.qty[hidden] { display: none; }
.qty button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 1.2rem; cursor: pointer; }
.qty output { min-width: 32px; text-align: center; font-weight: 700; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.calc__result { background: var(--accent-soft); border-radius: var(--radius); padding: 22px; align-self: start; }
.calc__label { margin: 0; font-weight: 600; }
.calc__total { font: 800 2.6rem/1.1 var(--font-head); margin: 4px 0; }
.calc__months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.seg { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 12px 4px; min-height: 44px; box-sizing: border-box; border-radius: 10px; background: #fff; border: 2px solid transparent; font-weight: 600; }
.seg input:checked + span { border-color: var(--accent); color: var(--accent-dark); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.calc__monthly { font: 700 1.5rem var(--font-head); margin: 0 0 4px; }
.calc__monthly small { font: 400 .9rem var(--font); }
.calc__hint { font-size: .9rem; margin: 12px 0 0; }
@media (min-width: 1024px) { .calc { grid-template-columns: 1.4fr 1fr; align-items: start; } .calc__result { position: sticky; top: 90px; } }

/* отзывы */
.reviews { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 16px; list-style: none; margin: 0; scrollbar-width: thin; }
.review { flex: 0 0 min(86%, 360px); scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.reviews-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }
.review__who { font-size: .92rem; color: var(--muted); margin: 0; }
.review__reply { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; font-size: .92rem; margin: 10px 0 0; }
.stars { color: #c47f0a; letter-spacing: 2px; }
.slider-nav { display: flex; gap: 8px; margin-top: 8px; }
.slider-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.2rem; cursor: pointer; }

/* FAQ */
.faq { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--accent); }
.faq[open] summary::after { content: '−'; }
.faq p { padding: 0 18px; margin: 0 0 16px; color: var(--muted); }

/* контакты */
.contacts { display: grid; gap: 24px; }
.contacts__info p { display: flex; gap: 10px; align-items: flex-start; }
.contacts__info p > span { flex: 1; }
.map { width: 100%; height: 320px; border: 0; border-radius: var(--radius); background: var(--bg-soft); }
@media (min-width: 768px) { .contacts { grid-template-columns: 1fr 1fr; } .map { height: 100%; min-height: 360px; } }

/* футер */
.footer { background: #0f2128; color: #c9d6db; padding: 40px 0 24px; font-size: .95rem; }
.footer a, .footer .link-btn { color: #fff; }
.footer__grid { display: grid; gap: 24px; }
.footer__title { font: 700 1.1rem var(--font-head); color: #fff; }
.footer__demo { border-top: 1px solid #2a3d46; margin-top: 24px; padding-top: 16px; color: #e4ecef; }
.footer__demo p { margin: 0; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: repeat(3, 1fr); } }
.modal { max-width: 520px; width: calc(100% - 32px); border: 0; border-radius: var(--radius); padding: 24px; }
.modal::backdrop { background: rgba(19, 35, 43, .5); }

/* внутренние страницы */
.page-head { background: var(--bg-soft); padding: 36px 0 28px; }
.page-head p { margin: 0; }
.page-body { padding: 28px 0 64px; }
.toolbar { display: grid; gap: 12px; margin-bottom: 20px; }
@media (min-width: 768px) { .toolbar { grid-template-columns: 2fr 1fr; } }
.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.field .check { font-weight: 400; }
input[type="text"], input[type="search"], input[type="tel"], input[type="date"], select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #9fb2b9; border-radius: 12px; font: inherit; background: #fff; color: var(--text); }
textarea { resize: vertical; }
input[aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: .9rem; margin: 4px 0 0; min-height: 0; }
.error:empty { display: none; }
.counter { display: block; text-align: right; font-size: .85rem; color: var(--muted); }
.radio { display: inline-flex; align-items: center; gap: 8px; margin-right: 18px; font-weight: 400 !important; min-height: 40px; }
.radio input { width: 20px; height: 20px; accent-color: var(--accent); }
.cat { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; }
.cat > summary { cursor: pointer; padding: 16px 18px; font: 700 1.1rem var(--font-head); display: flex; justify-content: space-between; }
.prices { list-style: none; margin: 0; padding: 0 18px 8px; }
.price-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--bg-soft); }
.price-row p { margin: 0; }
.price-row__name { font-weight: 500; }
.price-row__price { font-weight: 700; white-space: nowrap; text-align: right; }
.price-row .btn { grid-column: 1 / -1; }
@media (min-width: 768px) { .price-row { grid-template-columns: 1fr 140px auto; } .price-row .btn { grid-column: auto; } }
mark { background: #fbe3b0; color: inherit; border-radius: 3px; padding: 0 1px; }
.empty, .empty-inline { text-align: center; padding: 40px 16px; background: var(--bg-soft); border-radius: var(--radius); }
.empty-inline { padding: 20px; }
.doc-page { display: grid; gap: 28px; margin-bottom: 8px; }
@media (min-width: 768px) { .doc-page { grid-template-columns: 340px 1fr; } }
.plain { padding-left: 20px; margin: 0 0 1em; }
.plain--muted { color: var(--muted); }
.chips { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 10px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; font-weight: 600; }

/* запись */
.stepper { display: flex; list-style: none; margin: 0 0 24px; padding: 0; gap: 6px; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .82rem; color: var(--muted); border-top: 4px solid var(--line); padding-top: 8px; }
.stepper li.is-current { border-color: var(--accent); color: var(--text); font-weight: 600; }
.stepper li.is-done { border-color: var(--accent); }
.stepper__n { display: none; }
.panel { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel h2:focus { outline: none; }
.opt-group { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.opt-group legend { font: 700 .95rem var(--font-head); color: var(--muted); margin-bottom: 8px; padding: 0; }
.opt { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 12px 14px; margin-bottom: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; color: inherit; cursor: pointer; }
.opt:hover { border-color: var(--accent); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.opt__main { min-width: 0; overflow-wrap: anywhere; }
.opt__main small { display: block; color: var(--muted); font-size: .88rem; }
.opt__price { font-weight: 700; white-space: nowrap; }
.opt--doc { justify-content: flex-start; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); display: grid; place-items: center; font-weight: 700; color: var(--accent-dark); }
.note { background: var(--bg-soft); padding: 10px 14px; border-radius: 10px; }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.actions--wrap { flex-wrap: wrap; justify-content: flex-start; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0 20px; }
.cal__h { text-align: center; font-size: .8rem; color: var(--muted); font-weight: 600; }
.cal__day { min-height: 52px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: 600 1rem var(--font); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.cal__day small { font-size: .65rem; font-weight: 500; color: var(--muted); }
.cal__day:hover:not([disabled]) { border-color: var(--accent); }
.cal__day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.cal__day[aria-pressed="true"] small { color: #fff; }
.cal__day[disabled] { background: var(--bg-soft); color: #7a8a91; cursor: not-allowed; text-decoration: line-through; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: 600 1rem var(--font); cursor: pointer; }
.slot:hover:not([disabled]) { border-color: var(--accent); }
.slot[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.slot[disabled] { background: var(--bg-soft); color: #7a8a91; cursor: not-allowed; text-decoration: line-through; }
.summary { margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.summary div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--bg-soft); }
.summary div:first-child { border-top: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; }
.success { text-align: center; }
.success .summary { text-align: left; }
.success__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 2rem; margin-bottom: 8px; }
.success .actions { justify-content: center; }
.demo-note { font-size: .85rem; color: var(--muted); text-align: center; margin: 16px 0 0; }
.notfound { text-align: center; padding: 80px 0; }
.notfound .num { font: 800 5rem var(--font-head); color: var(--accent); margin: 0; }

@media (min-width: 480px) { .stepper__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--line); font-weight: 700; } .stepper li.is-current .stepper__n, .stepper li.is-done .stepper__n { background: var(--accent); color: #fff; } .panel { padding: 28px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; animation: none !important; } }

/* QA: крупные зоны нажатия на телефоне, калькулятор не шире экрана */
.logo { min-height: 44px; }
.doc h2 a, .doc h3 a { display: inline-block; padding: 12px 0; }
.footer a, .footer .link-btn { display: inline-block; padding: 12px 0; min-width: 44px; }
.contacts__info a { display: inline-block; padding: 12px 0; }
.calc > *, .calc__list, .calc__row > * { min-width: 0; }
