/* web/static/css/guides.css
   Гайды поверх site.css: список /guides (gl-*) и статья /guides/{slug} (ga-*, блоки из render.go — gtool, gitem, gnote).
   Первый экран и ячейки — как на /documents и /check (hero--page, hfacts). */
:root { --band: #F7F7F8; }
.page .h2 { font: 500 40px/1.1 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.page .lead { margin-top: 12px; max-width: 38em; font-size: 18px; color: var(--text2); }
.page .section { padding: 88px 0; }
.section--band { background: var(--band); }

/* ---------- первый экран ---------- */
.hero.hero--page { padding-bottom: 0; }
.hero.hero--page::before { content: ""; position: absolute; left: 50%; top: -300px; bottom: auto; width: 1000px; height: 640px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(216, 242, 106, .22), transparent); pointer-events: none; }
.hero--page .hero__body { position: relative; max-width: 1000px; margin: 0 auto; padding: 64px 0 0; text-align: center; }
.hero__kicker { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--on-dark); font-size: 14px; text-decoration: none; }
a.hero__kicker:hover { color: #fff; }
.hero--page .hero__title { margin: 22px auto 0; max-width: 15em; font: 500 52px/1.06 var(--display); letter-spacing: -0.04em; text-wrap: balance; }
.hero--page .hero__lead { margin: 22px auto 0; max-width: 32em; color: var(--on-dark); font-size: 18px; }
.hero--page .gl-hero, .ga-hero--bare .hero__body { padding-bottom: 80px; }
.gl-search { margin-top: 32px; }

.hfacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 64px; border-top: 1px dashed rgba(255, 255, 255, .18); text-align: left; }
.hfacts--1 { grid-template-columns: 1fr; }
.hfacts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hfacts--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hfacts__cell { position: relative; padding: 26px 24px 40px; color: #fff; text-decoration: none; transition: background-color .15s; }
.hfacts__cell + .hfacts__cell { border-left: 1px dashed rgba(255, 255, 255, .18); }
.hfacts__cell--link:hover { background: rgba(255, 255, 255, .04); }
.hfacts__cell--link::after { content: "↓"; position: absolute; right: 20px; top: 28px; color: var(--on-dark-2); transition: transform .15s, color .15s; }
.hfacts__cell--link:hover::after { color: var(--lime); transform: translateY(3px); }
.hfacts__num { padding-right: 18px; font: 500 26px/1.1 var(--display); letter-spacing: -0.03em; }
.hfacts__num--lime { color: var(--lime); }
.hfacts__num--red { color: #F07A66; }
.hfacts__label { margin-top: 8px; color: var(--on-dark); font-size: 14.5px; line-height: 1.45; }

/* ---------- список ---------- */
.gl-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 28px; }
.gl-tool { display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 20px; border-radius: 20px; background: var(--fog); color: var(--ink); text-decoration: none; transition: background-color .15s; }
.gl-tool:hover { background: #ECEDEF; }
.gl-tool__ico { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; border-radius: 12px; background: var(--ink); }
.gl-tool__ico svg { width: 20px; height: 20px; fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gl-tool b { font: 500 16px/1.3 var(--display); letter-spacing: -0.01em; }
.gl-tool span { font-size: 14px; color: var(--text2); }
.gl-tool--main { background: var(--lime); }
.gl-tool--main:hover { background: var(--lime-hover); }
.gl-tool--main span { color: #3A4012; }
.page .gl-list { padding-top: 0; border-top: 0; } /* продолжение блока инструментов — без линии между ними */
.section + .section--band { border-top: 0; }

.gl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.gl-chip { padding: 9px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--text2); font-size: 14.5px; line-height: 1.2; text-decoration: none; }
.gl-chip:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.gl-chip--on, .gl-chip--on:hover { background: var(--ink); box-shadow: none; color: #fff; }

.gl-feat { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-top: 28px; }
.gl-feat--solo { grid-template-columns: 1fr; }
.gl-big { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 340px; padding: 32px; border-radius: var(--r-panel); background: var(--ink); color: #fff; text-decoration: none; overflow: hidden; }
.gl-big::before { content: ""; position: absolute; right: -200px; top: -220px; width: 600px; height: 500px; background: radial-gradient(closest-side, rgba(216, 242, 106, .28), transparent); }
.gl-big > * { position: relative; }
.gl-big h3 { margin-top: 14px; max-width: 15em; font: 500 30px/1.12 var(--display); letter-spacing: -0.03em; }
.gl-big p { margin-top: 12px; max-width: 32em; color: var(--on-dark); }
.gl-big .gl-tag { background: rgba(255, 255, 255, .1); color: var(--on-dark); }
.gl-big .gl-has { color: var(--lime); }
.gl-side { display: grid; gap: 16px; }
.gl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.gl-chips + .gl-grid { margin-top: 28px; }
.gl-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; transition: box-shadow .15s; }
.gl-card:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.gl-card h3 { font: 500 19px/1.3 var(--display); letter-spacing: -0.015em; }
.gl-card p { font-size: 15px; color: var(--text2); }
.gl-tag { align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: var(--fog); color: var(--text2); font-size: 13.5px; line-height: 1.2; }
.gl-has { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; color: var(--ok-ink); font-size: 14px; }
.gl-has i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.gl-big .gl-has { margin-top: 18px; }
.gl-empty { margin-top: 24px; color: var(--text2); }
.gl-empty[hidden], [data-guide][hidden], .gl-feat[hidden], .gl-side[hidden], .gl-grid[hidden] { display: none; }

.gl-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 28px; }
.gl-group b { display: block; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); font: 500 17px/1.3 var(--display); }
.gl-group a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text2); font-size: 15px; text-decoration: none; }
.gl-group a:hover { color: var(--ink); }

