/* ==========================================================================
   Руководство «Как работать с Gargona» (/guide).

   Отдельный файл по той же причине, что и legal.css: landing.css — один сплошной
   блок стилей маркетинговой страницы, и дописывать в него разделы, к маркетингу не
   относящиеся, значит смешивать две несвязанные вещи в файле, который правится
   целиком. Переменные берутся из landing.css — палитра у сайта одна.
   ========================================================================== */

.guide { --guide-max: 54rem; }

/* --- Шапка документа ---------------------------------------------------- */
.guide-hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 420px at 12% -10%, rgba(137, 124, 242, .18), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.guide-hero-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3rem;
}
.guide-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  transition: color .16s ease;
}
.guide-back:hover { color: var(--text); }
.guide-back svg { width: 15px; height: 15px; }
.guide-kicker {
  margin: 1.9rem 0 .7rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--purple-3);
}
.guide-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.guide-lead {
  margin: 1.1rem 0 0;
  max-width: 46rem;
  font-size: clamp(15.5px, 1.6vw, 18px);
  line-height: 1.6;
  color: var(--muted);
}
.guide-meta {
  margin: 1.4rem 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
}

/* --- Раскладка: оглавление слева, документ справа ------------------------ */
.guide-body {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4.5rem;
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.guide-toc {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding-right: .4rem;
}
.guide-toc strong {
  display: block;
  margin-bottom: .8rem;
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.guide-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  border-left: 1px solid var(--line);
}
.guide-toc li { counter-increment: toc; }
.guide-toc ol a {
  display: block;
  padding: .38rem 0 .38rem .85rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.35;
  text-decoration: none;
  transition: color .16s ease, border-color .16s ease;
}
.guide-toc ol a::before {
  content: counter(toc) ". ";
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
}
.guide-toc ol a:hover { color: var(--text); }
.guide-toc ol a.is-on { color: var(--text); border-left-color: var(--purple); }
.guide-toc-cta {
  display: block;
  margin-top: 1.4rem;
  padding: .6rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--fill);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease;
}
.guide-toc-cta:hover { border-color: var(--purple); background: rgba(137, 124, 242, .18); }

.guide-content { max-width: var(--guide-max); min-width: 0; }

/* --- Разделы ------------------------------------------------------------- */
.guide-section { scroll-margin-top: 5.5rem; padding-top: 2.6rem; }
.guide-section:first-child { padding-top: 0; }
.guide-section + .guide-section { border-top: 1px solid var(--line); }
.guide-section h2 {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.guide-section-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--fill);
  color: var(--purple-3);
}
.guide-section-icon svg { width: 19px; height: 19px; }
.guide-section h3 {
  margin: 2rem 0 .8rem;
  font-size: 16.5px;
  font-weight: 650;
  color: var(--text);
}
.guide-section p { margin: 0 0 1rem; color: var(--muted); line-height: 1.68; font-size: 15px; }
.guide-p-lead { font-size: 16.5px !important; color: var(--text) !important; }

/* --- Списки -------------------------------------------------------------- */
.guide-ul { margin: 0 0 1.2rem; padding: 0; list-style: none; }
.guide-ul li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .6rem;
  color: var(--muted);
  line-height: 1.62;
  font-size: 15px;
}
.guide-ul li::before {
  content: "";
  position: absolute;
  left: .25rem;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple);
}

.guide-steps { margin: 0 0 1.2rem; padding: 0; list-style: none; counter-reset: step; }
.guide-steps li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: .7rem .9rem;
  margin-bottom: .5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
}
.guide-step-n {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--fill);
  border: 1px solid var(--line-strong);
  color: var(--purple-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

.guide-check { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.guide-check li {
  position: relative;
  padding: .6rem .9rem .6rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.5;
}
.guide-check li::before {
  content: "";
  position: absolute;
  left: .9rem;
  top: .78rem;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid var(--line-strong);
}

/* --- Врезка -------------------------------------------------------------- */
.guide-callout {
  display: flex;
  gap: .85rem;
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 184, 107, .28);
  border-radius: var(--radius-sm);
  background: rgba(255, 184, 107, .07);
}
.guide-callout-icon { flex: 0 0 auto; color: var(--orange); }
.guide-callout-icon svg { width: 19px; height: 19px; display: block; }
.guide-callout strong { display: block; margin-bottom: .3rem; font-size: 14.5px; color: var(--text); }
.guide-callout p { margin: 0 !important; font-size: 14.5px !important; line-height: 1.6 !important; }

/* --- Плитка с иконками --------------------------------------------------- */
.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: .7rem;
  margin: 1.4rem 0 1.6rem;
}
.guide-card {
  display: grid;
  gap: .35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.guide-card-icon { color: var(--purple-3); }
.guide-card-icon svg { width: 20px; height: 20px; display: block; }
.guide-card b { font-size: 13px; color: var(--text); }
.guide-card span:last-child { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* --- Ссылка-чип ---------------------------------------------------------- */
.guide-link-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 1.2rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .16s ease;
}
.guide-link-chip:hover { border-color: var(--purple); }
.guide-link-chip svg { width: 14px; height: 14px; color: var(--purple-3); }

/* --- Таблицы ------------------------------------------------------------- */
.guide-table-wrap {
  margin: 0 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.guide-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 34rem; }
.guide-table th {
  padding: .7rem .95rem;
  text-align: left;
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--faint);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.guide-table td {
  padding: .78rem .95rem;
  vertical-align: top;
  color: var(--muted);
  line-height: 1.55;
  border-bottom: 1px solid var(--line);
}
.guide-table tr:last-child td { border-bottom: 0; }
.guide-td-lead { color: var(--text); font-weight: 600; }
.guide-table tbody tr:hover td { background: rgba(137, 124, 242, .045); }

/* --- Скриншот ------------------------------------------------------------ */
.guide-shot { margin: 1.6rem 0 1.8rem; }
.guide-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.guide-shot figcaption {
  margin-top: .7rem;
  font-size: 13px;
  color: var(--faint);
  line-height: 1.5;
}

/* --- Финальный призыв ---------------------------------------------------- */
.guide-cta {
  margin-top: 3.2rem;
  padding: 2rem 1.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(700px 260px at 20% 0%, rgba(137, 124, 242, .2), transparent 65%),
    var(--surface-solid);
  text-align: center;
}
.guide-cta h2 { margin: 0 0 .6rem; font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 26px); }
.guide-cta p { margin: 0 auto 1.4rem; max-width: 34rem; color: var(--muted); line-height: 1.6; }
.guide-cta-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* --- Узкие экраны -------------------------------------------------------- */
@media (max-width: 960px) {
  .guide-body { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .guide-toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
  }
  .guide-toc ol { columns: 2; column-gap: 1.2rem; border-left: 0; }
  .guide-toc ol a { border-left: 0; padding-left: 0; }
  .guide-toc ol a.is-on { color: var(--purple-3); }
  .guide-toc-cta { display: none; }
}
@media (max-width: 560px) {
  .guide-toc ol { columns: 1; }
  .guide-section h2 { gap: .6rem; }
  .guide-section-icon { width: 2rem; height: 2rem; border-radius: 10px; }
}
