:root {
  --bg: #f6f3fa;
  --surface: #ffffff;
  --ink: #302444;
  --muted: #62576f;
  --primary: #6a3db5;
  --primary-dark: #4f278f;
  --soft: #ede5f7;
  --accent: #f3ba93;
  --line: #dcd3e8;
  --success: #14764a;
  --max: 1280px;
  --article: 760px;
  --shadow: 0 18px 50px rgba(48, 36, 68, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Manrope, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--primary-dark); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
:focus-visible { outline: 3px solid #c85f20; outline-offset: 4px; }
[id] { scroll-margin-top: 120px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.container { width: min(var(--max), calc(100% - 80px)); margin-inline: auto; }
.narrow { width: min(var(--article), calc(100% - 40px)); margin-inline: auto; }

.notice {
  position: relative;
  z-index: 60;
  background: var(--ink);
  color: #fff;
}
.notice__inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: .88rem;
  line-height: 1.45;
}
.notice__inner p { margin: 9px 0; }
.notice__close {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
}
.js .notice__close { display: grid; place-items: center; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 250, .97);
  border-bottom: 1px solid var(--line);
}
.header-row {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand__mark { position: relative; width: 42px; height: 34px; flex: none; }
.brand__mark::before,
.brand__mark::after {
  content: "";
  position: absolute;
  width: 31px;
  height: 22px;
  border: 2px solid var(--primary);
  background: var(--soft);
  transform: skewY(-8deg);
}
.brand__mark::before { left: 2px; top: 3px; }
.brand__mark::after { left: 9px; top: 9px; background: var(--surface); }
.brand__text { display: grid; line-height: 1.15; }
.brand__text strong { font-size: 1.25rem; letter-spacing: -.02em; }
.brand__text small { margin-top: 5px; color: var(--muted); font-size: .76rem; }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 650; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--primary); }
.menu-toggle {
  display: none;
  min-width: 48px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.hero { padding: 72px 0 34px; }
.hero-copy { max-width: 910px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--primary-dark);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
h1, h2, h3 { margin-top: 0; line-height: 1.18; letter-spacing: -.035em; }
h1 { max-width: 950px; margin-bottom: 22px; font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { margin-bottom: 24px; font-size: clamp(1.7rem, 3vw, 2.25rem); }
h3 { margin-bottom: 12px; font-size: 1.2rem; }
.lead { max-width: 810px; margin: 0; color: var(--muted); font-size: 1.16rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 22px; margin-top: 30px; }
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--primary-dark); }
.button--ghost { background: transparent; color: var(--primary-dark); }
.button--small { min-height: 44px; padding: 9px 15px; font-size: .9rem; }
.official-link {
  margin-top: 24px;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: .92rem;
}

