/* ==========================================================================
   МУП «Двуречье» — New Vision
   Дизайн-система: сайт и личный кабинет заявителя.
   Шрифт Onest (OFL) подключён локально — без обращений к зарубежным сервисам.
   ========================================================================== */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/onest-cyrillic-wght-normal.woff2') format('woff2-variations'),
       url('../fonts/onest-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/onest-latin-wght-normal.woff2') format('woff2-variations'),
       url('../fonts/onest-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --ink: #0f1c2e;
  --ink-2: #44546a;
  --ink-3: #6f7f93;
  --line: #dfe6ee;
  --line-2: #edf1f6;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --bg-tint: #eef5fc;

  --brand: #0a64c2;
  --brand-600: #0855a8;
  --brand-700: #06458a;
  --brand-800: #073463;
  --brand-50: #eaf3fd;
  --brand-100: #d3e6fb;
  --aqua: #0b9a9a;
  --aqua-50: #e4f6f5;
  --heat: #ea6a12;
  --heat-50: #fff1e6;
  --ok: #15803d;
  --ok-50: #e8f6ed;
  --warn: #b45309;
  --warn-50: #fef3e2;
  --danger: #c62828;
  --danger-50: #fdecec;
  --violet: #6d28d9;
  --violet-50: #f1eafd;

  --hero-bg: radial-gradient(1200px 500px at 85% -10%, rgba(14,165,165,.45), transparent 60%),
             linear-gradient(135deg, #062d5c 0%, #0a4f9c 55%, #0a64c2 100%);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 28, 46, .06);
  --shadow: 0 1px 2px rgba(15, 28, 46, .05), 0 8px 24px rgba(15, 28, 46, .07);
  --shadow-lg: 0 20px 50px rgba(8, 35, 70, .18);
  --ring: 0 0 0 3px rgba(10, 100, 194, .28);
  --container: 1240px;
  --header-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--brand-700); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.06rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.75rem 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-100); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.check { position: relative; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 2000; padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff; font-weight: 600; }
