/* ==========================================================================
   Синапс — проект о неврологии для взрослых и детей
   Дизайн-система: токены, типографика, компоненты
   ========================================================================== */

:root {
  /* Палитра */
  --ink: #0d2233;
  --ink-soft: #33506a;
  --ink-muted: #4f6b81;
  --line: #dbe7ef;
  --line-strong: #c3d6e2;

  --bg: #ffffff;
  --bg-tint: #f4f9fc;
  --bg-tint-2: #eaf3f8;
  --bg-deep: #0a2739;
  --bg-deeper: #071c2a;

  --primary: #0f7c97;
  --primary-dark: #0a5e74;
  --primary-soft: #e2f2f7;
  --primary-ink: #075063;

  --adult: #2f6fed;
  --adult-soft: #e8f0fe;
  --adult-ink: #1c4aa8;

  --child: #e2664f;
  --child-soft: #fdeeea;
  --child-ink: #a83f2c;

  --alert: #cc3f3f;
  --alert-soft: #fdeced;
  --alert-ink: #992c2c;

  --ok: #24855b;
  --ok-soft: #e6f6ee;
  --ok-ink: #186244;

  --warn: #b7791f;
  --warn-soft: #fdf4e3;
  --warn-ink: #8a5b14;

  /* Типографика */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* Геометрия */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(13, 34, 51, 0.06), 0 2px 8px rgba(13, 34, 51, 0.04);
  --shadow: 0 4px 12px rgba(13, 34, 51, 0.07), 0 12px 32px rgba(13, 34, 51, 0.06);
  --shadow-lg: 0 10px 24px rgba(13, 34, 51, 0.1), 0 28px 64px rgba(13, 34, 51, 0.1);

  --container: 1180px;
  --header-h: 72px;
}

/* ------------------------------ Базовая сетка ----------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  display: block;
}

/* ------------------------------ Типографика ------------------------------- */

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 750;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.25rem + 2.6vw, 3.35rem);
}

h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem);
}

h3 {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
}

h4 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

