/* Mark GreenEngine — стили публичного сайта. Системные шрифты, без внешних зависимостей.
 * Структура: токены → основа → раскладка → компоненты (кнопки, шапка, карточки, тарифы, галерея, FAQ, документы)
 * → подвал → доступность. Компоненты описаны в server/README.md («Дизайн-система сайта»). */

:root {
  --green-900: #0c3a22;
  --green-800: #0f4d2d;
  --green-700: #136a3d;
  --green-600: #17804a;
  --green-500: #1f9a5a;
  --green-100: #e3f4ea;
  --green-50:  #f2faf5;
  --ink: #17221c;
  --muted: #4f6157;
  --line: #dbe7df;
  --line-strong: #b9cfc2;
  --bg: #ffffff;
  --warn-bg: #fff6e0;
  --warn-line: #e8c15a;
  --warn-ink: #6b4b00;
  --error-bg: #fdecec;
  --error-line: #e3a1a1;
  --error-ink: #8a1c1c;
  --focus: #0b63ce;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 72px;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(12, 58, 34, .06), 0 8px 24px rgba(12, 58, 34, .07);
  --shadow-sm: 0 1px 2px rgba(12, 58, 34, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --header-h: 68px;
  --gutter: 24px;
}
@media (max-width: 640px) { :root { --gutter: 16px; --header-h: 60px; } }

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--green-700); text-underline-offset: 2px; }
a:hover { color: var(--green-500); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--green-900); margin: 0 0 .5em; overflow-wrap: break-word; }
h1 { font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem); letter-spacing: -.02em; max-width: 24ch; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.125rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .92em; background: var(--green-50);
  border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; }
