/**
 * Модуль 5: юридические страницы (/privacy-policy/, /terms/).
 * Дизайн по референсу verifystring.test в стиле sunday: hero + плавающий TOC +
 * summary-карточка + нумерованные секции-карточки. Baloo 2 (дисплей) + Manrope (текст),
 * палитра orange/sky. Единый контейнер .site-container (хедер = контент = футер).
 */

.ibd-lg-main {
    --lg-orange: #f5820a;
    --lg-deep:   #dc7000;
    --lg-terra:  #e8785b;
    --lg-sky:    #2e86c1;
    --lg-sky-bg: #eaf4fb;
    --lg-ink:    #1e2a32;
    --lg-muted:  #5b7385;
    --lg-line:   #e3ecf2;
    --lg-card:   #fff;

    background: transparent;
    color: var(--lg-ink);
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    line-height: 1.62;
}

.ibd-lg-main * { box-sizing: border-box; }

/* ── HERO ─────────────────────────────────────────────────────────────── */
.ibd-lg-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 42px;
    background: linear-gradient(180deg, #f4fafd 0%, var(--lg-sky-bg) 100%);
    border-bottom: 1px solid var(--lg-line);
}
.ibd-lg-hero-glow {
    position: absolute;
    top: -160px;
    inset-inline-end: -120px;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(245, 130, 10, .18), transparent 62%);
    pointer-events: none;
    z-index: 0;
}
.ibd-lg-hero-inner { position: relative; z-index: 1; }

.ibd-lg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d9ebf9;
    color: var(--lg-sky);
    font-weight: 800;
    font-size: 12.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: 0 4px 14px -8px rgba(46, 134, 193, .4);
}
.ibd-lg-h1 {
    margin: 18px 0 0;
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--lg-ink);
}
.ibd-lg-sub {
    margin: 16px 0 0;
    max-width: 640px;
    font-size: 17px;
    color: var(--lg-muted);
}
.ibd-lg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}
.ibd-lg-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--lg-line);
    color: var(--lg-ink);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}
.ibd-lg-badge svg { color: var(--lg-deep); flex: none; }
.ibd-lg-badge--sky { background: #fff; border-color: #d9ebf9; }
.ibd-lg-badge--sky svg { color: var(--lg-sky); }
.ibd-lg-metabtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 999px;
    background: transparent;
    border: 1.5px solid var(--lg-line);
    color: var(--lg-muted);
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.ibd-lg-metabtn:hover {
    background: rgba(245, 130, 10, .07);
    border-color: #f8dcc1;
    color: var(--lg-deep);
}
.ibd-lg-metabtn svg { flex: none; }

/* ── LAYOUT (плавающий TOC + статья) ──────────────────────────────────── */
.ibd-lg-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 72px;
}

/* Плавающий сайдбар (smart-sticky через data-floating-sidebar в sunday.js). */
.ibd-lg-toc {
    flex: 0 0 262px;
    position: sticky;
    top: calc(var(--shp-header-h, 79px) + 24px);
    align-self: flex-start;
}
.ibd-lg-toc-card {
    background: var(--lg-card);
    border: 1px solid #eef0f6;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 14px 34px -24px rgba(17, 24, 39, .45);
}
.ibd-lg-toc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 12px;
    color: var(--lg-muted);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-bottom: 1px solid #f1f4f8;
    margin-bottom: 8px;
}
.ibd-lg-toc-head svg { color: var(--lg-deep); }
.ibd-lg-toc-nav { display: flex; flex-direction: column; gap: 1px; }
.ibd-lg-toc-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border-radius: 11px;
    text-decoration: none;
    color: var(--lg-muted);
    transition: background .16s ease, color .16s ease;
}
.ibd-lg-toc-num {
    flex: none;
    width: 24px;
    font-weight: 800;
    font-size: 12px;
    color: #aab6c2;
    font-variant-numeric: tabular-nums;
    transition: color .16s ease;
}
.ibd-lg-toc-txt {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}
.ibd-lg-toc-link:hover {
    background: rgba(245, 130, 10, .07);
    color: var(--lg-deep);
}
.ibd-lg-toc-link:hover .ibd-lg-toc-num { color: var(--lg-deep); }
.ibd-lg-toc-link.is-active {
    background: var(--lg-sky-bg);
    color: var(--lg-ink);
}
.ibd-lg-toc-link.is-active .ibd-lg-toc-num { color: var(--lg-orange); }
.ibd-lg-toc-link.is-active .ibd-lg-toc-txt { font-weight: 800; }

/* Мобильные чипы-оглавление (по умолчанию скрыты - показываются на <=980px). */
.ibd-lg-chips { display: none; }

