/* zhaloba-na-uk.ru - главная и внутренние */

:root {
  --bg: #f6f7f9;
  --surface: #fff;
  --text: #1a1d24;
  --muted: #5c6370;
  --border: #e2e5eb;
  --primary: #1e4d6b;
  --primary-hover: #163a52;
  --accent: #2d6a4f;
  --accent-soft: #e8f2ec;
  --primary-soft: #e8f0f5;
  --header-bg: rgba(255, 255, 255, 0.92);
  --radius: 10px;
  --shadow: 0 1px 3px rgba(26, 29, 36, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #12161d;
  --surface: #1b222c;
  --text: #e8edf4;
  --muted: #a7b1bf;
  --border: #2b3442;
  --primary: #7ab2d9;
  --primary-hover: #98c6e6;
  --accent: #71c49b;
  --accent-soft: #1f332a;
  --primary-soft: #1d2a36;
  --header-bg: rgba(18, 22, 29, 0.92);
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

a {
  color: var(--primary);
}

a:visited {
  color: var(--primary-hover);
}

.wrap {
  width: min(72rem, 100% - 1.5rem);
  margin-inline: auto;
}

@media (min-width: 480px) {
  .wrap {
    width: min(72rem, 100% - 2rem);
  }
}

@media (min-width: 900px) {
  .wrap {
    width: min(82rem, 100% - 2.5rem);
  }
}

@media (min-width: 1320px) {
  .wrap {
    width: min(90rem, 100% - 3rem);
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--text);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Header */

.site-header {
  position: relative;
  z-index: 100;
  padding: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(30, 77, 107, 0.06), var(--shadow);
  backdrop-filter: saturate(1.2) blur(10px);
}

.site-header:not(:has(.header-inner)) {
  min-height: 5.75rem;
}

@media (min-width: 769px) {
  .site-header:not(:has(.header-inner)) {
    min-height: 7.25rem;
  }
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  margin: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
}

.site-nav-theme-item {
  display: none !important;
}

.header-nav-actions {
  display: contents;
}

@media (max-width: 768px) {
  .header-nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
  }

  .header-nav-actions .nav-toggle:not([hidden]) {
    display: inline-flex;
    margin-left: 0;
    grid-column: unset;
    grid-row: unset;
    align-self: unset;
    justify-self: unset;
  }

}

@media (min-width: 769px) {
  .theme-toggle--header {
    display: inline-flex !important;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: start;
    margin-top: 0.2rem;
    position: relative;
    z-index: 3;
  }
}

@media (max-width: 768px) {
  .theme-toggle--header {
    display: inline-flex !important;
    width: 2rem;
    height: 2rem;
    font-size: 0.88rem;
  }

  .header-nav-actions {
    gap: 0.55rem;
  }

  .header-nav-actions .nav-toggle {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 999px;
    gap: 0;
    justify-content: center;
    font-size: 0.64rem;
    line-height: 1;
    white-space: nowrap;
  }

  .header-nav-actions .nav-toggle .nav-toggle-text {
    display: inline;
    margin: 0;
  }

  .header-nav-actions .nav-toggle .nav-toggle-bars {
    display: none;
  }

  .header-nav-actions .nav-toggle[aria-expanded="true"] .nav-toggle-text {
    display: none;
  }

  .header-nav-actions .nav-toggle[aria-expanded="true"] .nav-toggle-bars {
    display: block;
    width: auto;
    height: auto;
  }

  .header-nav-actions .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
    content: "×";
    display: block;
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 600;
  }

  .header-nav-actions .nav-toggle[aria-expanded="true"] .nav-toggle-bars span {
    display: none;
  }
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  padding: 0.4rem 0;
  position: relative;
  z-index: 2;
}

.header-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem clamp(0.45rem, 1.5vw, 0.75rem);
  min-width: 0;
  flex: 1 1 auto;
}

.brand-mark {
  flex-shrink: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  min-width: 0;
  max-width: 100%;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  text-decoration: none;
  line-height: 0;
}

.brand-mark:hover {
  border: none;
  box-shadow: none;
  opacity: 0.9;
}

.brand-mark:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.brand-mark-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(62rem, 100%);
  max-height: clamp(3.05rem, 5.2vw + 1.3rem, 4.55rem);
  object-fit: contain;
}

@media (min-width: 769px) {
  .brand-mark-img {
    max-height: clamp(3.25rem, 1.56vw + 2.4rem, 4.875rem);
    max-width: min(52rem, 100%);
  }
}

@media (max-width: 380px) {
  .brand-mark-img {
    max-height: clamp(2.75rem, 18vw, 3.9rem);
  }
}

.brand-mark-img--theme-dark {
  display: none;
}

:root[data-theme="dark"] .brand-mark-img--theme-light {
  display: none;
}

:root[data-theme="dark"] .brand-mark-img--theme-dark {
  display: block;
}

.brand {
  flex: 1 1 12rem;
  min-width: 0;
  display: flex;
  align-items: center;
}

.site-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--primary);
}

.site-tagline {
  margin: 0;
  font-size: clamp(0.8125rem, 1.45vw, 0.9375rem);
  font-weight: 500;
  color: #334e62;
  line-height: 1.42;
  letter-spacing: 0.028em;
  max-width: min(36rem, 100%);
  text-wrap: balance;
}