pre { overflow-x: auto; background: var(--green-50); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--space-3); font-size: .9rem; line-height: 1.45; }
pre code { background: none; border: 0; padding: 0; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Раскладка ---------- */
.container { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(860px + 2 * var(--gutter)); }
.section { padding: var(--space-7) 0; }
.section-alt { background: var(--green-50); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: var(--space-5); }
.section-head p { color: var(--muted); font-size: 1.0625rem; }
.section-foot { margin-top: var(--space-4); }
@media (max-width: 860px) { .section { padding: var(--space-6) 0; } }

.grid { display: grid; gap: var(--space-4); }
.grid > *, .pricing > *, .hero-grid > *, .feature-grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100; background: #fff; color: var(--green-900);
  padding: 10px 14px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Иконки (SVG-спрайт из inc/icons.php) ---------- */
.i { width: 1.25em; height: 1.25em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.icon-tile {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 12px; background: var(--green-100); color: var(--green-700);
}
.icon-tile .i { width: 24px; height: 24px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 10px 20px;
  border-radius: var(--radius-sm); border: 2px solid var(--green-600);
  background: var(--green-600); color: #fff;
  font: inherit; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn-outline { background: #fff; color: var(--green-700); }
.btn-outline:hover { background: var(--green-50); color: var(--green-800); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--green-700); }
.btn-ghost:hover { background: var(--green-50); border-color: var(--green-50); color: var(--green-800); }
.btn-light { background: #fff; border-color: #fff; color: var(--green-800); }
.btn-light:hover { background: var(--green-100); border-color: var(--green-100); color: var(--green-900); }
.btn-small { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: mg-spin .8s linear infinite;
}
@keyframes mg-spin { to { transform: rotate(360deg); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow .i { width: 1em; height: 1em; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, .9); backdrop-filter: saturate(160%) blur(8px); }
}
.header-inner { display: flex; align-items: center; gap: var(--space-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--green-900); flex: 0 0 auto; }
.brand img { width: 36px; height: 36px; }
.brand-name { font-size: 1.15rem; font-weight: 500; white-space: nowrap; }
.brand-name b { color: var(--green-600); font-weight: 700; }
.site-nav { display: flex; align-items: center; gap: var(--space-4); flex: 1 1 auto; justify-content: flex-end; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
  color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap;
}
.nav-list a:hover { color: var(--green-700); background: var(--green-50); }
.nav-list a[aria-current="page"] { color: var(--green-700); box-shadow: inset 0 -2px 0 var(--green-600); border-radius: 8px 8px 0 0; }
.nav-actions { display: flex; align-items: center; gap: var(--space-2); }
.nav-toggle {
  display: none; margin-left: auto; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--green-900);
  font: inherit; font-weight: 600; cursor: pointer;
}
.nav-toggle .i { width: 22px; height: 22px; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-menu { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: inline; }
.header-cta-mobile { display: none; }

@media (max-width: 1100px) {
  .js .nav-toggle { display: inline-flex; }
  .js .header-cta-mobile { display: inline-flex; margin-left: auto; }
  .js .header-cta-mobile + .nav-toggle { margin-left: 0; }
  .js .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: var(--space-3);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: var(--space-2) var(--gutter) var(--space-4);
  }
  .js .site-nav.is-open { display: flex; }
  .js .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav-list a { display: flex; padding: 0 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--green-600); padding-left: 12px; }
  .js .nav-actions { flex-direction: column; align-items: stretch; }
  /* Без JS меню остаётся видимым списком под логотипом. */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 8px; }
  html:not(.js) .site-nav { flex-wrap: wrap; justify-content: flex-start; }
  html:not(.js) .nav-list { flex-wrap: wrap; }
}
@media (max-width: 640px) { .header-inner { gap: 12px; } }
@media (max-width: 480px) {
  .js .nav-toggle { padding: 0; justify-content: center; }
  .js .nav-toggle-text {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
/* На самых узких экранах кнопка запуска остаётся в меню и в первом экране страницы. */
@media (max-width: 400px) { .js .header-cta-mobile { display: none; } .js .header-cta-mobile + .nav-toggle { margin-left: auto; } }

/* ---------- Первый экран ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(31, 154, 90, .16), transparent 60%),
    linear-gradient(180deg, var(--green-50), #fff);
  padding: var(--space-6) 0;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-6); align-items: center; }
.eyebrow {
  display: inline-block; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--green-700); background: var(--green-100); padding: 4px 10px; border-radius: 999px; margin-bottom: var(--space-3);
}
.lead { font-size: 1.125rem; color: var(--muted); max-width: 38em; }
.hero .actions { margin: var(--space-4) 0 var(--space-3); }
.hero h1 { max-width: none; }
.hero .btn-ghost { padding-inline: 8px; }
.hero-note { font-size: .9375rem; color: var(--muted); max-width: 40em; }
.hero-note a { color: var(--green-700); }
.hero-shot { margin: 0; }
.hero-shot img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--line-strong); box-shadow: var(--shadow); background: #fff; }
.hero-shot figcaption { margin-top: var(--space-2); font-size: .875rem; color: var(--muted); }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* Кнопка-увеличение поверх изображения */
.zoom { position: relative; display: block; border-radius: var(--radius); text-decoration: none; }
.zoom-badge {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; background: rgba(12, 58, 34, .85); color: #fff; font-size: .875rem; font-weight: 600;
}
.zoom:hover .zoom-badge { background: var(--green-900); }

/* ---------- Карточки ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.card > :last-child { margin-bottom: 0; }
.card ul { margin: 0 0 1em; padding-left: 1.1em; }
.card li { margin: 4px 0; }
.feature-card { display: flex; flex-direction: column; gap: var(--space-3); }
.feature-card h3 { margin: 0; }
.feature-card .card-head { display: flex; align-items: center; gap: 12px; }
.feature-card p { color: var(--muted); margin: 0; }
.feature-card ul { flex: 1 1 auto; margin: 0; }
.feature-card .link-arrow { margin-top: auto; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .i { color: var(--green-600); margin-top: 2px; }
.checklist-inline { display: flex; flex-wrap: wrap; gap: 10px 28px; }

/* ---------- Шаги ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.steps > li {
  counter-increment: step; position: relative; padding: 18px 20px 18px 70px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.steps > li::before {
  content: counter(step); position: absolute; left: 20px; top: 18px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--green-600); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.steps h3 { margin-bottom: .3em; }
.steps p:last-child { margin-bottom: 0; }
.steps-grid { grid-template-columns: repeat(4, 1fr); }
.steps-grid > li { padding: 64px 20px 20px; }
.steps-grid > li::before { top: 20px; }
@media (max-width: 1000px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid > li { padding: 18px 20px 18px 70px; }
  .steps-grid > li::before { top: 18px; }
}

/* ---------- Сообщения ---------- */
.note {
  background: var(--green-50); border: 1px solid var(--line); border-left: 4px solid var(--green-600);
  border-radius: 8px; padding: 14px 18px; margin: 18px 0;
}
.note > :last-child { margin-bottom: 0; }
.note-warn { background: var(--warn-bg); border-color: var(--warn-line); border-left-color: var(--warn-line); color: var(--warn-ink); }
.note-error { background: var(--error-bg); border-color: var(--error-line); border-left-color: var(--error-ink); color: var(--error-ink); }
.note-title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 4px; }

/* ---------- Тарифы ---------- */
.pricing-common {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); align-items: stretch; }
@media (max-width: 1000px) { .pricing { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .pricing { grid-template-columns: 1fr; }
  /* В одну колонку выравнивать нечего: пустое место под бейдж убирается. */
  .price-card { grid-template-rows: auto; }
  .price-badge-slot:empty { display: none; }
}
.price-card {
  display: grid; grid-template-rows: 28px auto auto auto auto 1fr; gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 22px; box-shadow: var(--shadow);
}
.price-card.featured { border: 2px solid var(--green-600); padding: 19px 21px 21px; }
.price-badge-slot { display: flex; align-items: flex-start; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 600; color: #fff;
  background: var(--green-600); border-radius: 999px; padding: 2px 10px;
}
.price-name { font-weight: 600; color: var(--green-800); font-size: 1.0625rem; }
.price-value { font-size: 2.125rem; font-weight: 700; color: var(--green-900); letter-spacing: -.02em; white-space: nowrap; line-height: 1.15; }
.price-unit { font-size: .9375rem; font-weight: 600; color: var(--green-700); }
.price-sub { color: var(--muted); font-size: .9375rem; }
.price-card .btn { align-self: end; margin-top: var(--space-3); }
.pricing-notes { margin-top: var(--space-4); color: var(--muted); font-size: .9375rem; max-width: 900px; }
.pricing-notes p { margin-bottom: .6em; }

/* ---------- Галерея и lightbox ---------- */
.gallery-main { margin: 0; }
.gallery-main img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--line-strong); background: #fff; box-shadow: var(--shadow); }
.gallery-main figcaption { margin-top: 10px; color: var(--muted); }
.gallery-main figcaption b { color: var(--ink); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; list-style: none; margin: var(--space-3) 0 0; padding: 0; }
@media (max-width: 640px) { .gallery-thumbs { grid-template-columns: repeat(3, 1fr); } }
.gallery-thumbs a {
  display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 2px solid transparent; border-radius: 12px;
  color: var(--ink); text-decoration: none; font-size: .875rem; font-weight: 600; min-height: 44px;
}
.gallery-thumbs a:hover { background: #fff; border-color: var(--line); }
.gallery-thumbs a[aria-current="true"] { border-color: var(--green-600); background: #fff; }
.gallery-thumbs img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: 6px; border: 1px solid var(--line); }

.lightbox {
  width: min(1320px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: var(--radius); background: #0b1a12; color: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.lightbox::backdrop { background: rgba(5, 20, 12, .78); }
.lightbox-inner { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100vh - 32px); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; }
.lightbox-title { font-weight: 600; }
.lightbox-img-wrap { overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 0 12px; }
.lightbox-img-wrap img { display: block; max-width: 100%; height: auto; border-radius: 8px; background: #fff; }
.lightbox-nav { display: flex; justify-content: center; gap: 12px; padding: 12px; }
.lightbox .btn-icon {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius-sm); background: transparent; color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
}
.lightbox .btn-icon:hover { background: rgba(255, 255, 255, .12); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 900px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 18px;
  font-weight: 600; color: var(--green-900); cursor: pointer; list-style: none; border-radius: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 10px; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--green-700); border-bottom: 2px solid var(--green-700); transform: rotate(45deg);
  transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { background: var(--green-50); }
.faq .faq-body { padding: 0 18px 16px; }
.faq .faq-body > :last-child { margin-bottom: 0; }
.faq-group { margin-top: var(--space-5); }

/* ---------- Страница модуля ---------- */
.page-hero { background: var(--green-50); border-bottom: 1px solid var(--line); padding: var(--space-6) 0 var(--space-5); }
.page-hero .lead { margin-bottom: 0; }
.page-hero .actions { margin-top: var(--space-4); }
.title-row { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.title-row h1 { margin: 0; }
.feature-shot { margin-bottom: var(--space-5); }
.breadcrumbs { font-size: .9rem; color: var(--muted); margin-bottom: var(--space-3); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.feature-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-6); align-items: start; }
.feature-grid aside { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: var(--space-3); }
@media (max-width: 960px) { .feature-grid { grid-template-columns: 1fr; } .feature-grid aside { position: static; } }
.prose h2 { font-size: 1.375rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.side-card h3 { font-size: 1rem; }
.side-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.module-nav { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.module-nav a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; text-decoration: none; color: var(--ink); font-weight: 500;
}
.module-nav a:hover { border-color: var(--green-600); color: var(--green-700); }
.module-nav a[aria-current="page"] { border-color: var(--green-600); background: var(--green-100); color: var(--green-800); }

/* ---------- Документация ---------- */
.doc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
@media (max-width: 640px) { .doc-list { grid-template-columns: 1fr; } }
.doc-list a {
  display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 18px 20px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
}
.doc-list a:hover { border-color: var(--green-600); box-shadow: var(--shadow-sm); }
.doc-list b { display: block; color: var(--green-900); margin-bottom: 2px; }
.doc-list span span { color: var(--muted); font-size: .9375rem; }
.doc-list + h2 { margin-top: var(--space-5); }
.release { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.release dt { font-weight: 600; color: var(--green-900); }
.release dd { margin: 0; overflow-wrap: anywhere; }
.release-actions { margin: var(--space-4) 0 0; }
@media (max-width: 480px) { .release { grid-template-columns: 1fr; gap: 2px; } .release dd { margin-bottom: 8px; } }

.doc-hero { background: var(--green-50); border-bottom: 1px solid var(--line); padding: var(--space-6) 0 var(--space-4); }
.doc-hero p { color: var(--muted); margin: 0; }
.doc { padding: var(--space-5) 0 var(--space-7); }
.doc h2 { font-size: 1.375rem; margin-top: 1.8em; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 1.4em; }
.doc ol, .doc ul { padding-left: 1.4em; }
.doc li { margin: 6px 0; }
.doc .clauses { list-style: none; padding-left: 0; }
.doc .clauses > li { padding-left: 0; }
.doc .num { font-weight: 600; color: var(--green-800); margin-right: 4px; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 30px; }
.toc ol { margin: 0; columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 14px 0 22px; }
.doc-table { width: 100%; border-collapse: collapse; background: #fff; }
.doc-table th, .doc-table td { text-align: left; padding: 10px 14px; border: 1px solid var(--line); vertical-align: top; }
.doc-table thead th { background: var(--green-50); color: var(--green-900); }
.requisites th { width: 34%; font-weight: 600; color: var(--green-900); background: var(--green-50); }
.req-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.req-list li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.req-list .i { color: var(--green-600); margin-top: 2px; }
.req-list b { display: block; }
.req-list small { color: var(--muted); font-size: .9375rem; }

/* ---------- Призыв ---------- */
.cta {
  background: linear-gradient(135deg, var(--green-700), var(--green-900)); color: #fff; border-radius: 20px;
  padding: 40px; display: flex; gap: var(--space-4); align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; color: rgba(255, 255, 255, .88); max-width: 46em; }
@media (max-width: 640px) { .cta { padding: 28px 20px; } }

/* Страница-сообщение (регистрация по заявке, 404) */
.placeholder { text-align: center; padding: var(--space-7) 0; }
.placeholder h1 { margin-left: auto; margin-right: auto; }
.placeholder .lead { margin: 0 auto var(--space-4); }
.placeholder .actions { justify-content: center; margin-bottom: var(--space-4); }
.placeholder-text { text-align: left; max-width: 640px; margin: 0 auto; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--green-900); color: rgba(255, 255, 255, .85); padding: var(--space-6) 0 var(--space-4); font-size: .9375rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--green-100); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr; gap: var(--space-4); }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-title { font-weight: 600; color: #fff; margin-bottom: 8px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 2px 0; }
.footer-links a { display: inline-block; padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: var(--space-5); padding-top: 18px; font-size: .875rem; color: rgba(255, 255, 255, .7); }

/* ---------- Формы (кабинет) ---------- */
.form { display: grid; gap: var(--space-3); }
.field { display: grid; gap: 6px; margin: 0; min-width: 0; }
fieldset.field { border: 0; padding: 0; }
.field > label, .field legend { font-weight: 600; color: var(--green-900); padding: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input:not([type]) {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.field input:hover { border-color: var(--green-600); }
.field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field-hint { margin: 0; color: var(--muted); font-size: .9rem; }
.field-error { display: flex; gap: 6px; align-items: flex-start; margin: 0; color: var(--error-ink); font-size: .9375rem; font-weight: 600; }
.field-error .i { margin-top: 2px; }
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="password"], .has-error input:not([type]) {
  border: 2px solid var(--error-ink); background: var(--error-bg);
}
.field-check { grid-template-columns: 24px 1fr; align-items: start; column-gap: 10px; }
.field-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green-600); }
.field-check > label { font-weight: 400; color: var(--ink); }
.field-check .field-error { grid-column: 2; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; font-weight: 400;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--green-600); }
.choice:has(input:checked) { border-color: var(--green-600); background: var(--green-50); }
.form-summary ul { margin: 6px 0 0; padding-left: 20px; }
.form-summary a { color: inherit; }
.form-inline { display: inline-block; margin: 0; }
.note-ok { background: var(--green-50); }
.h3 { font-size: 1.15rem; }

/* ---------- Вход, регистрация, восстановление ---------- */
.auth { padding: var(--space-6) 0 var(--space-7); }
.auth-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 360px); gap: var(--space-5); justify-content: center; align-items: start; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem); }
.auth-card .muted a, .auth-aside a { font-weight: 600; }
.auth-aside { padding-top: var(--space-3); }
.steps-plain { padding-left: 20px; }
.steps-plain li { margin-bottom: 8px; }
.nav-login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 600; text-decoration: none; color: var(--green-800); border-radius: 8px; }
.nav-login:hover { background: var(--green-50); }
@media (max-width: 860px) {
  .auth { padding: var(--space-4) 0 var(--space-6); }
  .auth-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-card { padding: var(--space-4) var(--space-3); }
}

