:root {
  --bg: #ffffff;
  --alt: #f2f5f8;
  --ink: #0f1720;
  --muted: #536070;
  --line: #dbe2ea;
  --navy: #0f2233;
  --navy-2: #1c3550;
  --accent: #ffb000;
  --accent-ink: #1a1200;
  --link: #1b62c4;
  --wa: #128c4b;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  padding-bottom: 72px;
}
a { color: var(--link); }
h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); letter-spacing: -.015em; margin-bottom: .8em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 800px; }

/* шапка */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; border-bottom: 3px solid var(--accent); }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; line-height: 1.15; }
.brand small { display: block; font-weight: 400; font-size: .78rem; opacity: .8; }
.brand > span { white-space: nowrap; }
.mark { flex: none; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.mark rect:first-child { fill: var(--navy-2); }
.top-right { display: flex; align-items: center; gap: 12px; }
.top-tel { color: inherit; text-decoration: none; font-weight: 700; white-space: nowrap; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; padding-bottom: 8px; }
.nav a { color: inherit; text-decoration: none; white-space: nowrap; font-size: .93rem; padding: 6px 11px; border-radius: 8px; opacity: .88; }
.nav a:hover, .nav a[aria-current] { background: rgba(255,255,255,.14); opacity: 1; }
.nav .nav-calc { display: none; }
@media (max-width: 899px) {
  .top { position: static; }
  html { scroll-padding-top: 16px; }
  .top-tel, .top .btn-small { display: none; }
  .top-row { padding-bottom: 8px; }
  .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-bottom: 12px; }
  .nav a, .nav .nav-calc { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40px; padding: 6px 2px; font-size: .86rem; line-height: 1.15; white-space: normal; border-radius: 9px; background: rgba(255,255,255,.09); opacity: 1; }
  .nav a[aria-current] { background: #fff; color: var(--navy); font-weight: 700; }
  .nav .nav-calc:not([aria-current]) { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
}
@media (max-width: 359px) { .nav a, .nav .nav-calc { font-size: .78rem; } }

/* хлебные крошки — на тёмном фоне во всю ширину */
.crumbs { font-size: .86rem; color: #9fb4c9; padding-top: 14px; padding-bottom: 2px; background: var(--navy); box-shadow: 0 0 0 100vmax var(--navy); clip-path: inset(0 -100vmax); }
.crumbs a { color: #c6d4e2; }

/* первый экран */
.hero {
  color: #fff; padding: 34px 0 40px;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
}
.hero-home { padding-top: 46px; padding-bottom: 54px; }
.hero-grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 1fr; } }
.hero-art .art { width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
@media (max-width: 899px) { .hero-art .art { max-width: 520px; } }
.article-art { margin: 22px 0 0; }
.article-art .art { width: 100%; height: auto; display: block; border-radius: 18px; }
.thumb { display: block; width: calc(100% + 40px); height: auto; aspect-ratio: 640 / 300; object-fit: cover; object-position: center 75%; margin: -20px -20px 16px; border-radius: var(--radius) var(--radius) 0 0; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--accent); margin-bottom: .6em; }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 720px; }
.hero .lead { color: #c6d4e2; }
.price { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 0; padding: 8px 14px; background: rgba(255,176,0,.12); border: 1px solid var(--accent); border-radius: 10px; font-weight: 800; color: #fff; }
.note { color: var(--muted); font-size: .92rem; margin: 14px 0 0; }
.hero .note { color: #9fb4c9; }
.sub { color: var(--muted); margin-top: -.4em; }
.draft { display: inline-block; vertical-align: middle; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; background: #ffe1e1; color: #a1121a; }

/* кнопки */
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.cta.stack { flex-direction: column; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 20px; border-radius: 10px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; max-width: 100%;
}
.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-tel { background: #fff; color: var(--navy); border-color: var(--navy); }
.hero .btn-tel { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-small { min-height: 38px; padding: 6px 14px; background: var(--accent); color: var(--accent-ink); font-size: .92rem; }
.btn:hover { filter: brightness(.95); }
.btn:focus-visible, a:focus-visible, summary:focus-visible, button:focus-visible, .quiz-check:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 420px) { .cta .btn { flex: 1 1 100%; white-space: normal; } }

/* факты */
.facts { background: var(--accent); color: var(--accent-ink); padding: 22px 0; }
.facts-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.facts b { display: block; font-size: 1.2rem; letter-spacing: -.01em; }
.facts span { font-size: .93rem; opacity: .85; }

/* секции */
.sec { padding: 50px 0; }
.alt { background: var(--alt); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card.link { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card.link:hover { border-color: var(--navy-2); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,34,51,.1); }
.card-price { display: inline-block; align-self: flex-start; margin-top: 12px; padding: 3px 10px; border-radius: 8px; background: #fff4d6; color: #6b4a00; font-weight: 700; font-size: .92rem; }
.more { margin-top: auto; padding-top: 14px; color: var(--link); font-weight: 700; }
.why .card { border-top: 4px solid var(--accent); }
.all { margin: 18px 0 0; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); font-size: .93rem; background: #fff; }
.chip:hover { border-color: var(--navy-2); }
.split { display: grid; gap: 36px; }
@media (min-width: 900px) { .split { grid-template-columns: 1.2fr 1fr; } }
.stack-links { display: grid; gap: 10px; }
.row-link { display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 14px 16px; text-decoration: none; color: inherit; }
.row-link b { display: block; }
.row-link span { color: var(--muted); font-size: .94rem; }
.row-link:hover { border-color: var(--navy-2); border-left-color: var(--accent); }

/* страница услуги */
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 34px; padding-bottom: 46px; }
.cols > *, .hero-grid > *, .final > *, .split > * { min-width: 0; }
h1, h2, h3, p, li, td, summary { overflow-wrap: break-word; }
@media (min-width: 960px) { .cols { grid-template-columns: minmax(0, 1fr) 330px; } .side { position: sticky; top: 120px; align-self: start; } }
.wrap.narrow > .main-col { padding: 26px 0 46px; }
.block { margin-bottom: 38px; }
.block p { max-width: 70ch; }
.block h3 { margin-top: 1.2em; }
.list { margin: 0 0 1em; padding: 0; list-style: none; }
.list li { position: relative; padding: 7px 0 7px 28px; border-bottom: 1px solid var(--line); }
.list li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 11px; height: 11px; border-radius: 2px; background: var(--accent); }
.table-wrap { overflow-x: auto; margin-bottom: 1em; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: .96rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--alt); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; }
@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; border-radius: 0; background: none; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; min-width: 0; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; margin-bottom: 10px; background: #fff; }
  .table-wrap td { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .table-wrap tr td:last-child { border-bottom: 0; }
  .table-wrap td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
  .table-wrap td[data-label=""]::before { display: none; }
  .table-wrap td:first-child { font-size: 1.05rem; }
}
.callout { background: var(--alt); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 22px; }
.callout p { color: var(--muted); margin-bottom: 0; }
.mini { list-style: none; padding: 0; margin: 18px 0 0; font-size: .9rem; color: var(--muted); }
.mini li { padding: 4px 0 4px 22px; position: relative; }
.mini li::before { content: "✓"; position: absolute; left: 0; color: var(--wa); font-weight: 800; }
.toc { background: var(--alt); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 30px; }
.toc ol { margin: 8px 0 0; padding-left: 1.2em; }
.toc li { margin: .25em 0; }

.final { display: grid; gap: 18px; align-items: center; }
.final h2 { margin-bottom: .3em; }
.final p { margin: 0; color: var(--muted); }
.final .cta { margin-top: 0; }
@media (min-width: 900px) { .final { grid-template-columns: 1fr auto; } }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.steps li { counter-increment: s; border-top: 3px solid var(--navy); padding-top: 12px; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; color: var(--navy-2); font-weight: 800; font-size: .85rem; }
.steps strong { display: block; margin: 2px 0 4px; }
.steps span { color: var(--muted); font-size: .94rem; }

details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 16px 0; }
details p { color: var(--muted); }

/* подбор шкафа */
.quiz { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 10px 30px rgba(15,34,51,.08); }
.quiz-bar { height: 6px; background: var(--alt); border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.quiz-bar span { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.quiz-step { color: var(--muted); font-size: .88rem; margin-bottom: .3em; }
.quiz-q { font-size: 1.3rem; margin-bottom: .8em; }
.quiz-opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.quiz-opt { font: inherit; font-weight: 600; text-align: left; padding: 14px 16px; min-height: 52px; background: var(--alt); color: var(--ink); border: 2px solid transparent; border-radius: 10px; cursor: pointer; }
.quiz-opt:hover { border-color: var(--navy-2); background: #fff8e6; }
.quiz-check { display: flex; align-items: center; gap: 10px; }
.quiz-check input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.quiz-check:has(input:checked) { border-color: var(--accent); background: #fff8e6; }
.quiz-next { margin-top: 16px; }
.quiz-back { font: inherit; background: none; border: 0; color: var(--muted); padding: 12px 0 0; cursor: pointer; display: block; }
.quiz-sum { list-style: none; padding: 0; margin: 0 0 18px; }
.quiz-sum li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.quiz-price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.15rem; margin: 0; padding: 12px 16px; border-radius: 10px; background: #fff4d6; }

.contact-card { background: var(--alt); border-radius: var(--radius); padding: 24px; margin-bottom: 36px; }
.contact-card .big { font-size: 1.5rem; font-weight: 800; text-decoration: none; color: var(--navy); }

.foot { background: var(--ink); color: #b9c6d3; padding: 38px 0; font-size: .93rem; }
.foot strong { color: #fff; display: block; margin-bottom: 8px; }
.foot a { color: #b9c6d3; }
.foot-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.bar .btn { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 10px 8px; }
@media (min-width: 800px) { .bar { display: none; } body { padding-bottom: 0; } }

.to-top { position: fixed; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 19; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: var(--navy); color: #fff; box-shadow: 0 6px 18px rgba(15,34,51,.3); cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.show { opacity: .92; transform: none; pointer-events: auto; }
.to-top:hover { opacity: 1; }
@media (min-width: 800px) { .to-top { right: 24px; bottom: 24px; width: 50px; height: 50px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .to-top, .card.link, .quiz-bar span { transition: none; } }
