:root {
  --bg: #f4efe6;
  --surface: #fffaf3;
  --text: #1c1612;
  --muted: #6b5d50;
  --line: rgba(92, 64, 40, 0.14);
  --accent: #8b4518;
  --accent-2: #b86b2d;
  --accent-dark: #5c2e12;
  --ink-soft: #3b2c22;
  --good: #2f5d3a;
  --was: #8a4b3a;
  --became: #2f5d3a;
  --shadow: 0 14px 32px rgba(55, 34, 18, 0.08);
  --radius: 22px;
  --max: 1160px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", Times, serif;

  /* Дизайн-концепт «Богатырский графический эпос» — доп. слои палитры.
     Индиго/ель/лазурь/ягода используются точечно поверх основной льняной
     палитры выше, не заменяют её. Лазурь — только как свечение (glow),
     не как заливка фона (см. 11_dizayn_kontsept/design_concept_bogatyrskiy_epos.md, п.9). */
  --indigo: #2b2f52;
  --spruce: #33533f;
  --azure-glow: #4fb8d6;
  --berry: #a13a5c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: -999px;
  z-index: 100;
  padding: 8px 12px;
  color: #fff;
  background: #000;
}

.skip-link:focus {
  left: 8px;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 239, 230, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.logo-mark {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.logo-text span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.main-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--text);
}

.hero {
  padding: 56px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  line-height: 1.08;
}

h1 {
  max-width: 16ch;
  font-size: clamp(34px, 5.4vw, 58px);
}

h2 {
  font-size: clamp(28px, 3.8vw, 44px);
}

h3 {
  font-size: 24px;
}

.hero-lead,
.prose p,
.section-intro,
.program-card p,
.method-card p,
.cta-copy p,
.cta-note,
.fineprint,
.site-footer p,
.case-pair p,
.case-essence,
.products-copy p,
.products-intro > p,
.product-card p,
.method-lead {
  color: var(--muted);
}

.hero-lead {
  max-width: 52ch;
  margin: 0 0 28px;
  font-size: 18px;
}

.hero-actions,
.cta-actions,
.method-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.method-actions {
  margin-top: 28px;
}

.contact-buttons {
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, filter 0.18s ease;
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
}

.btn-primary {
  color: #fff8f1;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 18px rgba(139, 69, 24, 0.18);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Дизайн-концепт: "искра" при наведении — тонкое лазурно-золотое свечение
   по контуру, не заливка. Отключается вместе со всей анимацией ниже. */
.btn-primary {
  position: relative;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(79, 184, 214, 0);
  transition: box-shadow 0.25s ease;
  pointer-events: none;
}

.btn-primary:hover::after {
  box-shadow: 0 0 14px 1px rgba(79, 184, 214, 0.45);
}

.btn-secondary {
  border-color: var(--line);
  background: rgba(255, 250, 243, 0.7);
}

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

.hero-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 540px;
  margin-top: 28px;
}

.hero-trust div {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 243, 0.72);
}

.hero-trust strong {
  display: block;
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: 20px;
}

.hero-trust span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.program-card,
.method-card,
.cta-copy,
.cta-panel,
.case-card,
.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section {
  padding: 72px 0;
}

.section-soft {
  background: rgba(255, 250, 243, 0.45);
}

