/* МАЯК Экспертиза — собственная дизайн-система. Без внешних зависимостей.
   Принципы: деловой тон, крупный читаемый текст (для пожилых), контраст AA, тёмно-синий основной и
   «маячный» жёлтый только для главного действия. */

:root {
  --navy: #14284b;
  --navy-2: #1f3d6e;
  --navy-soft: #e8edf6;
  --yellow: #f5b800;
  --yellow-dark: #d99f00;
  --ink: #1c2430;
  --muted: #5a6574;
  --line: #d9dfe8;
  --bg: #f2f5fa;
  --blue: #2754c5;
  --blue-soft: #e8eefc;
  --amber-soft: #fff4cf;
  --amber-ink: #7a4f00;
  --header-h: 140px;
  --surface: #ffffff;
  --ok: #1d6f42;
  --ok-bg: #e7f4ec;
  --warn-bg: #fff6dc;
  --danger: #a8281c;
  --danger-bg: #fdecea;
  --gutter: clamp(16px, 3vw, 44px);
  --table-line: #6b7a95;   /* границы таблиц: не светлее #9aa7bd (D-80) */
  --table-head: #d3dcee;
  --radius: 16px;
  --r: 22px;
  --shadow: 0 1px 2px rgba(20, 40, 75, .06), 0 8px 24px rgba(20, 40, 75, .07);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; }
img, svg { max-width: 100%; }
a { color: var(--navy-2); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 800; margin-top: 1.2em; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1em; letter-spacing: 0; }
p { margin: 0 0 1em; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Consolas, monospace; }
.eyebrow { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin: 0 0 .6em; font-weight: 700; }
.eyebrow a { color: inherit; }
.kind { color: var(--muted); margin: 0 0 .4em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--navy); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

.container { width: 100%; max-width: 1520px; margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: 1520px; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.section { padding: clamp(16px, 2.2vw, 28px) 0; }
.section-tight { padding-top: 12px; }
.h-tight { margin-top: 0; }
.section-alt { background: var(--navy-soft); }

/* Верхняя служебная полоса: аварийная заметка справа, одной строкой */
.topbar { background: #fffaeb; border-bottom: 1px solid #f0e3b8; }
.topbar-row { display: flex; justify-content: flex-end; }
.calm-note { margin: 0; font-size: .78rem; line-height: 1.3; color: var(--ink); padding: 4px 0; text-align: right; }
.calm-note strong { color: var(--navy); }

/* Шапка */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand mission actions"; align-items: center; column-gap: 28px; padding-top: 10px; padding-bottom: 10px; }
.brand { grid-area: brand; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); font-weight: 700; }
.brand-mark { flex: none; width: 60px; height: 60px; }
.brand-name { font-size: 1.75rem; line-height: 1.1; white-space: nowrap; }
.brand-name span { font-weight: 500; color: var(--navy-2); }
.header-mission { grid-area: mission; border-left: 2px solid var(--line); padding-left: 24px; font-size: .86rem; line-height: 1.4; color: var(--muted); max-width: 900px; }
.header-mission .prose p { margin: 0; }
.header-actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }

