/* ПравоЛиния — стили по DESIGN.md. Цвета бренда приходят из настроек через переменные в <style> шапки. */
@font-face { font-family: 'Onest'; src: url('/static/fonts/onest-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; src: url('/static/fonts/onest-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --c-deep: #0E3B43; --c-primary: #0E3B43; --c-ink: #14262B; --c-bg: #F8F4EC; --c-accent: #E38B2C;
  --c-card: #FFFFFF; --c-mint: #DCEBE6; --c-accent-text: #A85A10; --c-muted: #4F6166; --c-border: #D9D2C3; --c-danger: #B3392F;
  --c-ok: #1F6B4A; --c-warn-bg: #FFF3D6; --c-warn-border: #E0B54A;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --r-sm: 10px; --r-md: 16px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(14, 59, 67, .08); --shadow-2: 0 8px 24px rgba(14, 59, 67, .09);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: 'Onest', system-ui, 'Segoe UI', Arial, sans-serif; --font-doc: Georgia, 'Times New Roman', serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--c-ink); background: var(--c-bg); }
img, svg { max-width: 100%; }
a { color: var(--c-accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
::selection { background: var(--c-primary); color: #fff; }
input, textarea, select { caret-color: var(--c-primary); accent-color: var(--c-primary); }
html { scrollbar-color: #8FA7A5 var(--c-bg); }
table, .price, .stat { font-variant-numeric: tabular-nums; }
a:hover { color: var(--c-primary); }
h1, h2, h3, h4 { color: var(--c-primary); line-height: 1.2; margin: 0 0 var(--s3); font-weight: 700; }
h1 { font-size: clamp(2.1rem, 1rem + 4.2vw, 3.6rem); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.1rem); text-wrap: balance; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--s4); max-width: 68ch; text-wrap: pretty; }
ul, ol { padding-left: 1.25em; margin: 0 0 var(--s4); }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--c-primary); color: #fff; padding: var(--s3) var(--s4); z-index: 100; border-radius: 0 0 var(--r-sm) 0; }
.skip:focus { left: 0; }
.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: max(16px, 4vw); }
.section { padding-block: var(--s8); }
.section.tight { padding-block: var(--s7); }
.section.mint { background: var(--c-mint); }
.section.dark :focus-visible { outline-color: var(--c-accent); }
.section.dark { background: var(--c-primary); color: #EAF3F1; }
.section.dark h2, .section.dark h3 { color: #fff; }
.muted { color: var(--c-muted); }
.small { font-size: .9rem; }
.eyebrow { color: var(--c-accent-text); font-weight: 600; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--s2); }
.lead { font-size: 1.2rem; color: var(--c-muted); max-width: 60ch; }
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: var(--s5); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
/* Страница услуги: описание и шаги, затем документы и другие услуги; блок «Узнать стоимость» справа на всю высоту.
   На планшете и телефоне — одна колонка, и этот блок идёт сразу после шагов, а не в самом низу. */
#svc-grid > div:first-child { grid-column: 1; grid-row: 1; }
#svc-grid > .svc-more { grid-column: 1; grid-row: 2; }
#svc-grid > aside { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 860px) {
  #svc-grid { grid-template-columns: minmax(0, 1fr) !important; gap: var(--s5) !important; }
  #svc-grid > div:first-child, #svc-grid > .svc-more, #svc-grid > aside { grid-column: 1; grid-row: auto; }
  #svc-grid > aside { order: 1; } #svc-grid > .svc-more { order: 2; }
  #svc-grid aside .card { position: static !important; }
}

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(248, 244, 236, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-border); }
.site-header .container { display: flex; align-items: center; gap: var(--s5); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--c-primary); font-weight: 700; font-size: 1.25rem; }
.brand img { height: 36px; width: auto; }
.brand:hover { color: var(--c-primary); }
.nav { display: flex; gap: var(--s1); margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--c-ink); text-decoration: none; padding: var(--s2) var(--s3); border-radius: var(--r-sm); min-height: 44px; display: inline-flex; align-items: center; font-weight: 500; }
.nav a:hover, .nav a[aria-current='page'] { background: var(--c-mint); color: var(--c-primary); }
.nav .nav-b2b { border: 1px solid var(--c-primary); color: var(--c-primary); }
.nav-toggle { display: none; margin-left: auto; min-width: 44px; min-height: 44px; border: 1px solid var(--c-border); background: var(--c-card); border-radius: var(--r-sm); font: inherit; color: var(--c-primary); cursor: pointer; }
@media (max-width: 1100px) {
  .js .nav-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 0 var(--s3); gap: var(--s2); }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--c-bg); border-bottom: 1px solid var(--c-border); padding: var(--s3) max(16px, 4vw) var(--s4); }
  .js .nav.open { display: flex; }
  .site-header .container { position: relative; flex-wrap: wrap; }
  .nav { width: 100%; margin-left: 0; }
}

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: 10px 20px; border-radius: var(--r-pill); border: 2px solid transparent; font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: none; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { color: #fff; background: #0a2d33; }
.btn-accent { background: var(--c-accent); color: var(--c-ink); }
.btn-accent:hover { color: var(--c-ink); background: #d97f1f; }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-mint); color: var(--c-primary); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-sm { min-height: 44px; padding: 6px 16px; font-size: .95rem; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--c-accent-text); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* Главный блок */
.hero { padding-block: var(--s8) var(--s7); position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s7); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s6); } .hero { padding-block: var(--s7) var(--s6); } }
.hero-art svg { width: 100%; height: auto; }
/* Тёмный первый экран главной: глубокая бирюза, яркие листы и круги. Белый на фоне — 12,2 : 1 */
.hero-dark { background: var(--c-primary); color: #fff; overflow: hidden; }
.hero-dark h1 { color: #fff; }
.hero-dark .lead { color: #DCEBE6; }
.hero-dark :focus-visible { outline-color: var(--c-accent); }
.hero-dark .chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4); color: #fff; }
.hero-dark .chip:hover { background: #fff; color: var(--c-primary); }
.hero-dark .sc-blob.b1 { background: #17707A; opacity: 1; }
.hero-dark .sc-blob.b2 { background: #3DDC97; opacity: .9; }
.hero-dark .sc-blob.b3 { background: #FFC15E; }
.hero-dark .sc-back.k1 { background: #8FD0F5; }
.hero-dark .sc-back.k2 { background: #FFC15E; }
.hero-dark .sc-back.k3 { background: #8EE29B; }
.hero-dark .sc-sheet { border-color: #fff; box-shadow: 0 22px 48px rgba(0, 0, 0, .35); }
.route-line { stroke-dasharray: 1000; stroke-dashoffset: 0; }
.rt { font: 600 17px var(--font); fill: var(--c-primary); }
/* Единственный авторский эффект страницы: маршрут прорисовывается, затем появляются точки */
.js .route-line { animation: draw 1.7s cubic-bezier(.16, 1, .3, 1) .2s both; }
.js .route-node { opacity: 0; animation: node-in .5s cubic-bezier(.16, 1, .3, 1) both; }
.js .route-node.n1 { animation-delay: .2s; } .js .route-node.n2 { animation-delay: .75s; } .js .route-node.n3 { animation-delay: 1.15s; } .js .route-node.n4 { animation-delay: 1.6s; }
@keyframes draw { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes node-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.searchbox { width: 100%; display: flex; gap: var(--s2); background: var(--c-card); border: 2px solid var(--c-primary); border-radius: var(--r-pill); padding: 6px 6px 6px var(--s5); box-shadow: var(--shadow-2); max-width: 640px; }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.1rem; color: var(--c-ink); outline: none; }
.searchbox:focus-within { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.chip { max-width: 100%; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: var(--r-pill); background: var(--c-card); border: 1px solid var(--c-border); color: var(--c-primary); text-decoration: none; font-weight: 500; transition: background-color .15s, border-color .15s; }
.chip:hover { background: var(--c-mint); border-color: var(--c-primary); color: var(--c-primary); }

/* Карточки */
.card { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s5); }
a.card { display: block; text-decoration: none; color: inherit; transition: transform .2s cubic-bezier(.16, 1, .3, 1), border-color .2s; }
a.card:hover { transform: translateY(-2px); border-color: var(--c-primary); }
a.card h3 { margin-bottom: var(--s2); }
.card .more { color: var(--c-accent-text); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ic-inline { width: 18px; height: 18px; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--c-mint); color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--s3); }
.icon svg { width: 24px; height: 24px; }
.price { font-weight: 700; color: var(--c-primary); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: var(--r-pill); font-size: .85rem; font-weight: 600; background: var(--c-mint); color: var(--c-primary); }
.badge.warn { background: var(--c-warn-bg); color: #6B4A00; }
.badge.ok { background: #DDF0E5; color: var(--c-ok); }
.badge.bad { background: #F8DEDA; color: var(--c-danger); }
.steps { counter-reset: st; list-style: none; padding: 0; display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.steps li { counter-increment: st; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s5); position: relative; }
.steps li::before { content: counter(st); display: flex; width: 36px; height: 36px; border-radius: 50%; background: var(--c-primary); color: #fff; align-items: center; justify-content: center; font-weight: 700; margin-bottom: var(--s3); }
.crumbs { font-size: .9rem; color: var(--c-muted); margin-bottom: var(--s4); }
.crumbs a { color: var(--c-muted); }

/* Компактные карточки направлений: на телефоне по две в ряд */
@media (max-width: 640px) {
  .grid.dirs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .dirs .card { padding: var(--s4); }
  .dirs .card h3 { font-size: 1rem; }
  .dirs .card p, .dirs .card .more { display: none; }
  .dirs .icon { margin-bottom: var(--s2); }
  .section { padding-block: var(--s7); }
}

/* Формы */
.field { margin-bottom: var(--s4); }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--c-ink); }
.field .req { color: var(--c-danger); }
.field label.check { display: flex; font-weight: 500; }
.help { font-size: .9rem; color: var(--c-muted); margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; color: var(--c-ink); background: #fff; border: 1.5px solid #8A9A9E; border-radius: var(--r-sm); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--c-accent); outline-offset: 1px; border-color: var(--c-primary); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--c-danger); border-width: 2px; }
.err { display: flex; gap: 6px; color: var(--c-danger); font-weight: 600; font-size: .95rem; margin-top: 6px; }
.check { display: flex; gap: var(--s3); align-items: flex-start; min-height: 44px; }
.check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--c-primary); flex: none; }
.alert { padding: var(--s4) var(--s5); border-radius: var(--r-sm); border: 1px solid var(--c-border); background: var(--c-card); margin-bottom: var(--s4); }
.alert.error { border-color: var(--c-danger); background: #FBEBE8; }
.alert.ok { border-color: var(--c-ok); background: #E6F4EC; }
.alert.warn, .demo-banner { border-color: var(--c-warn-border); background: var(--c-warn-bg); }
.demo-banner { border: 2px dashed var(--c-warn-border); padding: var(--s3) var(--s4); border-radius: var(--r-sm); margin-bottom: var(--s4); font-weight: 500; }
.form-narrow { max-width: 520px; }
fieldset { border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s4) var(--s5); margin: 0 0 var(--s5); background: var(--c-card); }
legend { font-weight: 700; padding: 0 var(--s2); color: var(--c-primary); }

/* Документ */
.doc-paper { background: #fff; border: 1px solid var(--c-border); border-radius: 6px; box-shadow: var(--shadow-2); padding: clamp(20px, 5vw, 56px); font: 17px/1.65 var(--font-doc); color: #111; max-width: 780px; }
.doc-paper p { max-width: none; margin: 0 0 12px; }
.doc-paper .d-right { text-align: right; margin-left: 30%; }
.doc-paper .d-center { text-align: center; font-weight: 700; }
.doc-paper .d-body { text-align: justify; text-indent: 1.25cm; }
.doc-paper .d-plain { text-align: left; }
.doc-paper .d-sec { font-weight: 700; margin-top: 18px; }
.doc-paper .d-clause { text-align: justify; }
.doc-tag { display: inline-block; background: var(--c-warn-bg); border: 1px solid var(--c-warn-border); padding: 2px 10px; border-radius: var(--r-pill); font-size: .85rem; font-weight: 600; }

/* Таблицы */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--r-md); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
th { background: var(--c-mint); color: var(--c-primary); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* Подвал */
.site-footer { background: var(--c-primary); color: #D5E4E1; padding-block: var(--s7); margin-top: var(--s8); }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.disclaimer { border-top: 1px solid rgba(255, 255, 255, .2); margin-top: var(--s6); padding-top: var(--s5); font-size: .9rem; }

/* Админка и кабинет */
.app-layout { display: grid; grid-template-columns: 240px 1fr; gap: var(--s6); align-items: start; padding-block: var(--s6); }
.app-layout > * { min-width: 0; }
@media (max-width: 900px) { .app-layout { grid-template-columns: 1fr; } }
.side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s3); }
@media (max-width: 900px) { .side { position: static; flex-direction: row; flex-wrap: wrap; } }
.side a { text-decoration: none; color: var(--c-ink); padding: 8px 12px; border-radius: var(--r-sm); min-height: 44px; display: flex; align-items: center; }
.side a:hover, .side a[aria-current='page'] { background: var(--c-mint); color: var(--c-primary); font-weight: 600; }
.side .side-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); padding: 12px 12px 4px; }
.stat { font-size: 2rem; font-weight: 700; color: var(--c-primary); line-height: 1.1; }
.rows-editor .rowline { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-sm); padding: var(--s3); margin-bottom: var(--s2); }
.rows-editor .rowline .field { margin: 0; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: #EFEADF; padding: 1px 6px; border-radius: 4px; }
textarea.mono { background: #fff; }
.only-print { display: none; }

/* Появление блоков: только при включённом JS и без «уменьшения движения» */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .route-node { opacity: 1; }
  .js .route-line { stroke-dashoffset: 0; }
}
@media print { .site-header, .site-footer, .no-print, .side { display: none !important; } .doc-paper { box-shadow: none; border: 0; } }

/* Как это работает: линия пути, а не карточки */
.path { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); counter-reset: p; }
.path li { counter-increment: p; position: relative; padding-top: 52px; }
.path li::before { content: counter(p); position: absolute; top: 0; left: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--c-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; z-index: 1; }
.path li:last-child::before { background: var(--c-accent); color: var(--c-ink); }
.path li::after { content: ''; position: absolute; top: 16px; left: 40px; right: calc(-1 * var(--s5) + 6px); height: 2px; background: var(--c-primary); opacity: .3; }
.path li:last-child::after { display: none; }
.path h3 { margin-bottom: var(--s2); }
@media (max-width: 900px) {
  .path { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .path li { padding: 0 0 var(--s5) 54px; min-height: 60px; }
  .path li::after { top: 40px; bottom: 6px; left: 16px; right: auto; width: 2px; height: auto; }
}

/* Указатель направлений и документов: строки вместо одинаковых карточек */
.index { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s7); border-top: 1px solid var(--c-border); }
.index li { border-bottom: 1px solid var(--c-border); }
.index a { display: flex; align-items: center; gap: var(--s4); min-height: 68px; padding: var(--s3) var(--s2); text-decoration: none; color: var(--c-ink); transition: background-color .15s; }
.index a:hover { background: rgba(220, 235, 230, .55); }
.ix-icon { flex: none; width: 30px; height: 30px; color: var(--c-primary); display: inline-flex; }
.ix-icon svg { width: 100%; height: 100%; }
.ix-body { flex: 1; min-width: 0; display: block; }
.ix-title { display: block; font-weight: 600; color: var(--c-primary); line-height: 1.3; }
.ix-sub { display: block; color: var(--c-muted); font-size: .92rem; line-height: 1.4; margin-top: 2px; }
.ix-go { flex: none; width: 20px; height: 20px; color: var(--c-accent-text); transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.ix-go svg { width: 100%; height: 100%; }
.index a:hover .ix-go { transform: translateX(4px); }
@media (max-width: 900px) { .index { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .ix-sub { display: none; } .index a { min-height: 56px; } }
/* Блок сроков: подпись видна и на телефоне; цветом и жирным — только сам срок (28.10.2026: шесть ярких подписей подряд тревожили) */
.urgent .ix-sub { display: block; }
.urgent .ix-sub strong { color: var(--c-accent-text); font-weight: 700; }
/* на телефоне — 4 строки и «Показать ещё» (без скрипта: флажок + подпись-кнопка) */
.urgent-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; }
.urgent-toggle:focus-visible ~ .urgent-more { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.urgent-more { display: none; margin-top: var(--s4); cursor: pointer; }
@media (max-width: 640px) {
  .urgent .index li:nth-child(n+5) { display: none; }
  .urgent-more { display: inline-flex; }
  .urgent-toggle:checked ~ .index li { display: block; }
  .urgent-toggle:checked ~ .urgent-more { display: none; }
}
/* главная на телефоне короче (исследование 28.10.2026: было ~11 экранов): 8 направлений и 4 документа, остальное — по кнопкам «Все …» */
@media (max-width: 640px) {
  .home-dirs .index li:nth-child(n+9), .home-docs .index li:nth-child(n+5) { display: none; }
}
/* напоминание о сроке в пути — внутри карточки форма без своей верхней линии */
.path-remind form { margin-top: 0 !important; padding-top: 0 !important; border-top: 0 !important; }
.path-remind { margin-top: var(--s5); }

/* Цветовые оттенки для разделов: пять мягких тонов, каждый проверен на читаемость (5,9–9,9 : 1) */
.t1 { --tone-bg: #DCEBE6; --tone-fg: #0E3B43; } .t2 { --tone-bg: #FBE6C8; --tone-fg: #7A4308; } .t3 { --tone-bg: #D9E8F2; --tone-fg: #1D4E6B; }
.t4 { --tone-bg: #DFEBD3; --tone-fg: #2F5A2B; } .t5 { --tone-bg: #F4DBCF; --tone-fg: #8A3A20; }
.icon { background: var(--tone-bg, var(--c-mint)); color: var(--tone-fg, var(--c-primary)); transition: transform .3s var(--ease); }
a.card:hover .icon { transform: rotate(-6deg) scale(1.08); }
.ix-icon { width: 46px; height: 46px; padding: 10px; border-radius: 13px; background: var(--tone-bg, var(--c-mint)); color: var(--tone-fg, var(--c-primary)); transition: transform .3s var(--ease); }
.index a:hover .ix-icon { transform: rotate(-6deg) scale(1.08); }
.section.sky { background: #E6EFF6; } .section.sun { background: #FBEBD3; }
.section.sun h2, .section.sky h2 { color: var(--c-primary); }
.chip { transition: background-color .2s, border-color .2s, transform .2s var(--ease), color .2s; }
.chip:hover { transform: translateY(-2px); background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn:active { transform: scale(.97); }
.site-header { transition: border-color .25s, background-color .25s; }
.site-header.scrolled { border-bottom-color: var(--c-primary); background: rgba(248, 244, 236, .985); }
.searchbox { transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.searchbox:focus-within { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(14, 59, 67, .16); }

/* Анимация: цветные круги за схемой плавают, блоки появляются по очереди, страницы сменяются плавно */
.blob { transform-box: fill-box; transform-origin: center; animation: float 9s ease-in-out infinite alternate; }
.blob.b2 { animation-duration: 11s; animation-delay: -3s; } .blob.b3 { animation-duration: 13s; animation-delay: -6s; }
@keyframes float { from { transform: translate(0, 0); } to { transform: translate(8px, -12px); } }
[data-rv] { transition: opacity .7s var(--ease) var(--d, 0s), transform .7s var(--ease) var(--d, 0s); }
.rv-ready [data-rv]:not(.in) { opacity: 0; transform: translateY(18px); }
.path li::after { transform-origin: left center; transition: transform .8s var(--ease) calc(var(--d, 0s) + .3s); }
.rv-ready .path li[data-rv]:not(.in)::after { transform: scaleX(0); }
@media (max-width: 900px) { .path li::after { transform-origin: top center; } .rv-ready .path li[data-rv]:not(.in)::after { transform: scaleY(0); } }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  [data-rv], .path li::after, .icon, .ix-icon, .chip, .searchbox { transition: none !important; }
  .rv-ready [data-rv]:not(.in) { opacity: 1; transform: none; }
  .rv-ready .path li[data-rv]:not(.in)::after { transform: none; }
  @view-transition { navigation: none; }
}
@media print { [data-rv] { opacity: 1 !important; transform: none !important; } }

/* Сцена первого экрана: документ собирается */
.scene { position: relative; width: 100%; max-width: 480px; margin-inline: auto; aspect-ratio: 1 / 1.15; }
.sc-blob { position: absolute; border-radius: 50%; animation: float 9s ease-in-out infinite alternate; }
.sc-blob.b1 { inset: 8% 4% 4% 10%; background: var(--c-mint); opacity: .75; }
.sc-blob.b2 { width: 17%; aspect-ratio: 1; left: 0; top: 10%; background: var(--c-accent); opacity: .22; animation-duration: 11s; animation-delay: -3s; }
.sc-blob.b3 { width: 11%; aspect-ratio: 1; right: 2%; bottom: 8%; background: #D9E8F2; animation-duration: 13s; animation-delay: -6s; }
.sc-back { position: absolute; bottom: 12%; border: 2px solid var(--c-primary); border-radius: 14px; box-shadow: 0 10px 24px rgba(14, 59, 67, .12); padding: 2.4% 6%; font-weight: 700; font-size: clamp(.68rem, 1.4vw, .85rem); letter-spacing: .1em; text-transform: uppercase; color: var(--c-primary); animation: sc-in .9s var(--ease) both; }
.sc-back.k1 { left: 13%; right: 18%; top: 18%; background: #D9E8F2; transform: rotate(3deg); animation-delay: .35s; }
.sc-back.k2 { left: 20%; right: 11%; top: 9%; background: #FBE6C8; transform: rotate(-3.5deg); animation-delay: .2s; }
.sc-back.k3 { left: 15%; right: 15%; top: 0; background: #DFEBD3; transform: rotate(2deg); animation-delay: .05s; }
.sc-sheet { position: absolute; left: 17%; right: 14%; top: 28%; bottom: 3%; background: #fff; border: 2px solid var(--c-primary); border-radius: 14px; padding: 6% 7%; box-shadow: 0 18px 40px rgba(14, 59, 67, .16); transform: rotate(-2deg); animation: sc-in .9s var(--ease) both; display: flex; flex-direction: column; gap: 3.2%; }
.sc-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--c-primary); padding-bottom: 3%; font-weight: 700; color: var(--c-primary); }
.sc-title { font-size: clamp(.8rem, 1.7vw, 1.05rem); letter-spacing: .12em; text-transform: uppercase; }
.sc-no { font-size: .8rem; color: var(--c-muted); font-weight: 600; }
.ln { display: block; height: 6px; border-radius: 3px; background: #D9E4E2; transform-origin: left center; animation: sc-line .6s var(--ease) both; }
.ln.w90 { width: 90%; } .ln.w85 { width: 85%; } .ln.w80 { width: 80%; } .ln.w70 { width: 70%; } .ln.w60 { width: 60%; }
.sc-sheet > .ln:nth-of-type(1) { animation-delay: .7s; } .sc-sheet > .ln:nth-of-type(2) { animation-delay: .85s; }
.sc-sheet > .ln:nth-of-type(3) { animation-delay: 3.2s; } .sc-sheet > .ln:nth-of-type(4) { animation-delay: 3.35s; } .sc-sheet > .ln:nth-of-type(5) { animation-delay: 3.5s; }
.sc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: clamp(.7rem, 1.5vw, .9rem); color: var(--c-muted); }
.sc-row b { color: var(--c-primary); background: var(--c-mint); padding: 2px 10px; border-radius: 999px; min-width: 0; }
.sc-type { display: inline-block; overflow: hidden; white-space: nowrap; }
.sc-type > span { display: inline-block; }
.sc-type.t1 { animation: sc-fill .9s steps(9, end) 1.5s both; }
.sc-type.t2 { animation: sc-fill .7s steps(7, end) 2.6s both; }
.sc-sign { width: 46%; margin-top: auto; fill: none; stroke: var(--c-primary); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sc-sign path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: sc-draw 1.3s ease-in-out 4.1s forwards; }
.sc-seal { position: absolute; right: 6%; bottom: 8%; width: 30%; aspect-ratio: 1; color: var(--c-accent-text); transform: rotate(-12deg); animation: sc-stamp .55s cubic-bezier(.16, 1, .3, 1) 5.4s both; }
.sc-seal svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sc-chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--c-border); box-shadow: var(--shadow-2); font-weight: 600; font-size: clamp(.75rem, 1.6vw, .95rem); color: var(--c-primary); white-space: nowrap; animation: sc-pop .6s var(--ease) both, sc-bob 6s ease-in-out infinite alternate; }
.sc-chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sc-chip.c1 { right: 0; top: 2%; animation-delay: .4s, 1s; }
.sc-chip.c2 { right: 0; top: 66%; color: var(--c-ok, #1F6B3F); animation-delay: 5.9s, 6.5s; }
.sc-chip.c3 { left: 6%; bottom: 4%; background: var(--c-accent); border-color: var(--c-accent); color: var(--c-ink); animation-delay: 3s, 3.6s; }
@keyframes sc-in { from { opacity: 0; transform: translateY(24px) rotate(-6deg); } }
@keyframes sc-line { from { transform: scaleX(0); } }
@keyframes sc-fill { from { max-width: 0; padding-inline: 0; } to { max-width: 12em; } }
@keyframes sc-draw { to { stroke-dashoffset: 0; } }
@keyframes sc-stamp { from { opacity: 0; transform: rotate(-12deg) scale(2.2); } }
@keyframes sc-pop { from { opacity: 0; transform: translateY(14px) scale(.85); } }
@keyframes sc-bob { from { translate: 0 0; } to { translate: 0 -8px; } }

/* Полоса с числами */
.stats { padding-block: var(--s6); background: var(--c-card); border-block: 1px solid var(--c-border); }
.stats dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); margin: 0; text-align: center; }
.stats dd { margin: 0; order: -1; font: 700 clamp(2rem, 5vw, 3.2rem)/1.1 var(--font); color: var(--c-primary); font-variant-numeric: tabular-nums; }
.stats div { display: flex; flex-direction: column; }
.stats dt { color: var(--c-muted); font-size: .95rem; }

/* Индикатор прокрутки и мягкие детали (там, где браузер умеет) */
@supports (animation-timeline: scroll()) {
  body::before { content: ''; position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 60; background: var(--c-accent); transform-origin: left; transform: scaleX(0); animation: progress linear both; animation-timeline: scroll(root); }
  @keyframes progress { to { transform: scaleX(1); } }
}
.section.dark { position: relative; overflow: hidden; }
.section.dark::before, .section.dark::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; animation: float 10s ease-in-out infinite alternate; }
.section.dark::before { width: 340px; height: 340px; right: -80px; top: -120px; background: var(--c-accent); opacity: .16; }
.section.dark::after { width: 200px; height: 200px; left: 8%; bottom: -90px; background: #fff; opacity: .07; animation-delay: -4s; }
.section.dark > .container { position: relative; z-index: 1; }
.btn-primary, .btn-accent { position: relative; overflow: hidden; }
.btn-primary::after, .btn-accent::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.btn-primary:hover::after, .btn-accent:hover::after { transform: translateX(120%); transition: transform .7s var(--ease); }
@media (prefers-reduced-motion: reduce) { .sc-sheet, .sc-back, .ln, .sc-type, .sc-sign path, .sc-seal, .sc-chip, .sc-blob { animation: none !important; } .sc-sign path { stroke-dashoffset: 0; } }

/* ===== Цветовые зоны: у каждого раздела свой яркий цвет (документы — голубой, юристы — фиолетовый, консультация — янтарный, тарифы — зелёный) ===== */
:root { --c-fill: var(--c-deep); --c-header: rgba(248, 244, 236, .94); --z: #2BB5A6; --z-deep: var(--c-deep); --z-fill: var(--c-deep); --z-soft: var(--c-mint); --z-text: var(--c-primary); }
.z-docs, [data-zone="docs"] { --z: #3AA0F0; --z-deep: #14508F; --z-fill: #14508F; --z-soft: #DCEBFA; --z-text: #14508F; }
.z-lawyers, [data-zone="lawyers"] { --z: #8B6CF0; --z-deep: #3B2A78; --z-fill: #3B2A78; --z-soft: #E9E4FA; --z-text: #3B2A78; }
.z-consult, [data-zone="consult"] { --z: #F0A030; --z-deep: #7A3F08; --z-fill: #7A3F08; --z-soft: #FBE6C8; --z-text: #7A3F08; }
.z-money, [data-zone="money"] { --z: #3DB37A; --z-deep: #1F5A3A; --z-fill: #1F5A3A; --z-soft: #DFF2E6; --z-text: #1F5A3A; }
.site-header, .site-header.scrolled { border-bottom: 4px solid var(--z); background: var(--c-header); }
.nav a:hover, .nav a[aria-current='page'] { background: var(--z-soft); color: var(--z-text); }
.nav .nav-b2b { border-color: #8B6CF0; color: #3B2A78; }
.btn-primary { background: var(--z-fill); color: #fff; }
.btn-primary:hover { background: var(--z-fill); color: #fff; filter: brightness(.88); }
.btn-ghost { color: var(--z-text); border-color: var(--z-fill); }
.btn-ghost:hover { background: var(--z-soft); color: var(--z-text); }
.btn-accent, .btn-accent:hover { color: #14262B; }
.steps li::before, .path li::before { background: var(--z-fill); color: #fff; }
.path li:last-child::before { background: var(--c-accent); color: #14262B; }
.chip:hover { background: var(--z-fill); border-color: var(--z-fill); color: #fff; }
::selection { background: var(--z-fill); color: #fff; }
.skip { background: var(--c-fill); }
.icon { background: var(--tone-bg, var(--z-soft)); color: var(--tone-fg, var(--z-text)); }
.ix-icon { background: var(--tone-bg, var(--z-soft)); color: var(--tone-fg, var(--z-text)); }
/* Цвет раздела — мягкой полосой под шапкой, а не заливкой всей формы */
[data-zone] main { background: linear-gradient(var(--z-soft), var(--c-bg) 420px) no-repeat; }
[data-zone] main h1::after { content: ''; display: block; width: 64px; height: 6px; border-radius: 3px; background: var(--z); margin-top: 14px; }
.site-footer { background: var(--c-deep); }
.section.dark, .hero-dark { background: var(--z-deep); color: #EAF3F1; }
.hero-dark { color: #fff; }
.section.dark::before { background: var(--z); opacity: .38; }
.hero-dark .chip:hover { background: #fff; color: var(--c-deep); }
/* Вставки со светлой «бумагой» и схемой не зависят от темы: внутри всегда светлые значения */
.scene, .doc-paper { --c-primary: #0E3B43; --c-ink: #14262B; --c-muted: #4F6166; --c-ok: #1F6B3F; --c-card: #fff; --c-border: #D9D2C3; --c-mint: #DCEBE6; }

/* ===== Переключатель темы ===== */
.theme-toggle { display: none; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--c-border); background: var(--c-card); color: var(--c-primary); border-radius: var(--r-pill); cursor: pointer; align-items: center; justify-content: center; }
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { background: var(--z-soft); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-gem, .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon, [data-theme="gold"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-gem { display: inline; }
[data-theme="gold"] .theme-toggle .i-sun { display: inline; }

/* ===== Тёмная тема (включается кнопкой; по умолчанию светлая) ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --c-bg: #0E1719; --c-ink: #E8EFEE; --c-card: #162226; --c-mint: #1B3438; --c-accent-text: #F2AE63; --c-muted: #AEC2BF; --c-border: #2B3E42;
  --c-danger: #FF9A90; --c-ok: #7FD6A4; --c-warn-bg: #3A2F10; --c-warn-border: #8A6A1E; --c-primary: #9BE0D4; --c-fill: #1F7F86;
  --c-header: rgba(14, 23, 25, .94); --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 8px 24px rgba(0, 0, 0, .4);
  --z-fill: #1F7F86; --z-text: #9BE0D4;
}
[data-theme="dark"] .z-docs, [data-theme="dark"] [data-zone="docs"] { --z-fill: #1F6FC4; --z-soft: #14283F; --z-text: #8CC4FF; }
[data-theme="dark"] .z-lawyers, [data-theme="dark"] [data-zone="lawyers"] { --z-fill: #6A4FD0; --z-soft: #231C42; --z-text: #C4B5FF; }
[data-theme="dark"] .z-consult, [data-theme="dark"] [data-zone="consult"] { --z-fill: #A85A10; --z-soft: #3A2A12; --z-text: #FFC27A; }
[data-theme="dark"] .z-money, [data-theme="dark"] [data-zone="money"] { --z-fill: #2A7F54; --z-soft: #16301F; --z-text: #8EE0B0; }
[data-theme="dark"] .nav .nav-b2b { color: #C4B5FF; }
:is([data-theme="dark"], [data-theme="gold"]) input[type=text], :is([data-theme="dark"], [data-theme="gold"]) input[type=email], :is([data-theme="dark"], [data-theme="gold"]) input[type=password], :is([data-theme="dark"], [data-theme="gold"]) input[type=tel], :is([data-theme="dark"], [data-theme="gold"]) input[type=date], :is([data-theme="dark"], [data-theme="gold"]) input[type=number], :is([data-theme="dark"], [data-theme="gold"]) input[type=url], :is([data-theme="dark"], [data-theme="gold"]) select, :is([data-theme="dark"], [data-theme="gold"]) textarea { background: var(--c-card); border-color: #6F8589; }
:is([data-theme="dark"], [data-theme="gold"]) .table-wrap, :is([data-theme="dark"], [data-theme="gold"]) textarea.mono { background: var(--c-card); }
:is([data-theme="dark"], [data-theme="gold"]) .alert.error { background: #3A1B18; } :is([data-theme="dark"], [data-theme="gold"]) .alert.ok { background: #14301F; }
:is([data-theme="dark"], [data-theme="gold"]) .badge.ok { background: #173A27; } :is([data-theme="dark"], [data-theme="gold"]) .badge.bad { background: #3F1E1B; } :is([data-theme="dark"], [data-theme="gold"]) .badge.warn { color: #FFD88A; }
:is([data-theme="dark"], [data-theme="gold"]) code, :is([data-theme="dark"], [data-theme="gold"]) .mono { background: var(--c-mint); }
:is([data-theme="dark"], [data-theme="gold"]) .section.sky { background: #12263A; } :is([data-theme="dark"], [data-theme="gold"]) .section.sun { background: #2E2411; }
[data-theme="dark"] .t1 { --tone-bg: #1D3A3D; --tone-fg: #9BE0D4; } [data-theme="dark"] .t2 { --tone-bg: #3A2A12; --tone-fg: #FFC27A; }
[data-theme="dark"] .t3 { --tone-bg: #173148; --tone-fg: #8CC4FF; } [data-theme="dark"] .t4 { --tone-bg: #1D3320; --tone-fg: #A9E0A0; } [data-theme="dark"] .t5 { --tone-bg: #3E231A; --tone-fg: #FFB59A; }
:is([data-theme="dark"], [data-theme="gold"]) .index a:hover { background: rgba(155, 224, 212, .08); }
[data-theme="dark"] html, html[data-theme="dark"] { scrollbar-color: #3B5459 var(--c-bg); }

/* Логотип Serge Legal в подвале */
.footer-logo { display: block; width: 128px; height: 128px; border-radius: 50%; margin-bottom: var(--s3); box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }

/* ===== Чёрно-золотая тема «Золото»: один цвет — золото, разделы различаются тонкими линиями ===== */
:root[data-theme="gold"] {
  color-scheme: dark;
  --c-bg: #0A0A0C; --c-ink: #EDE8DC; --c-card: #15151A; --c-mint: #1C1A14; --c-accent: #D4AF37; --c-accent-text: #D4AF37; --c-muted: #B5AE9C; --c-border: #34301F;
  --c-danger: #FF9A90; --c-ok: #8FD6A4; --c-warn-bg: #2A2410; --c-warn-border: #8A6F1E; --c-primary: #D4AF37; --c-fill: #D4AF37; --c-deep: #050506;
  --c-header: rgba(10, 10, 12, .94); --shadow-1: 0 1px 2px rgba(0, 0, 0, .6); --shadow-2: 0 8px 24px rgba(0, 0, 0, .55);
  --z: #D4AF37; --z-deep: #0F0F12; --z-fill: #D4AF37; --z-soft: #12110D; --z-text: #D4AF37;
}
[data-theme="gold"] [data-zone], [data-theme="gold"] .z-docs, [data-theme="gold"] .z-lawyers, [data-theme="gold"] .z-consult, [data-theme="gold"] .z-money { --z: #D4AF37; --z-deep: #0F0F12; --z-fill: #D4AF37; --z-soft: #12110D; --z-text: #D4AF37; }
[data-theme="gold"] .btn-primary, [data-theme="gold"] .btn-primary:hover { color: #0A0A0C; }
[data-theme="gold"] .steps li::before, [data-theme="gold"] .path li::before, [data-theme="gold"] .chip:hover, [data-theme="gold"] .skip { color: #0A0A0C; }
[data-theme="gold"] ::selection { color: #0A0A0C; }
[data-theme="gold"] .nav .nav-b2b { border-color: #D4AF37; color: #D4AF37; }
[data-theme="gold"] .site-header, [data-theme="gold"] .site-header.scrolled { border-bottom-width: 3px; }
[data-theme="gold"] .section.dark { border-block: 1px solid #3A3320; }
[data-theme="gold"] .hero-dark { background: #050506; }
[data-theme="gold"] .hero-dark .lead { color: #D9D2C0; }
[data-theme="gold"] .hero-dark .sc-blob.b1 { background: #2A2208; }
[data-theme="gold"] .hero-dark .sc-blob.b2 { background: #D4AF37; opacity: .85; }
[data-theme="gold"] .section.dark::before { opacity: .22; }
[data-theme="gold"] .section.sun, [data-theme="gold"] .section.sky { background: #12110D; }
[data-theme="gold"] .t1, [data-theme="gold"] .t2, [data-theme="gold"] .t3, [data-theme="gold"] .t4, [data-theme="gold"] .t5 { --tone-bg: #1E1B12; --tone-fg: #D4AF37; }
[data-theme="gold"] .index a:hover { background: rgba(212, 175, 55, .07); }
[data-theme="gold"] .badge.warn { color: #F0D27A; }
[data-theme="gold"] html, html[data-theme="gold"] { scrollbar-color: #4A4228 var(--c-bg); }
[data-theme="gold"] .theme-toggle:hover { background: #1C1A14; }

/* Подзаголовок под главным слоганом */
.hero-sub { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); font-weight: 600; line-height: 1.3; margin-bottom: var(--s3); color: var(--c-accent-text); }
.hero-dark .hero-sub { color: #FFC15E; }
[data-theme="gold"] .hero-dark .hero-sub { color: #D4AF37; }

/* ===== Доводка 02.10.2026 ===== */
.sec { margin-top: var(--s7); }
.search-start { margin-top: var(--s6); padding-block: var(--s5); border-block: 1px solid var(--c-border); }
.search-start p { margin-bottom: var(--s3); }
.search-more { margin-top: var(--s6); }
.search-more > summary, .consult-details > summary { min-height: 44px; padding-block: var(--s3); cursor: pointer; color: var(--c-primary); font-weight: 600; }
.consult-terms { margin-bottom: var(--s4); }
.consult-terms p { margin-bottom: var(--s2); }
.consult-details { margin-bottom: var(--s5); }
.consult-details[open] > summary { margin-bottom: var(--s2); }
.list-note { margin: 0 0 var(--s2); }
.list-note + .index { margin-top: var(--s3); }
.index.one { grid-template-columns: minmax(0, 1fr); }
.ix-meta { display: block; margin-top: 4px; font-size: .85rem; font-weight: 600; color: var(--z-text); }
/* Шаги услуги — та же линия пути, что на главной */
.path.p1, .path.p2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.path.p3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.path li > p { margin: 0; }
@media (max-width: 900px) { .path.p1, .path.p2, .path.p3 { grid-template-columns: minmax(0, 1fr); } }
/* Строка поиска на телефоне: поле на всю ширину, кнопка под ним — подсказка не обрезается */
@media (max-width: 520px) {
  .searchbox { flex-wrap: wrap; border-radius: var(--r-md); padding: 6px; }
  .searchbox input { flex-basis: 100%; padding: 10px 12px; }
  .searchbox .btn { width: 100%; }
}
/* Кнопка отправки, пока форма уходит на сервер */
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.btn { text-align: center; }
/* Знак-весы: лёгкое покачивание коромысла при наведении на название */
.brand .logo-mark { transition: transform .4s var(--ease); transform-origin: 50% 20%; }
.brand:hover .logo-mark { transform: rotate(-6deg); }
@media (max-width: 900px) { .brand .logo-mark { width: 44px; height: 44px; } }

/* Кнопка «Назад» под шапкой на всех страницах, кроме главной */
.back-bar { padding-top: var(--s3); }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 10px; margin-left: -10px; border-radius: var(--r-pill); color: var(--z-text); font-weight: 600; text-decoration: none; transition: background-color .15s, transform .2s var(--ease); }
.back-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.back-link:hover { background: var(--z-soft); color: var(--z-text); }
.back-link:hover svg { transform: translateX(-3px); }
/* На страницах с тёмным первым экраном полоса продолжает его цвет */
main:has(> .hero-dark) > .back-bar { background: var(--z-deep); }
main:has(> .hero-dark) .back-link { color: #fff; }
main:has(> .hero-dark) .back-link:hover { background: rgba(255, 255, 255, .12); color: #fff; }
main:has(> .back-bar) > .section:nth-child(2), main:has(> .back-bar) > .hero:nth-child(2) { padding-top: var(--s5); }
[data-theme="gold"] main:has(> .hero-dark) > .back-bar { background: #050506; }
[data-theme="gold"] main:has(> .hero-dark) .back-link { color: #D4AF37; }
/* «Назад» компактнее: маленькая ссылка, почти не занимает высоты */
.back-bar { padding-top: var(--s2); }
.back-link { min-height: 32px; padding: 0 10px 0 6px; margin-left: -6px; font-size: .9rem; font-weight: 500; gap: 4px; color: var(--c-muted); }
/* зона нажатия 44 px при прежнем виде (проверка на телефоне 28.10.2026: «Назад» 32 px, крошки и ссылка в подвале 18 px) */
.back-link { min-height: 44px; margin-top: -6px; margin-bottom: -6px; }
/* Одиночная ссылка в строке текста (мессенджер на «Контактах»): нажимается на 44 px, строка выглядит как прежде */
.tap-link { display: inline-flex; align-items: center; min-height: 44px; margin-block: calc((1lh - 44px) / 2); }
.crumbs a, .disclaimer a { display: inline-block; padding: 13px 0; margin: -13px 0; }
.back-link svg { width: 16px; height: 16px; }
main:has(> .back-bar) > .section:nth-child(2), main:has(> .back-bar) > .hero:nth-child(2) { padding-top: var(--s4); }
/* «Назад» в начале строки «Главная / …» */
.crumbs-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-bottom: var(--s4); }
.crumbs-row .crumbs { margin: 0; padding-left: 12px; border-left: 1px solid var(--c-border); }
@media (max-width: 640px) { .crumbs-row { gap: 0; } .crumbs-row .crumbs { flex-basis: 100%; padding-left: 0; border-left: 0; } }
/* Шапка: пункты меню никогда не переносятся на вторую строку */
.site-header .container { max-width: 1280px; }
.nav { flex-wrap: nowrap; }
.nav a, .nav .btn { white-space: nowrap; }
@media (min-width: 1101px) { .nav a { padding-inline: 10px; } }
@media (max-width: 1100px) { .nav { flex-wrap: wrap; } }
/* Переключатель темы — всегда в верхней строке шапки (рядом с «Записаться», на телефоне — рядом с «Меню») */
.site-header .theme-toggle { flex: none; margin-left: -12px; }
@media (max-width: 1100px) { .site-header .theme-toggle { order: 2; margin-left: -12px; } .site-header .nav-toggle { order: 1; } .site-header .nav { order: 3; } }
@media (max-width: 480px) {
  .site-header .container { gap: var(--s2); }
  .site-header .brand { gap: var(--s1); font-size: 1rem; }
  .site-header .brand .logo-mark { width: var(--s6); height: var(--s6); }
  .site-header .nav-toggle { padding-inline: var(--s2); }
  .site-header .theme-toggle { margin-left: 0; }
}
/* Иерархия в тёмных темах: заголовок раздела — цвет темы, названия и подзаголовки — светлые, строки форматов — отдельный оттенок.
   Контраст на фоне: слоновая кость ~17:1, почти белый ~16:1, лаванда ~9:1 */
[data-theme="dark"] h3, [data-theme="dark"] .ix-title, [data-theme="dark"] legend, [data-theme="dark"] .card h3 { color: #EEF4F2; }
[data-theme="gold"] h3, [data-theme="gold"] .ix-title, [data-theme="gold"] legend, [data-theme="gold"] .card h3 { color: #F4EEDF; }
[data-theme="gold"] .ix-meta { color: #B9A6F5; }
[data-theme="gold"] .index a:hover .ix-title, [data-theme="dark"] .index a:hover .ix-title { color: var(--c-primary); }
/* Статус «На проверке юристом» — фиолетовый (плашка и слово в строке списка). Контраст: светлая 10:1, тёмная и золотая ~9:1 */
.badge.review { background: #E9E4FA; color: #3B2A78; }
.st-review { color: #5B3FC4; }
:is([data-theme="dark"], [data-theme="gold"]) .badge.review { background: #2A2150; color: #C9BBFF; }
:is([data-theme="dark"], [data-theme="gold"]) .st-review { color: #B9A6F5; }
/* Плашка «Шаблон на проверке» — в тон фиолетовому статусу */
.alert.review { border-color: #8B6CF0; background: #F1EDFC; }
.alert.review strong { color: #3B2A78; }
:is([data-theme="dark"], [data-theme="gold"]) .alert.review { border-color: #6A4FD0; background: #1E1838; }
:is([data-theme="dark"], [data-theme="gold"]) .alert.review strong { color: #C9BBFF; }
/* Реквизиты исполнителя в офертах */
.requisites { list-style: none; padding: 0; margin: 0 0 var(--s5); }
.requisites li { padding: 6px 0; border-bottom: 1px solid var(--c-border); }
/* Разъяснения Верховного Суда РФ на странице шаблона */
.court-list { list-style: none; padding: 0; margin: var(--s4) 0 0; border-top: 1px solid var(--c-border); }
.court-list li { padding: var(--s4) 0; border-bottom: 1px solid var(--c-border); }
.court-name { font-weight: 600; margin-bottom: var(--s1); }
.court-list details summary { cursor: pointer; min-height: 32px; color: var(--c-accent-text); font-weight: 600; }
.court-list p { margin-bottom: var(--s2); }
/* Переключатель темы: два состояния — в тёмной теме показывается солнце (золотая тема отключена 02.10.2026, её стили сохранены) */
[data-theme="dark"] .theme-toggle .i-sun { display: inline; }
/* Конструктор: сколько обязательных полей заполнено (появляется со скриптом) */
/* Срок ответа на заявку (страница записи): иконка-часы + текст, мягкая мятная плашка */
.response-time { display: inline-flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); padding: var(--s2) var(--s4); border-radius: var(--r-pill); background: var(--c-mint); color: var(--c-primary); }
.response-time svg { width: 20px; height: 20px; flex: none; }

/* Путь до записи (по разбору tatarstars.ru): кнопка и срок ответа на первом экране, телефон/мессенджер одним нажатием,
   «Чего здесь не будет», паспорт услуги, частые вопросы, нижняя панель на телефоне */
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s5); }
.hero-note { display: inline-flex; align-items: center; gap: var(--s2); color: #DCEBE6; }
.hero-note svg, .quick-contact svg { width: 20px; height: 20px; flex: none; }
.quick-contact { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: var(--s3) 0 var(--s4); }
.quick-contact a { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; font-weight: 600; }
.hero-dark .quick-contact a { color: #fff; }
.worries { list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.worries li { display: flex; gap: var(--s4); align-items: flex-start; }
.worries h3 { font-size: 1.1rem; margin: 0 0 var(--s1); }
.worries p { margin: 0; }
.passport { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--s3) var(--s5); margin: var(--s4) 0 var(--s2); padding: var(--s4) var(--s5); border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-card); }
.passport div { display: flex; flex-direction: column; }
.passport dt { color: var(--c-muted); font-size: .9rem; }
.passport dd { margin: 0; font-weight: 600; }
.faq summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.faq details p { margin: var(--s3) 0 0; }
.after-steps h3 { font-size: 1.05rem; margin-bottom: var(--s1); }
.mobile-cta { display: none; }
@media (max-width: 760px) {
  .mobile-cta { display: flex; gap: var(--s2); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: var(--s2) var(--s3) calc(var(--s2) + env(safe-area-inset-bottom)); background: var(--c-card); border-top: 1px solid var(--c-border); box-shadow: 0 -8px 24px rgba(14, 59, 67, .08); }
  .mobile-cta .btn { flex: 1 1 0; min-width: 0; min-height: 56px; flex-direction: column; gap: var(--s1); padding: var(--s2) var(--s1); font-size: var(--text-sm, .875rem); line-height: 1.25; white-space: normal; text-align: center; overflow-wrap: anywhere; }
  .mobile-cta .btn span { max-width: 100%; }
  .mobile-cta .btn svg { width: 18px; height: 18px; flex: none; }
  /* Место под панель — внутри подвала, чтобы между тёмным подвалом и панелью не было светлой полосы фона */
  body.has-mcta .site-footer { padding-bottom: calc(var(--s7) + 112px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .mobile-cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-cta .btn-accent { grid-column: 1 / -1; flex-direction: row; min-height: 44px; }
  .mobile-cta .btn:only-child { grid-column: 1 / -1; }
  body.has-mcta .site-footer { padding-bottom: calc(var(--s7) + 144px + env(safe-area-inset-bottom)); }
}
#consultation-form, main .alert.error { scroll-margin-top: 96px; }
@media print { .mobile-cta { display: none !important; } }
/* «Кто ведёт ваше дело»: круглый знак + имя и факты (образование, стаж, где, срок ответа) */
.lawyer-card { display: flex; gap: var(--s5); align-items: center; padding: var(--s5); border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-card); }
.lawyer-card.about { margin: var(--s4) 0 var(--s5); }
.lawyer-card.article-author { margin: var(--s6) 0 0; }
.article-byline { margin: 0 0 var(--s5); }
.article-byline a { color: inherit; }
.lawyer.compact { margin: var(--s5) 0; }
.lawyer-logo { flex: none; border-radius: 50%; }
.lawyer-name { font-weight: 700; font-size: 1.15rem; color: var(--c-ink); margin: var(--s1) 0 var(--s2); }
.lawyer-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s1); }
.lawyer-facts li { display: flex; gap: var(--s2); align-items: flex-start; }
.lawyer-facts svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--c-primary); }
@media (max-width: 560px) { .lawyer-card { flex-direction: column; align-items: flex-start; } }
.form-progress { position: sticky; top: 72px; z-index: 5; margin: 0 0 var(--s4); padding: var(--s2) var(--s4); border-radius: var(--r-pill); background: var(--c-mint); color: var(--c-primary); font-weight: 600; }
/* «Поделиться»: кнопки-чипы выглядят как ссылки-чипы */
button.chip { font: inherit; cursor: pointer; }
.share { border-top: 1px solid var(--c-border); padding-top: var(--s4); }

/* ---------- Путь: пошаговое решение одной проблемы (/put/…, 26.10.2026) ---------- */
.path-form { display: grid; gap: var(--s4); }
.path-q { border: 0; padding: 0; margin: 0; }
.path-q legend { font-weight: 600; margin-bottom: var(--s2); }
.path-opts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.path-opt { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: var(--s2) var(--s4); border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-card); cursor: pointer; }
.path-opt input { accent-color: var(--c-primary); width: 20px; height: 20px; margin: 0; }
.path-opt:has(input:checked) { border-color: var(--c-primary); background: var(--c-mint); font-weight: 600; }
.path-opt:focus-within { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.path-result { margin-top: var(--s6); }
.path-verdict { border-left: 6px solid var(--c-primary); background: var(--c-mint); }
.path-verdict p { margin: 0; font-size: 1.08rem; }
.path-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s4); counter-reset: none; }
.path-step { border-left: 3px solid var(--c-border); padding: 0 0 0 var(--s4); }
.path-step h3 { margin: 0 0 var(--s2); }
.path-n { margin: 0 0 var(--s1); font-size: .9rem; font-weight: 600; color: var(--c-accent-text); }
.path-fork { margin: var(--s6) 0 var(--s4); }
.path-fork h2 { margin-top: 0; font-size: 1.3rem; }
.path-fork-lawyer { border: 2px solid var(--c-accent); }
.path-fork-self { border: 2px solid var(--c-primary); }
.path-cta { border: 2px solid var(--c-accent); margin-bottom: var(--s4); }
[data-theme="dark"] .path-opt:has(input:checked), [data-theme="dark"] .path-verdict { background: #16343A; }
.path-edit { margin-top: var(--s5); }
.path-edit > summary { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--c-primary); }
.path-edit[open] > summary { margin-bottom: var(--s3); }

/* Шаги на странице ситуации (src/guides.js, 26.10.2026): на первом экране — коротко, главный срок и первое действие */
.guide-deadline { display: flex; gap: var(--s2); align-items: flex-start; margin: 0 0 var(--s4); padding: var(--s3) var(--s4); background: var(--c-card); border: 1px solid var(--c-border); border-radius: 10px; }
.guide-deadline svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--c-primary); }
.guide-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s4) 0 var(--s2); }
@media (max-width: 520px) { .guide-actions .btn { flex: 1 1 100%; } }
.guide-src { margin: var(--s2) 0 var(--s4); }
.guide-src > summary { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--c-primary); }
[data-theme="dark"] .guide-deadline svg { color: #9BE0D4; }

/* Вторая прогулка 26.10.2026: «на проверке» — одной строкой с фиолетовой полосой, а не крупной плашкой перед формой;
   декоративная сцена главной на телефоне не занимает целый экран — польза (как это работает, направления) выше */
.review-note { margin: 0 0 var(--s4); padding: var(--s2) var(--s3); border-left: 3px solid #8B6CF0; background: #F1EDFC; border-radius: 0 10px 10px 0; color: var(--c-ink); }
.review-note strong { color: #3B2A78; }
:is([data-theme="dark"], [data-theme="gold"]) .review-note { border-left-color: #6A4FD0; background: #1E1838; color: var(--c-ink); }
:is([data-theme="dark"], [data-theme="gold"]) .review-note strong { color: #C9BBFF; }
@media (max-width: 520px) { .hero-art { display: none; } }