a {
  color: var(--primary-dark);
  text-decoration-color: rgba(15, 124, 151, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

strong,
b {
  font-weight: 680;
  color: var(--ink);
}

small {
  font-size: 0.84em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

ul.plain,
ol.plain {
  padding-left: 1.15em;
}

ul.plain li,
ol.plain li {
  margin-bottom: 0.35em;
}

ul.check {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

ul.check li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: 0.5em;
}

ul.check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324855b' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 0.62em no-repeat;
}

ul.check.cross li::before {
  background: var(--alert-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cc3f3f' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / 0.6em no-repeat;
}

/* ------------------------------ Служебные --------------------------------- */

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

.eyebrow--adult {
  color: var(--adult-ink);
}

.eyebrow--child {
  color: var(--child-ink);
}

.lead {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 64ch;
}

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

.small {
  font-size: 0.9rem;
}

.center {
  text-align: center;
}

.center .lead {
  margin-left: auto;
  margin-right: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

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

/* ------------------------------ Кнопки ------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.78em 1.4em;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 640;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 124, 151, 0.28);
}

.btn--primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(15, 124, 151, 0.3);
}

.btn--ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn--dark {
  background: var(--bg-deep);
  color: #fff;
}

.btn--dark:hover {
  background: var(--bg-deeper);
}

.btn--sm {
  padding: 0.6em 1.05em;
  font-size: 0.92rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ------------------------------ Хедер ------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 auto;
}

.brand__mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-weight: 760;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.brand__tag {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav__link {
  display: inline-block;
  padding: 0.5em 0.72em;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 560;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}

.nav__link:hover {
  background: var(--bg-tint-2);
  color: var(--ink);
}

.nav__link.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 640;
}

.header-cta {
  margin-left: 10px;
}

.burger {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}

.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.burger span::before {
  top: -6px;
}

.burger span::after {
  top: 6px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 14px 0 22px;
}

.mobile-panel__list {
  display: grid;
  gap: 2px;
}

.mobile-panel .nav__link {
  display: block;
  padding: 0.75em 0.8em;
  font-size: 1.02rem;
}

/* Шапка: на средних экранах подпись бренда и второстепенные пункты скрываются,
   чтобы навигация оставалась в одну строку. */
@media (max-width: 1499px) {
  .brand__tag {
    display: none;
  }
}

@media (min-width: 1500px) {
  :root {
    --container: 1300px;
  }
}

@media (max-width: 1279px) {
  .nav__link--minor {
    display: none;
  }
}
@media (max-width: 1180px) {
  .nav,
  .header-cta {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .mobile-panel.is-open {
    display: block;
  }
}

/* ------------------------------ Секции ------------------------------------ */

.section {
  padding: clamp(48px, 3vw + 40px, 88px) 0;
}

.section--tint {
  background: var(--bg-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--deep {
  background: linear-gradient(160deg, var(--bg-deep), #0d3c53 55%, var(--bg-deeper));
  color: #e8f3f8;
}

.section--deep h1,
.section--deep h2,
.section--deep h3 {
  color: #fff;
}

.section--deep .lead,
.section--deep .muted {
  color: #b9d4e0;
}

.section__head {
  max-width: 780px;
  margin-bottom: clamp(28px, 2vw + 20px, 48px);
}

.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.grid--wide {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}

@media (max-width: 1000px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------ Карточки ---------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card--link {
  text-decoration: none;
  color: inherit;
}

.card--link:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.card__icon {
  width: 46px;
  height: 46px;
  margin-bottom: 2px;
}

.card h3 {
  margin-bottom: 0.15em;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
}

.card__more {
  margin-top: auto;
  padding-top: 12px;
  font-weight: 620;
  font-size: 0.93rem;
  color: var(--primary-dark);
}

.card--adult {
  border-top: 3px solid var(--adult);
}

.card--child {
  border-top: 3px solid var(--child);
}

.card--plain {
  box-shadow: none;
  background: var(--bg-tint);
}

/* ------------------------------ Плашки ------------------------------------ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.28em 0.75em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 660;
  background: var(--primary-soft);
  color: var(--primary-ink);
  text-decoration: none;
  white-space: nowrap;
}

.pill--adult {
  background: var(--adult-soft);
  color: var(--adult-ink);
}

.pill--child {
  background: var(--child-soft);
  color: var(--child-ink);
}

.pill--alert {
  background: var(--alert-soft);
  color: var(--alert-ink);
}

.pill--ok {
  background: var(--ok-soft);
  color: var(--ok-ink);
}

.pill--warn {
  background: var(--warn-soft);
  color: var(--warn-ink);
}

.pill--line {
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ------------------------------ Выноски ----------------------------------- */

.callout {
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-tint);
  margin: 1.6rem 0;
}

.callout__icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-top: 2px;
}

.callout__body > *:last-child {
  margin-bottom: 0;
}

.callout__title {
  font-weight: 700;
  margin: 0 0 0.25em;
  letter-spacing: -0.01em;
}

.callout--alert {
  background: var(--alert-soft);
  border-color: #f3cccd;
}

.callout--alert .callout__title {
  color: var(--alert-ink);
}

.callout--ok {
  background: var(--ok-soft);
  border-color: #c8e8d8;
}

.callout--ok .callout__title {
  color: var(--ok-ink);
}

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

.callout--info .callout__title {
  color: var(--primary-ink);
}

.callout--warn {
  background: var(--warn-soft);
  border-color: #f0dcb4;
}

.callout--warn .callout__title {
  color: var(--warn-ink);
}

/* ------------------------------ Герой ------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 3vw + 24px, 72px) 0 clamp(44px, 3vw + 32px, 84px);
  background:
    radial-gradient(900px 420px at 82% -8%, #d9eef7 0%, rgba(217, 238, 247, 0) 65%),
    radial-gradient(700px 420px at 4% 8%, #eaf6f9 0%, rgba(234, 246, 249, 0) 60%),
    #fff;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 3vw, 56px);
  align-items: center;
}

.hero h1 {
  margin-bottom: 0.4em;
}

.hero h1 .accent {
  color: var(--primary);
}

.hero__lead {
  font-size: 1.16rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 1.6rem;
}

.hero__art {
  position: relative;
  border-radius: var(--radius-xl);
  background: linear-gradient(155deg, #f2fafd, #e2f1f7 60%, #dceef5);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero__art svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 940px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__art {
    order: -1;
    max-width: 560px;
  }
}

.scenario-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.scenario {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.scenario:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.scenario__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.scenario__title {
  font-weight: 660;
  font-size: 0.98rem;
  display: block;
  margin-bottom: 2px;
}

.scenario__text {
  font-size: 0.86rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

@media (max-width: 860px) {
  .scenario-row {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------ Статистика -------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  background: #fff;
  padding: 22px 20px;
}

.stat__value {
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem);
  font-weight: 760;
  letter-spacing: -0.03em;
  color: var(--primary-dark);
  line-height: 1.1;
}

.stat__label {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-top: 6px;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------ Хлебные крошки ---------------------------- */

.breadcrumbs {
  padding: 18px 0 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: var(--line-strong);
}

.breadcrumbs a {
  color: var(--ink-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ------------------------------ Страница контента ------------------------- */

.page-head {
  padding: clamp(26px, 2vw + 16px, 44px) 0 clamp(18px, 1.5vw + 12px, 30px);
}

.page-head h1 {
  margin-bottom: 0.35em;
}

.prose {
  max-width: 74ch;
}

.prose h2 {
  margin-top: 2.1em;
  margin-bottom: 0.6em;
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose--wide {
  max-width: none;
}

.layout-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 3vw, 56px);
  align-items: start;
}

@media (max-width: 1000px) {
  .layout-side {
    grid-template-columns: 1fr;
  }
}

.side-card {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
}

@media (max-width: 1000px) {
  .side-card {
    position: static;
  }
}

.side-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.6em;
}

.side-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.side-nav a {
  display: block;
  padding: 0.45em 0.6em;
  border-radius: 8px;
  font-size: 0.94rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.side-nav a:hover {
  background: #fff;
  color: var(--primary-dark);
}

.side-nav a.is-active {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 640;
}

/* ------------------------------ Аккордеон --------------------------------- */

.acc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.acc + .acc {
  margin-top: 12px;
}

.acc__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 640;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.acc__head::-webkit-details-marker {
  display: none;
}

.acc__head:hover {
  background: var(--bg-tint);
}

.acc__num {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.acc__chevron {
  flex: 0 0 auto;
  margin-left: auto;
  width: 20px;
  height: 20px;
  color: var(--ink-muted);
  transition: transform 0.2s ease;
  margin-top: 4px;
}

details[open] > .acc__head .acc__chevron {
  transform: rotate(180deg);
}

.acc__body {
  padding: 0 20px 20px 60px;
  color: var(--ink-soft);
}

.acc__body > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .acc__body {
    padding-left: 20px;
  }
}

/* ------------------------------ Таймлайн ---------------------------------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 30px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--primary), var(--bg-tint-2));
  border-radius: 2px;
}

.timeline > li {
  position: relative;
  padding-bottom: 26px;
}

.timeline > li:last-child {
  padding-bottom: 0;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
}

.timeline__title {
  font-weight: 680;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.timeline__text {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* ------------------------------ Таблица ----------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  min-width: 560px;
}

table.data th,
table.data td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data th {
  background: var(--bg-tint);
  font-weight: 680;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr:hover {
  background: #fbfdff;
}

/* ------------------------------ Иллюстрации ------------------------------- */

.figure {
  margin: 2rem 0;
}

.figure__frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #f7fcfe, #eef7fb);
  padding: 20px;
}

.figure__frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.figure figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.figure--flush {
  margin: 0;
}

/* ------------------------------ Формы ------------------------------------- */

.field {
  display: block;
  margin-bottom: 18px;
}

.field__label {
  display: block;
  font-weight: 620;
  font-size: 0.94rem;
  margin-bottom: 6px;
}

.field__hint {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-top: 5px;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.72em 0.9em;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 124, 151, 0.15);
}

.textarea {
  min-height: 130px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.checkbox-row input {
  margin-top: 4px;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.form-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.form-status--ok {
  background: var(--ok-soft);
  color: var(--ok-ink);
}

.form-status--error {
  background: var(--alert-soft);
  color: var(--alert-ink);
}

/* ------------------------------ Фильтры ----------------------------------- */

.filters {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
  margin-bottom: 28px;
}

.filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0.45em 0.95em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 580;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.chip.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.search-input {
  flex: 1 1 260px;
}

.results-count {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.empty-state {
  padding: 40px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-muted);
  background: #fff;
}

/* ------------------------------ Шаги -------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 46px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.step h3 {
  font-size: 1.06rem;
  margin-bottom: 0.3em;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin: 0;
}

/* ------------------------------ Навигатор симптомов ----------------------- */

.finder {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .finder {
    grid-template-columns: 1fr;
  }
}

.finder__panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 20px;
}

.finder__group + .finder__group {
  margin-top: 22px;
}

.finder__group h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.finder__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finder__result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #f7fcfe, #eff7fb);
  padding: 26px;
  min-height: 300px;
}

.triage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  font-weight: 660;
  font-size: 0.88rem;
}

.triage--emergency {
  background: var(--alert);
  color: #fff;
}

.triage--soon {
  background: var(--warn-soft);
  color: var(--warn-ink);
}

.triage--plan {
  background: var(--ok-soft);
  color: var(--ok-ink);
}

/* ------------------------------ Футер ------------------------------------- */

.site-footer {
  background: var(--bg-deep);
  color: #c3d9e4;
  padding: 56px 0 28px;
  font-size: 0.94rem;
}

.site-footer a {
  color: #e2f0f6;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer h3 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9em;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  color: #9dbccc;
  font-size: 0.85rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand__name {
  color: #fff;
  font-weight: 760;
  font-size: 1.12rem;
}

.disclaimer {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #b6d0dd;
}

/* ------------------------------ Прочее ------------------------------------ */

.cta-band {
  border-radius: var(--radius-lg);
  padding: clamp(28px, 2vw + 20px, 48px);
  background: linear-gradient(150deg, #0f7c97, #0a5e74 60%, #0a4152);
  color: #fff;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 24px;
  align-items: center;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 0.3em;
}

.cta-band p {
  color: #d3eaf3;
  margin: 0;
  max-width: 60ch;
}

@media (max-width: 760px) {
  .cta-band {
    grid-template-columns: 1fr;
  }
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hr-soft {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 3px solid rgba(15, 124, 151, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------ Значок карточки --------------------------- */

.card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 19px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  margin-bottom: 2px;
}

.card__badge--adult {
  background: var(--adult-soft);
  color: var(--adult-ink);
}

.card__badge--child {
  background: var(--child-soft);
  color: var(--child-ink);
}

.acc__head .card__badge {
  margin-bottom: 0;
  margin-top: 0;
}

/* ------------------------------ Навигатор: колонка ------------------------ */

.finder__opts--column {
  flex-direction: column;
  align-items: stretch;
}

.chip--wide {
  text-align: left;
  white-space: normal;
  line-height: 1.35;
  border-radius: 12px;
  padding: 0.6em 0.9em;
}

.finder__result h2 {
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem);
}

.finder__result h3 {
  font-size: 1.02rem;
  margin-top: 1.4em;
  margin-bottom: 0.45em;
}

/* ------------------------------ Фотографии -------------------------------- */

.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .photo-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .photo-strip {
    grid-template-columns: 1fr;
  }
}

.photo {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-deep);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
}

.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(1.02);
  opacity: 0.9;
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(10, 39, 57, 0.45), rgba(15, 124, 151, 0.72));
}

.photo figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  color: #ffffff;
  font-weight: 660;
  font-size: 0.98rem;
  line-height: 1.3;
}

.photo figcaption span {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: #d3e9f2;
  margin-top: 3px;
}

/* ------------------------------ Веб-чат консультанта ---------------------- */

.chat {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(160deg, #f7fcfe, #eef7fb);
}

.chat__avatar {
  display: inline-flex;
  flex: 0 0 auto;
}

.chat__title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chat__status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.chat__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.chat__dot.is-on {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(36, 133, 91, 0.15);
}

.chat__reset {
  margin-left: auto;
  border: 0;
  background: none;
  padding: 6px 4px;
  font: inherit;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-decoration: underline;
  cursor: pointer;
}

.chat__reset:hover {
  color: var(--primary-dark);
}

.chat__feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: min(58vh, 540px);
  min-height: 380px;
  overflow-y: auto;
  padding: 20px;
  background: #fbfdff;
  scroll-behavior: smooth;
}

.chat__intro p {
  margin: 0 0 0.6em;
}

.chat__intro-title {
  font-weight: 660;
  letter-spacing: -0.01em;
}

.chat__starter-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 1.2em !important;
}

.chat__starters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.chat__row {
  display: flex;
}

.chat__row--mine {
  justify-content: flex-end;
}

.chat__bubble {
  max-width: 80%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 6px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 0.98rem;
  line-height: 1.55;
}

.chat__bubble p {
  margin: 0 0 0.55em;
}

.chat__line + .chat__line {
  margin-top: 0.45em;
}

.chat__line--bullet {
  position: relative;
  padding-left: 1.05em;
}

.chat__line--bullet::before {
  content: "";
  position: absolute;
  left: 0.15em;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.chat__bubble--mine .chat__line--bullet::before {
  background: rgba(255, 255, 255, 0.85);
}

.chat__schema-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 6px 0 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.chat__bubble a {
  color: var(--primary-dark);
  font-weight: 600;
}

.chat__bubble--mine a {
  color: #fff;
}

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

.chat__bubble--mine {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  border-radius: 16px 16px 6px 16px;
}

.chat__bubble.is-pending {
  opacity: 0.72;
}

.chat__bubble--typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 16px;
}

.chat__bubble--typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-muted);
  animation: chat-blink 1.1s infinite ease-in-out;
}