/* ── СТАТЬЯ ────────────────────────────────────────────────────────────── */
.ibd-lg-article {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Дисклеймер «черновик» */
.ibd-lg-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 18px;
    border-radius: 16px;
    background: #fff8ec;
    border: 1px solid #fbe3bf;
    color: #7a4e12;
    font-size: 14.5px;
}
.ibd-lg-note-ic { flex: none; color: #d98a1f; margin-top: 1px; }
.ibd-lg-note strong { color: #6b4310; }

/* Summary-карточка «Коротко о главном» */
.ibd-lg-summary {
    background: linear-gradient(180deg, #f4fafd, #eaf4fb);
    border: 1px solid #d9ebf9;
    border-radius: 22px;
    padding: 26px 28px;
    box-shadow: 0 18px 40px -30px rgba(46, 134, 193, .5);
}
.ibd-lg-summary-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.ibd-lg-summary-ic {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f5820a, #e8785b);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(245, 130, 10, .55);
}
.ibd-lg-summary-eyebrow {
    display: block;
    font-weight: 800;
    font-size: 11.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lg-sky);
}
.ibd-lg-summary-title {
    margin: 2px 0 0;
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 700;
    font-size: 23px;
    color: var(--lg-ink);
}
.ibd-lg-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 26px;
}
.ibd-lg-summary-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14.5px;
    color: #384856;
}
.ibd-lg-check {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(16, 185, 129, .14);
    color: #059669;
}
.ibd-lg-summary-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #d9ebf9;
}
.ibd-lg-summary-note {
    font-size: 13px;
    color: var(--lg-muted);
    font-style: italic;
}

/* Нумерованные секции-карточки */
.ibd-lg-sec {
    background: var(--lg-card);
    border: 1px solid #eef0f6;
    border-radius: 18px;
    padding: 24px 28px 20px;
    scroll-margin-top: calc(var(--shp-header-h, 79px) + 24px);
    box-shadow: 0 10px 30px -26px rgba(17, 24, 39, .4);
}
.ibd-lg-sec-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 12px;
}
.ibd-lg-sec-ic {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--lg-sky-bg);
    color: var(--lg-sky);
}
.ibd-lg-sec-num {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: #c3cfda;
    font-variant-numeric: tabular-nums;
}
.ibd-lg-sec-title {
    margin: 0;
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 700;
    font-size: 21px;
    line-height: 1.2;
    color: var(--lg-ink);
}
.ibd-lg-sec-body { color: #3a4a58; font-size: 15.5px; }
.ibd-lg-sec-body p { margin: 0 0 12px; }
.ibd-lg-sec-body p:last-child { margin-bottom: 0; }
.ibd-lg-sec-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ibd-lg-sec-body li {
    position: relative;
    padding-inline-start: 26px;
}
.ibd-lg-sec-body li::before {
    content: "";
    position: absolute;
    inset-inline-start: 6px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lg-orange);
}
.ibd-lg-sec-body strong { color: var(--lg-ink); font-weight: 700; }
.ibd-lg-sec-body a {
    color: var(--lg-deep);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(245, 130, 10, .3);
    transition: border-color .16s ease;
}
.ibd-lg-sec-body a:hover { border-bottom-color: var(--lg-deep); }

/* Футер-ссылки */
.ibd-lg-flinks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin-top: 8px;
    padding: 20px 4px 0;
    border-top: 1px solid var(--lg-line);
}
.ibd-lg-flinks a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--lg-muted);
    font-weight: 700;
    font-size: 14px;
    transition: color .16s ease;
}
.ibd-lg-flinks a:hover { color: var(--lg-deep); }
.ibd-lg-flinks svg { flex: none; color: var(--lg-sky); }
.ibd-lg-top { margin-inline-start: auto; }

/* ── Адаптив ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    .ibd-lg-toc { display: none; }
    .ibd-lg-layout { flex-direction: column; gap: 0; padding-top: 22px; }
    .ibd-lg-chips {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 0 0 16px;
        margin: 0 0 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .ibd-lg-chips::-webkit-scrollbar { display: none; }
    .ibd-lg-chip {
        flex: none;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 8px 14px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid var(--lg-line);
        color: var(--lg-muted);
        font-weight: 700;
        font-size: 13.5px;
        text-decoration: none;
        white-space: nowrap;
    }
    .ibd-lg-chip span {
        font-weight: 800;
        font-size: 11px;
        color: var(--lg-orange);
        font-variant-numeric: tabular-nums;
    }
    .ibd-lg-summary-list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .ibd-lg-hero { padding: 40px 0 32px; }
    .ibd-lg-summary { padding: 22px 18px; border-radius: 18px; }
    .ibd-lg-sec { padding: 20px 18px 16px; }
    .ibd-lg-layout { padding-bottom: 52px; }
}

@media (prefers-reduced-motion: reduce) {
    .ibd-lg-toc-link,
    .ibd-lg-metabtn,
    .ibd-lg-sec-body a,
    .ibd-lg-flinks a { transition: none !important; }
}

/* ── Печать ────────────────────────────────────────────────────────────── */
@media print {
    .ibd-lg-hero-glow,
    .ibd-lg-meta,
    .ibd-lg-toc,
    .ibd-lg-chips,
    .ibd-lg-flinks { display: none !important; }
    .ibd-lg-hero { background: none; border: 0; padding: 0 0 12px; }
    .ibd-lg-summary,
    .ibd-lg-sec { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
    .ibd-lg-main { color: #000; }
}