.skip-link:focus { top: 12px; color: #fff; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.stack > * + * { margin-top: 1rem; }
.cluster { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Иконки ---------- */
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.icon--sm { width: 1em; height: 1em; vertical-align: -.15em; }
.icon--lg { width: 1.6em; height: 1.6em; }
.ico-badge { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--brand-50); color: var(--brand); flex-shrink: 0; }
.ico-badge .icon { width: 24px; height: 24px; }
.ico-badge--aqua { background: var(--aqua-50); color: var(--aqua); }
.ico-badge--heat { background: var(--heat-50); color: var(--heat); }
.ico-badge--ok { background: var(--ok-50); color: var(--ok); }
.ico-badge--warn { background: var(--warn-50); color: var(--warn); }
.ico-badge--sm { width: 36px; height: 36px; border-radius: 10px; }
.ico-badge--sm .icon { width: 18px; height: 18px; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .65rem 1.2rem;
  border: 1px solid transparent; border-radius: var(--radius); background: var(--brand); color: #fff; font-weight: 600;
  font-size: .975rem; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s, color .15s, box-shadow .15s, transform .15s; }
.btn:hover { background: var(--brand-600); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn--secondary { background: var(--brand-50); color: var(--brand-700); }
.btn--secondary:hover { background: var(--brand-100); color: var(--brand-800); }
.btn--outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { background: var(--bg-soft); color: var(--ink); border-color: #c9d4e0; }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn--white { background: #fff; color: var(--brand-700); }
.btn--white:hover { background: var(--brand-50); color: var(--brand-800); }
.btn--glass { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn--glass:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn--heat { background: var(--heat); }
.btn--heat:hover { background: #d15a08; }
.btn--danger { background: var(--danger); }
.btn--danger:hover { background: #a61f1f; }
.btn--danger-ghost { background: transparent; color: var(--danger); }
.btn--danger-ghost:hover { background: var(--danger-50); color: var(--danger); }
.btn--sm { min-height: 36px; padding: .45rem .85rem; font-size: .875rem; border-radius: 10px; }
.btn--lg { min-height: 52px; padding: .85rem 1.6rem; font-size: 1.05rem; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-weight: 500; }
.link:hover { text-decoration: underline; }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.link-arrow .icon { transition: transform .2s var(--ease); }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Формы ---------- */
.field { margin-bottom: 1.1rem; }
.field__label { display: block; margin-bottom: .4rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__hint { margin-top: .35rem; font-size: .83rem; color: var(--ink-3); }
.field__error { display: flex; gap: .35rem; align-items: flex-start; margin-top: .35rem; font-size: .85rem; color: var(--danger); }
.field { min-width: 0; }
/* Safari: длинный текст варианта в списке иначе расширяет страницу, хотя сам список помещается */
.select { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.input, .select { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 48px; padding: .7rem .9rem; border: 1px solid #cfd8e3; border-radius: var(--radius);
  background: #fff; font-size: 1rem; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 110px; resize: vertical; }
.input::placeholder { color: #9aa8b8; }
.input:hover, .select:hover { border-color: #b3c1d1; }
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.select { appearance: none; padding-right: 2.5rem; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2344546a' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.field.is-invalid .input, .field.is-invalid .select, .input.is-invalid { border-color: var(--danger); background-color: #fffafa; }
.field.is-invalid .input:focus { box-shadow: 0 0 0 3px rgba(198, 40, 40, .2); }
.input-group { position: relative; }
.input-group .input { padding-right: 3rem; }
.input-group__btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0;
  border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.input-group__btn:hover { background: var(--bg-soft); color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
.form-grid .field--wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.form-note { font-size: .85rem; color: var(--ink-3); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.check { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; font-size: .93rem; line-height: 1.5; color: var(--ink-2); }
.check input { appearance: none; flex-shrink: 0; width: 22px; height: 22px; margin: 1px 0 0; border: 1.5px solid #b8c5d4; border-radius: 6px;
  background: #fff; cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.check input::after { content: ''; width: 11px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { box-shadow: var(--ring); outline: none; }
.field.is-invalid .check input { border-color: var(--danger); }
.check a { font-weight: 500; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; cursor: pointer; }
.switch + .switch { border-top: 1px solid var(--line-2); }
.switch input { appearance: none; flex-shrink: 0; width: 46px; height: 26px; border-radius: 13px; background: #cbd5e1; position: relative;
  cursor: pointer; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:focus-visible { box-shadow: var(--ring); outline: none; }

.choices { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice__body { display: flex; gap: .85rem; align-items: flex-start; height: 100%; padding: 1rem 1.1rem; border: 1.5px solid var(--line);
  border-radius: var(--radius); background: #fff; transition: border-color .15s, background .15s, box-shadow .15s; }
.choice__body strong { display: block; font-size: .98rem; }
.choice__body small { display: block; color: var(--ink-3); font-size: .84rem; line-height: 1.45; margin-top: .15rem; }
.choice:hover .choice__body { border-color: #b6c6d8; }
.choice input:checked + .choice__body { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.choice input:focus-visible + .choice__body { box-shadow: var(--ring); }
.choices--compact .choice__body { padding: .75rem .9rem; align-items: center; }

.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  padding: 1.4rem 1rem; border: 1.5px dashed #b8c7d8; border-radius: var(--radius); background: var(--bg-soft); text-align: center;
  color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-50); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone__title { font-weight: 600; color: var(--ink); }
.dropzone__hint { font-size: .82rem; color: var(--ink-3); }
.dropzone__picked { font-size: .85rem; color: var(--brand-700); font-weight: 500; }

/* ---------- Уведомления, всплывающие окна ---------- */
.alert { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.15rem; border-radius: var(--radius); background: var(--brand-50);
  color: var(--brand-800); border: 1px solid var(--brand-100); margin-bottom: 1.25rem; font-size: .95rem; }
.alert .icon { margin-top: .1rem; }
.alert strong { display: block; color: inherit; }
.alert--ok { background: var(--ok-50); color: #14532d; border-color: #c7e8d3; }
.alert--warn { background: var(--warn-50); color: #7c3d06; border-color: #f6dcb3; }
.alert--danger { background: var(--danger-50); color: #7f1d1d; border-color: #f5c9c9; }
.alert > div > :last-child { margin-bottom: 0; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1500; display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; width: min(400px, calc(100vw - 40px)); }
.toast { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 2.6rem .9rem 1rem; border-radius: var(--radius); background: var(--ink);
  color: #fff; box-shadow: var(--shadow-lg); position: relative; font-size: .93rem; animation: toast-in .3s var(--ease); }
.toast--success { background: #0f5132; } .toast--error { background: #8a1c1c; } .toast--warning { background: #7a4a07; }
.toast__close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent;
  color: rgba(255,255,255,.75); cursor: pointer; font-size: 18px; }
.toast__close:hover { background: rgba(255,255,255,.12); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.modal { position: fixed; inset: 0; z-index: 1600; display: none; align-items: center; justify-content: center; padding: 20px;
  background: rgba(8, 20, 38, .55); backdrop-filter: blur(3px); }
.modal.is-open { display: flex; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal__dialog { position: relative; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 2rem;
  border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-lg); animation: pop .25s var(--ease); }
.modal__dialog--wide { width: min(820px, 100%); }
@keyframes pop { from { transform: translateY(12px) scale(.98); } to { transform: none; } }
.modal__close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--bg-soft);
  color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.modal__close:hover { background: var(--line-2); color: var(--ink); }
.modal__icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
  background: var(--ok-50); color: var(--ok); }
.modal__icon .icon { width: 30px; height: 30px; }
.modal__icon--error { background: var(--danger-50); color: var(--danger); }
.modal__icon--info { background: var(--brand-50); color: var(--brand); }
.modal__title { text-align: center; font-size: 1.3rem; font-weight: 700; margin-bottom: .5rem; }
.modal__text { text-align: center; color: var(--ink-2); margin-bottom: 1.5rem; }
.modal__actions { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }
body.has-modal { overflow: hidden; }

/* ---------- Карточки, пилюли, таблицы ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card__body { padding: 1.5rem; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line-2); }
.card__head h2, .card__head h3 { margin: 0; font-size: 1.08rem; }
.card--soft { background: var(--bg-soft); border-color: var(--line-2); box-shadow: none; }
.card--tint { background: linear-gradient(180deg, var(--brand-50), #fff); border-color: var(--brand-100); }

.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap; line-height: 1.5; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill--plain::before { display: none; }
.pill--info, .pill--new { background: var(--brand-50); color: var(--brand-700); }
.pill--warn, .pill--review, .pill--work { background: var(--warn-50); color: var(--warn); }
.pill--need_docs { background: var(--heat-50); color: #b4470a; }
.pill--ok, .pill--done, .pill--answered { background: var(--ok-50); color: var(--ok); }
.pill--danger, .pill--rejected { background: var(--danger-50); color: var(--danger); }
.pill--muted, .pill--draft, .pill--withdrawn, .pill--closed { background: var(--line-2); color: var(--ink-3); }
.pill--violet { background: var(--violet-50); color: var(--violet); }

.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th { padding: .8rem 1rem; text-align: left; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--bg-soft); white-space: nowrap; }
.table td { padding: .9rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tbody tr:hover td { background: #fafcfe; }
.table tr[data-href] { cursor: pointer; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.empty { padding: 3rem 1.5rem; text-align: center; color: var(--ink-3); }
.empty .ico-badge { width: 64px; height: 64px; border-radius: 20px; margin-bottom: 1rem; }
.empty .ico-badge .icon { width: 30px; height: 30px; }
.empty h3 { color: var(--ink); margin-bottom: .35rem; }

/* ---------- Типографика контента ---------- */
.prose { font-size: 1.04rem; line-height: 1.75; color: #1f2d3f; max-width: 78ch; }
.prose h2 { font-size: 1.45rem; margin-top: 2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--brand); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose table th, .prose table td { padding: .65rem .8rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose table th { background: var(--bg-soft); font-weight: 600; }
.prose blockquote { margin: 1.2em 0; padding: 1rem 1.25rem; border-left: 4px solid var(--brand); background: var(--bg-tint);
  border-radius: 0 var(--radius) var(--radius) 0; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose--full { max-width: none; }

/* ==========================================================================
   Публичный сайт
   ========================================================================== */

.alertbar { font-size: .9rem; background: var(--brand-800); color: #fff; }
.alertbar--warning { background: #8a4b07; } .alertbar--danger { background: #9b1c1c; }
.alertbar .container { display: flex; gap: .6rem; align-items: center; padding-block: .55rem; }
.alertbar a { color: #fff; text-decoration: underline; }

/* Небольшая кнопка-ссылка с иконкой (страницы входа) и скрытие подписи на телефоне */
.topbar__btn { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: none; color: var(--ink-2); cursor: pointer;
  padding: .3rem .5rem; border-radius: 8px; font: inherit; font-size: .875rem; }
.topbar__btn:hover { background: var(--bg-soft); color: var(--brand); }

/* Полоса сотрудника на публичном сайте */
.admin-bar { background: #0d1b2d; color: #c4d0de; font-size: .86rem; }
.admin-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; min-height: 40px; padding-block: .3rem; }
.admin-bar a { display: inline-flex; align-items: center; gap: .35rem; color: #fff; font-weight: 500; }
.admin-bar a:hover { color: #9ecbff; text-decoration: none; }
.admin-bar__who { display: inline-flex; align-items: center; gap: .4rem; color: #8ea2b8; }
.admin-bar__add { opacity: .9; }
.admin-bar__spacer { flex: 1; }

/* Шапка: строка с логотипом, поиском и контактами + закреплённая полоса меню */
.mobile-dispatch { display: none; align-items: center; justify-content: center; gap: .45rem; padding: .45rem 1rem; background: var(--bg-soft);
  border-bottom: 1px solid var(--line-2); color: var(--ink); font-size: .88rem; }
.mobile-dispatch:hover { text-decoration: none; color: var(--brand); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); flex-shrink: 0; }

.header { position: relative; z-index: 101; background: #fff; }
.header__main { display: flex; align-items: center; gap: 1.25rem; height: 80px; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); flex-shrink: 0; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand__mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand__name { display: block; font-size: 1.14rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; }
.brand__tag { display: block; font-size: .76rem; color: var(--ink-3); line-height: 1.3; margin-top: 2px; white-space: nowrap; }
.header__search { flex: 1 1 auto; min-width: 150px; max-width: 460px; display: flex; align-items: center; gap: .6rem; height: 46px; margin-left: .75rem;
  padding: 0 .55rem 0 .95rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); color: var(--ink-3);
  font: inherit; font-size: .95rem; text-align: left; cursor: text; transition: border-color .15s, background .15s, box-shadow .15s; }
.header__search:hover { background: #fff; border-color: #c9d6e6; }
.header__search:focus-visible { outline: none; background: #fff; border-color: var(--brand); box-shadow: var(--ring); }
.header__search span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header__search kbd { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 .4rem; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-3); font: 600 .8rem/1 inherit; }
.header__dispatch { display: flex; align-items: center; gap: .65rem; margin-left: auto; color: var(--ink); white-space: nowrap; }
.header__dispatch:hover { text-decoration: none; color: var(--ink); }
.header__dispatch:hover b { color: var(--danger); }
.header__dispatch small { display: flex; align-items: center; gap: .4rem; font-size: .76rem; color: var(--ink-3); line-height: 1.2; }
.header__dispatch small .dot { width: 6px; height: 6px; box-shadow: 0 0 0 2px rgba(34,197,94,.2); }
.header__dispatch b { display: block; font-size: 1.08rem; line-height: 1.3; letter-spacing: -.005em; transition: color .15s; }
.ico-badge--danger { background: var(--danger-50); color: var(--danger); }
.header__tools { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.header__tool { display: inline-flex; align-items: center; gap: .45rem; height: 44px; padding: 0 .75rem; border: 0; border-radius: 12px; background: none;
  color: var(--ink-2); font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.header__tool:hover { background: var(--bg-soft); color: var(--brand-700); }
.header__lk { white-space: nowrap; }
.header__tools .header__search-btn { display: none; }

.navbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transition: box-shadow .2s; }
.navbar.is-stuck { box-shadow: 0 6px 24px rgba(15,28,46,.08); }
.navbar__inner { display: flex; align-items: center; gap: .75rem; height: var(--header-h); }
.navbar__mark { display: flex; flex-shrink: 0; width: 0; margin-right: -.75rem; opacity: 0; overflow: hidden; transition: width .2s var(--ease), opacity .2s, margin .2s; }
.navbar__mark .brand__mark { width: 32px; height: 32px; }
.navbar.is-stuck .navbar__mark { width: 32px; margin-right: 0; opacity: 1; }
.navbar__cta { flex-shrink: 0; min-height: 42px; padding-block: .5rem; margin-left: auto; }

.nav { flex: 1 1 auto; min-width: 0; }
.nav__list { display: flex; align-items: center; gap: .25rem; margin: 0 0 0 -.8rem; padding: 0; list-style: none; }
.navbar.is-stuck .nav__list { margin-left: 0; }
.nav__item { position: relative; flex-shrink: 0; }
/* Ссылка целиком (текст + стрелка) — одна кликабельная зона, подсветка покрывает и стрелку */
.nav__link { position: relative; display: inline-flex; align-items: center; gap: .35rem; height: 42px; padding: 0 .8rem; border-radius: 10px;
  color: var(--ink); font-weight: 500; font-size: .96rem; white-space: nowrap; transition: background .15s, color .15s; }
.nav__link:hover, .nav__item.is-open > .nav__link { background: var(--bg-soft); color: var(--brand-700); text-decoration: none; }
.nav__item.is-active > .nav__link { color: var(--brand); }
.nav__item.is-active > .nav__link::after { content: ''; position: absolute; left: .8rem; right: .8rem; bottom: -9px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.nav__chevron { width: 16px; height: 16px; flex-shrink: 0; opacity: .55; transition: transform .2s, opacity .15s; }
.nav__link:hover .nav__chevron, .nav__item.is-open .nav__chevron { opacity: 1; }
.nav__item.is-open .nav__chevron { transform: rotate(180deg); }
.navbar.is-compact .nav__link { padding: 0 .55rem; font-size: .92rem; gap: .2rem; }
.navbar.is-compact .nav__list { gap: 0; margin-left: -.55rem; }
.navbar.is-compact .nav__item.is-active > .nav__link::after { left: .55rem; right: .55rem; }
/* Выпадающая панель по центру пункта; у крайних пунктов прижата к их краю. Скрипт дополнительно сдвигает
   её (--mega-dx), если она всё равно выходит за окно. */
.mega { position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%) translateY(6px); translate: var(--mega-dx, 0px) 0;
  width: min(560px, calc(100vw - 32px)); padding: 1rem;
  border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s var(--ease), visibility .18s; }
.nav__item:first-child .mega, .nav__item:nth-child(2) .mega { left: 0; transform: translateY(6px); }
.nav__item:last-child .mega, .nav__item:nth-last-child(2) .mega { left: auto; right: 0; transform: translateY(6px); }
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: translateX(-50%); }
.nav__item:first-child.is-open .mega, .nav__item:nth-child(2).is-open .mega,
.nav__item:last-child.is-open .mega, .nav__item:nth-last-child(2).is-open .mega { transform: none; }
.mega::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.mega__head { display: flex; gap: .85rem; align-items: center; padding: .5rem .6rem 1rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line-2); }
.mega__head strong { display: block; }
.mega__head small { color: var(--ink-3); font-size: .84rem; line-height: 1.4; display: block; }
.mega__grid { display: grid; grid-template-columns: minmax(0, 1fr) 1fr; gap: .15rem; }
.mega__link { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .7rem; border-radius: 10px; color: var(--ink); }
.mega__link:hover { background: var(--bg-soft); text-decoration: none; color: var(--brand-700); }
.mega__link .icon { color: var(--brand); margin-top: .15rem; }
.mega__link span { font-weight: 500; font-size: .93rem; line-height: 1.35; }

.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent;
  color: var(--ink-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn .badge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--heat); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.burger { display: none; }

/* Поиск */
.search-overlay { position: fixed; inset: 0; z-index: 1400; display: none; background: rgba(8,20,38,.5); backdrop-filter: blur(4px);
  padding: 12vh 20px 20px; }
.search-overlay.is-open { display: block; animation: fade .15s; }
.search-box { width: min(720px, 100%); margin: 0 auto; background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.search-box form { display: flex; align-items: center; gap: .5rem; padding: .75rem .9rem; border-bottom: 1px solid var(--line-2); }
.search-box input { flex: 1; border: 0; font-size: 1.15rem; padding: .6rem .4rem; outline: none; background: transparent; }
.search-box__results { max-height: 50vh; overflow: auto; padding: .5rem; }
.search-hit { display: flex; gap: .8rem; align-items: center; padding: .7rem .8rem; border-radius: 10px; color: var(--ink); }
.search-hit:hover, .search-hit.is-active { background: var(--bg-soft); text-decoration: none; color: var(--brand-700); }
.search-hit small { display: block; color: var(--ink-3); font-size: .8rem; }
.search-box__foot { padding: .6rem 1rem; font-size: .8rem; color: var(--ink-3); background: var(--bg-soft); }
.search-box__quick { display: flex; flex-wrap: wrap; gap: .5rem; padding: .75rem 1rem 1rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: 999px; background: var(--bg-soft);
  border: 1px solid var(--line-2); color: var(--ink-2); font-size: .86rem; cursor: pointer; }
.chip:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); text-decoration: none; }
.chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Мобильное меню */
.drawer { position: fixed; inset: 0; z-index: 1300; display: none; }
.drawer.is-open { display: block; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(8,20,38,.45); animation: fade .2s; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); background: #fff; overflow-y: auto; padding: 1.1rem;
  box-shadow: var(--shadow-lg); animation: slide-in .25s var(--ease); display: flex; flex-direction: column; gap: 1rem; }
@keyframes slide-in { from { transform: translateX(30px); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer__head { display: flex; justify-content: space-between; align-items: center; }
.drawer details { border-bottom: 1px solid var(--line-2); }
.drawer summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: .9rem .25rem; font-weight: 600; cursor: pointer; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer details[open] summary .icon { transform: rotate(180deg); }
.drawer details ul { list-style: none; margin: 0 0 .75rem; padding: 0; }
.drawer details a { display: block; padding: .55rem .5rem; border-radius: 8px; color: var(--ink-2); }
.drawer details a:hover { background: var(--bg-soft); text-decoration: none; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); color: #fff; }
.hero__waves { position: absolute; inset: auto 0 0 0; height: 140px; opacity: .5; pointer-events: none; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center;
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(4rem, 7vw, 6.5rem); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem .35rem .45rem; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); font-size: .85rem; font-weight: 500; margin-bottom: 1.25rem; }
.hero__eyebrow b { padding: .1rem .5rem; border-radius: 999px; background: #fff; color: var(--brand-700); font-size: .75rem; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); margin-bottom: 1.1rem; }
.hero h1 span { background: linear-gradient(90deg, #7ee7e1, #bfe0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: rgba(255,255,255,.85); max-width: 36rem; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }
/* Иллюстрация и плашки под ней — одна сетка, без абсолютного позиционирования */
.hero__art { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; align-self: center; }
.hero__scene { overflow: hidden; border-radius: var(--radius-xl); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  aspect-ratio: 13 / 8; }
.hero__scene svg { display: block; width: 100%; height: 100%; }
.hero__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.hero-tile { display: flex; align-items: center; gap: .75rem; min-width: 0; padding: .8rem .95rem; border-radius: var(--radius-lg);
  background: #fff; color: var(--ink); box-shadow: 0 10px 30px rgba(0,20,50,.22); transition: transform .15s var(--ease); }
.hero-tile:hover { transform: translateY(-2px); text-decoration: none; color: var(--ink); }
.hero-tile__body { min-width: 0; }
.hero-tile small { display: block; font-size: .78rem; color: var(--ink-3); line-height: 1.3; }
.hero-tile b { display: block; font-size: .98rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.outage-strip { background: var(--warn-50); border-bottom: 1px solid #f6dcb3; color: #7c3d06; font-size: .93rem; }
.outage-strip .container { display: flex; align-items: center; gap: .75rem; padding-block: .75rem; flex-wrap: wrap; }
.outage-strip a { color: #7c3d06; font-weight: 600; text-decoration: underline; }

/* Секции */
.section { padding-block: clamp(3rem, 5vw, 5rem); }
.section--soft { background: var(--bg-soft); }
.section--tint { background: linear-gradient(180deg, var(--bg-tint), #fff); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__head p { margin: .5rem 0 0; color: var(--ink-2); max-width: 44rem; }
.eyebrow { display: inline-block; margin-bottom: .6rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }

/* Сервисы */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin-top: -3.5rem; position: relative; z-index: 2; }
.service { display: flex; gap: 1rem; align-items: flex-start; padding: 1.35rem; border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.service:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15,28,46,.12); border-color: var(--brand-100); text-decoration: none; color: var(--ink); }
.service strong { display: block; font-size: 1.05rem; margin-bottom: .2rem; }
.service small { display: block; color: var(--ink-3); font-size: .88rem; line-height: 1.45; }
.service--accent { background: linear-gradient(135deg, var(--brand), var(--brand-700)); border-color: transparent; color: #fff; }
.service--accent:hover { color: #fff; }
.service--accent small { color: rgba(255,255,255,.8); }
.service--accent .ico-badge { background: rgba(255,255,255,.16); color: #fff; }
.service__arrow { margin-left: auto; color: var(--ink-3); transition: transform .2s; align-self: center; }
.service:hover .service__arrow { transform: translateX(3px); color: var(--brand); }
.service--accent .service__arrow { color: #fff; }

/* Шаги подключения */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { position: relative; padding: 1.5rem 1.35rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 1rem;
  border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 44px; right: -1.1rem; width: 1.1rem; height: 2px; background: var(--brand-100); }
.step h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.step p { font-size: .92rem; color: var(--ink-2); margin: 0; }

/* Новости */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.news-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line);
  color: var(--ink); transition: transform .2s var(--ease), box-shadow .2s; height: 100%; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.news-card__cover { aspect-ratio: 16 / 8; background: linear-gradient(135deg, var(--brand-100), var(--aqua-50)); display: grid; place-items: center; color: var(--brand); }
.news-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card__cover .icon { width: 42px; height: 42px; opacity: .55; }
.news-card__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.news-card__date { font-size: .82rem; color: var(--ink-3); }
.news-card__title { font-size: 1.08rem; font-weight: 700; line-height: 1.35; }
.news-card__text { font-size: .92rem; color: var(--ink-2); }

/* Отключения */
/* График отключений: строка с датой, ресурсом, адресом и статусом */
.oboard { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.ocheck { display: flex; gap: .6rem; max-width: 640px; margin-bottom: 1.25rem; }
.ocheck .outage-search { flex: 1; max-width: none; }
.orow { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding: 1rem 1.25rem 1rem 1rem;
  border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.orow--active { border-color: #f1c996; box-shadow: inset 4px 0 0 var(--warn); }
.orow--active.orow--emergency { border-color: #f0bcbc; box-shadow: inset 4px 0 0 var(--danger); }
.orow--finished { background: var(--bg-soft); }
.orow--finished .orow__title, .orow--finished .orow__addr { color: var(--ink-3); }
.orow__date { align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .55rem .3rem;
  border-radius: 14px; background: var(--brand-50); color: var(--brand-800); text-align: center; }
.orow--emergency .orow__date { background: var(--danger-50); color: #8f1d1d; }
.orow__date b { font-size: 1.75rem; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.orow__date span { font-size: .85rem; font-weight: 600; margin-top: .15rem; }
.orow__date small { font-size: .78rem; opacity: .75; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.orow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin-bottom: .35rem; }
.res { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--aqua); }
.res--heat, .res--hot_water { color: var(--heat); }
.orow__title { margin: 0 0 .3rem; font-size: 1.08rem; line-height: 1.35; }
.orow__addr { display: flex; gap: .35rem; margin: 0; color: var(--ink); font-size: .96rem; line-height: 1.45; }
.orow__addr .icon { flex-shrink: 0; margin-top: .2rem; color: var(--ink-3); }
.orow__when { margin: .3rem 0 0; font-size: .86rem; color: var(--ink-3); }
.state { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.state--active { background: var(--warn-50); color: #9a4a06; }
.state--active::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }
.orow--emergency .state--active { background: var(--danger-50); color: var(--danger); }
.state--upcoming { background: var(--brand-50); color: var(--brand-700); }
.state--finished { background: var(--line-2); color: var(--ink-3); }
@keyframes blink { 50% { opacity: .25; } }

/* Вопросы и ответы на главной: вопросы слева, иллюстрация справа */
.faq-home { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.faq-home__aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.faq-home__art svg { display: block; width: 100%; height: auto; }
.faq-home__cta { padding: 1.25rem 1.35rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.faq-home__cta b { display: block; font-size: 1.1rem; margin-bottom: .35rem; }
.faq-home__cta p { margin: 0 0 1rem; color: var(--ink-2); font-size: .95rem; }

/* Новости на главной: главная новость крупно + лента */
.newsblock { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.newsblock--single { grid-template-columns: minmax(0, 720px); }
.news-feature { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-xl); background: #fff; border: 1px solid var(--line);
  color: var(--ink); transition: box-shadow .2s, border-color .2s; }
.news-feature:hover { text-decoration: none; color: var(--ink); border-color: var(--brand-100); box-shadow: var(--shadow); }
.news-feature__img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.news-feature__body { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; padding: clamp(1.25rem, 2.5vw, 2rem); }
.news-feature h3 { margin: 0; font-size: clamp(1.3rem, 1.1rem + .7vw, 1.65rem); line-height: 1.25; }
.news-feature p { margin: 0; color: var(--ink-2); font-size: 1.02rem; line-height: 1.65; }
.news-feature .link-arrow { margin-top: .25rem; }
.news-date { display: inline-flex; padding: .25rem .7rem; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .84rem; font-weight: 600; }
.news-list { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border-radius: var(--radius-xl); background: #fff; border: 1px solid var(--line); }
.news-item { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.news-item:last-child { border-bottom: 0; }
.news-item:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.news-item:hover .news-item__title { color: var(--brand-700); }
.news-item time { grid-row: 1 / span 2; padding-top: .15rem; font-size: .85rem; font-weight: 600; color: var(--brand-700); white-space: nowrap; }
.news-item__title { font-weight: 700; font-size: 1.02rem; line-height: 1.4; transition: color .15s; }
.news-item__text { margin-top: .25rem; font-size: .9rem; line-height: 1.5; color: var(--ink-3); }

.outage-search { position: relative; display: block; max-width: 520px; }
.outage-search .icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.outage-search .input { padding-left: 2.6rem; }

/* О компании */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: start; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.fact { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.fact small { display: block; color: var(--ink-3); font-size: .8rem; }
.fact b { font-weight: 600; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.faq details { border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); border-color: var(--brand-100); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.05rem 1.25rem;
  font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--brand); transition: transform .2s; flex-shrink: 0; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq__answer { padding: 0 1.25rem 1.2rem; color: var(--ink-2); }

/* CTA */
.cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius-xl); background: var(--hero-bg); color: #fff; position: relative; overflow: hidden; }
.cta h2 { color: #fff; margin-bottom: .5rem; }
.cta p { color: rgba(255,255,255,.85); margin: 0; }

/* Обратная связь */
.feedback { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2.5rem; align-items: start; }
.contact-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1.5rem; }
.contact-item { display: flex; gap: .9rem; align-items: flex-start; }
.contact-item small { display: block; color: var(--ink-3); font-size: .82rem; }
.contact-item a, .contact-item b { font-weight: 600; color: var(--ink); }

/* Полезные ссылки */
.links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.link-card { display: flex; gap: .85rem; align-items: center; padding: 1rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 600; font-size: .94rem; line-height: 1.35; }
.link-card:hover { border-color: var(--brand-100); box-shadow: var(--shadow); text-decoration: none; color: var(--brand-700); }
.link-card small { display: block; font-weight: 400; color: var(--ink-3); font-size: .8rem; }

/* Внутренние страницы */
.page-hero { background: linear-gradient(180deg, var(--bg-tint), #fff); border-bottom: 1px solid var(--line-2); }
.page-hero .container { padding-block: 1.75rem 2.25rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .86rem; color: var(--ink-3); }
.crumbs li { display: inline-flex; align-items: center; gap: .4rem; }
.crumbs li + li::before { content: ''; width: 5px; height: 5px; border-top: 1.5px solid #9fb0c2; border-right: 1.5px solid #9fb0c2; transform: rotate(45deg); }
.crumbs a { color: var(--ink-2); }
.page-hero h1 { margin-bottom: .4rem; }
.page-hero__lead { font-size: 1.08rem; color: var(--ink-2); max-width: 50rem; margin: 0; }
.page-hero__row { display: flex; gap: 1.25rem; align-items: center; }

.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 2.5rem; padding-block: 2.5rem 4rem; align-items: start; }
.layout--full { grid-template-columns: minmax(0, 1fr); }
.layout > * { min-width: 0; }
/* Две колонки внутри страницы (подключение, обращения): основной текст + боковая карточка */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.split > * { min-width: 0; }
.prose { overflow-wrap: break-word; }
.side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.side-nav { border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; padding: .5rem; }
.side-nav__title { padding: .75rem .85rem .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.side-nav a { display: flex; gap: .6rem; align-items: center; padding: .6rem .85rem; border-radius: 10px; color: var(--ink-2); font-size: .94rem; font-weight: 500; }
.side-nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.side-nav a.is-active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.side-nav a .icon { color: var(--ink-3); }
.side-nav a.is-active .icon { color: var(--brand); }
.help-card { padding: 1.25rem; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--brand-700), var(--brand)); color: #fff; }
.help-card h3 { color: #fff; font-size: 1.05rem; margin-bottom: .35rem; }
.help-card p { color: rgba(255,255,255,.85); font-size: .9rem; margin-bottom: 1rem; }
.help-card a:not(.btn) { color: #fff; font-weight: 700; font-size: 1.1rem; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: #fff; color: var(--ink); transition: box-shadow .2s, border-color .2s, transform .2s var(--ease); }
.section-card:hover { box-shadow: var(--shadow); border-color: var(--brand-100); transform: translateY(-2px); text-decoration: none; color: var(--ink); }
.section-card strong { display: block; font-size: 1.02rem; margin-bottom: .2rem; }
.section-card small { display: block; color: var(--ink-3); font-size: .87rem; line-height: 1.45; }

.block { margin-top: 2.5rem; }
.block > h2 { font-size: 1.35rem; }

.docs { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.doc { display: flex; gap: 1rem; align-items: center; padding: .9rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff;
  color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.doc:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); }
.doc__ext { display: grid; place-items: center; width: 44px; height: 50px; flex-shrink: 0; border-radius: 6px 14px 6px 6px; background: var(--brand);
  color: #fff; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.doc__ext--pdf { background: #d6453d; } .doc__ext--doc, .doc__ext--docx, .doc__ext--rtf, .doc__ext--odt { background: #2b6cc4; }
.doc__ext--xls, .doc__ext--xlsx, .doc__ext--ods { background: #1f8a4c; } .doc__ext--zip, .doc__ext--rar, .doc__ext--7z { background: #8b6a3e; }
.doc__ext--jpg, .doc__ext--jpeg, .doc__ext--png, .doc__ext--tif, .doc__ext--tiff { background: #7c4dbe; }
.doc__body { flex: 1; min-width: 0; }
.doc__title { display: block; font-weight: 600; line-height: 1.35; }
.doc__meta { display: block; margin-top: .15rem; font-size: .82rem; color: var(--ink-3); }
.doc__dl { color: var(--brand); }
.year-group + .year-group { margin-top: 1.75rem; }
.year-group h3 { display: flex; align-items: center; gap: .6rem; font-size: 1.1rem; }
.year-group h3 .pill { font-weight: 600; }

.list-pubs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.pub { display: grid; grid-template-columns: 96px 1fr; gap: 1.25rem; padding: 1.2rem; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: #fff; color: var(--ink); transition: box-shadow .2s, border-color .2s; }
.pub:hover { box-shadow: var(--shadow); border-color: var(--brand-100); text-decoration: none; color: var(--ink); }
.pub__date { text-align: center; padding: .65rem .4rem; border-radius: var(--radius); background: var(--bg-tint); color: var(--brand-700); line-height: 1.1; }
.pub__date b { display: block; font-size: 1.6rem; }
.pub__date span { font-size: .8rem; }
.pub__title { font-size: 1.08rem; font-weight: 700; margin-bottom: .3rem; line-height: 1.35; }
.pub__text { font-size: .93rem; color: var(--ink-2); }
.pub.is-pinned { border-color: var(--brand-100); background: linear-gradient(180deg, #fff, var(--bg-tint)); }
.pub--cover { grid-template-columns: 220px 1fr; align-items: start; }
.pub__img { display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; background: var(--bg-soft); }
.pub__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.pub:hover .pub__img img { transform: scale(1.03); }
.pub__body { display: block; min-width: 0; }
.pub__when { display: flex; align-items: center; gap: .3rem; font-size: .84rem; color: var(--brand-700); font-weight: 600; margin-bottom: .35rem; }
.pub__title, .pub__text { display: block; }
/* Фото в новости */
.article-cover { margin: 0 0 1.75rem; overflow: hidden; border-radius: var(--radius-lg); }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.prose img { border-radius: var(--radius); }
.prose figure { margin: 1.5rem 0; }
.prose figure img { display: block; width: auto; max-width: 100%; max-height: 560px; height: auto; margin-inline: auto; cursor: zoom-in; }
.prose figcaption { margin-top: .5rem; font-size: .88rem; color: var(--ink-3); text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.gallery__item { position: relative; display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--bg-soft); cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item span { position: absolute; inset: auto 0 0 0; padding: .5rem .7rem; background: linear-gradient(transparent, rgba(8,20,38,.7)); color: #fff; font-size: .82rem; }
/* Просмотр фото на весь экран */
.lightbox { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 3.5rem 1rem;
  background: rgba(8,20,38,.92); animation: fade .15s; }
.lightbox[hidden] { display: none !important; }
.lightbox__img { max-width: min(1200px, 100%); max-height: 100%; border-radius: 8px; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox__cap { position: absolute; left: 0; right: 0; bottom: 1rem; text-align: center; color: #dbe4ee; font-size: .92rem; padding: 0 4rem; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12);
  color: #fff; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.lightbox__btn:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
/* Картинки в новостях на главной */
.news-item--img { grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
.news-item__img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; grid-row: 1 / span 3; }
.news-item__body { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 1rem; min-width: 0; }
.news-item--img .news-item__body { grid-template-columns: minmax(0, 1fr); }
.news-item--img time { grid-row: auto; padding: 0 0 .15rem; }

.article-meta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; color: var(--ink-3); font-size: .92rem; margin-bottom: 1.5rem; }

/* Закупки */
.proc { padding: 1.3rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; }
.proc + .proc { margin-top: 1rem; }
.proc__top { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; font-size: .86rem; color: var(--ink-3); }
.proc__title { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; }
.proc__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding: .9rem 1rem; border-radius: var(--radius);
  background: var(--bg-soft); font-size: .9rem; }
.proc__grid small { display: block; color: var(--ink-3); font-size: .78rem; }
.proc__grid b { font-weight: 600; }

/* Тарифы */
.tariff-group + .tariff-group { margin-top: 2rem; }
.tariff-group h3 { display: flex; gap: .65rem; align-items: center; }

/* Калькулятор */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start; }
.calc__form { padding: 1.5rem; }
.calc__result { position: sticky; top: calc(var(--header-h) + 20px); padding: 1.5rem; border-radius: var(--radius-xl); background: var(--hero-bg); color: #fff; }
.calc__result h3 { color: #fff; font-size: 1rem; font-weight: 600; opacity: .85; margin-bottom: .35rem; }
.calc__total { font-size: clamp(2rem, 1.6rem + 1.5vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc__total small { font-size: 1rem; font-weight: 500; opacity: .75; }
.calc__total.is-text { font-size: 1.6rem; }
.calc__rows { margin: 1.25rem 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; font-size: .9rem; }
.calc__rows li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid rgba(255,255,255,.15); }
.calc__rows li span:first-child { opacity: .85; }
.calc__rows b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc__note { font-size: .82rem; opacity: .8; margin-bottom: 1.25rem; }
.range-row { display: flex; gap: .75rem; align-items: center; }
.range-row input[type=range] { flex: 1; accent-color: var(--brand); }
.range-row .input { width: 140px; flex-shrink: 0; }

/* Вход в ЛК на сайте */
.lk-entry { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 2rem; align-items: start; }

/* Правовые документы */
.legal-meta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.legal-meta .pill { font-size: .82rem; }
.legal-toc { font-size: .9rem; }

/* Подвал */
.footer { background: #0b1a2e; color: #b7c4d3; font-size: .92rem; margin-top: auto; }
.footer a { color: #dbe5f0; }
.footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding-block: 3.5rem 2.5rem; }
.footer .brand { color: #fff; margin-bottom: 1rem; }
.footer .brand__tag { color: #8b9bb0; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .55rem; }
.footer__owner { font-size: .82rem; line-height: 1.6; color: #8b9bb0; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer__bottom .container { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; padding-block: 1.25rem; font-size: .84rem; color: #8b9bb0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.footer__dispatch { display: inline-flex; gap: .6rem; align-items: center; padding: .75rem 1rem; border-radius: var(--radius); background: rgba(255,255,255,.06); margin-top: .5rem; }
.footer__dispatch b { color: #fff; font-size: 1.1rem; }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; }
.socials a:hover { background: var(--brand); }

/* Cookie-баннер и доступность */
.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 1450; width: min(460px, calc(100vw - 40px)); padding: 1.25rem; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .9rem; animation: toast-in .35s var(--ease); }
.cookie h3 { font-size: 1rem; display: flex; gap: .5rem; align-items: center; }
.cookie p { color: var(--ink-2); margin-bottom: 1rem; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cookie__settings { margin: .5rem 0 1rem; padding: .25rem 1rem; border-radius: var(--radius); background: var(--bg-soft); }
.cookie__settings small { display: block; color: var(--ink-3); font-size: .8rem; font-weight: 400; }

.a11y-panel { position: fixed; top: 0; left: 0; right: 0; z-index: 1550; background: #fff; border-bottom: 2px solid var(--ink); box-shadow: var(--shadow-lg); padding: 1rem 0; }
.a11y-panel .container { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; }
.a11y-group { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.a11y-group > span { font-weight: 600; font-size: .9rem; margin-right: .25rem; }
.a11y-opt { min-width: 44px; min-height: 40px; padding: .35rem .7rem; border: 2px solid var(--ink); border-radius: 8px; background: #fff; color: #000;
  font-weight: 700; cursor: pointer; }
.a11y-opt.is-active { outline: 3px solid var(--brand); outline-offset: 2px; }
.a11y-opt--bw { background: #fff; color: #000; } .a11y-opt--wb { background: #000; color: #fff; }
.a11y-opt--blue { background: #9dd1ff; color: #063462; } .a11y-opt--beige { background: #f7f3d6; color: #4d4b43; }

/* ==========================================================================
   Режимы для слабовидящих (ГОСТ Р 52872-2019)
   ========================================================================== */
html[data-a11y-font='130'] { font-size: 125%; }
html[data-a11y-font='160'] { font-size: 150%; }
html[data-a11y-spacing='wide'] body { letter-spacing: .08em; word-spacing: .16em; line-height: 1.9; }
html[data-a11y-images='off'] img, html[data-a11y-images='off'] .decor, html[data-a11y-images='off'] .hero__art { display: none !important; }
html[data-a11y-images='gray'] img, html[data-a11y-images='gray'] .decor { filter: grayscale(1); }
html[data-a11y-scheme] { --shadow-sm: none; --shadow: none; --shadow-lg: 0 0 0 2px currentColor; }
html[data-a11y-scheme] .hero__waves, html[data-a11y-scheme] .decor { display: none; }
html[data-a11y-scheme='bw'] { --ink: #000; --ink-2: #000; --ink-3: #000; --line: #000; --line-2: #000; --bg: #fff; --bg-soft: #fff; --bg-tint: #fff;
  --brand: #000; --brand-600: #000; --brand-700: #000; --brand-800: #000; --brand-50: #fff; --brand-100: #000; --aqua: #000; --aqua-50: #fff;
  --heat: #000; --heat-50: #fff; --hero-bg: #fff; }
html[data-a11y-scheme='wb'] { --ink: #fff; --ink-2: #fff; --ink-3: #fff; --line: #fff; --line-2: #fff; --bg: #000; --bg-soft: #000; --bg-tint: #000;
  --brand: #fff; --brand-600: #fff; --brand-700: #fff; --brand-800: #fff; --brand-50: #000; --brand-100: #fff; --aqua: #fff; --aqua-50: #000;
  --heat: #fff; --heat-50: #000; --hero-bg: #000; }
html[data-a11y-scheme='blue'] { --ink: #063462; --ink-2: #063462; --ink-3: #063462; --line: #063462; --line-2: #063462; --bg: #9dd1ff; --bg-soft: #9dd1ff;
  --bg-tint: #9dd1ff; --brand: #063462; --brand-600: #063462; --brand-700: #063462; --brand-800: #063462; --brand-50: #9dd1ff; --brand-100: #063462;
  --aqua: #063462; --aqua-50: #9dd1ff; --heat: #063462; --heat-50: #9dd1ff; --hero-bg: #9dd1ff; }
html[data-a11y-scheme='beige'] { --ink: #4d4b43; --ink-2: #4d4b43; --ink-3: #4d4b43; --line: #4d4b43; --line-2: #4d4b43; --bg: #f7f3d6; --bg-soft: #f7f3d6;
  --bg-tint: #f7f3d6; --brand: #4d4b43; --brand-600: #4d4b43; --brand-700: #4d4b43; --brand-800: #4d4b43; --brand-50: #f7f3d6; --brand-100: #4d4b43;
  --aqua: #4d4b43; --aqua-50: #f7f3d6; --heat: #4d4b43; --heat-50: #f7f3d6; --hero-bg: #f7f3d6; }
html[data-a11y-scheme] body, html[data-a11y-scheme] .card, html[data-a11y-scheme] .service, html[data-a11y-scheme] .header,
html[data-a11y-scheme] .news-card, html[data-a11y-scheme] .section-card, html[data-a11y-scheme] .doc, html[data-a11y-scheme] .mega,
html[data-a11y-scheme] .input, html[data-a11y-scheme] .select, html[data-a11y-scheme] .step, html[data-a11y-scheme] .faq details,
html[data-a11y-scheme] .side-nav, html[data-a11y-scheme] .pub, html[data-a11y-scheme] .fact, html[data-a11y-scheme] .orow, html[data-a11y-scheme] .news-feature, html[data-a11y-scheme] .news-list, html[data-a11y-scheme] .hero-tile,
html[data-a11y-scheme] .link-card, html[data-a11y-scheme] .proc, html[data-a11y-scheme] .choice__body, html[data-a11y-scheme] .cookie,
html[data-a11y-scheme] .footer, html[data-a11y-scheme] .navbar, html[data-a11y-scheme] .mobile-dispatch, html[data-a11y-scheme] .header__search, html[data-a11y-scheme] .cab-side, html[data-a11y-scheme] .cab-top,
html[data-a11y-scheme] .modal__dialog, html[data-a11y-scheme] .help-card, html[data-a11y-scheme] .calc__result {
  background: var(--bg) !important; color: var(--ink) !important; border-color: var(--ink) !important; }
html[data-a11y-scheme] .hero, html[data-a11y-scheme] .cta, html[data-a11y-scheme] .service--accent, html[data-a11y-scheme] .auth-aside {
  background: var(--bg) !important; color: var(--ink) !important; border: 2px solid var(--ink); }
html[data-a11y-scheme] .hero *, html[data-a11y-scheme] .cta *, html[data-a11y-scheme] .footer *, html[data-a11y-scheme] .help-card *,
html[data-a11y-scheme] .calc__result *, html[data-a11y-scheme] .service--accent *, html[data-a11y-scheme] .auth-aside * { color: var(--ink) !important; }
html[data-a11y-scheme] .btn { background: var(--bg) !important; color: var(--ink) !important; border: 2px solid var(--ink) !important; }
html[data-a11y-scheme] a { text-decoration: underline; }

/* ==========================================================================
   Страницы входа и регистрации
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: #fff; }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 2.5rem clamp(2rem, 4vw, 4rem);
  background: var(--hero-bg); color: #fff; }
.auth-aside .brand { color: #fff; }
.auth-aside .brand__tag { color: rgba(255,255,255,.7); }
/* Логотип на тёмном и синем фоне: «водная» половина светлее, чтобы не сливаться */
.footer .lm-water, .auth-aside .lm-water { fill: #5aa9f7; }
.auth-aside h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem); margin-bottom: 1rem; }
.auth-aside p { color: rgba(255,255,255,.82); }
.auth-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.auth-points li { display: flex; gap: .85rem; align-items: flex-start; }
.auth-points .ico-badge { background: rgba(255,255,255,.14); color: #fff; }
.auth-points b { display: block; color: #fff; }
.auth-points small { color: rgba(255,255,255,.75); font-size: .88rem; }
.auth-aside__foot { font-size: .85rem; color: rgba(255,255,255,.7); }
.auth-aside__foot a { color: #fff; font-weight: 600; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 2.5rem clamp(1.25rem, 5vw, 5rem); }
.auth-box { width: 100%; max-width: 460px; margin: 0 auto; }
.auth-box--wide { max-width: 560px; }
.auth-box h1 { font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem); margin-bottom: .35rem; }
.auth-box__lead { color: var(--ink-2); margin-bottom: 2rem; }
.auth-links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .92rem; margin: -.25rem 0 1.25rem; }
.auth-foot { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2); font-size: .93rem; color: var(--ink-2); text-align: center; }
.auth-brand { display: none; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; font-size: .9rem; }
.pw-meter { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: .5rem; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s, background .25s; }
.pw-meter[data-level='2'] span { width: 50%; background: var(--warn); }
.pw-meter[data-level='3'] span { width: 75%; background: #65a30d; }
.pw-meter[data-level='4'] span { width: 100%; background: var(--ok); }
.result-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; margin-bottom: 1.25rem; background: var(--ok-50); color: var(--ok); }
.result-icon .icon { width: 34px; height: 34px; }
.result-icon--info { background: var(--brand-50); color: var(--brand); }
.result-icon--error { background: var(--danger-50); color: var(--danger); }

/* ==========================================================================
   Личный кабинет заявителя
   ========================================================================== */
.cab { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); background: var(--bg-soft); }
.cab-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1.25rem; padding: 1.25rem 1rem;
  background: #fff; border-right: 1px solid var(--line-2); }
.cab-side .brand { padding: .25rem .5rem; }
.cab-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem; }
.cab-nav__label { padding: .9rem .75rem .35rem; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.cab-nav a { display: flex; align-items: center; gap: .75rem; padding: .65rem .75rem; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.cab-nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.cab-nav a.is-active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.cab-nav a .icon { color: var(--ink-3); }
.cab-nav a.is-active .icon { color: var(--brand); }
.cab-nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--heat); color: #fff; font-size: .74rem;
  font-weight: 700; display: grid; place-items: center; }
.cab-side__help { margin-top: auto; padding: 1rem; border-radius: var(--radius); background: var(--bg-soft); font-size: .86rem; color: var(--ink-2); }
.cab-side__help b { display: block; color: var(--ink); font-size: 1rem; }
.cab-side__help .link, .cab-side__help a.small { display: block; text-align: left; }
.cab-main { min-width: 0; display: flex; flex-direction: column; }
.cab-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; height: 68px; padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(245,248,251,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
.cab-top__title { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; font-weight: 600; color: var(--ink-2); font-size: .95rem; }
.cab-top__spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem .3rem .3rem; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  color: var(--ink); cursor: pointer; font-weight: 600; font-size: .9rem; }
.user-chip:hover { border-color: #c5d1de; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--aqua));
  color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.dropdown { position: relative; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: .5rem; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: none; z-index: 60; }
.dropdown.is-open .dropdown__menu { display: block; animation: fade .15s; }
.dropdown__menu a, .dropdown__menu button { display: flex; width: 100%; gap: .6rem; align-items: center; padding: .6rem .7rem; border: 0; border-radius: 8px;
  background: none; color: var(--ink-2); font-size: .92rem; text-align: left; cursor: pointer; }
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.dropdown__menu hr { margin: .35rem 0; }
.dropdown__head { padding: .5rem .7rem .7rem; border-bottom: 1px solid var(--line-2); margin-bottom: .35rem; font-size: .85rem; color: var(--ink-3); }
.dropdown__head b { display: block; color: var(--ink); font-size: .95rem; }
.cab-content { width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2rem); flex: 1; }
.cab-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.cab-head h1 { margin: 0; font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
.cab-head p { margin: .35rem 0 0; color: var(--ink-2); }
.back-link { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: .75rem; font-size: .9rem; color: var(--ink-3); font-weight: 500; }
.back-link:hover { color: var(--brand); text-decoration: none; }
.cab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.cab-footer { padding: 1.25rem 2rem; font-size: .82rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.cab-footer a { color: var(--ink-3); }

.welcome { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.75rem 2rem; margin-bottom: 1.5rem; border-radius: var(--radius-xl); background: var(--hero-bg); color: #fff; }
.welcome h1 { color: #fff; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); margin-bottom: .3rem; }
.welcome p { margin: 0; color: rgba(255,255,255,.85); }
.welcome__decor { position: absolute; right: -40px; top: -40px; width: 260px; opacity: .18; pointer-events: none; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { display: flex; gap: .9rem; align-items: center; padding: 1.1rem 1.2rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); color: var(--ink); }
a.kpi:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); }
.kpi b { display: block; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--ink-3); font-size: .86rem; }

/* Карточка заявки */
.app-card { display: block; padding: 1.25rem 1.35rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); color: var(--ink);
  transition: box-shadow .2s, border-color .2s; }
.app-card + .app-card { margin-top: .9rem; }
.app-card:hover { box-shadow: var(--shadow); border-color: var(--brand-100); text-decoration: none; color: var(--ink); }
.app-card__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: center; margin-bottom: .35rem; }
.app-card__num { font-weight: 700; font-size: 1.02rem; }
.app-card__type { color: var(--ink-2); font-size: .93rem; }
.app-card__meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-top: .9rem; font-size: .84rem; color: var(--ink-3); }
.app-card__meta span { display: inline-flex; gap: .35rem; align-items: center; }
.app-card--attention { border-color: #f6c79b; background: linear-gradient(180deg, #fff, var(--heat-50)); }
.unread-dot { display: inline-flex; align-items: center; gap: .35rem; color: var(--heat); font-weight: 600; }

.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.progress__step { position: relative; padding-top: .9rem; font-size: .8rem; color: var(--ink-3); }
.progress__step::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 3px; background: var(--line-2); }
.progress__step.is-done::before { background: var(--brand); }
.progress__step.is-current { color: var(--ink); font-weight: 600; }
.progress__step.is-current::before { background: linear-gradient(90deg, var(--brand), var(--brand-100)); }
.progress__step.is-warn::before { background: var(--heat); }
.progress__step.is-bad::before { background: var(--danger); }

/* Мастер */
.wizard-steps { display: flex; gap: .5rem; margin: 0 0 1.75rem; padding: 0; list-style: none; counter-reset: wz; overflow-x: auto; }
.wizard-steps li { flex: 1; min-width: 150px; display: flex; gap: .65rem; align-items: center; padding: .8rem 1rem; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--line); font-size: .9rem; color: var(--ink-3); font-weight: 500; }
.wizard-steps li::before { counter-increment: wz; content: counter(wz); display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%; background: var(--line-2); color: var(--ink-2); font-weight: 700; font-size: .85rem; }
.wizard-steps li.is-done::before { content: '✓'; background: var(--ok); color: #fff; }
.wizard-steps li.is-warn::before { content: '!'; background: var(--warn, #d98a00); color: #fff; }
.wizard-steps li.is-current { border-color: var(--brand); color: var(--ink); background: var(--brand-50); }
.wizard-steps li.is-current::before { background: var(--brand); color: #fff; }
.wizard-steps a { color: inherit; }
.wizard-steps a:hover { text-decoration: none; }

.slot { padding: 1.1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.slot + .slot { margin-top: .9rem; }
.slot.is-filled { border-color: #bfe3cc; }
.slot.is-missing { border-color: #f6c79b; }
.slot__head { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; margin-bottom: .8rem; }
.slot__title { font-weight: 600; line-height: 1.4; }
.slot__title small { display: block; font-weight: 400; color: var(--ink-3); font-size: .84rem; margin-top: .15rem; }
.slot__files { display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; margin-bottom: .8rem; }
.file-row { display: flex; gap: .7rem; align-items: center; padding: .55rem .7rem; border-radius: 10px; background: var(--bg-soft); font-size: .9rem; }
.file-row .doc__ext { width: 34px; height: 38px; font-size: .58rem; border-radius: 5px 10px 5px 5px; }
.file-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-row__size { color: var(--ink-3); font-size: .8rem; white-space: nowrap; }
.file-row form { margin: 0; }

.summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; margin: 0; }
.card__body > .summary { margin-block: -.7rem; }
.summary__row { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line-2); font-size: .95rem; }
.summary__row:last-child { border-bottom: 0; }
.summary__row dt { color: var(--ink-3); }
.summary__row dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.summary--stack .summary__row { grid-template-columns: minmax(0, 1fr); gap: .1rem; padding: .55rem 0; }

/* ---------- Документы и договоры в кабинете ---------- */
.doc-line { display: flex; align-items: center; gap: .4rem; }
.doc-line > .doc { flex: 1; min-width: 0; }
.doc-line form { margin: 0; flex-shrink: 0; }
.doc .pill { flex-shrink: 0; }
.icon-btn--sm { width: 34px; height: 34px; border-radius: 9px; }
.clist { display: grid; grid-template-columns: minmax(0, 1fr); }
.citem { display: flex; align-items: center; gap: .9rem; padding: .95rem 1.35rem; border-top: 1px solid var(--line-2); color: var(--ink); }
.citem:first-child { border-top: 0; }
.citem:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.citem__body { flex: 1; min-width: 0; }
.citem__body b { display: block; line-height: 1.35; }
.citem__body small { display: block; color: var(--ink-3); font-size: .85rem; margin-top: .1rem; }
.citem__sum { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.citem__arrow { color: var(--ink-3); flex-shrink: 0; }
.pill--c-sent { background: var(--heat-50); color: #b4470a; }
.pill--c-signed { background: var(--violet-50); color: var(--violet); }
.pill--c-concluded { background: var(--ok-50); color: var(--ok); }
.pill--c-cancelled { background: var(--line-2); color: var(--ink-3); }
.rgroup { padding: 1.1rem 1.35rem; border-top: 1px solid var(--line-2); }
.rgroup:first-of-type { border-top: 0; }
.rgroup__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.sign-card { border-color: #f1c996; }
.sign-steps { margin: 0; padding: 0; list-style: none; counter-reset: sign; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.sign-steps > li { position: relative; padding-left: 2.6rem; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.sign-steps > li::before { counter-increment: sign; content: counter(sign); position: absolute; left: 0; top: -.1rem; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .9rem; }
.sign-steps form { width: 100%; }
.slot__lib { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed var(--line); }
.slot__lib .select { flex: 1 1 220px; width: auto; }
.select--sm, .input--sm { min-height: 38px; padding-top: .4rem; padding-bottom: .4rem; font-size: .92rem; }
.dropzone--sm { padding: .9rem; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-section { margin: 1.25rem 0 .75rem; font-size: 1rem; }
.hint-line { display: flex; gap: .45rem; align-items: flex-start; margin: 0 0 1.25rem; font-size: .88rem; color: var(--ink-3); }
.hint-line .icon { flex-shrink: 0; margin-top: .15rem; color: var(--brand); }
.req-block { margin: .5rem 0 1.5rem; padding: 1.25rem; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--line-2); }
.req-block__head { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; }
.req-block__head h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.req-block .input, .req-block .select { background: #fff; }
.alert--info { background: var(--brand-50); color: var(--brand-800); border-color: var(--brand-100); }

/* Таймлайн и чат */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.25rem 1.75rem; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: #fff;
  border: 3px solid var(--brand); }
.timeline li::after { content: ''; position: absolute; left: 9px; top: 20px; bottom: 0; width: 2px; background: var(--line-2); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline__date { font-size: .8rem; color: var(--ink-3); }
.timeline__text { font-size: .93rem; margin-top: .15rem; }

.chat { display: flex; flex-direction: column; gap: .9rem; max-height: 520px; overflow-y: auto; padding: 1.25rem; background: var(--bg-soft); }
.msg { max-width: 82%; }
.msg__bubble { padding: .8rem 1rem; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--line); font-size: .95rem; white-space: pre-line;
  overflow-wrap: anywhere; }
.msg__meta { font-size: .76rem; color: var(--ink-3); margin-top: .3rem; padding-left: .25rem; }
.msg--mine { align-self: flex-end; }
.msg--mine .msg__bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 16px 16px 4px 16px; }
.msg--mine .msg__meta { text-align: right; padding-right: .25rem; }
.msg--internal .msg__bubble { background: #fffbeb; border: 1px dashed #e6b54c; color: #6b4a07; }
.msg__file { display: inline-flex; gap: .4rem; align-items: center; margin-top: .5rem; padding: .35rem .6rem; border-radius: 8px; background: rgba(0,0,0,.06);
  font-size: .85rem; color: inherit; }
.msg--mine .msg__file { background: rgba(255,255,255,.18); color: #fff; }
.chat-form { display: flex; gap: .6rem; align-items: flex-end; padding: 1rem 1.25rem; border-top: 1px solid var(--line-2); background: #fff;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.chat-form textarea { flex: 1; min-height: 48px; max-height: 200px; }
.chat-form__file { position: relative; }
.chat-form__file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.notif { display: flex; gap: .9rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.notif:last-child { border-bottom: 0; }
a.notif:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.notif.is-unread { background: #f7fbff; }
.notif.is-unread .notif__title::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: .4rem; border-radius: 50%; background: var(--heat); vertical-align: middle; }
.notif__title { font-weight: 600; font-size: .95rem; }
.notif__text { font-size: .88rem; color: var(--ink-2); }
.notif__date { font-size: .78rem; color: var(--ink-3); margin-top: .2rem; }

.tabs { display: flex; gap: .25rem; margin-bottom: 1.25rem; padding: .3rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  overflow-x: auto; width: fit-content; max-width: 100%; }
.tabs a { padding: .5rem .95rem; border-radius: 9px; color: var(--ink-2); font-weight: 500; font-size: .92rem; white-space: nowrap; }
.tabs a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.tabs a.is-active { background: var(--brand); color: #fff; }
.tabs .tabs__count { margin-left: .35rem; opacity: .7; font-size: .82rem; }

.pagination { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.5rem; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 .6rem; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-weight: 500; }
.pagination a:hover { border-color: var(--brand-100); color: var(--brand); text-decoration: none; }
.pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }

.cab-burger { display: none; }

/* ==========================================================================
   Адаптивность
   ========================================================================== */
@media (max-width: 1320px) {
  .header__tool span { display: none; }
  .header__tool { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 1180px) {
  .footer__top { grid-template-columns: minmax(0, 1fr) 1fr; }
  .links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand__tag { display: none; }
}
/* Узкий экран или крупный шрифт (версия для слабовидящих): меню уходит в боковую панель.
   Класс nav-collapsed ставит скрипт, если пункты меню не помещаются в строку. */
@media (max-width: 1080px) {
  .navbar { display: none; }
  .header { position: sticky; top: 0; box-shadow: 0 1px 0 var(--line-2); }
  .header__main { height: 68px; }
  .burger { display: inline-grid; }
  :root { --header-h: 68px; }
}
/* Ступени сжатия верхней строки (ставит скрипт при нехватке места) */
html.hdr-1 .brand__tag, html.hdr-1 .header__tool span { display: none; }
html.hdr-1 .header__tool { width: 44px; padding: 0; justify-content: center; }
html.hdr-2 .header__lk span { display: none; }
html.hdr-2 .header__lk { width: 44px; padding: 0; justify-content: center; }
html.hdr-2 .header__dispatch .ico-badge { display: none; }
html.hdr-3 .header__search, html.hdr-3 .header__dispatch small { display: none; }
html.hdr-3 .header__tools .header__search-btn { display: inline-grid; }
html.nav-collapsed .navbar { display: none; }
html.nav-collapsed .header { position: sticky; top: 0; box-shadow: 0 1px 0 var(--line-2); }
html.nav-collapsed .burger { display: inline-grid; }
@media (max-width: 900px) {
  .header__lk span { display: none; }
  .header__lk { width: 44px; padding: 0; justify-content: center; }
  .header__dispatch .ico-badge { display: none; }
}
@media (max-width: 760px) {
  .mobile-dispatch { display: flex; }
  .header__dispatch, .header__search, .header__tool { display: none; }
  .header__tools .header__search-btn { display: inline-grid; }
  .header__tools { margin-left: auto; gap: .25rem; }
  .header__lk { border: 0; }
}
@media (max-width: 1020px) {
  .hero__inner, .about, .feedback, .lk-entry, .calc, .cab-grid { grid-template-columns: minmax(0, 1fr); }
  .hero__art { max-width: 560px; width: 100%; margin-inline: auto; }
  .services, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step::after { display: none; }
  .layout, .split { grid-template-columns: minmax(0, 1fr); }
  .layout > .side { order: 2; }  /* на телефоне сначала содержимое, меню раздела — после */
  .side { position: static; }
  .calc__result { position: static; }
  .cab { grid-template-columns: minmax(0, 1fr); }
  .cab-side { position: fixed; left: 0; top: 0; z-index: 1200; width: 290px; transform: translateX(-105%); transition: transform .25s var(--ease);
    box-shadow: var(--shadow-lg); }
  .cab.is-nav-open .cab-side { transform: none; }
  .cab.is-nav-open::after { content: ''; position: fixed; inset: 0; z-index: 1100; background: rgba(8,20,38,.4); }
  .cab-burger { display: inline-grid; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .auth-main { justify-content: flex-start; padding-top: 1.5rem; }
  .auth-brand { display: inline-flex; margin-bottom: 1.75rem; }
}
@media (max-width: 1020px) {
  .newsblock { grid-template-columns: minmax(0, 1fr); }
  .faq-home { grid-template-columns: minmax(0, 1fr); }
  .faq-home__aside { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
@media (max-width: 720px) {
  /* Таблицы → карточки: у каждой ячейки подпись колонки (ставит скрипт) */
  .table.is-stackable thead { display: none; }
  .table.is-stackable, .table.is-stackable tbody, .table.is-stackable tr, .table.is-stackable td, .table.is-stackable th { display: block; width: auto; }
  .table.is-stackable tr { padding: .85rem 1rem; border-bottom: 1px solid var(--line-2); }
  .table.is-stackable tr:last-child { border-bottom: 0; }
  .table.is-stackable td, .table.is-stackable th { padding: .2rem 0 !important; border: 0 !important; text-align: left !important; white-space: normal; }
  .table.is-stackable td[data-label]::before { content: attr(data-label); display: block; margin-bottom: .1rem; font-size: .72rem; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
  .table.is-stackable td:first-child::before, .table.is-stackable td:empty { display: none; }
  .table.is-stackable td:first-child { font-size: 1rem; }
  .table.is-stackable .stable__actions { display: flex; gap: .25rem; justify-content: flex-end; }
  .table.is-stackable .stable__actions::before { display: none; }
  .dropzone { padding: .85rem .75rem; }
  .dropzone .icon--lg { width: 22px; height: 22px; }
  .btn { white-space: normal; text-align: center; max-width: 100%; }
  .faq-home__aside { grid-template-columns: minmax(0, 1fr); }
  .faq-home__art { max-width: 360px; }
  .topbar__hide-sm { display: none; }
  .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .citem { flex-wrap: wrap; padding: .9rem 1rem; }
  .citem__body { flex-basis: calc(100% - 60px); }
  .rgroup__head { flex-direction: column; align-items: flex-start; }
  .orow { grid-template-columns: 70px minmax(0, 1fr); gap: .9rem; padding: .85rem; }
  .orow__state { grid-column: 2; }
  .orow__date b { font-size: 1.4rem; }
  .ocheck { flex-direction: column; }
  .news-item { padding: 1rem 1.1rem; }
  .news-item__body { grid-template-columns: minmax(0, 1fr); }
  .news-item time { grid-row: auto; padding: 0; margin-bottom: .2rem; }
  .news-item--img { grid-template-columns: 76px minmax(0, 1fr); }
  .news-item__img { width: 76px; height: 60px; }
  .pub--cover { grid-template-columns: minmax(0, 1fr); }
  .services, .news-grid, .steps, .cards, .cards--3, .grid-2, .grid-3, .grid-4, .links, .form-grid, .proc__grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { gap: .5rem; }
  .kpi { flex-direction: column; align-items: flex-start; gap: .4rem; padding: .8rem; }
  .kpi .ico-badge { display: none; }
  .footer__top { grid-template-columns: minmax(0, 1fr); }
  .cta { grid-template-columns: minmax(0, 1fr); }
  .pub { grid-template-columns: minmax(0, 1fr); }
  .pub__date { display: flex; gap: .4rem; align-items: baseline; width: fit-content; padding: .3rem .7rem; }
  .pub__date b { font-size: 1rem; }
  .summary__row { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .msg { max-width: 94%; }
  .hero__tiles { grid-template-columns: minmax(0, 1fr); }
  .hero__inner { padding-bottom: 5rem; }
  .services { margin-top: -2.25rem; }
  .modal__dialog { padding: 1.5rem 1.25rem; }
  .welcome { padding: 1.4rem; }
  .cookie { left: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .toasts { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .brand__name { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .admin-bar, .mobile-dispatch, .navbar, .header, .footer, .side, .cookie, .toasts, .cab-side, .cab-top, .chat-form, .btn, .alertbar { display: none !important; }
  .layout, .cab, .cab-grid { display: block; }
  body, .cab { background: #fff; }
}

/* Статическая демо-версия */
.static-ribbon { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; min-height: 34px; padding: .4rem 3rem;
  background: #0f1c2e; color: rgba(255,255,255,.88); font-size: .8rem; line-height: 1.35; text-align: center; }
.static-ribbon b { color: #fff; margin-right: .35rem; }
.static-ribbon button { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.14); color: #fff;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: .7rem; }
.static-ribbon button:hover { background: rgba(255,255,255,.26); }
@media (max-width: 600px) { .static-ribbon { justify-content: flex-start; padding: .45rem 2.6rem .45rem 1rem; text-align: left; } }
@media print { .static-ribbon { display: none; } }