/* Горизонтальное меню разделов под шапкой (D-57) */
.menu-bar { background: var(--surface); border-top: 1px solid var(--line); }
.menu-row { display: flex; align-items: center; gap: 12px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 6px 0; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .45em .95em; border-radius: 12px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: 1rem; }
.main-nav a:hover { background: var(--blue-soft); }
.main-nav a[aria-current="page"] { background: var(--navy); color: #fff; box-shadow: inset 0 -3px 0 var(--yellow); }
.nav-toggle { display: none; align-items: center; gap: .5em; background: var(--surface); border: 1.5px solid #b9c2d0; border-radius: 12px; padding: 6px 14px; min-height: 44px; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; }
.nav-toggle .ic { width: 1.3em; height: 1.3em; }
.menu-bar:has(.main-nav:empty) { display: none; }
@media (max-width: 1100px) {
  .site-header { position: static; }
  .menu-row { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .js .nav-toggle { display: inline-flex; }
  .js .main-nav { display: none; width: 100%; flex-direction: column; padding: 4px 0 8px; }
  .js .main-nav.is-open { display: flex; }
  .main-nav a { width: 100%; }
}
.inline-form { display: inline; margin: 0; }
.who { color: var(--muted); }

@media (max-width: 1100px) {
  .header-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "mission mission"; row-gap: 6px; column-gap: 12px; }
  .header-mission { border-left: 0; padding: 0; max-width: none; }
}
@media (max-width: 700px) {
  .header-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "actions"; }
  .header-actions { justify-content: flex-start; margin-left: 0; padding-bottom: 4px; }
}
@media (max-width: 900px) { h1, .hero h1 { font-size: 1.65rem; } }
@media (max-width: 700px) {
  .header-mission { display: none; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-name { font-size: 1.3rem; }
  .brand { gap: 10px; }
}

/* Кнопки */
.btn { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer;
  border: 2px solid transparent; border-radius: 8px; padding: 10px 18px; line-height: 1.2; min-height: 44px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-accent { background: var(--yellow); color: var(--navy); }
.btn-accent:hover { background: var(--yellow-dark); color: var(--navy); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy-soft); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy-soft); }
.btn-sm { padding: 6px 12px; font-size: .9rem; min-height: 38px; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Сообщения */
.messages { margin-top: 12px; }
.message { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 8px; background: var(--navy-soft); border-left: 4px solid var(--navy-2); }
.message-success { background: var(--ok-bg); border-color: var(--ok); }
.message-error { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.message-warning { background: var(--warn-bg); border-color: var(--yellow-dark); }
.note { background: var(--navy-soft); border-radius: var(--radius); padding: 12px 16px; }
.emergency { display: block; background: var(--danger-bg); border: 1px solid #e8b3ad; border-left: 6px solid var(--danger);
  border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; color: #5a1710; }
.emergency strong { display: block; color: var(--danger); margin-bottom: 4px; }
.draft-note { display: inline-block; font-size: .75rem; background: var(--warn-bg); color: #6a4f00; border: 1px dashed var(--yellow-dark);
  border-radius: 6px; padding: 2px 8px; margin: 0 0 8px; }

/* Главная */
.hero { background: linear-gradient(180deg, var(--navy-soft), var(--bg)); padding: 22px 0 14px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.problem-card { display: block; background: var(--surface); border-radius: var(--r); padding: 16px 18px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); border: 1.5px solid var(--line); transition: transform .12s, border-color .12s; }
.problem-card:hover { transform: translateY(-2px); border-color: var(--blue); }
.problem-card h3 { margin-top: .4em; }
.problem-icon { font-size: 1.8rem; }
.link-more { color: var(--navy-2); font-weight: 600; }
.steps-short { list-style: none; counter-reset: s; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps-short li { counter-increment: s; background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.steps-short li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.steps-short span { color: var(--muted); font-size: .9rem; }
.narrow-note { max-width: none; }

@media (max-width: 900px) {
  .hero-grid, .card-grid, .steps-short, .two-col { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Страницы */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 0 8px; }
.page-head h1 { margin-bottom: .3em; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.two-col-wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.side-card, .panel, .form-card, .offer-box { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px; }
.side-card { position: sticky; top: calc(var(--header-h) + 12px); }
.panel h2 { margin-top: 0; font-size: 1.25rem; }
.panel-accent { border-top: 4px solid var(--yellow); }
.prose h3:first-child, .prose h2:first-child { margin-top: .3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.steps-long ol { padding-left: 0; list-style: none; counter-reset: st; }
.steps-long ol li { counter-increment: st; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px 14px 64px; margin-bottom: 12px; position: relative; }
.steps-long ol li::before { content: counter(st); position: absolute; left: 16px; top: 12px; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.price-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 12px; margin: 12px 0 18px; align-items: start; }
.price-card { display: block; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 18px 10px; box-shadow: var(--shadow); }
.price-card-main { border-left: 6px solid var(--blue); }
.price-card h3 { margin: 0 0 .1em; }
.price-line { margin: 0 0 .3em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.price-line .kind { margin: 0; font-size: .9rem; }
.price-lead { margin: 0 0 .3em; }
.price-card p { margin-bottom: .35em; }
.price-value { font-size: 1.35rem; font-weight: 800; color: var(--navy); overflow-wrap: anywhere; }
.ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; margin: 12px 0 16px; align-items: start; }
.ladder-card { display: block; }
.ladder-card h3 { margin: 0; }
.ladder-card .price-value { margin: .1em 0 .4em; }
.ladder-card h4 { margin: .9em 0 .2em; font-size: 1rem; color: var(--navy); }
.ladder-card ul { margin: 0 0 .4em; padding-left: 1.2em; }
.ladder-card li { margin-bottom: .3em; }
.ladder-credit { background: var(--ok-bg); border-left: 6px solid var(--ok); border-radius: var(--radius); padding: 12px 18px; margin: 0 0 20px; font-weight: 600; }
.offer-box { border: 2px dashed var(--yellow-dark); background: var(--warn-bg); box-shadow: none; }
.offer-box h2 { margin-top: 0; }
.expert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.expert-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 22px; }
.expert-card h3 { margin: 0; }
.faq h2 { font-size: 1.15rem; margin-top: 1.4em; }
.doc-list li { margin-bottom: .6em; }
.details { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; gap: 6px 16px; margin: 0; }
.details dt { color: var(--muted); font-size: .9rem; }
.details dd { margin: 0; }
.answers { grid-template-columns: minmax(140px, 45%) 1fr; }
@media (max-width: 1000px) { .two-col { grid-template-columns: minmax(0, 1fr); } .side-card { position: static; } }
@media (max-width: 600px) { .details, .answers { grid-template-columns: 1fr; } }

/* Формы */
.form-card { max-width: 760px; }
.field { margin-bottom: 20px; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.field fieldset { border: 0; margin: 0; padding: 0; }
.input, .field input[type=text], .field input[type=email], .field input[type=number], .field input[type=tel], .field input[type=date],
.field input[type=file], .field textarea, .field select, select.input, textarea.input {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid #b9c2d0; border-radius: 8px; padding: 10px 12px; min-height: 46px; }
.input:focus, .field input:focus, .field textarea:focus { border-color: var(--navy-2); outline: 3px solid rgba(245, 184, 0, .6); outline-offset: 0; }
.field .choice, .choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 6px 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.choice:hover { background: var(--navy-soft); }
.choice input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--navy); }
.choice-unknown { color: var(--muted); font-style: italic; }
.help { color: var(--muted); font-size: .88rem; margin: 2px 0 6px; }
.error { color: var(--danger); font-weight: 600; margin: 6px 0 0; font-size: .92rem; }
.has-error .input, .has-error input[type=text], .has-error textarea { border-color: var(--danger); }
.req { color: var(--danger); }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; max-width: 260px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-h { margin-top: 1.4em; }
.offer-details { margin: 8px 0 20px; padding: 10px 14px; border: 1px dashed var(--yellow-dark); border-radius: 8px; background: var(--warn-bg); }
.offer-details summary { cursor: pointer; font-weight: 600; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.stack-form .field { margin-bottom: 12px; }
.inline-fields { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.inline-fields .input { width: auto; flex: 1 1 180px; }
.upload-form { margin-top: 12px; display: grid; gap: 10px; }
.autosave-status.is-error { color: var(--danger); }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.progress span { display: block; height: 100%; background: var(--navy); }

/* Кабинет и рабочий экран */
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--navy-soft); color: var(--navy); vertical-align: middle; white-space: nowrap; }
.badge-draft { background: #eceff3; color: #3b4452; }
.badge-proposal { background: var(--warn-bg); color: #6a4f00; }
.badge-paid, .badge-in_work, .badge-in_check { background: #dde8fb; color: #163a7a; }
.badge-signed, .badge-delivered, .badge-closed { background: var(--ok-bg); color: var(--ok); }
.badge-unknown { background: #eceff3; color: #3b4452; font-weight: 600; }
.badge-collecting, .badge-review { background: var(--warn-bg); color: #6a4f00; }
.badge-cancelled { background: var(--danger-bg); color: var(--danger); }
.case-list { display: grid; gap: 10px; margin-bottom: 20px; }
.case-row { display: flex; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: var(--ink); }
.case-row:hover { border-color: var(--navy-2); box-shadow: var(--shadow); }
.case-row-side { text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.timeline { list-style: none; display: flex; gap: 4px; padding: 0; margin: 20px 0; overflow-x: auto; }
.timeline li { flex: 1 0 auto; min-width: 92px; font-size: .75rem; text-align: center; padding: 8px 6px; border-radius: 6px; background: #e6eaf0; color: var(--muted); }
.timeline-done { background: var(--navy-soft) !important; color: var(--navy) !important; }
.timeline-current { background: var(--navy) !important; color: #fff !important; font-weight: 700; }
.progress-list { list-style: none; padding: 0; margin: 0 0 14px; }
.progress-list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.progress-list li.is-done a::before { content: "\2713  "; color: var(--ok); }
.file-list, .event-list { list-style: none; padding: 0; margin: 0 0 12px; }
.file-list li, .event-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-list .small { display: block; }
.price-big { font-size: 2rem; font-weight: 700; color: var(--navy); margin-bottom: .3em; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: .85rem; color: var(--ink); }
.chip span { color: var(--muted); }
.chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.is-active span { color: #cfd8ea; }
.search-form { display: flex; gap: 8px; margin-bottom: 16px; max-width: 520px; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; border: 2px solid var(--table-line); }
.table th, .table td { text-align: left; padding: 8px 12px; border: 1px solid var(--table-line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--navy); background: var(--table-head); }
.table-small { font-size: .85rem; }
.pager { text-align: center; margin-top: 16px; }
.staff .site-header { border-bottom: 3px solid var(--yellow); }

/* Подвал */
.site-footer { background: var(--navy); color: #d5def0; padding: 22px 0; margin-top: 24px; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1.2fr 1fr 1.5fr; gap: 32px; }
.plain-list { list-style: none; padding: 0; margin: 6px 0 0; }
.plain-list li { margin-bottom: 4px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Тексты страниц (site_content) --- */
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: #3c4a62; max-width: 52em; }
.under-button p { margin: 0 0 .4em; }
.callout, .prose blockquote { background: var(--warn-bg); border-left: 6px solid var(--yellow-dark); border-radius: var(--radius); padding: 14px 20px; margin: 16px 0; }
.prose blockquote { color: var(--ink); }
.prose blockquote p:last-child, .prose blockquote ul:last-child { margin-bottom: 0; }
.prose table, .price-table, .data-table { width: 100%; border-collapse: collapse; margin: 10px 0; background: var(--surface); font-size: .95rem; border: 2px solid var(--table-line); }
.prose th, .prose td, .price-table th, .price-table td, .data-table th, .data-table td { text-align: left; vertical-align: top; padding: 8px 12px; border: 1px solid var(--table-line); }
.prose th, .price-table th, .data-table th { background: var(--table-head); color: var(--navy); font-weight: 700; }
.prose thead:not(:has(th:not(:empty))) { display: none; }
.table-scroll { overflow-x: auto; }
.data-table td.num, .price-table td.num { white-space: nowrap; font-weight: 700; color: var(--navy); }
.data-table tbody tr:nth-child(even) td { background: #f6f8fc; }
.price-main-table td:first-child a { font-weight: 600; }
@media (max-width: 600px) { .prose table { display: block; overflow-x: auto; } }
.prose h2 { margin-top: 1.1em; }
.prose h4 { font-size: 1.05rem; color: var(--navy); margin: 1.4em 0 .4em; scroll-margin-top: var(--header-h); }
.prose h2[id], .prose h4[id] { scroll-margin-top: var(--header-h); }
.block { margin-bottom: 4px; }
.block-footnote { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.block-steps h4 { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 18px; border-left: 6px solid var(--navy); }
.phone-line { margin-left: 12px; }
.qualification { color: var(--muted); font-size: .92rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; padding: 4px 16px; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 10px 0; color: var(--navy); }
.faq-item[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.footer-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: .8rem; color: #b9c6df; }
.footer-note p { margin: 0; }

/* --- Заявка --- */
.choice-card { border: 2px solid var(--line); background: #fff; padding: 12px 14px; }
.choice-card:has(input:checked) { border-color: var(--navy); background: var(--navy-soft); }
.choice-hint { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.form-h.first { margin-top: 0; }
.optional-tag { font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--navy-soft); border-radius: 99px; padding: 2px 10px; vertical-align: middle; }
.offer-details-box { border: 2px dashed var(--yellow-dark); background: var(--warn-bg); border-radius: var(--radius); padding: 14px 18px; margin: 8px 0 20px; }
.offer-details-box.is-focus { border-style: solid; }
.small-prose { font-size: .92rem; }

/* --- Анкета --- */
.is-hidden { display: none !important; }
.q-box { border: 0; margin: 0; padding: 0; min-width: 0; }
.why { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.why span { font-weight: 600; }
.empty-note { display: none; }
.questionnaire-form:not(:has(.q-field:not(.is-hidden))) .empty-note { display: block; }
.emergency-live { border-width: 2px; }
.emergency-live span { display: block; margin-top: 4px; }
.emergency-note { font-weight: 600; }

/* Двухфакторный вход сотрудников (accounts/twofactor_views.py) */
.code-input-2fa { letter-spacing: .15em; max-width: 340px; }
.qr-card { text-align: center; }
.qr { display: block; margin: 0 auto 12px; background: #fff; border: 1px solid var(--navy-soft); border-radius: var(--radius); image-rendering: pixelated; }
.secret-key { font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; }
.backup-codes { list-style: none; padding: 16px; margin: 0 0 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; background: var(--surface); border-radius: var(--radius); font-size: 1.15rem; }
.steps-list { padding-left: 1.2rem; }
.revoke-box { margin-top: 6px; }
.revoke-box summary { cursor: pointer; color: var(--navy); }
/* Приёмка услуги (D-24) */
.badge-acc-pending { background: var(--warn-bg); color: #6a4f00; }
.badge-acc-accepted, .badge-acc-deemed { background: var(--ok-bg); color: var(--ok); }
.badge-acc-objection { background: var(--danger-bg); color: var(--danger); }
.badge-acc-superseded { background: #eceff3; color: #3b4452; }

/* Миссия: полоса на главной (краткая миссия — в шапке) */
.mission-band { background: var(--navy); color: #fff; padding: 18px 0; }
.mission-band .prose { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 4px 48px; align-items: start; }
.mission-band .prose, .mission-band .prose p { color: #fff; }
.mission-band h2 { grid-column: 1 / -1; color: var(--yellow); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .5em; }
.mission-band p { margin: 0 0 .6em; }
.mission-band p:first-of-type { font-size: 1.3rem; line-height: 1.4; }
.mission-band p:last-child { margin-bottom: 0; color: #dbe3f1; }
@media (max-width: 900px) { .mission-band p:first-of-type { font-size: 1.12rem; } .mission-band .prose { grid-template-columns: 1fr; } }

/* Квалификация команды (страница «Эксперты») */
.qualification-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 5px solid var(--yellow); padding: 6px 24px 14px; }
.qualification-box h2 { margin-top: .7em; }

/* Каталог направлений и ситуаций */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 0 0 10px; font-size: .85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 8px; color: var(--muted); }
.breadcrumbs a { color: var(--navy-2); }
.direction-card { position: relative; }
.situation-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 8px; align-items: start; }
.situation-link { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 18px; text-decoration: none; color: var(--ink); }
.situation-link:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.situation-title { font-weight: 600; color: var(--navy); }
.situation-meta { white-space: nowrap; font-size: .85rem; }
.level { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-weight: 600; }
.level-C { background: var(--ok-bg); color: var(--ok); }
.situation-chosen { background: var(--navy-soft); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 14px; }
.situation-chosen p { margin: 0 0 .35em; }
.price-big { font-size: 1.8rem; font-weight: 700; color: var(--navy); margin: 0 0 .3em; }
.catalog-home-note { margin-top: 12px; }
@media (max-width: 600px) { .situation-link { flex-direction: column; align-items: flex-start; } }

.catalog-prices-h { margin-top: 28px; }

/* ===== Визуальный слой: аварийная заметка, карточки с иллюстрациями, образец акта, схема шагов ===== */

/* Карточки направлений: справа картинка (фото или иллюстрация) */
.direction-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); align-items: start; }
.direction-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px 14px 14px 18px; }
.direction-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.direction-body h3 { margin-top: 0; }
.direction-body .link-more { margin-top: .2em; }
.direction-body p { margin-bottom: .4em; }
.direction-media { flex: 0 0 150px; width: 150px; }
.direction-visual { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--navy-soft); }
.photo-credit { display: block; margin-top: 4px; font-size: .68rem; line-height: 1.3; color: var(--muted); }
.direction-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.direction-visual.is-art img { object-fit: contain; }
@media (max-width: 900px) { .direction-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 480px) {
  .direction-card { flex-direction: column; }
  .direction-media { order: -1; flex: none; width: 100%; }
  .direction-visual { aspect-ratio: auto; height: 130px; }
}

/* Страница направления: картинка справа в шапке */
.page-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: center; }
.page-head-visual { margin: 0 0 8px; }
.page-head-visual img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.page-head-visual.is-art img { object-fit: contain; }
@media (max-width: 700px) { .page-head-grid { grid-template-columns: 1fr; } .page-head-visual { max-width: 200px; } }

/* Герой главной: слот фото / иллюстрация над карточкой */
.hero-side { display: grid; gap: 16px; }
.hero-figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--navy-soft); }
.hero-figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-figure.is-art { box-shadow: none; background: transparent; }
.hero-figure.is-art img { object-fit: contain; }
@media (max-width: 900px) { .hero-figure { max-width: 440px; } }

/* «Из практики»: текст + слот фото */
.case-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.case-figure { margin: 0; position: sticky; top: calc(var(--header-h) + 12px); }
.case-figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.case-figure.is-art img { object-fit: contain; }
.case-figure figcaption { margin-top: 8px; }
@media (max-width: 900px) { .case-layout { grid-template-columns: 1fr; } .case-figure { position: static; max-width: 460px; } }

/* Схема «Как мы помогаем»: лента шагов с номерами и линиями */
.steps-flow ol { list-style: none; counter-reset: flow; margin: 30px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 24px; align-items: start; }
.steps-flow li { counter-increment: flow; position: relative; margin: 0; padding: 34px 18px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.steps-flow li::before { content: counter(flow); position: absolute; top: -19px; left: 18px; z-index: 1; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 5px var(--navy-soft); }
.steps-flow li:not(:nth-child(3n)):not(:last-child)::after { content: ""; position: absolute; top: -2px; left: 62px; width: calc(100% - 25px); height: 3px; background: var(--yellow); }
.steps-flow li > strong:first-child { display: block; font-size: 1.12rem; color: var(--navy); margin-bottom: 6px; }
@media (max-width: 900px) {
  .steps-flow ol { grid-template-columns: 1fr; gap: 26px 0; }
  .steps-flow li { padding: 16px 16px 16px 68px; }
  .steps-flow li::before { top: 14px; left: 14px; }
  .steps-flow li:not(:last-child)::after, .steps-flow li:not(:nth-child(3n)):not(:last-child)::after { content: ""; display: block; position: absolute; top: 56px; left: 31px; width: 3px; height: calc(100% - 8px); background: var(--yellow); }
}

/* «Как выглядит результат»: страница акта и мини-образцы документов */
.sample-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; align-items: start; margin: 22px 0 14px; }
.paper { position: relative; isolation: isolate; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 26px 30px 24px; font-size: .88rem; line-height: 1.5; color: var(--ink);
  box-shadow: 0 2px 4px rgba(20, 40, 75, .08), 0 14px 30px rgba(20, 40, 75, .12); }
.paper-ribbon { position: absolute; top: 12px; right: 14px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6a4f00; background: var(--warn-bg); border: 1px dashed var(--yellow-dark); border-radius: 4px; padding: 2px 8px; }
.paper-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--navy); margin-right: 84px; }
.paper-mark { flex: none; }
.paper-sub { color: var(--muted); font-size: .8rem; }
.paper-title { font-size: 1.3rem; text-align: center; margin: 18px 0 2px; }
.paper-meta { text-align: center; color: var(--muted); margin-bottom: 14px; }
.paper-facts { display: grid; grid-template-columns: 5.5rem 1fr; gap: 4px 12px; margin: 0 0 14px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.paper-facts dt { color: var(--muted); }
.paper-facts dd { margin: 0; }
.paper-h { font-size: 1rem; color: var(--navy); margin: 0 0 6px; padding-bottom: 4px; border-bottom: 3px solid var(--yellow); display: inline-block; }
.paper-list { margin: 8px 0 18px; padding-left: 1.3em; }
.paper-list li { margin-bottom: .5em; }
.paper-sign { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.paper-kep { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .8rem; color: var(--ok); border: 2px solid var(--ok); border-radius: 6px; padding: 4px 10px; background: var(--ok-bg); }
.paper-who { text-align: right; }
.sample-side { display: grid; gap: 28px; }
.paper-mini { font-size: .82rem; padding: 20px 22px 16px; }
.paper-mini::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: translate(7px, 7px); background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.paper-mini + .paper-mini { margin-left: 18px; }
.paper-kicker { margin: 0 70px .2em 0; color: var(--muted); font-size: .78rem; }
.paper-mini-title { font-size: 1.1rem; margin: 0 0 .4em; }
.paper-mini-text { margin-bottom: .6em; }
.paper-foot { margin: 10px 0 0; color: var(--muted); font-size: .78rem; }
.sk { display: block; height: 7px; border-radius: 4px; background: var(--navy-soft); margin: 7px 0; }
.sk.w90 { width: 90%; } .sk.w70 { width: 70%; } .sk.w50 { width: 50%; }
@media (max-width: 900px) {
  .sample-layout { grid-template-columns: 1fr; gap: 30px; }
  .paper { padding: 22px 18px 20px; }
  .paper-head { margin-right: 0; padding-top: 22px; }
  .paper-mini + .paper-mini { margin-left: 0; }
}

/* Нормативные документы: компактные карточки */
.norm-note { background: var(--navy-soft); border-left: 4px solid var(--yellow); border-radius: 0 var(--radius) var(--radius) 0; padding: 8px 16px; margin-bottom: 14px; font-size: .95rem; }
.norm-note p { margin: 0; }
.norm-filters { margin: 0 0 8px; position: sticky; top: var(--header-h); z-index: 5; padding: 8px 0; background: var(--bg); }
.norm-group { scroll-margin-top: calc(var(--header-h) + 50px); margin-bottom: 8px; }
.norm-group h2 { margin-top: .8em; }
.norm-intro { font-size: .95rem; color: var(--muted); }
.norm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; align-items: start; margin-bottom: 18px; }
.norm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.norm-card h3 { font-size: 1.02rem; margin: 0 0 .3em; }
.norm-gist { margin: 0 0 .5em; font-size: .92rem; color: var(--muted); }
.norm-link { margin: 0 0 .4em; font-weight: 600; }
.norm-details summary { cursor: pointer; font-size: .9rem; color: var(--navy-2); font-weight: 600; padding: 4px 0; }
.norm-details[open] summary { margin-bottom: 6px; }
.norm-details .prose { font-size: .9rem; }
.norm-details .prose p { margin-bottom: .6em; }
.norm-full { color: var(--muted); font-size: .85rem; }
@media (max-width: 1100px) { .norm-filters { top: 0; position: static; } :root { --header-h: 12px; } }

/* ===== Широкая раскладка: текст в колонки, блоки рядом ===== */
.prose-cols { columns: 2 480px; column-gap: 56px; }
.prose-cols > h2, .prose-cols > h3:first-child { column-span: all; }
.prose-cols > p, .prose-cols > ul, .prose-cols > ol, .prose-cols > blockquote, .prose-cols > h3, .prose-cols > h4, .prose-cols > table { break-inside: avoid; }
.prose-cols > h3, .prose-cols > h4 { break-after: avoid; }
.prose-cols li { break-inside: avoid; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 56px; align-items: start; }
.split > .prose > h2:first-child { margin-top: 0; }
.faq-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 0 48px; align-items: start; }
.faq-group h2 { margin-top: .6em; }
.contacts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 56px; align-items: start; }
.requisites-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 5px solid var(--yellow); padding: 6px 24px 14px; }
.requisites-card h2 { margin-top: .7em; }
.requisites-card table { font-size: .95rem; }
.price-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 48px; align-items: start; }
.section-photo { margin: 0 0 14px; }
.section-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
@media (max-width: 1000px) { .split, .contacts-grid, .price-split { grid-template-columns: 1fr; } .prose-cols { columns: 1; } }
@media (min-width: 701px) { .page-head-wide { grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); } }
.page-head-wide .page-head-visual img { aspect-ratio: 3 / 2; }
.page-head-visual figcaption { margin-top: 4px; }
@media (max-width: 700px) { .page-head-wide .page-head-visual { max-width: 100%; } }

/* Кнопка заявки в шапке страницы, справа вверху */
.page-head-cta-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: start; }
.page-head-cta { text-align: center; padding-top: 6px; }
.page-head-cta .btn { white-space: nowrap; }
.page-head-cta p { margin: 6px 0 0; }
@media (max-width: 800px) { .page-head-cta-grid { grid-template-columns: 1fr; gap: 8px; } .page-head-cta { text-align: left; padding: 0 0 12px; } }

/* ===== D-57: карточки в стиле «Ваша ситуация», строка направлений, шаги «Как это работает» ===== */
.ic { width: 1.4em; height: 1.4em; flex: none; }

/* Карточка: тёмная шапка с иконкой, тело, подвал */
.card2 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.side-card.card2, .hero-card.card2, .ladder-card.card2 { padding: 0; }
.card2-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 20px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }
.card2-head > div { min-width: 0; flex: 1 1 140px; }
.card2-head .pic { flex: none; width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; color: #ffd54a; font-weight: 800; font-size: 1.2rem; }
.card2-head .pic .ic { width: 28px; height: 28px; }
.card2-head small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #c7d3ea; font-weight: 700; }
.card2-head h2, .card2-head h3 { color: #fff; margin: 0; font-size: 1.15rem; line-height: 1.25; letter-spacing: 0; }
.card2-head .head-price { margin: .1em 0 0; font-size: 1.35rem; font-weight: 800; color: #ffd54a; line-height: 1.2; }
.card2-body { padding: 14px 20px 16px; }
.card2-body > :last-child { margin-bottom: 0; }
.card2-body h4 { margin: 1.1em 0 .5em; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card2-body > h4:first-child { margin-top: 0; }
.card2-foot { padding: 0 22px 18px; font-size: .82rem; color: var(--muted); }
.card2-foot p { margin: 0 0 .4em; }
.ladder-card .ladder-diff { margin-top: auto; padding-top: .8em; border-top: 1px solid var(--line); font-weight: 600; }
.ladder-card .ladder-diff { margin: .8em 0 0; padding-top: .7em; border-top: 1px solid var(--line); font-weight: 600; }
.side-card .card2-body .btn-block { margin: .3em 0 .8em; }
.side-card .kv { margin-bottom: .8em; }

/* Галочки и крестики в списках */
.checks, .checks-prose ul { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 8px; }
.checks li, .checks-prose li { position: relative; padding-left: 1.9em; margin: 0; }
.checks li::before, .checks-prose li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.15em; height: 1.15em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232754c5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain; }
.ladder-not li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8281c' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }

/* Плитки «формат / цена / срок / разбор» */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1em; }
.kv > div { background: var(--bg); border-radius: 14px; padding: 12px 14px; }
.kv b { display: block; font-size: 1.05rem; color: var(--navy); line-height: 1.25; }
.kv span { display: block; margin-top: 2px; font-size: .8rem; line-height: 1.35; color: var(--muted); }
.kv-one { grid-template-columns: 1fr; }
.alert-note { background: var(--amber-soft); border-radius: 14px; padding: .7em 1em; font-size: .92rem; color: #4c3500; margin: 0 0 1em; }

/* Строка «Что у вас случилось?» */
.pickline { background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 0 16px; }
.pick-h { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin: 0 0 .7em; }
.pick-h h2 { font-size: 1.35rem; margin: 0; }
.pick-h span { color: var(--muted); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pick-chip { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; background: var(--surface); border: 1.5px solid #b9c2d0; border-radius: 99px; padding: .45em 1em .45em .8em;
  font-weight: 600; font-size: .95rem; color: var(--navy); text-decoration: none; transition: background .12s, border-color .12s; }
.pick-chip .ic { width: 1.25em; height: 1.25em; color: var(--blue); }
.pick-chip:hover { border-color: var(--navy); background: var(--blue-soft); }
.pick-chip[aria-expanded="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pick-chip[aria-expanded="true"] .ic { color: #ffd54a; }
.dir-panels { margin-top: 0; }
.dir-panel { display: none; margin-top: 18px; }
.dir-panel.is-open { display: block; }
.dir-close { display: none; margin-left: auto; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 12px; padding: 6px 14px; min-height: 40px; font: inherit; font-weight: 600; cursor: pointer; }
.js .dir-close { display: inline-block; }
.dir-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; }
.dir-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dir-actions .btn { flex: 1 1 200px; }

/* Кнопки в духе C */
.btn { border-radius: 14px; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-out { background: var(--surface); border-color: #b9c2d0; color: var(--navy); }
.btn-out:hover { border-color: var(--navy); color: var(--navy); }
.btn .ic { width: 1.2em; height: 1.2em; vertical-align: -.2em; margin-left: .3em; }
.btn-ghost { color: var(--navy); }

/* Теги «Вы / Эксперт / Мы» */
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 99px; padding: .2em .75em; background: var(--blue-soft); color: var(--blue); vertical-align: middle; }
.tag-you { background: var(--amber-soft); color: var(--amber-ink); }
.tag-exp { background: #e2f4ea; color: var(--ok); }
.tag-on-dark { margin-left: auto; background: #fff; }

/* «Как это работает»: шаги слева направо */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
.how-step { position: relative; }
.how-step:not(:last-child)::after { display: none; content: ""; position: absolute; top: 30px; right: -26px; width: 26px; height: 26px; border-radius: 50%; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314284b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat center / 16px; }
.how-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 18px 16px 16px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: border-color .12s, transform .12s; }
.how-card:hover { border-color: var(--navy); transform: translateY(-2px); color: var(--ink); }
.how-card[aria-expanded="true"] { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px var(--blue); }
.how-num { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: 1.15rem; display: grid; place-items: center; }
.how-card[aria-expanded="true"] .how-num { background: var(--blue); }
.how-title { font-weight: 800; color: var(--navy); line-height: 1.25; font-size: 1.05rem; }
.how-title .tag { margin-left: 4px; }
.how-short { font-size: .92rem; color: #3c4a62; line-height: 1.45; }
.how-time { display: flex; align-items: flex-start; gap: .4em; margin-top: 2px; padding-top: 2px; font-size: .84rem; font-weight: 600; color: var(--navy); }
.how-time .ic { width: 1.1em; height: 1.1em; margin-top: .15em; color: var(--blue); }
.how-hint { margin: 10px 0 0; }
.how-panels { margin-top: 14px; display: grid; gap: 16px; }
.js .how-panel { display: none; }
.js .how-panel.is-open { display: block; }
.how-panel { scroll-margin-top: var(--header-h); }
.how-pic { font-size: 1.3rem; }
.how-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr); gap: 24px 48px; align-items: start; }
.blk-h { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 1.2em 0 .5em; }
.how-main > .blk-h:first-child { margin-top: 0; }
.how-main .prose p:last-child, .how-main .prose ul:last-child { margin-bottom: 0; }
.how-action { margin: 1.4em 0 0; }
.how-choice { border-top: 1px solid var(--line); padding: 8px 22px 22px; background: #fafbfd; }
.choice-row { display: flex; flex-wrap: wrap; gap: 12px; }
.how-stop { display: none; }
.js .how-stop { display: inline-flex; align-items: center; justify-content: center; }
.how-stop-box { background: var(--amber-soft); border-radius: 14px; padding: 14px 20px; margin-top: 16px; }
.how-stop-box h4 { margin: 0 0 .4em; font-size: 1rem; color: var(--amber-ink); }
.how-stop-box .prose p:last-child { margin-bottom: 0; }
.js .how-stop-box { display: none; }
.js .how-stop-box.is-open { display: block; }

/* Макет экрана дела */
.phone { background: var(--navy); border-radius: 32px; padding: 12px; max-width: 300px; margin: 16px auto 0; box-shadow: 0 18px 40px rgba(20, 40, 75, .25); }
.screen { background: #f6f8fc; border-radius: 22px; padding: 16px 14px; }
.screen .lab { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin: 0 0 .3em; }
.screen h4 { margin: 0 0 .6em; font-size: 1.05rem; color: var(--navy); text-transform: none; letter-spacing: 0; }
.prog { height: 10px; border-radius: 99px; background: #dfe6f3; overflow: hidden; margin: .4em 0 1em; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #4f7be8); border-radius: 99px; }
.prog-1 { width: 14%; } .prog-2 { width: 29%; } .prog-3 { width: 43%; } .prog-4 { width: 57%; } .prog-5 { width: 71%; } .prog-6 { width: 86%; } .prog-7 { width: 100%; }
.srow { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; font-size: .8rem; line-height: 1.3; }
.srow .ic { width: 1.2em; height: 1.2em; color: var(--ok); }
.srow.now { border-color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.srow.now .ic { color: var(--blue); }
.srow.wait { color: var(--muted); }
.srow.wait .ic { color: #8a97ad; }
.phone-cap { text-align: center; margin-top: 10px; }

@media (max-width: 1200px) {
  .how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .how-step:not(:last-child)::after { display: none; }
}
@media (max-width: 1000px) {
  .dir-body, .how-body { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .phone, .phone-cap { display: none; }
}
@media (max-width: 700px) {
  .price-table td.num, .data-table td.num { white-space: normal; }
  .price-table, .data-table, .prose table { font-size: .88rem; }
  .price-table th, .price-table td, .data-table th, .data-table td { padding: 6px 6px; overflow-wrap: anywhere; }
  .how-steps { grid-template-columns: 1fr; gap: 30px; }
  .how-step:not(:last-child)::after { display: block; top: auto; right: auto; bottom: -28px; left: 29px; transform: rotate(90deg); }
  .kv { grid-template-columns: 1fr 1fr; }
  .card2-head { padding: 14px 16px; }
  .card2-body { padding: 16px; }
  .card2-foot { padding: 0 16px 16px; }
  .card2-head .head-price { font-size: 1.2rem; }
  .how-choice { padding: 8px 16px 18px; }
  .choice-row .btn { width: 100%; }
}
@media (max-width: 420px) {
  .kv { grid-template-columns: 1fr; }
  .dir-close { padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) { .how-card, .problem-card, .pick-chip { transition: none; transform: none !important; } }

/* ===== D-80, D-65, D-67, D-78, D-82: компактная вёрстка, позиционирование, «любой дом», подробности, подписи фото, окно комментария ===== */

/* Позиционирование организации над заголовком главной */
.hero-position { margin: 0 0 .7em; max-width: 46em; }
.hero-position p { margin: 0; font-size: clamp(1.2rem, 2.1vw, 1.6rem); font-weight: 800; line-height: 1.3; color: var(--navy); }

/* «В любом доме есть, кому отвечать» — три плитки под строкой направлений */
.anyhouse { padding: 14px 0 18px; background: var(--bg); }
.anyhouse h2 { font-size: 1.25rem; margin: 0 0 .6em; }
.anyhouse-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.anyhouse-tile { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .12s, transform .12s; }
.anyhouse-tile:hover { border-color: var(--navy); transform: translateY(-2px); color: var(--ink); }
.anyhouse-tile .pic { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--navy); color: #ffd54a; display: grid; place-items: center; }
.anyhouse-tile .pic .ic { width: 26px; height: 26px; }
.anyhouse-text { display: block; min-width: 0; }
.anyhouse-text small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); font-weight: 700; }
.anyhouse-text b { display: block; color: var(--navy); line-height: 1.25; margin: .1em 0 .25em; }
.anyhouse-text span { display: block; font-size: .88rem; color: #3c4a62; line-height: 1.4; }
@media (max-width: 900px) { .anyhouse-grid { grid-template-columns: 1fr; } }

/* Подробности под «Подробнее» (D-67) */
details.more { margin-top: .4em; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--navy-2); padding: .25em 0; min-height: 32px; }
details.more[open] > summary { margin-bottom: .3em; }
details.more h4 { margin: .8em 0 .3em; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Окно комментария на «Контактах» (D-82) */
.comment-form { max-width: 640px; margin: 10px 0 8px; padding: 16px 18px; }
.comment-form textarea.input { min-height: 120px; }
.comment-form .field { margin-bottom: 14px; }
.comment-form .choice { margin-top: 8px; padding: 4px 6px; font-size: .88rem; }
.phone-big { font-size: 1.3rem; font-weight: 700; }
.phone-big a { color: var(--navy); }
.photo-credits-table td:nth-child(3) a, .photo-credits-table td:nth-child(4) a { overflow-wrap: anywhere; }
.price-footnote { margin: .2em 0 .4em; }
.refund-note { margin: 0 0 .6em; }

/* Позиционирование в шапке (над миссией): тот же размер, полужирный */
.header-mission .header-position { display: block; font-weight: 600; color: var(--ink); margin-bottom: .25em; }
.header-mission .prose p + p { margin-top: .2em; }

/* Карточка ситуации: цена/метка под названием, а не справа (замечание директора 10.10) */
.situation-list .situation-link { display: flex !important; flex-direction: column !important; align-items: flex-start !important; justify-content: flex-start !important; gap: 8px; }
.situation-list .situation-title { width: 100%; }
.situation-list .situation-meta { margin: 0; }

/* Юридические документы (оферта, политика) */
.legal-toc { margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--table-line, #d8dee6); border-radius: 8px; background: var(--surface, #fff); }
.legal-toc summary { cursor: pointer; font-weight: 600; }
.legal-toc ol { margin: 8px 0 0; padding-left: 1.4em; columns: 2; column-gap: 28px; font-size: .95rem; }
.legal-toc li { margin-bottom: .25em; break-inside: avoid; }
.legal-doc { overflow-wrap: anywhere; }
.legal-doc h2 { margin-top: 1.6em; }
@media (max-width: 700px) { .legal-toc ol { columns: 1; } }

/* Сворачиваемые блоки страницы «Цены» */
.more-block { margin: 18px 0; }
.more-block > summary { cursor: pointer; font-size: 1.15rem; font-weight: 700; color: var(--navy); padding: 6px 0; }
.more-block[open] > summary { margin-bottom: 6px; }

/* Главная: короткий заголовок над строкой направлений, подпись под главными кнопками, «Вопрос?» на телефоне */
.home-top { background: linear-gradient(180deg, var(--navy-soft), var(--bg)); padding: 22px 0 14px; }
.home-top h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); max-width: 28em; margin-bottom: .3em; }
.home-top .lead { max-width: 46em; }
.free-note { margin: 6px 0 0; }
.hero-grid-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) {
  .home-top { padding: 14px 0 8px; }
  .home-top h1 { font-size: 1.5rem; }
  .home-top .lead { font-size: 1rem; }
  .hero-grid-even { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 600px) {
  .helpchat .helpchat-toggle { padding: 8px 16px; min-height: 42px; font-size: .95rem; right: 12px; bottom: 12px; }
}
.hero-offer p { margin: 0 0 .6em; font-weight: 700; color: var(--navy); }
.prose table th, .prose table td { overflow-wrap: anywhere; }
@media (max-width: 600px) { .more-block .prose table { display: table; table-layout: auto; } }
.home-top .hero-sub p { margin: 0 0 .5em; font-size: inherit; }
@media (max-width: 600px) { .home-top .hero-tagline { display: none; } }