.section-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.method-head {
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

.method-lead {
  max-width: 70ch;
  margin: 0 0 28px;
  font-size: 18px;
}

.section-intro {
  margin: 0;
  font-size: 17px;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.prose p {
  margin: 0 0 14px;
  font-size: 18px;
}

.program-grid,
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.program-card,
.method-card {
  padding: 24px;
}

.method-card-rich h3 {
  font-size: 22px;
}

.method-card-rich p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.program-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.program-card.is-featured {
  background: linear-gradient(180deg, #fffaf3 0%, #f7ebdd 100%);
  transform: translateY(-4px);
}

.program-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.age-pill,
.program-tag,
.case-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.age-pill {
  color: var(--accent-dark);
  background: rgba(139, 69, 24, 0.10);
}

.program-tag,
.case-tag {
  color: var(--good);
  background: rgba(47, 93, 58, 0.10);
}

.program-card ul {
  margin: 8px 0 16px;
  padding-left: 18px;
  color: var(--muted);
}

.text-link {
  margin-top: auto;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
}

.products-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.products-intro > p {
  margin: 0;
  font-size: 17px;
}

.products-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.products-copy {
  max-width: 760px;
}

.products-copy p {
  margin: 0 0 16px;
  font-size: 17px;
}

.products-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.products-list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  font-weight: 700;
}

.products-list li::before {
  content: "✦";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent-2);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 26px;
}

.product-card--featured {
  background: linear-gradient(145deg, #fff9f1 0%, #f5e5d2 100%);
}

.product-card--wide {
  grid-column: span 2;
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.product-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff8f1;
  background: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.product-format {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
}

.product-card h3 {
  font-size: clamp(24px, 2vw, 30px);
}

.product-card p {
  margin: 0 0 14px;
}

.product-meta {
  margin-top: auto !important;
  color: var(--accent-dark) !important;
  font-weight: 800;
}

.product-order {
  align-self: flex-start;
  margin-top: 12px;
}

.product-disciplines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
}

.product-disciplines span {
  padding: 7px 10px;
  border: 1px solid rgba(47, 93, 58, 0.16);
  border-radius: 999px;
  color: var(--good);
  background: rgba(47, 93, 58, 0.07);
  font-size: 12px;
  font-weight: 700;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.case-card {
  padding: 22px;
}

.case-card h3 {
  margin-top: 10px;
}

.case-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.case-pair > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(244, 239, 230, 0.7);
}

.case-label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-label.was {
  color: var(--was);
}

.case-label.became {
  color: var(--became);
}

.case-pair p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.case-essence {
  margin: 0;
  font-size: 14px;
}

.case-essence strong {
  color: var(--ink-soft);
}

.cases-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid rgba(139, 69, 24, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(139, 69, 24, 0.10), rgba(47, 93, 58, 0.07)),
    var(--surface);
  box-shadow: var(--shadow);
}

.cases-more-label {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cases-more h3 {
  margin-bottom: 6px;
}

.cases-more p:not(.cases-more-label) {
  margin: 0;
  color: var(--muted);
}

.cases-more-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}

.method-num {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-2);
  font-weight: 800;
}

.cta-box {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.cta-copy,
.cta-panel {
  padding: 28px;
}

.mini-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-weight: 600;
}

.mini-list li + li {
  margin-top: 8px;
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(244, 239, 230, 0.55);
  transition: transform 0.15s ease, background 0.15s ease;
}

.contact-row:hover {
  background: #fff;
  transform: translateY(-1px);
}

.contact-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff8f1;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-size: 11px;
  font-weight: 800;
}

.contact-row strong {
  display: block;
  font-size: 14px;
}

.contact-row small {
  color: var(--muted);
  font-size: 12px;
}

.fineprint {
  margin: 18px 0 0;
  font-size: 12px;
}

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.footer-inner p {
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .hero-grid,
  .section-head,
  .split,
  .program-grid,
  .method-grid,
  .method-grid-rich,
  .products-intro,
  .products-showcase,
  .cta-box,
  .cases-grid,
  .case-pair,
  .fit-check-grid {
    grid-template-columns: 1fr;
  }

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

  .product-card--wide {
    grid-column: span 1;
  }

  .program-card.is-featured {
    transform: none;
  }

  h1 {
    max-width: none;
  }

  .header-inner {
    min-height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
  }

  .header-cta {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 36px;
  }

  .section {
    padding: 52px 0;
  }

  .hero-trust {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .cta-actions,
  .method-actions {
    width: 100%;
  }

  .product-card {
    padding: 22px;
  }

  .product-card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-format {
    text-align: left;
  }

  .product-order {
    width: 100%;
  }

  .cases-more {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .cases-more-actions {
    width: 100%;
  }

  .cases-more-actions .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
  }
}
/* ===== Cases page (/cases.html) — added 2026-08-14 ===== */
.cases-hero {
  padding: 48px 0 8px;
}

.cases-hero .section-intro {
  max-width: 70ch;
}

.cases-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.case-card-full {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.case-card-full .case-card-media img,
.case-card-full .case-card-media video {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  background: var(--bg);
}

@media (max-width: 820px) {
  .case-card-full {
    grid-template-columns: 1fr;
  }

  .case-card-full .case-card-media img,
  .case-card-full .case-card-media video {
    min-height: 220px;
  }
}

/* ===== Library page (/biblioteka.html) — added 2026-08-14 ===== */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pub-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pub-cover {
  margin: -28px -28px 24px;
}

.pub-cover img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
}

.pub-body h2 {
  margin-top: 0;
}

.pub-body h3 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 19px;
}

