/* ============================================================
   GUIDE LONGREAD — редакционный стиль для статей раздела «Гид».
   Отдельная система, НЕ переиспользует компоненты инструментов:
   узкая колонка для чтения, крупная типографика, врезки «Ключевое»
   в конце каждого раздела (как у референса), FAQ.
   Токены (--teal, --navy, --gold, --text…) — глобальные из _bundle.css.
   ============================================================ */

.gd { --gd-measure: 62rem; --gd-wide: 1300px; --gd-pad: 24px; --gd-gap: 2.4rem; color: var(--text); }

/* ---------- HERO ---------- */
.gd-hero {
  position: relative;
  padding: 9rem 0 2.8rem;   /* верх = clearance под fixed-навбар, как у .pa-hero */
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(14,165,165,.10), transparent 60%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.gd-hero__inner { max-width: 72rem; margin: 0 auto; padding: 0 var(--gd-pad);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.gd-hero__text { min-width: 0; }
.gd-hero__media { min-width: 0; }
.gd-hero__media-frame {
  aspect-ratio: 5 / 4; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(135deg, #e8eef6, #dbe6f2); box-shadow: var(--sh-lg);
}
.gd-hero__media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gd-crumbs { font-size: .82rem; color: var(--text-muted); margin-bottom: 1.4rem; letter-spacing: .01em; }
.gd-crumbs a { color: var(--text-muted); text-decoration: none; }
.gd-crumbs a:hover { color: var(--teal); }
.gd-eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .74rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--teal); background: var(--teal-dim);
  padding: .42em .9em; border-radius: 100px; margin-bottom: 1.1rem;
}
.gd-title {
  font-family: var(--font-body);
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.08; font-weight: 800; letter-spacing: -.02em;
  color: var(--navy); margin: 0 0 1rem; max-width: 20ch;
}
.gd-deck {
  font-size: clamp(1.06rem, 2.2vw, 1.28rem); line-height: 1.55;
  color: var(--text-muted); max-width: 40rem; margin: 0 0 1.5rem;
}
.gd-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center;
  font-size: .84rem; color: var(--text-muted); padding-top: 1.1rem; border-top: 1px solid var(--border); }
.gd-meta__item { display: inline-flex; align-items: center; gap: .4em; }
.gd-meta__item .material-symbols-outlined { font-size: 1.05rem; color: var(--teal); }


/* ---------- BODY: узкая читаемая колонка ---------- */
.gd-body { max-width: 72rem; margin: 0 auto; padding: 2.8rem var(--gd-pad) 1rem; }
.gd-body > p {
  font-size: 1.17rem; line-height: 1.85; color: #26313f;
  margin: 0 0 1.35em; letter-spacing: -.003em;
}
.gd-body > p strong { color: var(--navy); font-weight: 700; }
.gd-lead { font-size: 1.24rem !important; line-height: 1.72 !important; color: #1e2a38 !important; }
.gd-lead::first-letter {
  float: left; font-size: 3.6rem; line-height: .82; font-weight: 800;
  color: var(--teal); margin: .06em .12em 0 0; font-family: var(--font-body);
}

.gd-h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; letter-spacing: -.015em;
  color: var(--navy); line-height: 1.2; margin: 2.6rem 0 1rem; padding-top: .4rem;
  scroll-margin-top: 6rem;
}
.gd-h2:first-of-type { margin-top: .6rem; }
.gd-h3 { font-size: 1.16rem; font-weight: 700; color: var(--navy); margin: 1.8rem 0 .7rem; }

/* Контекстная инлайн-ссылка на инструмент/статью (сплошное подчёркивание —
   визуально отличается от медтерминов с пунктиром и тултипом) */
