/* =========================================================
   Recovery System — public platform
   Design language: calm, spacious, Apple-like
   ========================================================= */
@import url("shared/ios-tabbar.css");

:root {
  --bg: #ffffff;
  --bg-muted: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-faint: #86868b;
  --line: #e6e6e9;
  --accent: #0f766e;          /* deep calm teal — recovery/health */
  --accent-ink: #0b5a54;
  --accent-soft: #e6f2f0;
  --dark: #111113;

  --radius-sm: 16px;
  --radius: 24px;
  --radius-lg: 32px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow: 0 12px 40px rgba(17, 17, 19, .06);
  --shadow-lg: 0 24px 70px rgba(17, 17, 19, .10);

  --maxw: 1200px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 72px;

  --bg-gradient-teal:
    radial-gradient(ellipse 90% 58% at 50% 108%, rgba(20, 160, 143, 0.55) 0%, transparent 58%),
    radial-gradient(ellipse 70% 45% at 50% 95%, rgba(15, 118, 110, 0.4) 0%, transparent 52%),
    linear-gradient(180deg, #083a36 0%, #0a4540 28%, #0b524c 55%, #0a3f3a 100%);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -.02em; font-weight: 600; }

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

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  padding: 14px 26px;
  border-radius: 980px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s var(--ease),
    box-shadow .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  white-space: nowrap;
}
.btn--sm { padding: 10px 20px; font-size: 15px; }
.btn--lg { padding: 17px 34px; font-size: 17px; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); transform: translateY(-1px); }

.btn--dark { background: var(--accent); color: #fff; }
.btn--dark:hover { background: var(--accent-ink); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--hero-light {
  background: #fff;
  color: var(--accent-ink);
  border-color: #fff;
}
.btn--hero-light:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 500;
  font-size: 15px;
  transition: gap .3s var(--ease);
}
.link-arrow::after { content: "→"; transition: transform .3s var(--ease); }
.link-arrow:hover { gap: 10px; }
.link-arrow:hover::after { transform: translateX(2px); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* ---------------- Header ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.header.is-scrolled { box-shadow: 0 1px 0 rgba(17, 17, 19, .04), 0 6px 24px rgba(17, 17, 19, .04); }

.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: var(--header-h);
  gap: 20px;
}
.nav { justify-self: center; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; flex-shrink: 0; }
.brand__mark {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--accent);
  position: relative;
  flex: none;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 3px;
  background: #fff;
}
.brand__name { font-size: 17px; letter-spacing: -.01em; }
.brand__logo { display: block; height: 48px; width: auto; max-width: 280px; object-fit: contain; }
.brand__logo--mark { display: none; height: 44px; width: 44px; max-width: 44px; object-fit: contain; }

/* New brand: shield icon + wordmark */
.brand__icon { display: block; height: 40px; width: 40px; object-fit: contain; flex: none; }
.brand__icon--light { display: none; }
.brand__wordmark {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
  min-width: 0;
}
.brand__wordmark b {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand__wordmark > span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 2px;
}

@media (min-width: 901px) {
  .brand__wordmark { display: none; }
  .brand__icon { height: 44px; width: 44px; }
}

.nav { display: flex; gap: 28px; }
.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .25s var(--ease);
}
.nav__link:hover { color: var(--ink); }