/* ---------- Кабинет ---------- */
.cab { padding: var(--space-4) 0 var(--space-7); }
.cab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.cab-account { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.cab-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin: var(--space-3) 0 var(--space-4); border-bottom: 1px solid var(--line); }
.cab-nav ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.cab-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 600; text-decoration: none;
  color: var(--green-800); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.cab-nav a:hover { background: var(--green-50); }
.cab-nav a[aria-current="page"] { border-bottom-color: var(--green-600); color: var(--green-900); }
.cab-logout { margin: 0; }
.cab-body h1 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem); }
.cab-body h2 { font-size: 1.375rem; margin-top: var(--space-5); }
.cab-stats { margin: var(--space-3) 0; }
.stat { display: grid; gap: 4px; align-content: start; }
.stat-label { font-weight: 600; color: var(--green-800); }
.stat-value { font-size: 2rem; line-height: 1.1; color: var(--green-900); }
.cab-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 8px; }
.cab-steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: start;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.cab-steps li::before { content: counter(step); grid-row: span 2; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--green-100); color: var(--green-800); font-weight: 700; }
.cab-steps li span { color: var(--muted); font-size: .9375rem; }
.cab-steps li.is-done::before { content: "✓"; background: var(--green-600); color: #fff; }
.cab-steps li.is-current { border: 2px solid var(--green-600); padding: 11px 13px; }
.cab-callout form { margin-top: 8px; }
.cab-dl { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.cab-dl dt { color: var(--muted); }
.cab-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cab-table td a { font-weight: 600; }
.cab-body .card h2 { margin-top: 0; }
@media (max-width: 640px) {
  /* Узкий экран: строка таблицы организаций — карточка с подписями полей, без прокрутки таблицы вбок. */
  .cab-table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cab-table-stack, .cab-table-stack tbody, .cab-table-stack tr, .cab-table-stack td { display: block; width: 100%; }
  .cab-table-stack tr { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 6px 0; background: #fff; }
  .cab-table-stack td { border: 0; padding: 4px 14px; display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 8px; }
  .cab-table-stack td::before { content: attr(data-label); color: var(--muted); font-weight: 400; }
}
.badge-muted { background: var(--green-100); color: var(--green-900); }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
/* Подписки ЮЛ/ИП (MGE-WEB-006A): состояние срока, выбранная организация, недоступные шаги подключения. */
.badge-ok { background: var(--green-600); color: #fff; }
.badge-error { background: var(--error-bg); color: var(--error-ink); border: 1px solid var(--error-line); }
.inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.cab-selected { margin-bottom: var(--space-4); border: 2px solid var(--green-600); }
.cab-selected .title-row h2 { margin: 0; }
.cab-org-pick { margin-top: var(--space-3); }
.cab-table tr.is-selected td { background: var(--green-50); }
.cab-steps li.is-unavailable { background: var(--green-50); border-style: dashed; }
.cab-steps li.is-unavailable::before { content: "—"; background: #fff; color: var(--muted); border: 1px solid var(--line-strong); }
.empty-state { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: var(--space-4); background: var(--green-50); }
.cab-form { max-width: 640px; }
.cab-actions { margin-top: var(--space-4); }
.cab-actions form { margin: 0; }
.title-row { flex-wrap: wrap; }
@media (max-width: 560px) {
  .cab-dl { grid-template-columns: minmax(0, 1fr); }
  .cab-dl dd { margin-bottom: 6px; }
  .cab-nav { flex-direction: column; align-items: stretch; }
  .cab-nav a { padding: 0 10px; }
}

/* ---------- Подтверждение УКЭП ---------- */
.select { width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.ukep-steps { margin: var(--space-4) 0; }
.ukep-panel { margin: var(--space-3) 0; display: grid; gap: var(--space-3); }
.ukep-panel[hidden] { display: none !important; }
.ukep-statement { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22rem; overflow-y: auto; margin: 0; }
.ukep-status:empty { display: none; }

/* ---------- Доступность ---------- */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.site-footer :focus-visible, .cta :focus-visible, .lightbox :focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Выбор срока подписки при оплате (MGE-WEB-007A) */
.tariff-pick { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; min-width: 0; }
.tariff-pick legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.tariff-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid #d5e3da; border-radius: 12px; background: #fff; cursor: pointer; }
.tariff-option input { margin-top: 4px; flex: none; }
.tariff-option:has(input:checked) { border-color: var(--green-600); box-shadow: 0 0 0 1px var(--green-600) inset; }
.cab-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