.chat__bubble--typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat__bubble--typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chat-blink {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.chat__error {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--alert-soft);
  color: var(--alert-ink);
  font-size: 0.9rem;
}

.chat__form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat__input {
  flex: 1 1 auto;
  min-height: 54px;
  max-height: 160px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  resize: vertical;
}

.chat__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 124, 151, 0.15);
}

.chat__send {
  flex: 0 0 auto;
}

.chat__note {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-muted);
  background: #fff;
}

@media (max-width: 560px) {
  .chat__feed {
    height: 62vh;
    padding: 16px;
  }

  .chat__bubble {
    max-width: 92%;
  }

  .chat__form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ------------------------------ Плавающий консультант --------------------- */

.consultant-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.consultant-widget__launcher {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(140deg, #1595b3, #0a5e74);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(10, 62, 84, 0.32);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.consultant-widget__launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(10, 62, 84, 0.38);
}

.consultant-widget__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 16px;
}

.consultant-widget__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
}

.consultant-widget__label small {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
}

.consultant-widget__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  animation: widget-in 0.18s ease-out;
}

.consultant-widget__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(13, 34, 51, 0.06);
  color: var(--ink-soft);
  font-size: 15px;
  cursor: pointer;
}

.consultant-widget__close:hover {
  background: rgba(13, 34, 51, 0.12);
}