/* ---------- статья ---------- */
.ga { max-width: 768px; margin: 0 auto; padding: 56px 24px 96px; }
.ga-upd { color: var(--muted); font-size: 14px; }
.ga-preview { margin-bottom: 28px; padding: 18px 22px; border-radius: 16px; background: #FFF4DB; font-size: 15px; }
.ga-preview ul { margin: 8px 0 0; padding-left: 18px; list-style: disc; color: #6B4E00; }
.ga-preview span { display: block; margin-top: 4px; color: var(--text2); }
.ga-short { margin-top: 24px; padding: 26px 28px; border-radius: 22px; background: var(--fog); }
.ga-short b { font: 500 17px/1.3 var(--display); }
.ga-short ul { display: grid; gap: 8px; margin-top: 12px; }
.ga-short li { position: relative; padding-left: 22px; color: var(--text2); }
.ga-short li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }

.ga-prose { font-size: 17.5px; line-height: 1.7; }
.ga-prose > :first-child { margin-top: 40px; }
.ga-prose h2 { margin: 56px 0 0; font: 500 30px/1.15 var(--display); letter-spacing: -0.03em; text-wrap: balance; scroll-margin-top: 24px; }
.ga-prose h3 { margin: 32px 0 0; font: 500 20px/1.3 var(--display); letter-spacing: -0.015em; }
.ga-prose p { margin-top: 16px; }
.ga-prose ul, .ga-prose ol { margin: 14px 0 0; padding-left: 0; display: grid; gap: 8px; }
.ga-prose ul > li { position: relative; padding-left: 24px; list-style: none; }
.ga-prose ul > li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.ga-prose ol { padding-left: 24px; list-style: decimal; }
.ga-prose a:not(.btn) { color: var(--ink); }
.ga-prose strong { font-weight: 600; }
.ga-prose blockquote { margin: 24px 0 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--lime); color: var(--text2); }
.ga-prose img { display: block; max-width: 100%; height: auto; margin-top: 24px; border-radius: 16px; }
.ga-prose table { width: 100%; margin-top: 20px; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.ga-prose th { padding: 10px 12px 10px 0; border-bottom: 1.5px solid var(--ink); color: var(--muted); font-size: 14px; font-weight: 500; text-align: left; }
.ga-prose td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ga-prose td:last-child { font-weight: 600; white-space: nowrap; }
.ga-prose code { padding: 2px 6px; border-radius: 6px; background: var(--fog); font-size: .9em; }

/* блоки из меток */
/* проверка сайта — тёмная карточка, как первый экран; ход проверки (pipe) — в тёмной теме главной */
.gtool { position: relative; overflow: hidden; margin-top: 40px; padding: 36px; border-radius: var(--r-panel); background: var(--ink); color: #fff; font-size: 16px; line-height: 1.55; scroll-margin-top: 24px; }
.gtool::before { content: ""; position: absolute; right: -220px; top: -260px; width: 640px; height: 520px; background: radial-gradient(closest-side, rgba(216, 242, 106, .24), transparent); pointer-events: none; }
.gtool > * { position: relative; }
.gtool__title { margin: 0; font: 500 26px/1.15 var(--display); letter-spacing: -0.03em; }
.ga-prose .gtool__text { margin-top: 10px; max-width: 34em; color: var(--on-dark); }
.gtool .scan { --frame: transparent; max-width: none; margin: 24px 0 0; }
.gtool .scan__error { max-width: none; margin-left: 0; }
.ga-prose .gtool__note { margin-top: 12px; color: var(--on-dark-2); font-size: 13.5px; }
.gtool .pipe { max-width: none; margin-top: 20px; }
.gtool__btn { margin-top: 22px; }
/* ИНН и призывы — лаймовые */
.gtool--lime { background: var(--lime); color: var(--ink); }
.gtool--lime::before { display: none; }
.ga-prose .gtool--lime .gtool__text { color: #3A4012; }
.gtool--lime .scan { --frame: rgba(23, 24, 26, .15); }
.gtool--lime .scan__error { color: #B23A27; }

.gitem { margin-top: 24px; padding: 24px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; line-height: 1.6; }
.gitem__top { display: flex; gap: 14px; align-items: flex-start; }
.gitem__n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font: 500 14px/1 var(--display); }
.gitem__body { min-width: 0; }
.ga-prose .gitem__title { margin: 4px 0 0; font: 500 19px/1.3 var(--display); }
.ga-prose .gitem__body p { margin-top: 10px; color: var(--text2); }
.gitem__foot { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.gitem__foot span { color: var(--muted); }
.gitem__foot b { color: var(--bad); font-weight: 600; }
.gitem__foot a { margin-left: auto; color: var(--ink); }
.gnote { margin-top: 24px; padding: 22px 26px; border-radius: 20px; background: var(--fog); font-size: 16px; }
.ga-prose .gnote > :first-child { margin-top: 0; }

.ga-faq { margin-top: 56px; }
.ga-faq h2 { font: 500 30px/1.15 var(--display); letter-spacing: -0.03em; }
.ga-faq details { padding: 18px 0; border-bottom: 1px solid var(--line); }
.ga-faq summary { display: flex; justify-content: space-between; gap: 20px; font-size: 17px; font-weight: 500; cursor: pointer; list-style: none; }
.ga-faq summary::-webkit-details-marker { display: none; }
.ga-faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
.ga-faq details[open] summary::after { content: "−"; }
.ga-faq details p { margin-top: 10px; color: var(--text2); }

.ga-next { display: block; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.ga-next > b { font: 500 17px/1.3 var(--display); }
.ga-next__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }

@media (max-width: 960px) {
  .gl-feat, .gl-grid, .gl-groups { grid-template-columns: 1fr; }
  .hfacts--4, .hfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hfacts--1 { grid-template-columns: 1fr; }
  .hfacts__cell:nth-child(2n+1) { border-left: 0; }
  .hfacts__cell:nth-child(n+3) { border-top: 1px dashed rgba(255, 255, 255, .18); }
}
@media (max-width: 640px) {
  .page .section { padding: 64px 0; }
  .page .h2 { font-size: clamp(26px, 7vw, 40px); }
  .hero--page .hero__body { padding-top: 40px; }
  .hero--page .hero__title { font-size: clamp(28px, 8.4vw, 52px); hyphens: auto; }
  .hfacts, .hfacts--4 { grid-template-columns: 1fr; margin-top: 44px; }
  .hfacts__cell { padding: 18px 0; }
  .hfacts__cell + .hfacts__cell { border-left: 0; border-top: 1px dashed rgba(255, 255, 255, .18); }
  .hfacts__cell--link::after { right: 0; top: 20px; }
  .gl-big { min-height: 280px; padding: 24px; }
  .gl-big h3 { font-size: 24px; }
  .ga { padding-top: 40px; }
  .ga-prose h2, .ga-faq h2 { font-size: 24px; }
  .gtool { padding: 22px; }
  .gitem { padding: 18px; }
  .gitem__foot a { margin-left: 0; }
  .ga-next__grid { grid-template-columns: 1fr; }
}

/* ответ реестра внутри статьи: отступы абзацев статьи карточке не нужны */
.ga-prose .rres__text { margin-top: 0; }
.ga-prose .rres__fine, .ga-prose .rres__note { margin-top: 10px; }