@media (min-width: 769px) {
  .header-brand > .brand {
    padding-left: clamp(0.7rem, 1.5vw, 1rem);
    margin-left: clamp(0.45rem, 1.1vw, 0.75rem);
    border-left: 1px solid rgba(30, 77, 107, 0.14);
    align-self: center;
  }

  .site-tagline {
    font-size: clamp(0.875rem, 1.05vw, 0.96875rem);
    letter-spacing: 0.032em;
    line-height: 1.4;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(30, 77, 107, 0.2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(26, 29, 36, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-toggle:hover {
  background: var(--primary-soft);
  border-color: rgba(30, 77, 107, 0.35);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.125rem;
  height: 0.875rem;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.js .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.js .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.js .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(26, 32, 44, 0.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.site-nav-backdrop:focus-visible {
  outline: none;
}

.nav-group-label {
  margin: 0 0 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-group-label--primary {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-nav {
  width: 100%;
}

.site-nav .nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.26rem 0.4rem;
  margin: 0 -0.2rem;
  border-radius: 8px;
  transition: background 0.12s ease, color 0.12s ease;
}

.site-nav a:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

.site-nav a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.site-nav a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary-hover);
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 0.2rem 0.55rem;
    align-items: center;
  }

  .header-brand {
    grid-column: 1;
    grid-row: 1;
  }

  #site-nav.header-nav-drawer {
    display: contents;
  }

  .site-nav--primary {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: auto;
    max-width: none;
  }

  .site-nav--primary .nav-list {
    flex-wrap: nowrap;
    gap: 0.06rem 0.28rem;
    justify-content: flex-end;
  }

  .site-nav--primary a {
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 0.18rem 0.3rem;
  }

  .site-nav--secondary {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: 100%;
    padding-top: 0.22rem;
    padding-bottom: 0.45rem;
    margin-top: 0;
    border-top: 1px solid var(--border);
  }

  .site-nav--secondary .nav-list {
    gap: 0.06rem 0.26rem;
  }

  .site-nav--secondary a {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.16rem 0.28rem;
  }
}

@media (max-width: 768px) {
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0.35rem;
    min-height: 5.25rem;
  }

  .header-brand {
    display: contents;
  }

  .header-brand .brand-mark {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    align-self: center;
  }

  .header-brand .brand {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
  }

  .nav-toggle[hidden] {
    display: none !important;
  }

  #site-nav.header-nav-drawer {
    grid-column: 1 / -1;
    grid-row: 3;
    flex: none;
    order: 0;
    width: 100%;
    display: none;
  }

  #site-nav.header-nav-drawer.is-open {
    display: flex;
  }

  html:not(.js) #site-nav.header-nav-drawer {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.55rem 0.45rem 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(26, 29, 36, 0.08);
  }

  html:not(.js) #site-nav.header-nav-drawer .site-nav--secondary {
    margin-top: 0.4rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
  }

  html:not(.js) #site-nav.header-nav-drawer .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  html:not(.js) #site-nav.header-nav-drawer .nav-list a {
    margin: 0;
    padding: 0.62rem 0.8rem;
    font-size: 0.9375rem;
    color: var(--text);
  }

  #site-nav.header-nav-drawer.is-open {
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.55rem 0.45rem 0.6rem;
    margin-top: 0.3rem;
    box-shadow: 0 12px 40px rgba(26, 29, 36, 0.1);
  }

  #site-nav.header-nav-drawer.is-open .site-nav--secondary {
    margin-top: 0.4rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
  }

  #site-nav.header-nav-drawer.is-open .nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.2rem;
    padding: 0;
    margin: 0;
  }

  #site-nav.header-nav-drawer.is-open .nav-list a {
    margin: 0;
    padding: 0.62rem 0.8rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
  }

  #site-nav.header-nav-drawer.is-open .nav-list a:hover,
  #site-nav.header-nav-drawer.is-open .nav-list a:focus-visible {
    border-color: var(--border);
    background: var(--primary-soft);
    color: var(--primary-hover);
  }

  #site-nav.header-nav-drawer.is-open .nav-list a[aria-current="page"] {
    border-color: rgba(30, 77, 107, 0.25);
    background: var(--primary-soft);
    color: var(--primary-hover);
  }

  body.is-nav-open {
    overflow: hidden;
  }

  body.is-nav-open .site-header {
    background: #fff;
    backdrop-filter: none;
    box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(26, 29, 36, 0.06);
  }
}

/* Trending topics strip (главная) */

[data-trending]:not(:has(.trending-strip__list)) {
  min-height: 7.5rem;
}

@media (min-width: 768px) {
  [data-trending]:not(:has(.trending-strip__list)) {
    min-height: 5.5rem;
  }
}

.trending-strip {
  padding: 0.75rem 0 0.85rem;
  background: linear-gradient(105deg, var(--primary-soft) 0%, rgba(255, 255, 255, 0.97) 48%, #fff 100%);
  border-bottom: 1px solid var(--border);
  max-width: 100%;
  overflow-x: clip;
}

.trending-strip__inner {
  display: grid;
  gap: 0.65rem 1.35rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  /* Одна колонка без minmax(0,1fr) растягивается под суммарную ширину горизонтального flex-ряда карточек и даёт горизонтальный скролл всей страницы + CLS в WebView */
  grid-template-columns: minmax(0, 1fr);
}

.trending-strip__head {
  min-width: 0;
}

@media (min-width: 768px) {
  .trending-strip {
    min-height: 5.85rem;
  }

  .trending-strip__inner {
    grid-template-columns: minmax(9.5rem, 12.5rem) minmax(0, 1fr);
  }

  .trending-strip__head {
    padding-right: 0.35rem;
    border-right: 1px solid rgba(30, 77, 107, 0.12);
  }
}

.trending-strip__badge {
  display: inline-block;
  margin-bottom: 0.3rem;
  padding: 0.18rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid rgba(30, 77, 107, 0.22);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(26, 29, 36, 0.05);
}

.trending-strip__title {
  margin: 0 0 0.28rem;
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}

.trending-strip__lead {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
  max-width: 15rem;
  overflow-wrap: break-word;
}

.trending-strip__lead a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.trending-strip__lead a:hover {
  text-decoration: underline;
}

.trending-strip__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.5rem;
  min-width: 0;
}