.consultant-widget__panel .chat {
  max-height: calc(100vh - 100px);
  box-shadow: 0 18px 50px rgba(10, 39, 57, 0.28);
  background: #fff;
}

.consultant-widget__panel .chat__feed {
  flex: 1 1 auto;
  height: auto;
  min-height: 200px;
}

.consultant-widget__panel .chat__head {
  padding-right: 52px;
}

.consultant-widget__loading {
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

/* Выбор темы внутри плавающего чата: неврология, косметология, питание */
.site-chats {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 18px 50px rgba(10, 39, 57, 0.28);
  animation: widget-in 0.18s ease-out;
  overflow: hidden;
}

.site-chats__head {
  padding-right: 30px;
}

.site-chats__head h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
}

.site-chats__head p {
  margin: 0 0 12px;
  line-height: 1.35;
}

.site-chats__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* Полоса прокрутки видна, если тем больше, чем помещается по высоте. */
.site-chats__list::-webkit-scrollbar {
  width: 8px;
}

.site-chats__list::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--line);
}

.site-chats__list::-webkit-scrollbar-track {
  background: transparent;
}

.site-chats__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.site-chats__item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.site-chats__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 15px;
}

.site-chats__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.site-chats__text strong {
  font-size: 0.97rem;
}

.site-chats__text small {
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.site-chats__chevron {
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 13px;
}

.site-chats__current {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-chats__back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 620;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.site-chats__back:hover {
  border-color: var(--primary);
}

.site-chats__back i {
  font-size: 12px;
}

@keyframes widget-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .consultant-widget {
    right: 12px;
    left: 12px;
    bottom: 12px;
    align-items: stretch;
  }

  .consultant-widget__launcher {
    justify-content: center;
  }

  .consultant-widget__panel {
    width: 100%;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
  }

  .consultant-widget__panel .chat,
  .consultant-widget__panel .chat__feed {
    max-height: calc(100vh - 90px);
  }

  .consultant-widget__panel .chat__feed {
    min-height: 180px;
  }
}

/* ------------------------------ Форма вопроса ---------------------------- */
.question-form {
  box-shadow: var(--shadow);
}

.question-form .field:last-of-type {
  margin-bottom: 0;
}

.side-card .btn + .btn {
  margin-top: 8px;
}

@media (max-width: 680px) {
  .question-form {
    padding: 20px !important;
  }
}


/* ------------------------------ Библиотека на главной --------------------- */

.grid--wide .side-card {
  position: static;
}

.grid--wide .side-card .side-nav a {
  font-size: 0.92rem;
}

/* ------------------------------ Печатная версия книги --------------------- */

.print-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 20px 0 0;
}