.header__actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 24px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu__link {
  padding: 14px 4px;
  font-size: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.mobile-menu .btn { margin-top: 16px; }

/* ---------------- Hero ---------------- */
.hero { padding: 72px 0 40px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero__title {
  font-size: clamp(38px, 5.4vw, 68px);
  letter-spacing: -.03em;
  margin-bottom: 22px;
}
.hero__subtitle {
  font-size: clamp(17px, 2.1vw, 21px);
  color: var(--ink-soft);
  max-width: 30ch;
  margin-bottom: 34px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero preview card */
.hero__preview { perspective: 1400px; }
.preview-card {
  background: var(--bg-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.preview-card__bar { display: flex; gap: 7px; margin-bottom: 22px; padding-left: 4px; }
.preview-card__bar span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #d3d3d8;
}
.preview-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mini-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mini-card__label { font-weight: 600; font-size: 15px; }
.mini-card__meta { font-size: 13px; color: var(--ink-faint); }

/* ---------------- Sections ---------------- */
.section { padding: 92px 0; background: var(--bg); }
.section--muted { background: var(--bg-muted); }
.section--gradient {
  background: var(--bg-gradient-teal);
  color: #fff;
}
.section--gradient .eyebrow {
  color: rgba(167, 243, 232, 0.95);
}
.section--gradient .section__title {
  color: #fff;
}
.section--gradient .section__lead {
  color: rgba(255, 255, 255, 0.88);
}
.section--gradient .center-card {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}
.section--gradient .steps .step {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.section--gradient .step__num {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.section--gradient .step h3 { color: #fff; }
.section--gradient .step p { color: rgba(255, 255, 255, 0.84); }
.section--gradient .btn--primary,
.section--gradient .btn--dark {
  background: #fff;
  color: var(--accent-ink);
  border-color: #fff;
}
.section--gradient .btn--primary:hover,
.section--gradient .btn--dark:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.section--gradient .diag-band {
  background: transparent;
  border: none;
  padding: 0;
}

.section__head { max-width: 760px; margin-bottom: 56px; }
.section__title { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -.03em; font-weight: 680; margin-bottom: 18px; }
.section__lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: var(--ink-soft); }

/* ---------------- Icons (geometric glyphs) ---------------- */
[data-glyph] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  position: relative;
  flex: none;
}
[data-glyph]::before {
  content: "";
  width: 20px; height: 20px;
  border: 2px solid var(--accent);
  border-radius: 5px;
}
[data-glyph="family"]::before { border-radius: 50%; width: 12px; height: 12px; box-shadow: 12px 0 0 -2px var(--accent-soft), 12px 0 0 0 var(--accent); }
[data-glyph="help"]::before { border-radius: 50% 50% 50% 3px; }
[data-glyph="pro"]::before { border-radius: 50%; }
[data-glyph="center"]::before { border-radius: 3px; height: 16px; }
[data-glyph="chat"]::before { border-radius: 10px 10px 10px 2px; }
[data-glyph="diagnostic"]::before { border-radius: 50%; border-style: dashed; }
[data-glyph="lecture"]::before { border-radius: 3px; width: 22px; height: 15px; }
[data-glyph="program"]::before { transform: rotate(45deg); }
[data-glyph="question"]::before { border-radius: 50% 50% 50% 3px; }

/* ---------------- Entries ---------------- */
.entries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.entry-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.entry-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.entry-card__icon { margin-bottom: 20px; }
.entry-card__title { font-size: 21px; margin-bottom: 8px; }
.entry-card__text { color: var(--ink-soft); font-size: 15px; margin-bottom: 20px; }
.entry-card__list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.entry-card__list li {
  font-size: 15px;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
}
.entry-card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.entry-card .link-arrow { margin-top: auto; }

/* ---------------- Actions grid ---------------- */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.action-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.action-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.action-card__icon { margin-bottom: 20px; }
.action-card h3 { font-size: 19px; margin-bottom: 8px; }
.action-card p { color: var(--ink-soft); font-size: 15px; }

/* ---------------- Ecosystem ---------------- */
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.eco-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.eco-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.eco-card__num {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: .05em;
}
.eco-card h3 { font-size: 18px; margin: 18px 0 6px; }
.eco-card p { font-size: 14px; color: var(--ink-soft); }

/* ---------------- Courses ---------------- */
.courses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.course-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.course-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.course-card__len { font-size: 13px; color: var(--ink-faint); }
.course-card h3 { font-size: 21px; margin-bottom: 10px; }
.course-card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 26px; }
.course-card__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.course-card__meta { font-size: 14px; color: var(--ink-faint); }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 6px 12px;
  border-radius: 980px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ---------------- Centers ---------------- */
.centers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.center-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.center-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.center-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.center-card__head h3 { font-size: 20px; }
.center-card__city { color: var(--ink-soft); font-size: 15px; margin-bottom: 18px; }
.center-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 980px;
}
.status {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 980px;
  white-space: nowrap;
}
.status--verified { background: var(--accent-soft); color: var(--accent-ink); }
.status--review { background: #f2eee1; color: #8a6d1f; }
.centers__cta { margin-top: 40px; }

/* ---------------- Stories ---------------- */
.stories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.story-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.story-card blockquote {
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -.01em;
}
.story-card figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.story-card__name { font-weight: 600; }
.story-card__meta { font-size: 14px; color: var(--ink-faint); }

/* ---------------- Final CTA ---------------- */
.cta {
  padding: 84px 0 100px;
  background: var(--bg-gradient-teal);
  color: #fff;
}
.cta__inner {
  background: transparent;
  border-radius: 0;
  padding: 0;
  text-align: center;
}
.cta__title { font-size: clamp(32px, 4.5vw, 52px); margin-bottom: 16px; }
.cta__text { font-size: 19px; color: rgba(255, 255, 255, .88); margin-bottom: 34px; }
.cta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta .btn--primary {
  background: #fff;
  color: var(--accent-ink);
  border-color: #fff;
}
.cta .btn--primary:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.cta .btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cta .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
}

/* ---------------- Footer ---------------- */
.footer { background: var(--bg-muted); border-top: 1px solid var(--line); padding: 64px 0 32px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.footer__tagline { margin-top: 16px; color: var(--ink-soft); font-size: 15px; max-width: 26ch; }
.footer__col h4 { font-size: 14px; margin-bottom: 18px; color: var(--ink); }
.footer__col a {
  display: block;
  font-size: 15px;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color .25s var(--ease);
}
.footer__col a:hover { color: var(--ink); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  font-size: 14px;
  color: var(--ink-faint);
}
.footer__bottom a { color: var(--accent); }

/* ---------------- Reveal animation ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .entries { grid-template-columns: 1fr 1fr; }
  .ecosystem-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .header__actions .btn--sm { display: none; }
  .menu-toggle { display: flex; }
  .header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    gap: 12px;
  }
  .brand { flex-shrink: 1; min-width: 0; }
  .brand__logo--full { display: none; }
  .brand__logo--mark {
    display: block;
    height: 40px;
    width: 40px;
    max-width: 40px;
  }
  .footer__brand .brand__logo--mark {
    height: 48px;
    width: 48px;
    max-width: 48px;
  }
  .brand__icon { height: 38px; width: 38px; }
  .footer__brand .brand__icon { height: 42px; width: 42px; }
  .brand__wordmark b { font-size: 15px; }
  .brand__wordmark > span { font-size: 10px; letter-spacing: .14em; }
  .header__actions { flex-shrink: 0; gap: 8px; }
  .menu-toggle {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
  }
  .mobile-menu {
    padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-menu .btn { width: 100%; justify-content: center; }

  .hero { padding: 48px 0 24px; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__subtitle { max-width: none; }

  .section { padding: 68px 0; }
  .section__head { margin-bottom: 40px; }

  .actions-grid,
  .courses,
  .centers,
  .stories { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .entries,
  .ecosystem-grid,
  .actions-grid,
  .courses,
  .centers,
  .stories { grid-template-columns: 1fr; }

  .header__inner { height: 56px; }
  .brand__logo--mark {
    height: 36px;
    width: 36px;
    max-width: 36px;
  }

  .section { padding: 56px 0; }
  .section__head { margin-bottom: 32px; }
  .section__title { font-size: clamp(28px, 7.2vw, 36px); }
  .section__lead { font-size: 17px; }

  .hero__actions .btn,
  .cta__actions .btn { min-height: 44px; }

  .cta__actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .cta__actions .btn,
  .quiz__result-actions .btn,
  .diag-band__cta .btn,
  .hero-c--gradient .hero-c__actions .btn--lg {
    width: auto;
    min-width: min(228px, 74vw);
    max-width: 272px;
    flex: 0 0 auto;
    justify-content: center;
    padding: 14px 28px;
  }

  .cta { padding: 56px 0 72px; }
  .cta__inner { padding: 0 4px; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer__brand { grid-column: auto; }
  .footer__brand .brand__logo { height: 56px; }
  .footer__bottom { flex-direction: column; gap: 10px; align-items: flex-start; }

  .page-hero { padding: 36px 0 8px; }
  .page-hero__title { max-width: none; font-size: clamp(28px, 7vw, 40px); }
  .page-hero__lead { font-size: 17px; }
  .page-hero__actions { flex-direction: column; }
  .page-hero__actions .btn { width: 100%; justify-content: center; }

  .path-step {
    grid-template-columns: 44px 1fr;
    gap: 14px 16px;
    padding: 20px;
  }
  .path-step .btn { width: 100%; justify-content: center; }

  .filter-panel { padding: 16px; gap: 14px; margin-bottom: 24px; }
  .filters { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 0; }
  .search {
    flex: none !important;
    width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    align-self: stretch;
    padding: 0 18px;
  }
  .search input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 0;
    line-height: 1.35;
    font-size: 16px;
  }
  .chip-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding-bottom: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
  }
  .chip-group::-webkit-scrollbar { display: none; }
  .chip-btn { flex: 0 0 auto; min-height: 44px; }

  .hub-cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    margin: 0 -20px 28px;
    padding: 0 20px 4px;
  }
  .hub-cats::-webkit-scrollbar { display: none; }
  .hub-cat { flex: 0 0 auto; min-height: 44px; }

  .matcher { grid-template-columns: 1fr; gap: 16px; }
  .match-card__body { padding: 22px 20px 24px; }
  .match-card .btn { width: 100%; justify-content: center; }

  .trust-card { padding: 26px 22px; }
  .diag-band { padding: 32px 20px; }
  .diag-band__cta { flex-direction: column; align-items: center; }

  .center-card__body { padding: 18px 18px 20px; }
  .center-card__foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
  }
  .center-card__foot .btn { width: auto; }

  .material-card { padding: 22px; }
  .material-card__media { margin: -22px -22px 18px; width: calc(100% + 44px); }

  .toast-host {
    right: 16px;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }

  .quiz__body { min-height: 340px; }
  .quiz__card { padding: 24px 18px; }
  .quiz__question { font-size: 22px; margin-bottom: 22px; }
  .quiz__option { padding: 16px 18px; min-height: 52px; }
  .quiz__nav { flex-direction: column-reverse; gap: 10px; }
  .quiz__nav .btn { width: 100%; justify-content: center; min-height: 48px; }
  .quiz__result-actions { flex-direction: column; align-items: center; gap: 10px; }

  .detail__grid { gap: 22px; }
  .detail-panel { padding: 22px 18px; }
}

/* =========================================================
   SUBPAGES — shared components (help, diagnostic, centers, materials)
   ========================================================= */

/* ---- Breadcrumb ---- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-faint); margin-bottom: 22px; }
.breadcrumb a { color: var(--ink-soft); transition: color .25s var(--ease); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { color: var(--ink-faint); }

/* ---- Page hero (subpage header) ---- */
.page-hero { padding: 56px 0 12px; }
.page-hero__title { font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -.03em; margin-bottom: 16px; max-width: 20ch; }
.page-hero__lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); max-width: 56ch; }
.page-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* ---- Help path (numbered vertical journey) ---- */
.path { display: flex; flex-direction: column; gap: 18px; max-width: 820px; }
.path-step {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.path-step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.path-step__num {
  width: 44px; height: 44px; border-radius: 14px; background: var(--dark); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 18px;
}
.path-step__body h3 { font-size: 20px; margin-bottom: 4px; }
.path-step__body p { color: var(--ink-soft); font-size: 15px; }
.path-step .btn { flex: none; }
.path-step--done { opacity: 0.72; }
.path-step--done .path-step__num { background: var(--accent-soft); color: var(--accent-ink); }
.path-step--current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.path-step--current .path-step__num { background: var(--accent); color: #fff; }

/* ---- Support channels ---- */
.channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.channel-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.channel-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.channel-card__icon { margin-bottom: 20px; }
.channel-card h3 { font-size: 19px; margin-bottom: 6px; }
.channel-card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 16px; }
.channel-card strong { display: block; font-size: 18px; letter-spacing: -.01em; margin-bottom: 16px; }

/* ---- Quiz / diagnostic ---- */
.quiz { max-width: 760px; margin: 0 auto; }
.quiz__progress { height: 6px; background: var(--bg-muted); border-radius: 980px; overflow: hidden; margin-bottom: 12px; }
.quiz__progress-bar { height: 100%; width: 0; background: var(--accent); border-radius: 980px; transition: width .4s var(--ease); }
.quiz__meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-faint); margin-bottom: 30px; }

.quiz__card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.quiz__body {
  flex: 1;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.quiz__question { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin-bottom: 28px; }
.quiz__options { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.quiz__option {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 16px; cursor: pointer; text-align: left; background: var(--surface); width: 100%;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .2s var(--ease);
}
.quiz__option:hover { border-color: var(--ink); transform: translateY(-1px); }
.quiz__option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.quiz__option .dot-radio {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; position: relative;
  transition: border-color .25s var(--ease);
}
.quiz__option.is-selected .dot-radio { border-color: var(--accent); }
.quiz__option.is-selected .dot-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.quiz__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 24px;
}

/* Quiz result */
.quiz__result { text-align: center; }
.quiz__result .result-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent-ink);
  padding: 8px 16px; border-radius: 980px; font-weight: 600; font-size: 14px; margin-bottom: 20px;
}
.quiz__result h3 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 14px; }
.quiz__result p { color: var(--ink-soft); font-size: 17px; max-width: 48ch; margin: 0 auto 28px; }
.quiz__result-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hidden { display: none !important; }