.pub-body p {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

.pub-body ol {
  margin: 0 0 14px;
  padding-left: 20px;
}

.pub-body ol li {
  margin-bottom: 8px;
  color: var(--ink-soft);
}

.pub-signature {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.pub-signature img {
  max-width: 360px;
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.pub-cta {
  margin-top: 24px;
}

/* ===== Per-publication signoff CTA (/biblioteka.html) — added 2026-08-14 ===== */
.pub-signoff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid rgba(139, 69, 24, 0.16);
  border-radius: 16px;
  background: rgba(244, 239, 230, 0.6);
}

.pub-signoff p {
  margin: 0;
  font-weight: 700;
  color: var(--ink-soft);
  flex: 1 1 260px;
}

/* ===== Homepage rework: hero photo, path navigator, flagship banner,
   product cards v2, library teaser, tariff cards, FAQ — added 2026-08-15 ===== */
.hero-grid--split {
  grid-template-columns: 1.05fr 0.95fr;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Обложка-выпуск несёт заголовок и слоган прямо в картинке — не обрезаем
   верх/низ под альбомную рамку, показываем полностью (пропорция картинки
   1024×1536 задана точно, letterbox не возникает). */
.hero-media img[src*="obshka-vypuska"],
.hero-media--v-put img {
  aspect-ratio: 1024 / 1536;
  object-fit: contain;
  background: var(--surface);
}

.path-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.path-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease;
}

.path-card:hover {
  transform: translateY(-3px);
}

.path-card .path-eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.path-card h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.path-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.path-card .text-link {
  margin-top: 10px;
}

.flagship-banner {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 32px;
  align-items: center;
  padding: 36px;
  border: 1px solid rgba(139, 69, 24, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(139, 69, 24, 0.12), rgba(184, 107, 45, 0.05)), var(--surface);
  box-shadow: var(--shadow);
}

.flagship-banner img {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.flagship-copy .eyebrow {
  margin-bottom: 8px;
}

.flagship-copy ul.mini-list {
  margin-top: 16px;
}

.product-card-media {
  margin: -26px -26px 18px;
}

.product-card-media img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.product-price {
  margin: 2px 0 12px;
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}

.library-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lib-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lib-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.lib-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.lib-card-body h3 {
  margin: 0;
  font-size: 18px;
}

.lib-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.lib-card-body .text-link {
  margin-top: auto;
}

.tariff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tariff-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tariff-card--mid {
  position: relative;
  border-color: var(--accent-2);
  background: linear-gradient(180deg, #fffaf3 0%, #f7ebdd 100%);
  transform: translateY(-6px);
}

.tariff-badge {
  position: absolute;
  top: -14px;
  left: 28px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff8f1;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tariff-card h3 {
  margin-bottom: 6px;
  font-size: 22px;
}

.tariff-price {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
}

.tariff-price span {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
}

.tariff-intro {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.tariff-list {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.tariff-list li {
  position: relative;
  padding-left: 24px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}

.tariff-list li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--good);
  font-weight: 800;
}

.tariff-note {
  margin: auto 0 16px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.tariff-cta {
  width: 100%;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq-item {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.faq-item summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 16px;
  list-style: none;
}

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

.faq-item summary::after {
  float: right;
  color: var(--accent);
  content: "+";
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 12px 0 0;
  color: var(--muted);
}

.next-stage {
  padding: 32px;
  border: 1px dashed var(--accent-2);
  border-radius: var(--radius);
  background: rgba(139, 69, 24, 0.05);
  text-align: center;
}

.next-stage h3 {
  margin-bottom: 10px;
}

.next-stage p {
  max-width: 62ch;
  margin: 0 auto;
  color: var(--muted);
}

.program-hero {
  padding: 48px 0 8px;
}

@media (max-width: 980px) {
  .hero-grid--split,
  .flagship-banner {
    grid-template-columns: 1fr;
  }

  .flagship-banner {
    padding: 24px;
  }

  .path-nav,
  .library-teaser-grid,
  .tariff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tariff-card--mid {
    transform: none;
  }
}

@media (max-width: 640px) {
  .path-nav,
  .library-teaser-grid,
  .tariff-grid {
    grid-template-columns: 1fr;
  }

  .flagship-banner img {
    aspect-ratio: 16 / 10;
  }
}

/* ===== Blockquotes and publication date (/biblioteka.html) — added 2026-08-14 ===== */
.pub-body blockquote {
  margin: 0 0 14px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent-2);
  background: rgba(139, 69, 24, 0.06);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--ink-soft);
}

.pub-date {
  margin: -6px 0 18px;
  font-size: 13px;
  color: var(--muted);
}

/* ===== Lists and quote attribution (/biblioteka.html) — added 2026-08-14 ===== */
.pub-body ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.pub-body ul li {
  margin-bottom: 10px;
  color: var(--ink-soft);
}

.pub-quote-author {
  margin: -8px 0 14px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

/* ===== About the author section — added 2026-08-15 ===== */
.author-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
  align-items: center;
}

.author-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.author-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 22px;
}

.author-badges span {
  padding: 7px 12px;
  border: 1px solid rgba(139, 69, 24, 0.18);
  border-radius: 999px;
  background: rgba(139, 69, 24, 0.06);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

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

  .author-photo img {
    max-width: 360px;
    margin: 0 auto;
  }
}

.fit-check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1100px;
}

.fit-check-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--was);
  border-radius: var(--radius);
  background: var(--surface);
}

.fit-check-card h3 {
  font-family: var(--font-display);
  color: var(--accent-dark);
  font-size: 19px;
  margin: 0 0 14px;
}

.fit-check-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.fit-check-list li {
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.fit-check-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--was);
}