.print-book {
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 56px;
}

.print-cover {
  padding: 32px 0 28px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 32px;
}

.print-cover h1 {
  margin-bottom: 0.2em;
}

.print-cover__sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 1.2em;
}

.print-cover__meta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.print-toc {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
  margin-bottom: 40px;
}

.print-toc ol {
  margin: 0;
  padding-left: 1.3em;
  columns: 2;
  column-gap: 32px;
}

.print-toc li {
  margin-bottom: 6px;
  break-inside: avoid;
}

.print-chapter {
  padding-top: 20px;
  margin-bottom: 48px;
  border-top: 2px solid var(--line);
}

.print-chapter__label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.print-chapter h2 {
  margin-bottom: 0.3em;
}

.print-section h3 {
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  font-size: 1.12rem;
}

.print-figure {
  margin: 20px 0;
}

.print-conclusions {
  margin-top: 26px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--ok-soft);
  border: 1px solid #c8e8d8;
}

.print-conclusions h3 {
  margin: 0 0 0.6em;
  font-size: 1.05rem;
  color: var(--ok-ink);
}

.print-conclusions ul {
  margin: 0;
  padding-left: 1.2em;
}

@media print {
  .site-header,
  .site-footer,
  .consultant-widget,
  .breadcrumbs,
  .print-actions,
  .btn-row,
  .side-card,
  .skip-link {
    display: none !important;
  }

  body {
    font-size: 11pt;
  }

  .print-book {
    max-width: none;
  }

  .print-chapter {
    break-before: page;
    border-top: 0;
  }

  .print-cover-art,
  .print-cover,
  .print-toc {
    break-after: page;
  }

  .print-conclusions,
  .print-figure {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
    color: inherit;
  }
}

/* ------------------------------ Полоса покупки ---------------------------- */

.buy-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border: 1px solid #c6e4ee;
  border-radius: var(--radius);
  background: linear-gradient(150deg, #eef8fc, #e2f2f7);
  margin-bottom: 34px;
}

.buy-strip strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.buy-strip .btn-row {
  flex: 1 1 auto;
  min-width: 0;
}

.buy-form__qr {
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.buy-form__qr img {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

/* ------------------------------ Обложка книги ----------------------------- */

.book-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
  margin-bottom: 34px;
}

@media (max-width: 860px) {
  .book-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .book-hero__cover {
    max-width: 280px;
  }
}

.book-hero__cover svg,
.side-card__cover svg,
.library-cover svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(10, 39, 57, 0.28);
}

.book-hero__text h2 {
  margin-top: 0;
}

.book-hero__text h3 {
  margin-top: 1.6em;
}

.side-card__cover {
  margin-bottom: 20px;
}

.print-cover-art {
  margin-bottom: 32px;
}

.print-cover-art svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.print-imprint {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-muted);
}