/* ---- Filter bar ---- */
.filter-panel {
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-group__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 34px; }
.filter-panel .filters { margin-bottom: 0; }
.search {
  flex: 1 1 260px;
  min-width: 220px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 980px;
  padding: 0 20px;
  box-sizing: border-box;
}
.filter-panel > .search { flex: 0 0 auto; align-self: stretch; }
.search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  width: 100%;
  min-height: 0;
  font-family: inherit;
  color: var(--ink);
  line-height: 1.35;
}
.search input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}
.search__icon { width: 16px; height: 16px; border: 2px solid var(--ink-faint); border-radius: 50%; flex: none; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  font-size: 14px; padding: 10px 18px; border-radius: 980px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
  transition: all .25s var(--ease); font-family: inherit;
}
.chip-btn:hover { border-color: var(--ink); color: var(--ink); }
.chip-btn.is-active { background: var(--dark); color: #fff; border-color: var(--dark); }

.results-count { font-size: 14px; color: var(--ink-faint); margin-bottom: 22px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-faint); font-size: 16px; }

/* ---- Centers catalog ---- */
.catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.catalog .center-card { display: flex; flex-direction: column; }
.center-card__desc { font-size: 14px; color: var(--ink-soft); margin: 12px 0 16px; }
.center-card__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.center-card__rating {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.35;
  min-width: 0;
}
.center-card__rating b { color: var(--ink); font-weight: 600; }
.center-card__foot .link-arrow {
  flex: none;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- Materials ---- */
.materials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.material-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.material-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.material-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.material-card__type { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-faint); }
.material-card h3 { font-size: 19px; margin-bottom: 8px; line-height: 1.25; }
.material-card p { font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }
.material-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-faint); }

@media (max-width: 900px) {
  .channels { grid-template-columns: 1fr; }
  .catalog, .materials { grid-template-columns: 1fr 1fr; }
  .path-step { grid-template-columns: 48px 1fr; }
  .path-step .btn { grid-column: 2; justify-self: start; }
  .quiz__card { padding: 28px 22px; }
}
@media (max-width: 640px) {
  .catalog, .materials { grid-template-columns: 1fr; }
  .quiz__nav { flex-direction: column-reverse; gap: 12px; }
  .quiz__nav .btn { width: 100%; }
}

/* =========================================================
   BOOKING-STYLE HERO (colored band, big bold heading)
   ========================================================= */
.hero-b {
  background: var(--accent);
  color: #fff;
  padding: 32px 0 84px;
  position: relative;
}
.hero-b__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 52px; }
.hero-b__tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 980px;
  border: 1px solid rgba(255, 255, 255, .32); color: #fff; font-size: 15px; font-weight: 500;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.hero-b__tab:hover { background: rgba(255, 255, 255, .12); }