@media (max-width: 767px) {
  .trending-strip {
    min-height: 7.25rem;
  }

  .trending-strip__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }

  .trending-strip__list > li {
    flex: 0 0 min(86%, 15.75rem);
    max-width: 15.75rem;
    min-width: 0;
    scroll-snap-align: start;
  }
}

.trending-card {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  height: 100%;
  min-height: 4.25rem;
  min-width: 0;
  padding: 0.62rem 0.72rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid rgba(30, 77, 107, 0.14);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(26, 29, 36, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.trending-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(30, 77, 107, 0.12);
  transform: translateY(-1px);
}

.trending-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.trending-card__title {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
  overflow-wrap: break-word;
  hyphens: auto;
}

.trending-card__meta {
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--muted);
  overflow-wrap: break-word;
}

:root[data-theme="dark"] .trending-strip {
  background: linear-gradient(105deg, var(--primary-soft) 0%, rgba(27, 34, 44, 0.92) 48%, var(--bg) 100%);
}

:root[data-theme="dark"] .trending-strip__badge {
  border-color: rgba(122, 178, 217, 0.32);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

@media (min-width: 768px) {
  :root[data-theme="dark"] .trending-strip__head {
    border-right-color: rgba(122, 178, 217, 0.22);
  }
}

/* Под шапкой на внутренних: главная + эта страница */

.site-hub {
  padding: 0.7rem 0 0.85rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-hub__inner {
  display: grid;
  gap: 0.85rem 1.5rem;
  min-width: 0;
}

.site-hub__col {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 880px) {
  .site-hub__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .site-hub__col:first-child {
    padding-right: 1rem;
    border-right: 1px solid rgba(30, 77, 107, 0.1);
  }
}

.site-hub__label {
  margin: 0 0 0.42rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-hub__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.site-hub__links a {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.58rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(30, 77, 107, 0.14);
  border-radius: 999px;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.site-hub__links a:hover {
  background: #dceaf2;
  border-color: rgba(30, 77, 107, 0.28);
  color: var(--primary-hover);
}

.site-hub__links a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 879px) {
  .site-hub__links--many {
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .site-hub__links--many li {
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
  }

  .site-hub__links--many a {
    white-space: normal;
    max-width: 100%;
    text-align: left;
  }
}

/* Локальный поиск (search.html) */

.site-search-code {
  font-size: 0.9em;
  padding: 0.05em 0.35em;
  background: var(--primary-soft);
  border-radius: 4px;
}

.site-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.75rem;
}

.site-search-input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.site-search-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: rgba(30, 77, 107, 0.35);
}

.site-search-status {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  min-height: 1.35em;
}

.site-search-results {
  min-height: 2rem;
}

.site-search-hits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.site-search-hit {
  margin: 0;
}

.site-search-hit a {
  display: block;
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.site-search-hit a:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.site-search-hit a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Hero */

.hero {
  padding: 2.5rem 0 2.75rem;
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: min(100%, 52rem);
}

.hero-lead,
.hero-pain,
.hero-value {
  margin: 0 0 1.5rem;
  font-size: 1.0625rem;
  color: var(--text);
  max-width: min(100%, 48rem);
}

.hero-pain {
  margin-bottom: 1rem;
}

.hero-value {
  margin-bottom: 1.5rem;
}

.hero-mass {
  margin: -0.35rem 0 1.25rem;
  padding: 0.9rem 1rem;
  max-width: min(100%, 48rem);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-tools-label {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-actions--tools {
  margin-top: 0;
  margin-bottom: 1.1rem;
  gap: 0.65rem;
}

.hero-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: min(100%, 48rem);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:visited {
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

.btn-secondary:visited {
  color: var(--primary);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  font-weight: 500;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.btn-ghost:hover {
  background: rgba(30, 77, 107, 0.08);
}

.btn-outline-primary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(30, 77, 107, 0.14);
}

.btn-outline-primary:visited {
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary-soft);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
  box-shadow: 0 3px 14px rgba(30, 77, 107, 0.18);
}

/* Main sections */

.site-main {
  padding-bottom: 3rem;
  min-width: 0;
  max-width: 100%;
}

.main-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-top: 2.5rem;
}

.section {
  scroll-margin-top: 5rem;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 65ch;
}

.section--surface {
  background: var(--surface);
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .section--surface {
    padding: 2rem 2rem;
  }
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

/* Steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.step:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.step-title {
  margin: 0 0 0.35rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.step-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Two columns */

.two-col {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.callout {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.callout--primary {
  background: var(--primary-soft);
  border-color: #c5d8e6;
}

.callout--accent {
  background: var(--accent-soft);
  border-color: #b8d4c4;
}

.callout-title {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.callout p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
}

.zapros-flash {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.zapros-section .section-title {
  margin-bottom: 0.5rem;
}

.zapros-form-note {
  margin: 0 0 1.1rem;
}

.zapros-form {
  max-width: 36rem;
}

.zapros-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
}

.zapros-field {
  margin-bottom: 1rem;
}

.zapros-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.zapros-req {
  color: var(--primary);
  font-weight: 700;
}

.zapros-field input[type="text"],
.zapros-field input[type="email"],
.zapros-field textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.zapros-field textarea {
  min-height: 10rem;
  resize: vertical;
  line-height: 1.45;
}

.zapros-field input:focus,
.zapros-field textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: rgba(30, 77, 107, 0.35);
}

.zapros-field-hint {
  display: block;
  margin-top: 0.35rem;
}

.zapros-field--check {
  margin-bottom: 1.1rem;
}

.zapros-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}

.zapros-check input {
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--primary);
}

.zapros-actions {
  margin-top: 0.25rem;
}

/* Cards grid */

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 5rem;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(30, 77, 107, 0.12);
}

.card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.card-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary);
}

.card-meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Templates */

.templates {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.template-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.template-block summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.template-block summary::-webkit-details-marker {
  display: none;
}

.template-block summary::after {
  content: "";
  float: right;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.35rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.template-block[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 0.5rem;
}

.template-block summary:hover {
  background: var(--bg);
}

.template-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.copy-block {
  margin: 0;
}

.copy-block-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.copy-btn:hover {
  background: var(--primary-soft);
  border-color: #c5d4e0;
}

.copy-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.copy-btn:disabled {
  cursor: default;
  opacity: 1;
}

.copy-btn.is-done {
  color: var(--accent);
  border-color: #9bc4ad;
  background: var(--accent-soft);
}

.copy-btn-ic {
  flex-shrink: 0;
  display: block;
}

.copy-btn-txt {
  white-space: nowrap;
}

.copy-status {
  flex: 1 1 8rem;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: right;
}

.template-copy-note {
  margin: 0.65rem 0 0;
}

.template-text {
  margin: 0;
  padding: 1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

/* Tag list */

.tag-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  padding: 0.4rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
}

/* FAQ */

.faq-section .section-title {
  margin-bottom: 1rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  float: right;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.35rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--border);
}

.faq-item[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 0.5rem;
}

.faq-item p {
  margin: 0;
  padding: 1rem 1.25rem 1.15rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.faq-item--final {
  border-color: rgba(170, 62, 62, 0.34);
  background: linear-gradient(180deg, #fff4f4 0%, #f9fbff 42%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(130, 44, 44, 0.12);
}

.faq-item--final summary {
  font-weight: 700;
  color: var(--primary);
}

.faq-item--final p {
  color: var(--text);
}

:root[data-theme="dark"] .faq-item--final {
  background: linear-gradient(180deg, #322127 0%, #232b36 45%, #1b222c 100%);
  border-color: rgba(214, 118, 118, 0.42);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.34);
}

/* CTA */

.cta-final {
  margin-top: 0.5rem;
}

.cta-inner {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cta-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 700;
}

.cta-text {
  margin: 0 0 1.25rem;
  opacity: 0.95;
  max-width: 42ch;
  margin-inline: auto;
}

.cta-text--sub {
  margin: 0 auto;
  font-size: 0.875rem;
  opacity: 0.88;
  max-width: 56ch;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.2rem 0.45rem;
}

.cta-text--sub a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cta-text--sub a:hover {
  opacity: 0.95;
}

.cta-actions {
  justify-content: center;
}

.cta-final .btn-primary {
  background: #fff;
  color: var(--primary);
}

.cta-final .btn-primary:hover {
  background: var(--primary-soft);
}

.cta-final .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.cta-final .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* Footer */

.site-footer {
  padding: 1.75rem 0;
  font-size: 0.8125rem;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-disclaimer {
  margin: 0;
  max-width: 70ch;
}

.footer-contact {
  margin: 0;
  max-width: 70ch;
}

.footer-legal {
  margin: 0;
  max-width: 70ch;
}

@media (min-width: 700px) {
  .footer-contact,
  .footer-legal {
    white-space: nowrap;
  }
}

.footer-legal a {
  color: var(--primary);
  font-weight: 600;
}

.footer-inner {
  position: relative;
}

.footer-support-cta {
  margin-top: 0.25rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.footer-support-cta__title {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
}

.footer-support-cta__text {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--muted);
}

.footer-support-cta .btn {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
}

@media (min-width: 1280px) {
  .footer-inner {
    padding-right: 18.5rem;
    min-height: 7rem;
  }

  .footer-support-cta {
    position: absolute;
    right: 0;
    top: 0;
    width: 17.5rem;
    margin-top: 0;
  }
}

.privacy-article .privacy-section {
  margin-top: 1.75rem;
}

.privacy-article .privacy-section .section-title {
  font-size: 1.125rem;
  margin-bottom: 0.65rem;
}

.privacy-article .privacy-section ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.privacy-article .privacy-section li + li {
  margin-top: 0.35rem;
}

.support-section + .support-section {
  margin-top: 1rem;
}

.support-requisites {
  margin-top: 1rem;
}

.support-requisites-dl {
  margin: 0;
}

.support-requisites-row {
  display: grid;
  grid-template-columns: minmax(6rem, 9rem) 1fr;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(30, 77, 107, 0.15);
}

.support-requisites-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.support-requisites-row:first-child {
  padding-top: 0;
}

.support-requisites-dl dt {
  margin: 0;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--primary);
}

.support-requisites-dl dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.support-pay-placeholder {
  margin-top: 1rem;
  text-align: center;
}

.support-pay-placeholder__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.support-pay-status {
  margin: 0;
  min-height: 1.2em;
}

.support-check-note {
  margin-top: 0.45rem;
  line-height: 1.35;
}

@media (max-width: 480px) {
  .support-requisites-row {
    grid-template-columns: 1fr;
  }
}

.footer-copy {
  margin: 0;
  color: var(--muted);
}

.footer-source-note {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
}

/* Inner page: problemy */

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
}

.page-lead {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
}

.page-lead a {
  color: var(--primary);
  font-weight: 500;
}

.problem-block {
  margin-bottom: 1rem;
  scroll-margin-top: 5rem;
}

.problem-block h2 {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.problem-block p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.problem-block ul + p {
  margin-top: 0.65rem;
}

.problem-block p + p:not(.problem-norms) {
  margin-top: 0.65rem;
}

.back-link {
  margin: 2rem 0 0;
}

.placeholder {
  margin: 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Сервисы РФ и правовые карточки */

.service-card {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.service-card:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.service-card-title {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--primary);
}

.service-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
}

.service-steps li {
  margin-bottom: 0.65rem;
  padding-left: 0.25rem;
}

.service-steps li:last-child {
  margin-bottom: 0;
}

.service-card p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.service-card p:last-child {
  margin-bottom: 0;
}

.service-card-cta {
  margin: 1rem 0 0;
}

.service-card-cta .btn {
  width: 100%;
  max-width: 20rem;
}

@media (min-width: 480px) {
  .service-card-cta .btn {
    width: auto;
  }
}

.result-path {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  max-width: 74ch;
  color: var(--text);
}

.result-path li {
  margin-bottom: 0.55rem;
}

.result-path li:last-child {
  margin-bottom: 0;
}

.result-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  color: var(--muted);
}

.result-links a {
  color: var(--primary);
  font-weight: 600;
}

.legal-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .legal-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.legal-card {
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.legal-card-title {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.legal-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted);
}

.legal-list li {
  margin-bottom: 0.5rem;
}

.legal-list li:last-child {
  margin-bottom: 0;
}

.legal-details {
  margin-top: 0.5rem;
}

#pravo .section-intro a {
  color: var(--primary);
  font-weight: 500;
}

.hero-lead a,
.hero-pain a,
.hero-value a {
  color: var(--primary);
  font-weight: 500;
}

.step-body p + p {
  margin-top: 0.65rem;
}

.step-push {
  padding: 0.65rem 0.75rem;
  margin-top: 0.75rem !important;
  background: var(--primary-soft);
  border-radius: 8px;
  border: 1px solid #c5d8e6;
  color: var(--text) !important;
}

.step-push a {
  color: var(--primary);
  font-weight: 600;
}

.step-body .checklist {
  margin-top: 0.5rem;
  color: var(--text);
}

/* Двухколоночный макет: содержание + текст */

.layout-doc {
  display: block;
  padding-top: 0;
}

@media (max-width: 1023px) {
  .doc-toc {
    margin-bottom: 1.25rem;
    padding: 1rem 1rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .doc-toc-list a {
    padding: 0.4rem 0.35rem;
  }
}

.doc-main {
  min-width: 0;
}

@media (min-width: 1024px) {
  .layout-doc {
    display: grid;
    grid-template-columns: 13.5rem minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }

  .doc-toc {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
}

.doc-toc-title {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.doc-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-toc-list a {
  display: block;
  padding: 0.35rem 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--primary);
  text-decoration: none;
  border-radius: 6px;
}

.doc-toc-list a:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

.doc-toc-list a.is-active {
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Краткая схема под hero */

.quick-path {
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 52rem;
}

.quick-path-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.quick-path-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
}

.quick-path-list li {
  margin-bottom: 0.25rem;
}

.quick-path-list li:last-child {
  margin-bottom: 0;
}

.quick-path-foot {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
}

.quick-path-foot--hint {
  margin-top: 0.35rem;
}

.quick-path--featured {
  padding: 1.1rem 1.3rem;
  background: linear-gradient(180deg, #f0f8ff 0%, #ffffff 100%);
  border: 2px solid rgba(30, 77, 107, 0.3);
  box-shadow: 0 10px 24px rgba(30, 77, 107, 0.14);
}

.quick-path--featured .quick-path-title {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(30, 77, 107, 0.12);
  color: var(--accent);
  font-size: 0.8rem;
}

.quick-path--featured .quick-path-list {
  font-size: 0.93rem;
}

.vmeste-shot-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr);
}

.vmeste-step-groups {
  display: grid;
  gap: 1rem;
}

.instruction-disclaimer {
  margin-bottom: 1rem;
}

.vmeste-shot-card {
  margin: 0;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.vmeste-shot-img {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  height: auto;
  border-radius: calc(var(--radius) - 4px);
}

.vmeste-shot-card figcaption {
  margin-top: 0.45rem;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text);
}

.vmeste-shot-grid--1 {
  max-width: 260px;
}

@media (min-width: 640px) {
  .vmeste-shot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .vmeste-shot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vmeste-shot-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
  }

  .vmeste-shot-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vmeste-shot-grid--1 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.about-stack {
  display: grid;
  gap: 1.2rem;
  padding-top: 0.75rem;
}

.about-page .page-header--about {
  margin-bottom: 0;
  background: linear-gradient(165deg, #f8fcff 0%, #eef5fb 100%);
  border: 1px solid rgba(30, 77, 107, 0.22);
  box-shadow: 0 14px 28px rgba(30, 77, 107, 0.12);
}

.about-page .page-header--about .page-title {
  margin-bottom: 0.7rem;
}

.about-page .value-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: rgba(30, 77, 107, 0.18);
  box-shadow: 0 6px 16px rgba(30, 77, 107, 0.08);
}

:root[data-theme="dark"] .quick-path--featured {
  background: linear-gradient(180deg, #1e2a36 0%, #1b222c 100%);
  border-color: rgba(122, 178, 217, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}

:root[data-theme="dark"] .quick-path--featured .quick-path-title {
  background: rgba(122, 178, 217, 0.18);
  color: #a9dfc0;
}

:root[data-theme="dark"] .viz-celebrate {
  color: #d8f2e5;
  background: linear-gradient(135deg, #1f332a 0%, #244034 100%);
  border-color: #3d6a56;
}

:root[data-theme="dark"] .about-page .page-header--about {
  background: linear-gradient(165deg, #1d2733 0%, #1a222c 100%);
  border-color: rgba(122, 178, 217, 0.3);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .about-page .value-card {
  background: linear-gradient(180deg, #1b222c 0%, #1f2833 100%);
  border-color: rgba(122, 178, 217, 0.24);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .btn-primary {
  color: #10202e;
}

:root[data-theme="dark"] .btn-primary:hover {
  color: #0d1a25;
}

/* Карточки ценности «о проекте» */

.value-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .value-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  padding: 1rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.value-card-title {
  margin: 0 0 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.value-card-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.value-card-text a {
  color: var(--primary);
  font-weight: 500;
}

/* Досье */

.dossier-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .dossier-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.dossier-card-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
}

.checklist {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.checklist li {
  margin-bottom: 0.45rem;
}

.checklist li:last-child {
  margin-bottom: 0;
}

.checklist--tight {
  font-size: 0.875rem;
}

.checklist strong {
  color: var(--text);
}

/* Таблица матрицы */

.table-wrap {
  overflow-x: auto;
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.doc-table th,
.doc-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.doc-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text);
}

.doc-table tbody tr:last-child th,
.doc-table tbody tr:last-child td {
  border-bottom: none;
}

.doc-table td {
  color: var(--muted);
}

.doc-table strong {
  color: var(--text);
}

/* Ошибки */

.mistake-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.mistake-list li {
  margin-bottom: 0.6rem;
}

.mistake-list li:last-child {
  margin-bottom: 0;
}

.mistake-list strong {
  color: var(--text);
}

/* Страница проблем */

.problem-actions {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  color: var(--text);
}

.problem-norms {
  margin: 0.85rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}

.problem-norms a {
  color: var(--primary);
  font-weight: 500;
}

/* Страница образцов для копирования */

.copy-hint {
  margin: 0.75rem 0 1.15rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid #b8d4c4;
  border-radius: 8px;
  max-width: 68ch;
}

.copy-preface {
  margin: 0 0 0.75rem;
  max-width: 72ch;
}

.copy-afternote {
  margin: 0.75rem 0 0;
  max-width: 72ch;
}

.mini-toc {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
}

.mini-toc-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.mini-toc-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.mini-toc-list a {
  color: var(--primary);
  font-weight: 500;
}

.copy-template {
  scroll-margin-top: 5rem;
  margin-bottom: 1.25rem;
}

.copy-template-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.template-text--tall {
  max-height: none;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.viz-crosslink {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
}

.viz-crosslink a {
  color: var(--primary);
  font-weight: 600;
}

/* Визуализация: простой путь заявки */

.viz-process {
  padding: 1.65rem 0 2rem;
  background: linear-gradient(180deg, #fff 0%, var(--primary-soft) 45%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

:root[data-theme="dark"] .viz-process {
  background: linear-gradient(180deg, #1a222c 0%, #1d2a36 45%, var(--bg) 100%);
}

@media (min-width: 600px) {
  .viz-process {
    padding: 2.25rem 0 2.5rem;
  }
}

.viz-process-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 40ch;
}

.viz-process-lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 72ch;
}

.viz-process-lead a {
  color: var(--primary);
  font-weight: 500;
}

.viz-panels {
  display: grid;
  align-items: stretch;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

@media (min-width: 900px) {
  .viz-panels {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.viz-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 1.15rem 1rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .viz-panel {
    padding: 1.35rem 1.25rem 1.5rem;
  }
}

.viz-panel-head {
  flex-shrink: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.viz-panel-title {
  margin: 0 0 0.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--primary);
}

.viz-panel-tag {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.viz-panel > p:last-child {
  margin: 1rem 0 0;
  text-align: center;
}

.viz-panel > p:last-child .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

/* Шаги: на телефоне - вертикальный список; от ~1100px - горизонтальная лента */
.flow-rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0.25rem 0 0;
  overflow-x: visible;
}

.flow-between {
  display: none;
}

.flow-knot {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.flow-knot:last-child {
  border-bottom: none;
  padding-bottom: 0.25rem;
}

.flow-knot--win {
  width: 100%;
}

.flow-knot-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
}

.flow-knot-badge--win {
  background: var(--accent);
  font-size: 1.1rem;
}

.flow-knot-text {
  flex: 1;
  min-width: 0;
  display: block;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: left;
  hyphens: none;
}

.flow-knot-text strong {
  display: inline;
  margin-right: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.flow-knot-text a {
  color: var(--primary);
  font-weight: 600;
}

@media (min-width: 1100px) {
  .flow-rail {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.5rem 0 0.35rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

  .flow-between {
    display: block;
    flex: 0 0 auto;
    align-self: center;
    padding: 0 0.1rem;
    margin-top: -0.5rem;
    color: #9aa3ad;
    font-size: 1.15rem;
    font-weight: 300;
    user-select: none;
  }

  .flow-knot {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    width: 6.25rem;
    scroll-snap-align: start;
    text-align: center;
    padding: 0 0.2rem;
    border-bottom: none;
  }

  .flow-knot--win {
    width: 7rem;
  }

  .flow-knot-badge {
    margin: 0 auto 0.4rem;
  }

  .flow-knot-text {
    flex: none;
    min-width: unset;
    font-size: 0.75rem;
    line-height: 1.35;
    text-align: center;
    hyphens: auto;
  }

  .flow-knot-text strong {
    display: block;
    margin-right: 0;
    margin-bottom: 0.15rem;
    font-size: 0.8125rem;
  }
}

.viz-celebrate {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  min-height: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 600;
  text-align: left;
  color: #1b4332;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #d8f0e4 100%);
  border: 1px solid #a3cfbb;
  border-radius: 10px;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .viz-celebrate {
    margin-top: auto;
    min-height: 8.75rem;
    text-align: center;
  }
}

.viz-celebrate a {
  color: var(--primary);
  font-weight: 600;
}

.viz-dual-cta {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.viz-dual-cta .btn {
  width: 100%;
  min-height: 2.75rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.viz-dual-hint {
  margin-top: 0.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

@media (min-width: 640px) {
  .viz-dual-cta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 0.75rem;
  }

  .viz-dual-cta .btn {
    width: auto;
    flex: 0 1 auto;
  }

  .viz-dual-hint {
    flex: 1 1 100%;
    margin-top: 0.15rem;
  }
}

@media (min-width: 720px) {
  .viz-dual-hint {
    flex: 0 1 auto;
    margin-top: 0;
    text-align: left;
  }
}

#kak-vmeste {
  scroll-margin-top: 5rem;
}

.vmeste-howto {
  margin: 1.5rem 0 0;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.vmeste-howto-title {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--primary);
}

.vmeste-howto-lead {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 62ch;
}

.vmeste-howto-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
}

.vmeste-howto-list li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}

.vmeste-howto-list li:last-child {
  margin-bottom: 0;
}

.vmeste-howto-list a {
  color: var(--primary);
  font-weight: 600;
}

.vmeste-howto-app {
  margin: 0.85rem 0 0 !important;
  max-width: 60ch;
}

.lead-mass-section {
  scroll-margin-top: 5rem;
  padding: 2rem 0 2.25rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--primary-soft) 45%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.lead-mass-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.lead-mass-lead {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  max-width: 58ch;
}

.lead-mass-points {
  margin: 0 0 1.35rem;
  max-width: 68ch;
}

.lead-mass-points li {
  margin-bottom: 0.5rem;
}

.lead-mass-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lead-mass-foot {
  margin: 0.85rem 0 0 !important;
  max-width: 52ch;
}

#prosto-shagi {
  scroll-margin-top: 5rem;
}

#electronno {
  scroll-margin-top: 5rem;
}

.electronno-section {
  padding: 2rem 0 2.5rem;
  background: linear-gradient(165deg, #fff 0%, var(--primary-soft) 38%, #fff 92%);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

:root[data-theme="dark"] .electronno-section {
  background: linear-gradient(165deg, #1a222c 0%, #1d2b38 38%, #18202a 92%);
  border-color: #2b3442;
}

.electronno-inner {
  position: relative;
  padding-left: 0.15rem;
  border-left: 4px solid var(--primary);
  padding-inline-start: 1.15rem;
}

@media (min-width: 640px) {
  .electronno-inner {
    padding-inline-start: 1.35rem;
  }
}

.electronno-badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #b8c9d6;
  border-radius: 6px;
}

:root[data-theme="dark"] .electronno-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: #3e5063;
  color: #a8cdea;
}

.electronno-title {
  margin-top: 0;
}

.electronno-hook {
  margin: 0 0 1.15rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--text);
  max-width: 84ch;
}

.electronno-list {
  margin-bottom: 1.35rem;
  max-width: 86ch;
}

.electronno-list li {
  margin-bottom: 0.55rem;
}

.electronno-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.electronno-foot {
  margin: 0 !important;
  max-width: 84ch;
}

:root[data-theme="dark"] .electronno-list {
  color: #d6dfeb;
}

:root[data-theme="dark"] .electronno-foot {
  color: #c3cfdd;
}

:root[data-theme="dark"] .electronno-section a {
  color: #9bcdf2;
}

.electronno-hint-specificity {
  margin-top: 0.85rem !important;
  margin-bottom: 0 !important;
}

.electronno-hint-guest {
  margin-top: 0.65rem !important;
  margin-bottom: 0 !important;
}

/* Плавающая кнопка «Поделиться» (справа внизу) */
.share-dock {
  position: fixed;
  right: max(0.65rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  font-family: var(--font);
}

.share-dock__fab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.share-dock__fab:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-hover);
}

.share-dock__fab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.share-dock.is-open .share-dock__fab {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.share-dock__fab svg {
  display: block;
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
}

.share-dock__panel {
  /* 100vw на мобильных даёт лишнюю ширину из-за полосы прокрутки; для fixed 100% = ширина вьюпорта без этой ошибки */
  width: min(13.5rem, calc(100% - 1.5rem));
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.share-dock__panel[hidden] {
  display: none !important;
}

.share-dock__label {
  margin: 0;
  padding: 0.35rem 0.75rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.share-dock__item {
  margin: 0;
}

.share-dock__action {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.42rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease;
}

.share-dock__action:hover {
  background: var(--primary-soft);
}

.share-dock__action:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.share-dock__badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.share-dock__badge--vk {
  background: #0077ff;
}

.share-dock__badge--tg {
  background: #26a5e4;
}

.share-dock__badge--ok {
  background: #ee8208;
}

.share-dock__badge--max {
  background: #6b4eff;
}

.share-dock__badge--copy {
  background: var(--muted);
}

.share-dock__badge--sys {
  background: var(--primary);
}

.support-rail {
  position: fixed;
  left: 0;
  top: 46%;
  transform: translateY(-50%);
  z-index: 10020;
}

.support-rail__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 0.62rem 0.38rem;
  min-height: 7.6rem;
  border: 1px solid rgba(30, 77, 107, 0.42);
  border-left: none;
  border-radius: 0;
  background: var(--surface);
  color: var(--primary);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.support-rail__link:hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.support-rail__link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .support-rail {
    left: 0.55rem;
    top: auto;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    transform: none;
  }

  .support-rail__link {
    writing-mode: horizontal-tb;
    transform: none;
    min-height: auto;
    padding: 0.38rem 0.62rem;
    border: 1px solid rgba(30, 77, 107, 0.42);
    border-radius: 0;
    font-size: 0.6875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .share-dock__fab,
  .share-dock__action {
    transition: none;
  }
}

@media print {
  .share-dock,
  .support-rail {
    display: none !important;
  }
}

/* Новости ЖКХ: сводки по месяцам */

.news-stack {
  display: grid;
  gap: 1.2rem;
  padding-top: 0.75rem;
}

.news-page .news-stack {
  padding-top: 1.4rem;
  gap: 1.35rem;
}

.news-page .page-header--news {
  margin-bottom: 0;
}

.news-month-index__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.news-month-index__list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}

.news-month-index__list li {
  margin-bottom: 0.35rem;
}

.news-month-index__list li:last-child {
  margin-bottom: 0;
}

.news-month-index__list a {
  font-weight: 500;
}

.news-digest {
  scroll-margin-top: 5rem;
}

.news-digest-body {
  max-width: 72ch;
}

.news-digest-body > :first-child {
  margin-top: 0;
}

.news-digest-body > :last-child {
  margin-bottom: 0;
}

.news-digest-lead {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(165deg, #f8fcff 0%, #eef5fb 100%);
  border: 1px solid rgba(30, 77, 107, 0.2);
  border-radius: 8px;
}

.news-digest-lead > :last-child {
  margin-bottom: 0;
}

:root[data-theme="dark"] .news-digest-lead {
  background: linear-gradient(165deg, #1d2733 0%, #1a222c 100%);
  border-color: rgba(122, 178, 217, 0.28);
}

.news-digest-toc {
  margin: 0 0 1.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.news-digest-toc__label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.news-digest-toc__list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.news-digest-part-title {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.news-digest-body > .news-digest-part-title:first-of-type {
  margin-top: 0;
}

.news-digest-subtitle {
  margin: 1.1rem 0 0.45rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.news-digest-steps {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
}

.news-digest-steps li {
  margin-bottom: 0.5rem;
}

.news-digest-steps li:last-child {
  margin-bottom: 0;
}

.news-digest-placeholder {
  margin: 0;
  font-style: italic;
}

.news-foot {
  margin: 0;
  font-size: 0.875rem;
  text-align: center;
}

.news-archive {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  padding-inline-start: 0;
  -webkit-padding-start: 0;
  display: grid;
  gap: 1.15rem;
}

.news-archive > li {
  list-style: none;
  list-style-type: none;
  display: block;
  padding-inline-start: 0;
  margin-inline-start: 0;
}

.news-archive > li::marker {
  display: none;
  content: "";
  font-size: 0;
}

@media (max-width: 768px) {
  .news-archive {
    margin-left: 0;
    padding-left: 0;
  }

  .news-archive > li {
    padding-left: 0;
    margin-left: 0;
    -webkit-padding-start: 0;
  }
}

.news-archive__item.section--surface {
  padding: 1.5rem 1.35rem;
}

@media (min-width: 640px) {
  .news-archive__item.section--surface {
    padding: 1.75rem 1.65rem;
  }
}

.news-page .news-archive {
  margin-top: 0.15rem;
}

.news-archive__title {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.news-archive__title a {
  text-decoration: none;
}

.news-archive__title a:hover {
  text-decoration: underline;
}

.news-archive__teaser {
  margin: 0 0 1rem;
  max-width: 72ch;
  line-height: 1.6;
  color: var(--muted);
}

.news-archive__cta {
  margin: 0;
}

.news-archive__item--pending .news-archive__title {
  color: var(--muted);
}

/* Хаб образцов: каталог тем */

.obrazcy-catalog-wrap {
  margin-top: 0.5rem;
}

.obrazcy-catalog-wrap .section-title {
  margin-bottom: 0.35rem;
}

.obrazcy-catalog-lead {
  margin: 0 0 1rem;
  max-width: 65ch;
}

.obrazcy-catalog {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .obrazcy-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .obrazcy-catalog__wide {
    grid-column: 1 / -1;
  }
}

.obrazcy-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  min-height: 8.5rem;
  padding: 1.1rem 1.15rem 1rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid rgba(30, 77, 107, 0.14);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(26, 29, 36, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.obrazcy-card:hover {
  border-color: rgba(30, 77, 107, 0.32);
  box-shadow: 0 6px 16px rgba(30, 77, 107, 0.1);
  transform: translateY(-1px);
}

.obrazcy-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.obrazcy-card--featured {
  box-shadow: 0 2px 10px rgba(30, 77, 107, 0.08);
}

.obrazcy-card--featured:hover {
  box-shadow: 0 8px 20px rgba(30, 77, 107, 0.12);
}

.obrazcy-card--gzhi-only {
  border-color: rgba(90, 125, 148, 0.22);
  background: var(--surface);
}

.obrazcy-card--gzhi-only:hover {
  border-color: rgba(90, 125, 148, 0.4);
}

.obrazcy-card__label {
  align-self: flex-start;
  padding: 0.18rem 0.55rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border: none;
  border-radius: 999px;
}

.obrazcy-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
  margin: 0;
}

.obrazcy-card__teaser {
  flex: 1;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

.obrazcy-card__route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  margin-top: 0.15rem;
}

.obrazcy-route-step {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 5px;
  background: rgba(30, 77, 107, 0.1);
  color: var(--primary);
  border: 1px solid rgba(30, 77, 107, 0.18);
}

.obrazcy-route-step--alt {
  background: rgba(30, 77, 107, 0.06);
  color: var(--text);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
}

.obrazcy-route-step--solo {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
}

.obrazcy-route-arrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}

.obrazcy-card__action {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(30, 77, 107, 0.12);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.obrazcy-card__action::after {
  content: " →";
}

.obrazcy-card:hover .obrazcy-card__action {
  color: var(--primary-hover);
}

:root[data-theme="dark"] .obrazcy-card {
  border-color: rgba(122, 178, 217, 0.2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .obrazcy-card--featured {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .obrazcy-card__label {
  color: #b8d4e8;
  background: rgba(30, 77, 107, 0.45);
}

:root[data-theme="dark"] .obrazcy-route-step {
  background: rgba(122, 178, 217, 0.12);
  border-color: rgba(122, 178, 217, 0.25);
}

.obrazcy-hub-page .news-stack {
  gap: 1.15rem;
}

.obrazcy-route .mini-toc-list {
  list-style: decimal;
  padding-left: 1.25rem;
}

.obrazcy-topic-page .copy-template {
  scroll-margin-top: 5.5rem;
}

.news-digest--single {
  scroll-margin-top: 5rem;
}