.gd-ilink {
  color: var(--teal-ink, #107373); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 2px; text-decoration-color: rgba(16,115,115,.4);
  transition: color .15s, text-decoration-color .15s;
}
.gd-ilink:is(:hover, :focus) { color: var(--teal); text-decoration-color: currentColor; }

.gd-body ul.gd-list { margin: 0 0 1.4em; padding: 0; list-style: none; }
.gd-list li { position: relative; padding-left: 1.7em; margin-bottom: .7em; font-size: 1.08rem; line-height: 1.65; color: #2c3846; }
.gd-list li::before {
  content: ''; position: absolute; left: .2em; top: .62em; width: .5em; height: .5em;
  border-radius: 50%; background: var(--teal);
}

/* ---------- Содержание (table of contents) ---------- */
.gd-toc {
  max-width: 52rem; margin: 2rem 0 2.6rem; padding: 1.3rem 1.6rem 1.4rem;
  background: var(--bg-chrome); border: 1px solid var(--border); border-radius: 14px;
}
.gd-toc__title {
  display: flex; align-items: center; gap: .5em;
  font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: .9rem;
}
.gd-toc__title .material-symbols-outlined { font-size: 1.15rem; color: var(--teal); }
.gd-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: gdtoc; }
.gd-toc li { counter-increment: gdtoc; }
.gd-toc a {
  display: flex; gap: .8em; align-items: baseline; text-decoration: none;
  color: #2c3846; font-size: 1.06rem; line-height: 1.45; padding: .34em 0;
  border-bottom: 1px solid rgba(0,0,0,.05); transition: color .15s;
}
.gd-toc li:last-child a { border-bottom: none; }
.gd-toc a::before { content: counter(gdtoc); font-weight: 800; color: var(--teal); min-width: 1.5em; }
.gd-toc a:hover { color: var(--teal); }

/* ---------- Источники ---------- */
.gd-sources { max-width: 52rem; margin: 2.4rem 0 0; }
.gd-sources__title {
  font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; letter-spacing: -.015em;
  color: var(--navy); margin: 2.6rem 0 1rem;
}
.gd-sources ol { margin: 0; padding-left: 1.5em; }
.gd-sources li { font-size: .95rem; line-height: 1.6; color: var(--text-muted); margin-bottom: .75em; }
.gd-sources li:last-child { margin-bottom: 0; }
.gd-sources cite { font-style: italic; color: #46525f; }
.gd-sources a { color: var(--teal-ink, #107373); text-decoration: none; word-break: break-word; }
.gd-sources a:hover { text-decoration: underline; }

/* ---------- Врезка «Ключевое» (per-section key points) ---------- */
.gd-key {
  margin: 1.8rem 0 2.2rem; padding: 1.3rem 1.5rem 1.4rem;
  background: linear-gradient(180deg, rgba(14,165,165,.07), rgba(14,165,165,.03));
  border: 1px solid rgba(14,165,165,.22); border-left: 4px solid var(--teal);
  border-radius: 12px;
}
.gd-key__label {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); margin-bottom: .8rem;
}
.gd-key__label .material-symbols-outlined { font-size: 1.1rem; }
.gd-key ul { margin: 0; padding: 0; list-style: none; }
.gd-key li { position: relative; padding-left: 1.9em; margin-bottom: .6em; font-size: 1.02rem; line-height: 1.55; color: #223; }
.gd-key li:last-child { margin-bottom: 0; }
.gd-key li::before {
  content: 'check'; font-family: 'Material Symbols Outlined'; font-size: 1.15em;
  position: absolute; left: 0; top: -.02em; color: var(--teal); font-weight: 500;
}

/* ---------- Практическая врезка / примечание ---------- */
.gd-note {
  display: flex; gap: 1rem; margin: 1.8rem 0; padding: 1.2rem 1.4rem;
  background: var(--bg-chrome); border-radius: 12px; border: 1px solid var(--border);
}
.gd-note--warn { background: var(--gold-dim); border-color: rgba(240,165,0,.3); }
.gd-note__icon { flex-shrink: 0; width: 2.2rem; height: 2.2rem; border-radius: 8px;
  display: grid; place-items: center; background: #fff; box-shadow: var(--sh-sm); }
.gd-note__icon .material-symbols-outlined { font-size: 1.3rem; color: var(--teal); }
.gd-note--warn .gd-note__icon .material-symbols-outlined { color: var(--gold); }
.gd-note__body { font-size: 1.02rem; line-height: 1.6; color: #2c3846; }
.gd-note__body strong { color: var(--navy); }

/* ---------- Стартовый блок / шаги ---------- */
.gd-steps { margin: 1.6rem 0 2rem; display: grid; gap: .8rem; }
.gd-step { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.2rem;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--sh-sm); }
.gd-step__n { flex-shrink: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .95rem;
  color: #fff; background: var(--teal); }
.gd-step__t { font-weight: 700; color: var(--navy); margin-bottom: .15em; }
.gd-step__d { font-size: 1rem; line-height: 1.55; color: var(--text-muted); }

/* ---------- Изображение: СВЕТЛЫЙ плейсхолдер, деградирует мягко ---------- */
.gd-figure { margin: 2rem 0; }
.gd-figure__frame {
  aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(135deg, #eaf0f7, #dde8f3);
  display: grid; place-items: center;
}
.gd-figure__frame img { width: 100%; height: 100%; object-fit: cover; }
.gd-figcaption { font-size: .9rem; color: var(--text-muted); margin-top: .7rem; line-height: 1.5; text-align: center; }

/* ---------- FAQ (схлопывающийся) ---------- */
.gd-faq { margin: 1.4rem 0 0; max-width: 52rem; border-top: 1px solid var(--border); }
.gd-faq__item { border-bottom: 1px solid var(--border); }
.gd-faq__q {
  list-style: none; cursor: pointer; position: relative;
  font-weight: 700; color: var(--navy); font-size: 1.1rem; line-height: 1.4;
  padding: 1.15rem 2.4rem 1.15rem 0; user-select: none;
  transition: color .15s;
}
.gd-faq__q::-webkit-details-marker { display: none; }
.gd-faq__q:hover { color: var(--teal); }
.gd-faq__q::after {
  content: 'expand_more'; font-family: 'Material Symbols Outlined';
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--teal); transition: transform .25s var(--ease-smooth);
}
.gd-faq__item[open] .gd-faq__q::after { transform: translateY(-50%) rotate(180deg); }
.gd-faq__a { font-size: 1.05rem; line-height: 1.68; color: #2c3846; padding: 0 2.4rem 1.2rem 0; margin-top: -.2rem; }

/* ---------- CTA в калькулятор ---------- */
.gd-cta {
  display: flex; align-items: center; gap: 1.2rem; margin: 2.4rem 0;
  padding: 1.4rem 1.6rem; border-radius: var(--r-lg); text-decoration: none;
  background: linear-gradient(120deg, var(--navy), var(--navy-mid));
  color: #fff; box-shadow: var(--sh-lg); transition: transform .25s var(--ease-spring);
}
.gd-cta:hover { transform: translateY(-3px); }
.gd-cta, .gd-cta:hover, .gd-cta:focus { color: #fff; }  /* глушим глобальный a:hover, красящий ссылку в тёмный */
.gd-cta__icon { flex-shrink: 0; width: 3rem; height: 3rem; border-radius: 12px;
  display: grid; place-items: center; background: rgba(255,255,255,.12); }
.gd-cta__icon .material-symbols-outlined { font-size: 1.7rem; color: var(--teal-light); }
.gd-cta__eyebrow { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-light); }
.gd-cta__title { display: block; font-size: 1.2rem; font-weight: 800; margin: .1em 0 .25em; color: #fff; }
.gd-cta__text { display: block; font-size: .96rem; line-height: 1.5; color: rgba(255,255,255,.8); }
.gd-cta__go { margin-left: auto; flex-shrink: 0; align-self: center; font-weight: 700; color: var(--teal-light); white-space: nowrap; }

/* ---------- Related ---------- */
.gd-related { max-width: 72rem; margin: 2.4rem auto 0; padding: 0 var(--gd-pad); }
.gd-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.gd-related__card { text-decoration: none; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-sm); transition: transform .2s var(--ease-spring), box-shadow .2s; }
.gd-related__card:hover { transform: translateY(-3px); box-shadow: var(--sh); }
.gd-related__cover { aspect-ratio: 16/10; background: linear-gradient(135deg, #eaf0f7, #dde8f3); overflow: hidden; }
.gd-related__cover img { width: 100%; height: 100%; object-fit: cover; }
.gd-related__body { padding: .9rem 1.1rem 1.1rem; }
.gd-related__kicker { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.gd-related__title { font-weight: 700; color: var(--navy); margin: .3em 0 .25em; line-height: 1.25; }
.gd-related__sub { font-size: .9rem; color: var(--text-muted); line-height: 1.45; }

.gd-disclaimer { max-width: 72rem; margin: 2rem auto 0; padding: 1rem var(--gd-pad);
  font-size: .86rem; line-height: 1.55; color: var(--text-muted); text-align: center; }

@media (max-width: 860px) {
  .gd-hero { padding: 7.5rem 0 2.2rem; }
  .gd-hero__inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .gd-hero__media-frame { aspect-ratio: 16 / 9; max-height: 42vh; }
}
@media (max-width: 640px) {
  .gd-related__grid { grid-template-columns: 1fr; }
  .gd-cta { flex-wrap: wrap; }
  .gd-cta__go { margin-left: 0; width: 100%; }
  .gd-lead::first-letter { font-size: 3rem; }
}