.hero-b__tab.is-active { background: #fff; color: var(--accent-ink); border-color: #fff; font-weight: 600; }
.hero-b__tab .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.hero-b__title {
  font-size: clamp(42px, 6.2vw, 78px);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.02;
  margin-bottom: 18px; max-width: 18ch;
}
.hero-b__subtitle {
  font-size: clamp(18px, 2.2vw, 24px); font-weight: 400;
  color: rgba(255, 255, 255, .88); max-width: 48ch; margin-bottom: 40px;
}

/* Booking-like search bar */
.searchbar {
  background: #fff; border-radius: 18px; padding: 8px;
  display: flex; gap: 8px; align-items: stretch; max-width: 940px;
  box-shadow: var(--shadow-lg);
}
.searchbar__field { flex: 1; display: flex; align-items: center; gap: 12px; padding: 6px 18px; border-radius: 12px; }
.searchbar__field + .searchbar__field { border-left: 1px solid var(--line); }
.searchbar__ic { width: 20px; height: 20px; border: 2px solid var(--ink-faint); border-radius: 6px; flex: none; }
.searchbar__ic--pin { border-radius: 50% 50% 50% 2px; }
.searchbar__field label { display: block; font-size: 12px; color: var(--ink-faint); margin-bottom: 2px; }
.searchbar__field select {
  border: none; outline: none; background: transparent; font-family: inherit;
  font-size: 15px; font-weight: 500; color: var(--ink); width: 100%; cursor: pointer;
}
.searchbar .btn { flex: none; }

@media (max-width: 760px) {
  .hero-b { padding: 24px 0 56px; }
  .hero-b__tabs { margin-bottom: 34px; gap: 6px; }
  .searchbar { flex-direction: column; padding: 10px; }
  .searchbar__field + .searchbar__field { border-left: none; border-top: 1px solid var(--line); }
  .searchbar__field { padding: 12px 14px; }
  .searchbar .btn { width: 100%; padding: 15px; }
}

/* =========================================================
   IMAGE PLACEHOLDERS (fill later with real photos)
   ========================================================= */
.img-ph {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 40%, rgba(17, 17, 19, .04) 100%),
    linear-gradient(135deg, #e9edf1 0%, #f4f6f8 60%, #eef1f4 100%);
  overflow: hidden; color: var(--ink-faint);
}
/* Спокойные плейсхолдеры без иконок — глиф скрыт */
.img-ph__glyph { display: none; }
.img-ph--wide { aspect-ratio: 16 / 10; }
.img-ph--card { aspect-ratio: 3 / 2; }
.img-ph--avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; background: #e9edf1; }

/* =========================================================
   BOOKING-STYLE CARDS (image on top, edge-to-edge)
   ========================================================= */
.center-card { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.center-card__media { border-radius: 0; }
img.center-card__media { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.center-card__media--link { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.center-card__media--link img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.center-card:hover .center-card__media--link img { transform: scale(1.03); }
.center-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.center-card__body .center-card__head { margin-bottom: 8px; }

.score { display: inline-flex; align-items: center; gap: 9px; }
.score__badge {
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  padding: 6px 9px; border-radius: 8px 8px 8px 2px; letter-spacing: -.01em;
}
.score__text { font-size: 13px; color: var(--ink-soft); line-height: 1.2; }
.score__text b { display: block; color: var(--ink); font-weight: 600; }

/* Course media (rounded, inset — Apple-like) */
.course-card__media { border-radius: var(--radius-sm); margin-bottom: 22px; }

/* Story avatar */
.story-card figcaption { flex-direction: row; align-items: center; gap: 14px; }
.story-card figcaption .cap { display: flex; flex-direction: column; gap: 2px; }

/* =========================================================
   BRAND — Национальная система восстановления (two-line logo)
   ========================================================= */
.brand__name { display: inline-flex; flex-direction: column; line-height: 1.1; font-size: 15px; }
.brand__sub { font-size: 11px; font-weight: 500; color: var(--ink-faint); letter-spacing: 0; }
.footer__brand .brand__name { font-size: 16px; }
.footer__brand .brand__logo { height: 72px; margin-bottom: 4px; }
.footer__brand .brand__icon { height: 44px; width: 44px; }
.footer__brand .brand__wordmark b { font-size: 17px; }

.hero-b__kicker {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255, 255, 255, .82); margin-bottom: 16px;
}
.hero-b__title { max-width: 22ch; }

/* =========================================================
   HERO — Stripe-style (text left, product image right)
   ========================================================= */
.hero-s {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1100px 520px at 82% -12%, #3a3a3e 0%, var(--accent) 46%, var(--accent-ink) 100%);
}
.hero-s::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(114deg, rgba(255, 255, 255, 0) 56%, rgba(255, 255, 255, .06) 56%);
}
.hero-s__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  padding: 72px 0 84px;
}
.hero-s__badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 16px; border-radius: 980px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; font-size: 14px; font-weight: 500; margin-bottom: 26px;
  transition: background .25s var(--ease);
}
.hero-s__badge:hover { background: rgba(255, 255, 255, .2); }
.hero-s__badge span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .22); font-size: 13px;
}
.hero-s__title {
  font-size: clamp(44px, 5.6vw, 82px); font-weight: 800; letter-spacing: -.035em;
  line-height: 1.0; margin-bottom: 22px; max-width: 14ch;
}
.hero-s__subtitle {
  font-size: clamp(18px, 2.1vw, 22px); font-weight: 400;
  color: rgba(255, 255, 255, .9); max-width: 40ch; margin-bottom: 34px;
}
.hero-s__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-s .btn--primary { background: #fff; color: var(--accent-ink); }
.hero-s .btn--primary:hover { background: #eef2f1; }
.hero-s .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .4); }
.hero-s .btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* Product image (bleeds slightly to the right like Stripe) */
.hero-s__media { position: relative; justify-self: end; width: 100%; }
.hero-s__img {
  display: block; width: 100%; height: auto;
  border-radius: 20px; box-shadow: 0 40px 90px rgba(0, 0, 0, .28);
}
/* Fallback frame shown until hero.png is added */
.hero-s__ph { display: none; }
.hero-s__media.is-empty {
  aspect-ratio: 16 / 11;
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
  border: 1px dashed rgba(255, 255, 255, .4);
}
.hero-s__media.is-empty .hero-s__ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  position: absolute; inset: 0; color: rgba(255, 255, 255, .8); font-size: 14px; font-weight: 500;
}
.hero-s__media.is-empty .img-ph__glyph { border-color: rgba(255, 255, 255, .65); }
.hero-s__media.is-empty .img-ph__glyph::before,
.hero-s__media.is-empty .img-ph__glyph::after { background: rgba(255, 255, 255, .65); }

@media (min-width: 1080px) {
  .hero-s__media { width: 118%; }
}
@media (max-width: 900px) {
  .hero-s__inner { grid-template-columns: 1fr; gap: 40px; padding: 48px 0 56px; }
  .hero-s__title { max-width: none; }
  .hero-s__media { width: 100%; justify-self: stretch; }
  .hero-s__actions .btn { flex: 1 1 auto; }
}

/* =========================================================
   POLISH — focus, toasts, loading, feedback, forms, details
   ========================================================= */

/* Accessible focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible { outline-offset: 3px; }
.hero-s :focus-visible { outline-color: #fff; }

/* Link-styled buttons (replace dead href="#") */
.linkish { font: inherit; background: none; border: none; padding: 0; margin: 0; color: inherit; cursor: pointer; text-align: left; }
.footer__col .linkish { display: block; font-size: 15px; color: var(--ink-soft); padding: 6px 0; transition: color .25s var(--ease); }
.footer__col .linkish:hover { color: var(--ink); }

/* Toasts */
.toast-host { position: fixed; right: 24px; bottom: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 48px); }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--dark); color: #fff; padding: 14px 18px; border-radius: 14px;
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  transform: translateY(12px); opacity: 0; transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.toast.is-in { transform: none; opacity: 1; }
.toast__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.toast--success .toast__dot { background: #2f9e78; }
.toast--error .toast__dot { background: #c2543a; }

/* Button loading spinner */
.btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; margin: auto; inset: 0;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%;
  animation: nsv-spin .7s linear infinite;
}
.btn--primary.is-loading::after,
.hero-s .btn--primary.is-loading::after { border-color: rgba(15, 118, 110, .35); border-top-color: var(--accent-ink); }
@keyframes nsv-spin { to { transform: rotate(360deg); } }

/* Simple form fields (public) */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Success block */
.form-success { text-align: center; }
.form-success__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent-ink);
  padding: 8px 16px; border-radius: 980px; font-weight: 600; font-size: 14px; margin-bottom: 14px;
}
.form-success h3 { font-size: 22px; margin-bottom: 10px; }
.form-success p { color: var(--ink-soft); font-size: 15px; }
.form-success__id { font-weight: 600; color: var(--ink); }

/* =========================================================
   DETAIL PAGES (center-detail, material-detail)
   ========================================================= */
.detail { padding: 32px 0 24px; }
.detail__cover { margin: 8px 0 36px; }
.detail__cover .img-ph { border-radius: var(--radius-lg); }
.detail__cover-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); }
.detail__grid { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.detail__main { min-width: 0; }
.detail__aside { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }

.detail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-head h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; }
.detail-sub { font-size: 17px; color: var(--ink-soft); margin-bottom: 8px; }

.prose p { font-size: 17px; line-height: 1.72; color: var(--ink); margin-bottom: 18px; }
.prose h2 { font-size: 24px; margin: 34px 0 12px; }