.map-section { padding: 28px 0 84px; }
.map-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.map-heading p { max-width: 560px; margin: 0; color: var(--muted); }
.task-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 28px; }
.task-button {
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.task-button:hover { border-color: var(--primary); transform: translateY(-1px); }
.task-button[aria-pressed="true"] { border-color: var(--primary); background: var(--soft); color: var(--primary-dark); }
.map-shell {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(106, 61, 181, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 61, 181, .06) 1px, transparent 1px),
    var(--surface);
  background-size: 44px 44px;
  box-shadow: var(--shadow);
}
.map-shell::after {
  content: "Карта мест действия · справочная схема";
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: var(--muted);
  font-size: .76rem;
}
.map-stage { position: absolute; inset: 44px 55px 50px; }
.map-layer {
  position: absolute;
  width: min(47%, 520px);
  min-height: 135px;
  display: grid;
  align-content: space-between;
  padding: 22px 24px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 25px rgba(48, 36, 68, .07);
  transform: skewY(-3deg);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.map-layer:nth-child(1) { left: 1%; top: 3%; }
.map-layer:nth-child(2) { right: 1%; top: 17%; }
.map-layer:nth-child(3) { left: 8%; bottom: 13%; }
.map-layer:nth-child(4) { right: 8%; bottom: 0; }
.map-layer > * { transform: skewY(3deg); }
.map-layer.is-active { z-index: 5; border-color: var(--primary); background: var(--soft); transform: skewY(-3deg) translateY(-5px); }
.map-layer__top { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.map-layer__num { color: var(--primary); font-size: .82rem; font-weight: 850; letter-spacing: .08em; }
.map-layer h3 { margin: 6px 0 0; font-size: 1.15rem; }
.map-layer p { max-width: 360px; margin: 10px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.state-label {
  visibility: hidden;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}
.is-active .state-label { visibility: visible; }
.map-result { margin-top: 22px; padding: 28px 30px; border-left: 4px solid var(--primary); background: var(--surface); }
.map-result h3 { font-size: 1.35rem; }
.map-result p { max-width: 850px; margin: 0 0 14px; color: var(--muted); }
.scenario-panel[hidden], .exit-choices[hidden] { display: none; }
.exit-choices { margin: 14px 0 18px; padding: 18px; background: var(--soft); }
.exit-choices p { color: var(--ink); }
.exit-choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.reset-map { margin-top: 18px; border: 0; background: transparent; color: var(--primary-dark); font-weight: 750; text-decoration: underline; cursor: pointer; }
.js .static-scenarios { display: none; }
.no-js .interactive-controls { display: none; }
.static-scenarios { margin-top: 24px; }
.static-scenarios article { padding: 20px 0; border-top: 1px solid var(--line); }

.section { padding: 84px 0; }
.section--white { background: var(--surface); }
.section-intro { max-width: 760px; color: var(--muted); }
.place-table { width: 100%; margin-top: 34px; border-collapse: collapse; background: var(--surface); }
.place-table th, .place-table td { padding: 20px 22px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.place-table th { width: 28%; color: var(--primary-dark); }
.practice-strip {
  position: relative;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 48px;
  padding: 52px;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.practice-strip::after { content: "02"; position: absolute; right: 24px; top: -38px; color: rgba(255,255,255,.07); font-size: 10rem; font-weight: 900; }
.practice-strip h2 { margin-bottom: 0; }
.practice-strip p { margin-top: 0; color: #e7e0ef; }
.practice-strip a { color: #fff; }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.problem-item { min-height: 230px; padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.problem-item__num { color: var(--primary); font-size: .8rem; font-weight: 850; letter-spacing: .08em; }
.problem-item p { color: var(--muted); }
.faq-list { margin-top: 28px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; font-weight: 750; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--primary); font-size: 1.5rem; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { max-width: 780px; margin: 0 0 24px; color: var(--muted); }

.page-hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 24px; color: var(--muted); font-size: .86rem; }
.breadcrumbs a { color: var(--muted); }
.page-hero .lead { max-width: 760px; }
.place-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 7px 12px; background: var(--soft); color: var(--primary-dark); font-size: .82rem; font-weight: 800; }
.place-badge::before { content: ""; width: 9px; height: 9px; border: 2px solid currentColor; }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--article)) 260px; justify-content: space-between; gap: 70px; padding: 64px 0 90px; }
.article { min-width: 0; }
.article h2 { margin-top: 64px; }
.article h2:first-child { margin-top: 0; }
.article h3 { margin-top: 34px; }
.article p, .article li { color: #463b55; }
.article ul, .article ol { padding-left: 1.25em; }
.article li + li { margin-top: 10px; }
.toc { position: sticky; top: 116px; align-self: start; padding: 20px 0 20px 20px; border-left: 2px solid var(--line); }
.toc strong { display: block; margin-bottom: 10px; font-size: .84rem; }
.toc a { display: block; margin: 7px 0; color: var(--muted); font-size: .85rem; }
.callout { margin: 30px 0; padding: 24px 26px; border-left: 4px solid var(--accent); background: #fff8f3; }
.callout--purple { border-color: var(--primary); background: var(--soft); }
.official-box { margin: 28px 0; padding: 28px; background: var(--ink); color: #fff; }
.official-box p { color: #e8e2ef; }
.official-box a { color: #fff; }
.steps { margin: 30px 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; min-height: 86px; padding: 4px 0 26px 70px; border-left: 2px solid var(--line); counter-increment: steps; }
.steps li::before { content: counter(steps); position: absolute; left: -22px; top: 0; width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid var(--primary); border-radius: 50%; background: var(--bg); color: var(--primary); font-weight: 850; }
.steps li:last-child { border-color: transparent; }
.step-place { display: block; margin-bottom: 4px; color: var(--primary-dark); font-size: .8rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.related { margin-top: 64px; padding-top: 30px; border-top: 1px solid var(--line); }
.related-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.related-links a { padding: 18px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; text-decoration: none; }
.matrix-wrap { overflow-x: auto; margin: 28px 0; }
.matrix { width: 100%; min-width: 620px; border-collapse: collapse; }
.matrix th, .matrix td { padding: 16px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.matrix th { background: var(--soft); }
.symptom-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 28px 0; background: var(--line); border: 1px solid var(--line); }
.symptom-index a { min-height: 110px; padding: 20px; background: var(--surface); font-weight: 750; text-decoration: none; }
.qr-demo { width: min(100%, 390px); margin: 30px 0; padding: 22px; border: 2px solid var(--ink); background: var(--surface); }
.qr-grid { display: grid; grid-template-columns: repeat(7, 1fr); aspect-ratio: 1; gap: 4px; padding: 10px; background: var(--surface); }
.qr-grid span { background: var(--ink); }
.qr-grid span:nth-child(3n), .qr-grid span:nth-child(5n) { background: transparent; }
.qr-demo strong { display: block; margin-top: 12px; color: #9d3121; text-align: center; }
.contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 28px 0; background: var(--line); border: 1px solid var(--line); }
.contact-list > div { padding: 22px; background: var(--surface); }
.contact-list dt { color: var(--muted); font-size: .82rem; }
.contact-list dd { margin: 4px 0 0; font-weight: 700; overflow-wrap: anywhere; }

.site-footer { padding: 56px 0 28px; background: var(--ink); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; }
.footer-grid p { color: #cfc5da; }
.footer-grid h2, .footer-grid h3 { font-size: 1rem; letter-spacing: 0; }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: #eee8f4; font-size: .9rem; }
.footer-bottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); color: #bfb4cb; font-size: .8rem; }

@media (max-width: 900px) {
  .container { width: min(100% - 48px, var(--max)); }
  .nav { display: none; position: absolute; inset: 82px 0 auto; padding: 18px 24px 24px; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-shell { min-height: 520px; }
  .map-stage { inset: 28px 30px 44px; }
  .map-layer { width: 58%; }
  .map-layer:nth-child(3) { left: 3%; }
  .map-layer:nth-child(4) { right: 3%; }
  .article-layout { grid-template-columns: 1fr; gap: 30px; }
  .toc { position: static; order: -1; }
  .practice-strip { grid-template-columns: 1fr; gap: 20px; }
  .problem-grid { grid-template-columns: 1fr; }
  .problem-item { min-height: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .container, .narrow { width: min(100% - 34px, var(--max)); }
  .brand__text small { display: none; }
  .header-row { min-height: 70px; }
  .nav { top: 70px; }
  .notice__inner { font-size: .78rem; }
  .hero { padding: 48px 0 26px; }
  h1 { font-size: clamp(2.05rem, 10.6vw, 2.45rem); }
  .lead { font-size: 1.05rem; }
  .hero-actions { align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .map-heading { align-items: start; flex-direction: column; gap: 8px; }
  .task-list { grid-template-columns: 1fr; }
  .map-shell { min-height: auto; overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .map-shell::after { display: none; }
  .map-stage { position: static; display: grid; gap: 10px; }
  .map-layer, .map-layer:nth-child(n) {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 0;
    padding: 18px;
    transform: none;
    box-shadow: none;
  }
  .map-layer > * { transform: none; }
  .map-layer.is-active { transform: none; border-width: 3px; }
  .map-layer p { margin-top: 7px; }
  .map-result { padding: 22px 20px; }
  .exit-choice-row { flex-direction: column; }
  .section { padding: 58px 0; }
  .place-table, .place-table tbody, .place-table tr, .place-table th, .place-table td { display: block; }
  .place-table tr { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .place-table th, .place-table td { width: auto; padding: 3px 0; border: 0; }
  .practice-strip { padding: 32px 24px; }
  .article-layout { padding-top: 44px; }
  .article h2 { margin-top: 48px; }
  .steps li { padding-left: 50px; }
  .related-links { grid-template-columns: 1fr; }
  .symptom-index { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid > :first-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
