/* ============================================================
   Legal pages — shared shell
   Used by privacy.php, terms.php and plan-terms.php.
   Loaded after style-v3.css; every rule is namespaced .lg-*.
============================================================ */

.lg-wrap { width: min(1180px, 100%); margin: 0 auto; padding-bottom: 40px; }

/* ── Back link ── */
.lg-back {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 26px 0 16px; color: #8b93b4; text-decoration: none;
    font-size: 14px; font-weight: 600; transition: color .2s, transform .2s;
}
.lg-back:hover { color: #6272e4; transform: translateX(-2px); }
.lg-back svg { width: 18px; height: 18px; }

/* ── Hero ── */
.lg-hero {
    position: relative; overflow: hidden;
    border-radius: 28px; padding: 38px 44px 34px;
    background:
        radial-gradient(120% 150% at 86% 18%, rgba(160,148,255,0.18) 0%, rgba(160,148,255,0) 60%),
        linear-gradient(150deg, rgba(255,255,255,0.94) 0%, rgba(240,238,254,0.92) 100%);
    border: 1px solid rgba(214,219,246,0.75);
    box-shadow: 0 24px 56px rgba(97,109,162,0.10), inset 0 1px 0 rgba(255,255,255,0.9);
}
.lg-hero-inner { position: relative; z-index: 2; max-width: 620px; }
.lg-hero-top { display: flex; align-items: center; gap: 18px; }
.lg-badge {
    width: 56px; height: 56px; border-radius: 18px; flex: none;
    display: grid; place-items: center; color: #8b8bf0;
    background: linear-gradient(180deg, #ffffff 0%, #f2f0ff 100%);
    border: 1px solid rgba(208,206,248,0.9);
    box-shadow: 0 10px 22px rgba(122,116,200,0.14);
}
.lg-badge svg { width: 26px; height: 26px; }
.lg-title {
    margin: 0; font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800;
    letter-spacing: -0.035em; color: #2f3967; line-height: 1.05;
}
.lg-lede { margin: 16px 0 0; color: #7c85a8; font-size: 15px; line-height: 1.7; max-width: 520px; }
.lg-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.lg-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    background: rgba(255,255,255,0.78); border: 1px solid rgba(214,219,246,0.9);
    color: #7b84a8; font-size: 12.5px; font-weight: 600;
}
.lg-chip svg { width: 14px; height: 14px; color: #9aa2e8; }
.lg-chip code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: #7b84a8; }

.lg-hero-art {
    position: absolute; right: 54px; top: 50%; transform: translateY(-50%);
    width: 236px; height: 236px; z-index: 1; pointer-events: none;
}
.lg-hero-art svg { width: 100%; height: 100%; }

/* ── Two column layout ── */
.lg-layout {
    display: grid; grid-template-columns: 272px minmax(0, 1fr);
    gap: 24px; align-items: start; margin-top: 24px;
}
.lg-side { position: sticky; top: 100px; display: grid; gap: 16px; }

/* ── Table of contents ── */
.lg-toc {
    background: linear-gradient(160deg, rgba(255,255,255,0.94) 0%, rgba(248,246,255,0.92) 100%);
    border: 1px solid rgba(216,221,246,0.85); border-radius: 20px;
    padding: 18px 14px; box-shadow: 0 16px 38px rgba(97,109,162,0.07);
}
.lg-toc > summary { display: none; }
.lg-toc-title {
    font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: #9aa2c2; padding: 0 10px; margin: 0 0 10px;
}
/* Long documents (plan terms) scroll inside the card rather than off-screen. */
.lg-toc nav { max-height: calc(100vh - 260px); overflow-y: auto; overscroll-behavior: contain; }
.lg-toc nav::-webkit-scrollbar { width: 6px; }
.lg-toc nav::-webkit-scrollbar-thumb { background: rgba(170,178,214,0.45); border-radius: 3px; }
.lg-toc a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 11px;
    color: #6d769a; font-size: 13px; font-weight: 500; line-height: 1.35;
    text-decoration: none; transition: background .18s, color .18s;
}
.lg-toc a svg { width: 15px; height: 15px; flex: none; color: #adb4d6; transition: color .18s; }
.lg-toc a:hover { background: rgba(143,155,241,0.08); color: #4d5891; }
.lg-toc a.is-active {
    background: linear-gradient(90deg, rgba(143,155,241,0.15) 0%, rgba(143,155,241,0.04) 100%);
    color: #4a55a0; font-weight: 600;
}
.lg-toc a.is-active svg { color: #8f9bf1; }

/* ── Sidebar help card ── */
.lg-help {
    background: linear-gradient(170deg, rgba(255,255,255,0.95) 0%, rgba(246,244,255,0.95) 100%);
    border: 1px solid rgba(216,221,246,0.85); border-radius: 20px;
    padding: 22px 20px; text-align: center; box-shadow: 0 16px 38px rgba(97,109,162,0.07);
}
.lg-help-ico {
    width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 14px;
    display: grid; place-items: center; color: #8f8bf0;
    background: linear-gradient(180deg, #f1efff 0%, #e9e6ff 100%);
}
.lg-help-ico svg { width: 24px; height: 24px; }
.lg-help h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #2f3967; }
.lg-help p { margin: 0 0 16px; font-size: 12.8px; line-height: 1.6; color: #8b93b4; }
.lg-help a {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 11px 16px; border-radius: 12px;
    background: #fff; border: 1px solid rgba(190,196,240,0.9);
    color: #6272e4; font-size: 13px; font-weight: 600; text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.lg-help a:hover { border-color: #8f9bf1; box-shadow: 0 8px 18px rgba(121,105,210,0.14); transform: translateY(-1px); }
.lg-help a svg { width: 15px; height: 15px; }

/* ── Document ── */
.lg-doc {
    background: linear-gradient(160deg, rgba(255,255,255,0.94) 0%, rgba(249,247,255,0.94) 100%);
    border: 1px solid rgba(216,221,246,0.80); border-radius: 24px;
    padding: 8px 34px 30px; box-shadow: 0 22px 54px rgba(97,109,162,0.09);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.lg-sec { padding: 28px 0; border-top: 1px solid rgba(226,230,247,0.9); scroll-margin-top: 110px; }
.lg-sec:first-child { border-top: none; }
.lg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lg-ico {
    width: 36px; height: 36px; border-radius: 12px; flex: none;
    display: grid; place-items: center; color: #7f8def;
    background: linear-gradient(180deg, #eff1ff 0%, #e7ebff 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.lg-ico svg { width: 18px; height: 18px; }
.lg-head h2 { margin: 0; font-size: 1.13rem; font-weight: 700; color: #2f3967; letter-spacing: -0.01em; }
.lg-num { color: #9aa4ef; }

.lg-doc p { color: #697292; font-size: 14.5px; line-height: 1.75; margin: 0 0 12px; }
.lg-doc p:last-child { margin-bottom: 0; }
.lg-doc h3 { font-size: 0.95rem; font-weight: 700; color: #3d4f88; margin: 22px 0 10px; }
.lg-doc strong { color: #3d4f88; font-weight: 600; }
.lg-doc a { color: #6272e4; text-decoration: none; font-weight: 600; }
.lg-doc a:hover { text-decoration: underline; }

.lg-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.lg-list:last-child { margin-bottom: 0; }
.lg-list li { position: relative; padding-left: 20px; color: #697292; font-size: 14px; line-height: 1.65; }
.lg-list li::before {
    content: ""; position: absolute; left: 6px; top: 9px;
    width: 6px; height: 6px; border-radius: 50%;
    background: linear-gradient(180deg, #b9c0f7 0%, #8f9bf1 100%);
}
.lg-list--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }

/* ── Callout ── */
.lg-callout {
    display: flex; gap: 12px; align-items: flex-start;
    margin: 18px 0; padding: 16px 18px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(143,155,241,0.10) 0%, rgba(120,159,255,0.06) 100%);
    border: 1px solid rgba(175,184,246,0.45);
}
.lg-callout svg { width: 20px; height: 20px; flex: none; color: #8f9bf1; margin-top: 2px; }
.lg-callout p { margin: 0; color: #4a5590; font-size: 14px; }

/* ── Panels, tiles & card rows ── */
.lg-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0 4px; }
.lg-panel { background: rgba(255,255,255,0.72); border: 1px solid rgba(222,227,248,0.9); border-radius: 16px; padding: 18px; }
.lg-panel-title { margin: 0 0 12px; font-size: 13.5px; font-weight: 700; color: #5563b5; }
.lg-panel p { font-size: 13.4px; line-height: 1.65; }

.lg-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.lg-tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lg-tiles--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lg-tile { background: rgba(255,255,255,0.72); border: 1px solid rgba(222,227,248,0.9); border-radius: 14px; padding: 14px 12px; }
.lg-tile svg { width: 18px; height: 18px; color: #8f9bf1; margin-bottom: 8px; }
.lg-tile span { display: block; font-size: 12.4px; line-height: 1.5; color: #6f7899; }
.lg-tile span strong { display: block; margin-bottom: 3px; color: #3d4f88; font-weight: 700; }
.lg-tile--row { display: flex; align-items: center; gap: 10px; }
.lg-tile--row svg { margin-bottom: 0; flex: none; }
.lg-tile--row span { font-size: 13px; color: #4c5885; font-weight: 600; }

.lg-row { display: grid; gap: 14px; }
.lg-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lg-card {
    background: rgba(255,255,255,0.74); border: 1px solid rgba(222,227,248,0.95);
    border-radius: 18px; padding: 20px; scroll-margin-top: 110px;
}
.lg-card .lg-head { gap: 10px; margin-bottom: 10px; }
.lg-card .lg-head h2 { font-size: 0.95rem; }
.lg-card .lg-ico { width: 30px; height: 30px; border-radius: 10px; }
.lg-card .lg-ico svg { width: 15px; height: 15px; }
.lg-card p { font-size: 13.4px; line-height: 1.65; }
.lg-card .lg-list li { font-size: 13.2px; padding-left: 18px; }
.lg-card .lg-list li::before { left: 4px; top: 8px; width: 5px; height: 5px; }

/* ── Contact details ── */
.lg-contact { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.lg-contact li { display: flex; gap: 10px; align-items: flex-start; color: #697292; font-size: 13.8px; line-height: 1.6; }
.lg-contact svg { width: 16px; height: 16px; flex: none; color: #8f9bf1; margin-top: 3px; }

/* ── Cookie table (privacy) ── */
.cookie-table { width: 100%; border-collapse: collapse; margin: 16px 0; border-radius: 14px; overflow: hidden; border: 1px solid rgba(222,227,248,0.9); }
.cookie-table th, .cookie-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(226,230,247,0.9); }
.cookie-table th { background: rgba(143,155,241,0.08); color: #3d4f88; font-weight: 600; font-size: 0.85rem; }
.cookie-table td { color: #697292; font-size: 0.86rem; }
.cookie-table tbody tr:last-child td { border-bottom: none; }

/* ── Buttons ── */
.lg-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 11px;
    background: #fff; border: 1px solid rgba(190,196,240,0.95);
    color: #6272e4; font-family: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.lg-btn-ghost:hover { border-color: #8f9bf1; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(121,105,210,0.14); text-decoration: none; }
.lg-btn-ghost svg { width: 16px; height: 16px; }

.cookie-manage-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--btn-purple-a,#c9a1ff) 0%, var(--btn-purple-b,#789fff) 100%);
    color: #fff; border: none; border-radius: 12px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: opacity .2s, transform .2s, box-shadow .2s; margin-top: 4px;
}
.cookie-manage-btn:hover { opacity: .9; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(121,105,210,0.28); }
.cookie-manage-btn svg { width: 20px; height: 20px; }

.lg-prefs {
    background: linear-gradient(135deg, rgba(143,155,241,0.10) 0%, rgba(120,159,255,0.05) 100%);
    border: 1px solid rgba(175,184,246,0.45); border-radius: 18px; padding: 22px 24px;
}

/* ── Responsive ── */
@media (max-width: 1040px) {
    .lg-layout { grid-template-columns: 1fr; }
    .lg-side { position: static; }
    .lg-hero-art { display: none; }
    .lg-lede, .lg-hero-inner { max-width: none; }
    .lg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg-toc nav { max-height: 320px; }
    .lg-toc > summary {
        display: flex; align-items: center; justify-content: space-between;
        cursor: pointer; list-style: none; padding: 2px 10px;
        font-size: 13px; font-weight: 700; color: #5563b5;
    }
    .lg-toc > summary::-webkit-details-marker { display: none; }
    .lg-toc > summary svg { width: 16px; height: 16px; transition: transform .2s; }
    .lg-toc[open] > summary svg { transform: rotate(180deg); }
    .lg-toc[open] > summary { margin-bottom: 10px; }
    .lg-toc .lg-toc-title { display: none; }
}
@media (max-width: 720px) {
    .lg-hero { padding: 26px 22px; border-radius: 20px; }
    .lg-hero-top { gap: 14px; }
    .lg-badge { width: 46px; height: 46px; border-radius: 15px; }
    .lg-badge svg { width: 22px; height: 22px; }
    .lg-doc { padding: 6px 20px 22px; border-radius: 20px; }
    .lg-split, .lg-row--2, .lg-row--3, .lg-contact, .lg-list--two,
    .lg-tiles--3, .lg-tiles--6 { grid-template-columns: 1fr; }
    .lg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cookie-table { display: block; overflow-x: auto; }
    .lg-prefs { padding: 18px; }
}

@media print {
    .lg-side, .lg-back, .lg-hero-art, .site-header, .site-footer,
    .cookie-popup, .cookie-mini-btn, .whatsapp-btn { display: none !important; }
    .lg-layout { display: block; }
    .lg-doc, .lg-hero { border: none; box-shadow: none; background: none; padding: 0; }
}