.spec { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 26px 0 10px; }
.spec--booking {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 28px 0 32px;
}
.spec--booking .spec__item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border-top: 1px solid var(--line);
}
.spec--booking .spec__label { font-size: 12px; margin-bottom: 4px; }
.spec--booking .spec__value { font-size: 17px; line-height: 1.3; }
.spec__item { padding: 14px 0; border-top: 1px solid var(--line); }
.spec__label { font-size: 13px; color: var(--ink-faint); }
.spec__value { font-size: 16px; font-weight: 600; margin-top: 2px; }

.program-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.program-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.program-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.program-card__name { font-weight: 600; font-size: 16px; grid-column: 1; }
.program-card__format { font-size: 13px; color: var(--ink-faint); grid-column: 1; }
.program-card__duration {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  grid-column: 2;
  grid-row: 1 / span 2;
  text-align: right;
  white-space: nowrap;
}
.program-row:first-of-type { border-top: none; }
.program-row__name { font-weight: 600; }
.program-row__meta { font-size: 14px; color: var(--ink-faint); }

.reviews-list { display: flex; flex-direction: column; gap: 14px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex: none;
  text-transform: lowercase;
}
.review__name { font-weight: 600; }
.review__stars { color: var(--accent); font-size: 14px; }
.review p { color: var(--ink-soft); font-size: 15px; }

.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.aside-card h3 { font-size: 18px; margin-bottom: 16px; }
.aside-card .btn { width: 100%; }
.aside-card .field:last-of-type { margin-bottom: 18px; }

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

@media (max-width: 900px) {
  .detail__grid { grid-template-columns: 1fr; gap: 28px; }
  .detail__aside { position: static; }
  .spec { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr; }
  .toast-host { right: 16px; left: 16px; bottom: 16px; }
}

/* =========================================================
   RECOVERY-LIKE REDESIGN (2026) — calm, mature, product feel
   ========================================================= */

/* Убираем декоративные «ИИ»-глифы из плашек (спокойный вид) */
[data-glyph] { display: none !important; }
.channel-card__icon, .action-card__icon, .entry-card__icon { display: none; }

/* ---- Universal image slots (fill with real photos later) ---- */
.image-slot {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(17, 17, 19, .04), rgba(17, 17, 19, .07)),
    linear-gradient(135deg, #e8eaed 0%, #f3f4f6 55%, #eaecef 100%);
}
.image-slot::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .16) 100%);
  opacity: .0; transition: opacity .3s var(--ease);
}
.image-slot--hero { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
.image-slot--center { aspect-ratio: 3 / 2; border-radius: 0; }
.image-slot--material { aspect-ratio: 16 / 10; }
.image-slot--story { aspect-ratio: 1 / 1; border-radius: 50%; }
.image-slot--course { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); }
.image-slot__label {
  position: absolute; left: 16px; bottom: 14px; z-index: 1;
  font-size: 13px; font-weight: 600; color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}
.image-slot--labelled::after { opacity: 1; }

/* Graceful fallback when an <img> fails to load */
.img-fallback {
  background:
    linear-gradient(180deg, rgba(17, 17, 19, .04), rgba(17, 17, 19, .07)),
    linear-gradient(135deg, #e8eaed 0%, #f3f4f6 55%, #eaecef 100%);
  object-fit: cover;
}
.brand__name-fallback {
  font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
  color: var(--ink); line-height: 1.1; max-width: 260px;
}

/* =========================================================
   HERO — Centered, product-first (StackAI-like)
   ========================================================= */
.hero-c {
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Gradient hero (homepage) — Laravel-style, brand teal */
.hero-c--gradient {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: visible;
  border-bottom: none;
  background: var(--bg-gradient-teal);
}

.hero-c--gradient .hero-c__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: auto;
  width: 100%;
  --hero-offset: clamp(88px, 10vh, 132px);
  padding: calc(var(--header-h) + var(--hero-offset)) 0 clamp(32px, 5vh, 64px);
  box-sizing: border-box;
}

.hero-c--gradient .hero-c__copy {
  flex: 0 0 auto;
  width: 100%;
  max-width: 900px;
}

.hero-c--gradient .hero-c__title {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 18px;
  font-size: clamp(38px, 5.4vw, 68px);
  max-width: 18ch;
}

.hero-c--gradient .hero-c__subtitle {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 28px;
}

.hero-c--gradient .hero-c__actions {
  margin-bottom: 0;
  justify-content: center;
}

.hero-c--gradient .hero-c__btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-c--gradient .hero-c__btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
}

/* Mac mockup — full image visible */
.hero-c--gradient .hero-c__stage {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(32px, 4.5vh, 56px);
  padding-top: 0;
}

.hero-c--gradient .hero-c__frame--mac {
  width: min(1080px, 92vw);
  margin-bottom: 0;
  border-radius: 20px;
  border-bottom: 1px solid var(--line);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 20px 80px rgba(0, 0, 0, 0.35),
    0 40px 100px rgba(0, 0, 0, 0.25);
}