.fit-check-cta {
  display: inline-block;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.fit-check-cta:hover {
  color: var(--accent-dark);
}

/* ===== Продающие лонгриды (Родник Грамотной Речи) ===== */
.longread {
  max-width: 720px;
  margin: 0 auto;
}

.longread p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.longread h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 48px 0 18px;
}

.longread h2:first-child {
  margin-top: 0;
}

.longread .lead-line {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-dark);
}

.comic-panel {
  margin: 32px 0;
  padding: 28px;
  border: 2px dashed var(--accent-2);
  border-radius: var(--radius);
  background: rgba(184, 107, 45, 0.05);
  text-align: center;
  color: var(--muted);
}

.comic-panel-icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}

.comic-panel strong {
  display: block;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.video-slot {
  margin: 32px 0;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
}

.video-slot-icon {
  font-size: 40px;
}

.video-slot span {
  opacity: 0.85;
  font-size: 14px;
  max-width: 420px;
}

.objection-block {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 16px 16px 0;
}

.objection-block strong {
  display: block;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.proof-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}

.proof-card b {
  display: block;
  font-size: 22px;
  color: var(--accent-dark);
  font-family: var(--font-display);
}

.proof-card span {
  font-size: 13px;
  color: var(--muted);
}

.lead-form {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lead-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 14px 0 6px;
}

.lead-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
}

.lead-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.lead-form button {
  width: 100%;
  margin-top: 20px;
}

.lead-form-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}

.funnel-step-nav {
  text-align: center;
  margin: 40px 0;
}

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