.hero-c--gradient .hero-c__slot {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

/* Hero logo — mobile only, top-left */
.hero-c__logo {
  display: none;
}

/* Home: immersive teal base — no white bands behind status bar / overscroll */
html.page-home-root,
body.page-home {
  background-color: #083a36;
}

/* Header over gradient hero */
.page-home .header--overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.page-home .header--overlay:not(.is-scrolled) .nav__link {
  color: rgba(255, 255, 255, 0.92);
}

.page-home .header--overlay:not(.is-scrolled) .nav__link:hover {
  color: #fff;
}

.page-home .header--overlay:not(.is-scrolled) .btn--primary {
  background: #fff;
  color: var(--accent-ink);
}

.page-home .header--overlay:not(.is-scrolled) .btn--primary:hover {
  background: rgba(255, 255, 255, 0.9);
}

.page-home .header--overlay:not(.is-scrolled) .menu-toggle span {
  background: #fff;
}

/* Homepage overlay: white shield + white wordmark until scrolled */
.page-home .header--overlay:not(.is-scrolled) .brand__icon--dark { display: none; }
.page-home .header--overlay:not(.is-scrolled) .brand__icon--light { display: block; }
.page-home .header--overlay:not(.is-scrolled) .brand__wordmark b { color: #fff; }
.page-home .header--overlay:not(.is-scrolled) .brand__wordmark > span { color: rgba(255, 255, 255, 0.8); }

.page-home .header--overlay.is-scrolled {
  position: sticky;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.page-home .header--overlay.is-scrolled .nav__link {
  color: var(--ink-soft);
}

.page-home .header--overlay.is-scrolled .nav__link:hover {
  color: var(--ink);
}

.page-home .header--overlay.is-scrolled .btn--primary {
  background: var(--accent);
  color: #fff;
}

.page-home .header--overlay.is-scrolled .menu-toggle span {
  background: var(--ink);
}

.hero-c__inner { text-align: center; padding: 112px 0 90px; }
.hero-c__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 980px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 14px; font-weight: 600; margin-bottom: 26px;
}
.hero-c__eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero-c__title {
  font-size: clamp(44px, 7.4vw, 88px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 700;
  margin: 0 auto 22px;
  max-width: 16ch;
}
.hero-c__subtitle {
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 auto 34px;
}
.hero-c__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }

.hero-c__media { max-width: 1060px; margin: 0 auto; }
.hero-c__frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(17, 17, 19, .16);
}
.hero-c__bar { display: flex; gap: 7px; padding: 15px 18px; border-bottom: 1px solid var(--line); background: #f8f9fa; }
.hero-c__bar span { width: 11px; height: 11px; border-radius: 50%; background: #dfe3e8; }
.hero-c__bar span:nth-child(1) { background: #ff5f57; }
.hero-c__bar span:nth-child(2) { background: #febc2e; }
.hero-c__bar span:nth-child(3) { background: #28c840; }
.hero-c__slot { display: block; width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero-c__inner { padding: 72px 0 60px; }

  /* Homepage mobile: logo top-left, text above image, balanced spacing */
  .hero-c__logo {
    display: block;
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    left: 20px;
    z-index: 12;
  }
  .hero-c__logo img {
    display: block;
    height: 44px;
    width: 44px;
    max-width: 44px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.28));
  }

  .hero-c--gradient {
    min-height: 100svh;
  }
  .hero-c--gradient .hero-c__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100svh;
    --hero-offset: 52px;
    padding: calc(132px + env(safe-area-inset-top, 0px) + var(--hero-offset)) 0 20px;
    box-sizing: border-box;
  }
  .hero-c--gradient .hero-c__copy {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 0 22px;
  }
  .hero-c--gradient .hero-c__stage {
    flex: 0 0 auto;
    width: 100%;
    margin-top: clamp(28px, 5vh, 40px);
    padding-top: 0;
    align-items: center;
  }
  .hero-c--gradient .hero-c__title {
    font-size: clamp(30px, 7.2vw, 40px);
    line-height: 1.06;
    max-width: none;
    margin-bottom: 12px;
  }
  .hero-c--gradient .hero-c__subtitle {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 18px;
  }
  .hero-c--gradient .hero-c__frame--mac {
    width: 96vw;
    margin-bottom: 0;
    border-radius: 16px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.1),
      0 16px 48px rgba(0, 0, 0, 0.28);
  }
  .hero-c--gradient .hero-c__slot {
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    object-fit: contain;
  }
  .hero-c--gradient .hero-c__actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    gap: 10px;
  }
  .hero-c--gradient .hero-c__actions .btn--lg {
    width: auto;
    min-width: min(228px, 74vw);
    max-width: 272px;
    justify-content: center;
    min-height: 46px;
    padding: 14px 28px;
  }
}
@media (max-width: 640px) {
  .hero-c__inner { padding: 64px 0 44px; }

  .hero-c__logo {
    left: 16px;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
  }
  .hero-c__logo img {
    height: 44px;
    max-width: min(62vw, 220px);
  }

  .hero-c--gradient .hero-c__inner {
    --hero-offset: 44px;
    padding-top: calc(120px + env(safe-area-inset-top, 0px) + var(--hero-offset));
  }
  .hero-c--gradient .hero-c__copy { padding: 0 20px; }
  .hero-c--gradient .hero-c__title {
    font-size: clamp(26px, 7.8vw, 34px);
    margin-bottom: 10px;
  }
  .hero-c--gradient .hero-c__subtitle {
    font-size: 14px;
    margin-bottom: 16px;
  }
  .hero-c--gradient .hero-c__stage {
    margin-top: clamp(24px, 4.5vh, 36px);
  }
  .hero-c--gradient .hero-c__frame--mac {
    width: 96vw;
  }
  .hero-c--gradient .hero-c__slot {
    max-height: none;
    min-height: 0;
    object-fit: contain;
  }
  .hero-c--gradient .hero-c__actions {
    align-items: center;
    padding: 0;
  }
  .hero-c--gradient .hero-c__actions .btn--lg {
    padding: 13px 26px;
    font-size: 15px;
    min-height: 44px;
  }
  .hero-c__bar { padding: 11px 13px; }
  .hero-c__frame { border-radius: 14px; }
}

/* =========================================================
   HERO — Recovery-like (clean, big heading, search)
   ========================================================= */
.hero-r {
  background:
    radial-gradient(1200px 520px at 88% -20%, #f1f2f4 0%, rgba(241, 242, 244, 0) 60%),
    linear-gradient(180deg, #fbfbfc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-r__inner {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 64px;
  align-items: center;
  padding: 84px 0 88px;
}
.hero-r__badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 980px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  margin-bottom: 26px;
}
.hero-r__badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero-r__title {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.0;
  letter-spacing: -.035em;
  font-weight: 700;
  margin-bottom: 22px;
  max-width: 15ch;
}
.hero-r__subtitle {
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 30px;
}
.hero-r__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }

/* Search bar as key element (light) */
.hero-search {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow);
  max-width: 560px;
}
.hero-search__ic {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2px solid var(--ink-faint); position: relative;
}
.hero-search__ic::after {
  content: ""; position: absolute; right: -5px; bottom: -5px;
  width: 8px; height: 2px; background: var(--ink-faint); transform: rotate(45deg); border-radius: 2px;
}
.hero-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 16px; color: var(--ink);
}
.hero-search input::placeholder { color: var(--ink-faint); }
.hero-search .btn { flex: none; }

/* Right premium panel (place for future mockups) */
.hero-r__panel {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.hero-r__panel-slot { width: 100%; }
.hero-r__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ui-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; background: var(--surface);
  display: flex; flex-direction: column; gap: 6px;
}
.ui-card__k { font-size: 13px; color: var(--ink-faint); }
.ui-card__v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.ui-card__v span { font-size: 14px; font-weight: 500; color: var(--ink-soft); }

@media (max-width: 900px) {
  .hero-r__inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 56px; }
  .hero-r__title { max-width: none; }
  .hero-r__actions .btn { flex: 1 1 auto; }
  .hero-search { max-width: none; }
}

/* =========================================================
   MATCHER — «Подберите помощь под вашу ситуацию»
   ========================================================= */
.matcher { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.match-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.match-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.match-card__slot { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--muted); }
.match-card__body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.match-card__title { font-size: clamp(21px, 2.4vw, 26px); letter-spacing: -.02em; margin-bottom: 10px; }
.match-card__text { color: var(--ink-soft); font-size: 16px; margin-bottom: 18px; }
.match-card__list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.match-card__list li { position: relative; padding-left: 24px; font-size: 15px; }
.match-card__list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent);
}
.match-card .btn { margin-top: auto; align-self: flex-start; }

/* =========================================================
   TRUST — «Система строится на прозрачности и проверке»
   ========================================================= */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.trust-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.trust-card__lead { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; color: var(--accent); }
.trust-card__lead--accent { color: var(--accent); }
.trust-card h3 { font-size: 19px; margin-bottom: 8px; }
.trust-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }

/* Trust stats strip */
.trust-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-bottom: 48px;
}
.trust-stat { text-align: left; }
.trust-stat__num { font-size: clamp(34px, 4.4vw, 52px); font-weight: 750; letter-spacing: -.03em; color: var(--ink); }
.trust-stat__label { font-size: 16px; color: var(--ink-soft); margin-top: 4px; }

/* =========================================================
   STEPS — диагностика как центральный сценарий
   ========================================================= */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px;
}
.step__num {
  width: 46px; height: 46px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 18px;
  margin-bottom: 20px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }

/* Diagnostic band (calm, not acid) */
.diag-band {
  background: var(--bg-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
}
.diag-band__head { max-width: 720px; margin-bottom: 40px; }
.diag-band__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* =========================================================
   CENTER CARDS — маркетплейс-паттерн (текстовые бейджи)
   ========================================================= */
.center-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cbadge {
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  padding: 4px 10px; border-radius: 980px; white-space: nowrap;
}
.cbadge--verified { background: var(--accent-soft); color: var(--accent-ink); }
.cbadge--assoc { background: #eef2f7; color: #3a4d63; }
.cbadge--online { background: #eceef0; color: #40464d; }
.center-card__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; }
.center-card__meta span { font-size: 14px; color: var(--ink-soft); }
.center-card__meta b { color: var(--ink); font-weight: 600; }

/* =========================================================
   MATERIALS HUB — категории + карточки с image-slot
   ========================================================= */
.hub-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.hub-cat {
  font-size: 15px; font-weight: 500; padding: 10px 18px; border-radius: 980px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.hub-cat:hover { border-color: var(--ink); color: var(--ink); }
.hub-cat.is-active { background: var(--dark); border-color: var(--dark); color: #fff; }

.material-card__media {
  display: block;
  margin: -26px -26px 20px;
  width: calc(100% + 52px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-muted);
}
.material-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ease);
}
.material-card:hover .material-card__media img { transform: scale(1.04); }
.material-card__cat { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); }

/* =========================================================
   Responsive — redesign blocks
   ========================================================= */
@media (max-width: 1024px) {
  .trust, .steps, .trust-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .trust, .steps, .trust-stats { grid-template-columns: 1fr; }
  .hero-r__cards { grid-template-columns: 1fr; }
  .diag-band { padding: 32px 20px; }
  .material-card__media { margin: -22px -22px 18px; width: calc(100% + 44px); }
}

/* =========================================================
   ARTICLE (material detail) — NYT desktop + iOS hero mobile
   ========================================================= */
.article-page {
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  background: #fff;
}

.page-article .header--article {
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
@media (max-width: 900px) {
  .page-article .header--article {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }
  .page-article .header--article:not(.is-scrolled) .nav__link {
    color: rgba(255, 255, 255, 0.94);
  }
  .page-article .header--article:not(.is-scrolled) .nav__link:hover { color: #fff; }
  .page-article .header--article:not(.is-scrolled) .btn--primary {
    background: rgba(255, 255, 255, 0.94);
    color: var(--accent-ink);
  }
  .page-article .header--article:not(.is-scrolled) .menu-toggle span { background: #fff; }
  .page-article .header--article.is-scrolled {
    position: sticky;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .page-article .header--article.is-scrolled .nav__link { color: var(--ink-soft); }
  .page-article .header--article.is-scrolled .nav__link:hover { color: var(--ink); }
  .page-article .header--article.is-scrolled .btn--primary {
    background: var(--accent);
    color: #fff;
  }
  .page-article .header--article.is-scrolled .menu-toggle span { background: var(--ink); }
}

.article-layout { display: flex; flex-direction: column; }

.article__media {
  order: 1;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #0a3f3a;
}
.article__media-img { display: block; width: 100%; object-fit: cover; }
.article__media-caption {
  font-family: var(--font, "Inter", sans-serif);
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.45;
  padding: 12px 24px 0;
  text-align: center;
}
.article__media-caption:empty,
.article__media-caption[hidden] { display: none; }

.article__head { order: 2; background: #fff; }
.article__head-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 28px 24px 0;
}
.article__main {
  order: 3;
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px 8px;
  width: 100%;
}

.article__crumb { margin-bottom: 20px; }

.article__kicker {
  font-family: var(--font, "Inter", sans-serif);
  font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.article__title {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink); margin: 0 0 16px;
}
.article__dek {
  font-family: var(--serif);
  font-size: clamp(19px, 2.3vw, 23px);
  line-height: 1.45; color: var(--ink-soft); margin: 0 0 24px;
}

.article__byline {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.article__author { display: flex; align-items: center; gap: 12px; }
.article__avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  letter-spacing: .02em;
}
.article__author-info { display: flex; flex-direction: column; line-height: 1.3; }
.article__author-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.article__author-role { font-size: 13px; color: var(--ink-faint); }
.article__meta { font-size: 14px; color: var(--ink-faint); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.article__dot { opacity: .5; }

/* Body typography */
.article__body {
  font-family: var(--serif);
  font-size: 20px; line-height: 1.78; color: #1f2226;
  padding-top: 36px;
}
.article__body p { margin: 0 0 26px; }
.article__body > p:first-of-type::first-letter {
  float: left; font-size: 66px; line-height: .82; font-weight: 700;
  padding: 6px 12px 0 0; color: var(--ink);
}
.article__body h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 30px); line-height: 1.2; font-weight: 700;
  letter-spacing: -.01em; color: var(--ink); margin: 44px 0 14px;
}
.article__body ul { margin: 0 0 26px; padding-left: 22px; }
.article__body li { margin-bottom: 10px; padding-left: 6px; }
.article__body li::marker { color: var(--accent); }

.article__body blockquote {
  margin: 36px 0; padding: 4px 0 4px 26px;
  border-left: 3px solid var(--accent);
  font-size: clamp(22px, 2.6vw, 26px); line-height: 1.4; font-style: italic;
  color: var(--ink);
}
.article__body blockquote cite {
  display: block; margin-top: 14px;
  font-family: var(--font, "Inter", sans-serif);
  font-size: 14px; font-style: normal; color: var(--ink-faint); letter-spacing: .01em;
}
.article__body blockquote cite::before { content: "— "; }

.article__note {
  font-family: var(--font, "Inter", sans-serif);
  font-size: 16px; line-height: 1.6; color: var(--ink-soft);
  background: var(--accent-soft); border-radius: 14px;
  padding: 20px 24px; margin: 34px 0;
}

/* End-of-article CTA */
.article__cta {
  margin: 48px 0 0; padding: 34px 32px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-muted); text-align: center;
}
.article__cta-title { font-size: 22px; letter-spacing: -.01em; margin-bottom: 8px; }
.article__cta-text { color: var(--ink-soft); font-size: 16px; max-width: 46ch; margin: 0 auto 20px; }
.article__cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Related */
.article-related { border-top: 1px solid var(--line); margin-top: 56px; padding: 52px 0 24px; background: var(--bg-muted); }
.article-related .container { max-width: 1100px; }
.article-related__title { font-family: var(--serif); font-size: 28px; letter-spacing: -.01em; margin-bottom: 28px; }
.article-related .material-card__media { margin: -26px -26px 20px; }

@media (min-width: 901px) {
  .page-article .header--article { position: sticky; }
  .article__head-inner { padding: 48px 24px 0; text-align: left; }
  .article__title { letter-spacing: -.02em; }
  .article__media {
    order: 2;
    width: 100%;
    max-width: 768px;
    margin: 28px auto 16px;
    padding: 0 24px;
    background: transparent;
    border-radius: 0;
  }
  .article__media-img {
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(17, 17, 19, 0.1);
  }
  .article__media-caption {
    padding: 14px 24px 0;
    text-align: left;
    max-width: 768px;
    margin: 0 auto;
  }
  .article__head { order: 1; }
  .article__main { order: 3; }
}

@media (max-width: 900px) {
  .article-page {
    background: #fff;
    --article-pad-x: max(24px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  }

  .article-layout { isolation: isolate; }

  .article__media {
    position: sticky;
    top: 0;
    z-index: 0;
    width: 100%;
    padding-top: env(safe-area-inset-top, 0px);
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }
  .article__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(8, 58, 54, 0.18) 42%,
      rgba(8, 58, 54, 0.52) 100%
    );
    pointer-events: none;
    z-index: 1;
  }
  .article__media-img {
    min-height: min(56svh, 440px);
    max-height: min(56svh, 440px);
    height: min(56svh, 440px);
  }
  .article__media-caption { display: none; }

  .article__head {
    margin-top: -48px;
    padding-top: 6px;
    border-radius: 28px 28px 0 0;
    position: relative;
    z-index: 3;
    background: #fff;
    box-shadow:
      0 -16px 48px rgba(0, 0, 0, 0.14),
      0 -2px 0 rgba(255, 255, 255, 0.9);
  }
  .article__head-inner {
    padding: 26px var(--article-pad-x) 0;
    box-sizing: border-box;
    width: 100%;
  }
  .article__crumb {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px 6px;
  }
  /* На мобиле заголовок уже в h1 — убираем дубль из крошек */
  .article__crumb span:last-of-type,
  .article__crumb span:nth-last-of-type(2) {
    display: none;
  }
  .article__title {
    font-size: clamp(30px, 8.2vw, 40px);
    line-height: 1.12;
    letter-spacing: -.025em;
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .article__dek {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 100%;
  }

  .article__main {
    position: relative;
    z-index: 3;
    padding: 0 var(--article-pad-x) 8px;
    background: #fff;
    box-sizing: border-box;
    width: 100%;
  }
  .article__body { padding-top: 28px; }

  .page-article--no-cover .article__head {
    margin-top: calc(env(safe-area-inset-top, 0px) + 16px);
    border-radius: 0;
    box-shadow: none;
  }
  .page-article--no-cover .article__media {
    position: relative;
  }
}

@media (max-width: 640px) {
  .article-page { --article-pad-x: max(22px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
  .article__head-inner { padding-top: 24px; }
  .article__title { font-size: clamp(28px, 7.5vw, 38px); }
  .article__dek { font-size: 17px; }
  .article__byline { flex-direction: column; align-items: flex-start; gap: 10px; }
  .article__body { font-size: 18px; line-height: 1.72; }
  .article__body > p:first-of-type::first-letter { font-size: 52px; padding: 4px 10px 0 0; }
  .article__body blockquote { font-size: 21px; padding-left: 18px; }
  .article__cta { padding: 26px 20px; }
  .article__cta-actions { flex-direction: column; align-items: center; }
  .article__cta-actions .btn {
    width: auto;
    min-width: min(228px, 74vw);
    max-width: 272px;
    justify-content: center;
  }
  .article-related { padding: 40px 0 20px; }
}

/* =========================================================
   CENTER (center detail) — hero + overlap like article
   ========================================================= */
.center-page { background: #fff; }

.page-center .header--detail {
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
@media (max-width: 900px) {
  .page-center .header--detail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }
  .page-center .header--detail:not(.is-scrolled) .nav__link { color: rgba(255, 255, 255, 0.94); }
  .page-center .header--detail:not(.is-scrolled) .nav__link:hover { color: #fff; }
  .page-center .header--detail:not(.is-scrolled) .btn--primary {
    background: rgba(255, 255, 255, 0.94);
    color: var(--accent-ink);
  }
  .page-center .header--detail:not(.is-scrolled) .menu-toggle span { background: #fff; }
  .page-center .header--detail.is-scrolled {
    position: sticky;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .page-center .header--detail.is-scrolled .nav__link { color: var(--ink-soft); }
  .page-center .header--detail.is-scrolled .nav__link:hover { color: var(--ink); }
  .page-center .header--detail.is-scrolled .btn--primary { background: var(--accent); color: #fff; }
  .page-center .header--detail.is-scrolled .menu-toggle span { background: var(--ink); }
}

.center-layout { display: flex; flex-direction: column; }

.center__media {
  order: 1;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #0a3f3a;
}
.center__media-img { display: block; width: 100%; object-fit: cover; }
.center__media[hidden] { display: none; }

.center__head { order: 2; background: #fff; }
.center__head-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 0;
}
.center__main {
  order: 3;
  background: #fff;
  width: 100%;
}
.center__crumb { margin-bottom: 20px; }

.center__head .detail-head { margin-bottom: 8px; }
.center__head .detail-head h1 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -.03em;
  line-height: 1.1;
}
.center__head .detail-sub { margin-bottom: 0; }

@media (min-width: 901px) {
  .page-center .header--detail { position: sticky; }
  .center__head-inner { padding: 40px 24px 0; }
  .center__media {
    order: 2;
    width: min(1100px, 92vw);
    margin: 28px auto 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(17, 17, 19, 0.1);
  }
  .center__media-img { aspect-ratio: 16 / 9; min-height: 0; }
  .center__head { order: 1; }
  .center__main { order: 3; }
  .center-page .detail { padding-top: 8px; }
}

@media (max-width: 900px) {
  .center-page {
    --center-pad-x: max(24px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  }

  .center-layout { isolation: isolate; }

  .center__media {
    position: sticky;
    top: 0;
    z-index: 0;
    width: 100%;
    padding-top: env(safe-area-inset-top, 0px);
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }
  .center__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(8, 58, 54, 0.18) 42%,
      rgba(8, 58, 54, 0.52) 100%
    );
    pointer-events: none;
    z-index: 1;
  }
  .center__media-img {
    min-height: min(56svh, 440px);
    max-height: min(56svh, 440px);
    height: min(56svh, 440px);
  }

  .center__head {
    margin-top: -48px;
    padding-top: 6px;
    border-radius: 28px 28px 0 0;
    position: relative;
    z-index: 3;
    background: #fff;
    box-shadow:
      0 -16px 48px rgba(0, 0, 0, 0.14),
      0 -2px 0 rgba(255, 255, 255, 0.9);
  }
  .center__head-inner {
    padding: 26px var(--center-pad-x) 0;
    box-sizing: border-box;
    width: 100%;
  }
  .center__crumb {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px 6px;
  }
  .center__crumb span:last-of-type,
  .center__crumb span:nth-last-of-type(2) { display: none; }

  .center__head .detail-head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 12px;
  }
  .center__head .detail-head h1 {
    font-size: clamp(28px, 7.8vw, 38px);
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .center__head .detail-sub {
    font-size: 16px;
    max-width: 100%;
  }

  .center__main {
    position: relative;
    z-index: 3;
    background: #fff;
  }
  .center__main .container {
    padding-left: var(--center-pad-x);
    padding-right: var(--center-pad-x);
    box-sizing: border-box;
  }
  .center-page .detail { padding: 0 0 24px; }
  .spec__value { overflow-wrap: anywhere; word-break: break-word; }

  .page-center--no-cover .center__head {
    margin-top: calc(env(safe-area-inset-top, 0px) + 16px);
    border-radius: 0;
    box-shadow: none;
  }
  .page-center--no-cover .center__media { position: relative; }
}

@media (max-width: 640px) {
  .center-page { --center-pad-x: max(22px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
  .center__head-inner { padding-top: 24px; }
}

/* =========================================================
   SPLASH (homepage) + logo mark
   ========================================================= */
body.splash-active { overflow: hidden; }
html.splash-active,
body.splash-active {
  background: #083a36;
  background: var(--bg-gradient-teal);
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient-teal);
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  padding:
    calc(env(safe-area-inset-top, 0px) + 24px)
    max(28px, env(safe-area-inset-left, 0px))
    calc(env(safe-area-inset-bottom, 0px) + 24px)
    max(28px, env(safe-area-inset-right, 0px));
  transition: opacity .55s var(--ease), visibility .55s;
}
.splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash__inner {
  text-align: center;
  animation: splash-in .85s var(--ease) both;
}
.splash__logo {
  display: block;
  width: clamp(92px, 24vw, 132px);
  height: clamp(92px, 24vw, 132px);
  margin: 0 auto 30px;
  object-fit: contain;
  filter: drop-shadow(0 10px 36px rgba(0, 0, 0, 0.28));
}
.splash__title {
  font-family: "Onest", var(--font);
  font-size: clamp(18px, 4.8vw, 24px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.96);
  max-width: 18ch;
  margin: 0 auto;
  text-wrap: balance;
}

@keyframes splash-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