/* ===== ИИ-ассистент «Лоцман» — плавающий чат-виджет ===== */
.epos-assistant {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
}

/* Маленький круглый переключатель — открывает и закрывает панель одним и тем
   же кликом, всегда виден и всегда поверх панели (z-index выше). */
.epos-assistant-toggle {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: #fff8f1;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: var(--shadow);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.epos-assistant-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.epos-assistant-panel {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 66px;
  width: min(340px, calc(100vw - 36px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Без этого правила атрибут [hidden] (браузерное display:none) проигрывает
   правилу выше того же веса — панель "не закрывалась" по крестику/кружку. */
.epos-assistant-panel[hidden] {
  display: none;
}

.epos-assistant-backdrop {
  display: none;
}

.epos-assistant-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(139, 69, 24, 0.1), rgba(184, 107, 45, 0.04));
}

.epos-assistant-head strong {
  font-family: var(--font-display);
  color: var(--accent-dark);
}

.epos-assistant-head span {
  font-size: 12px;
  color: var(--muted);
}

.epos-assistant-close {
  margin-left: auto;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.epos-assistant-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.epos-assistant-msg {
  font-size: 14px;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 14px;
  max-width: 92%;
}

.epos-assistant-msg--user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff8f1;
}

.epos-assistant-msg--bot {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
}

.epos-assistant-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.epos-assistant-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
}

.epos-assistant-note {
  padding: 0 16px 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .epos-assistant {
    right: 12px;
    bottom: 12px;
  }

  /* На телефоне панель — нижний лист на всю ширину экрана, а не блок в углу:
     легче попасть по крестику. Снизу оставлен зазор под сам кружок (76px =
     56px кружок + отступы), чтобы он не перекрывался панелью и оставался
     кликабельным для закрытия тем же жестом, что открывал. */
  .epos-assistant-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 76px;
    width: auto;
    max-height: 60vh;
  }

  .epos-assistant.is-open .epos-assistant-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(28, 22, 18, 0.35);
    z-index: 79;
  }
}

/* ===== Дизайн-концепт «Богатырский графический эпос»: движение ===== */
/* Секция "въезжает как страница комикса" при появлении в зоне видимости.
   Управляется через js/main.js (IntersectionObserver, класс .is-visible). */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Постер экипажа — портретная пропорция, не обрезаем как альбомные баннеры. */
#druzhina .flagship-banner img {
  aspect-ratio: 1023 / 1537;
  object-fit: contain;
  background: var(--surface);
}

.epos-chapter-seal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.epos-chapter-seal img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

/* "Карта глав" карточки программы (дизайн-концепт, раздел 6) — список
   испытаний со ссылками на разделы страницы ниже. */
.epos-chapters {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.epos-chapters li a {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.epos-chapters li a:hover {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px var(--accent-2), 0 0 16px rgba(79, 184, 214, 0.25);
}

.epos-chapters li strong {
  display: block;
  font-family: var(--font-display);
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.epos-chapters li span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.epos-artifact {
  padding: 16px 20px;
  border-left: 3px solid var(--accent-2);
  background: rgba(184, 107, 45, 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Постер/иллюстрация с рамкой в духе иллюминированной рукописи — переиспользуется
   на страницах экипажа, глав программ и т.д. */
.epos-poster {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.epos-poster img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.epos-poster figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* Требование концепта (п.7): никаких принудительных анимаций/мерцаний для тех,
   кто просит их отключить — статичный целевой кадр вместо движения. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .btn-primary::after {
    transition: none;
  }

  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Документы: ссылки на оферты рядом с кнопками заказа */
.product-doc,
.offer-note {
  margin-top: 10px;
  font-size: 0.85rem;
  opacity: 0.8;
}
.product-doc a,
.offer-note a {
  color: inherit;
  text-decoration: underline;
}
.br-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 10px 0;
  font-size: 0.88rem;
  line-height: 1.4;
}
.br-check input { margin-top: 3px; flex: none; }
.br-check a { color: inherit; text-decoration: underline; }
