/* =====================================================
   Legal pages: Privacy Policy and Terms & Conditions
   (homepage-matching design, live since 2026-10-04)
   Used by app/Views/pages/privacy-policy.php and terms-conditions.php.

   Loaded AFTER home.css: reuses the homepage's tokens and building
   blocks (.hv1 colours, .hv1-hero, .hv1-cta ...). This file only adds the
   .lg-* parts: a compact hero, then the document panel overlapping the
   hero edge, with an "On this page" list beside it on wide screens.
   ===================================================== */

/* ---------- Hero ---------- */
.lg .hv1-hero { padding: 64px 0 140px; }

.lg-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    color: #94A3B8;
    font-size: 0.875rem;
}

.lg-crumbs li + li::before {
    content: "/";
    margin-right: 0.4rem;
    opacity: 0.5;
}

.lg-crumbs a { color: #CBD5E1; }
.lg-crumbs a:hover { color: #fff; }
.lg-crumbs [aria-current] { color: #fff; font-weight: 500; }

/* ---------- Layout: contents list + document ---------- */
.lg-body {
    position: relative;
    z-index: 2;
    margin-top: -92px;
}

.lg-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    max-width: 1040px;
    margin: 0 auto;
}

.lg-toc {
    position: sticky;
    top: 96px;
    padding: 1.25rem;
    border: 1px solid var(--hv1-border);
    border-radius: 20px;
    background: var(--hv1-surface);
    box-shadow: var(--hv1-shadow);
}

.lg-toc-title {
    margin: 0 0 0.75rem 0.5rem;
    color: var(--hv1-muted);
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.lg-toc ol {
    display: grid;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: lg-toc;
}

.lg-toc li { counter-increment: lg-toc; }

.lg-toc a {
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    color: var(--hv1-text);
    font-size: 0.9rem;
    line-height: 1.35;
}

.lg-toc a::before {
    content: counter(lg-toc);
    flex-shrink: 0;
    width: 1.2rem;
    color: var(--hv1-blue);
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
}

.lg-toc a:hover { background: var(--hv1-surface-2); color: var(--hv1-text); }

/* ---------- Document ---------- */
.lg-doc {
    padding: 2.75rem;
    border: 1px solid var(--hv1-border);
    border-radius: 24px;
    background: var(--hv1-surface);
    box-shadow: var(--hv1-shadow-lg);
}

.lg-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.25rem;
    padding: 1.25rem 1.4rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.08);
    color: var(--hv1-text);
    line-height: 1.6;
}

.lg-summary i {
    margin-top: 0.2rem;
    color: #10B981;
    font-size: 1.15rem;
}

.lg-section {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 1.1rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--hv1-border);
    scroll-margin-top: 96px;
}

.lg-section:first-of-type { border-top: 0; padding-top: 0; }
.lg-section:last-of-type { padding-bottom: 0; }

.lg-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--hv1-blue) 12%, transparent);
    color: var(--hv1-blue);
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
}

.lg-section h2 {
    margin: 0.45rem 0 0.75rem;
    color: var(--hv1-text);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.lg-section p {
    margin: 0;
    color: var(--hv1-muted);
    font-size: 1rem;
    line-height: 1.8;
}

/* Questions? card under the document */
.lg-ask {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-top: 1.5rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--hv1-border);
    border-radius: 20px;
    background: var(--hv1-surface);
}

.lg-ask strong {
    display: block;
    color: var(--hv1-text);
    font-size: 1.05rem;
}

.lg-ask span { color: var(--hv1-muted); font-size: 0.92rem; }

.lg-ask-btn {
    border: 0;
    background: linear-gradient(135deg, #3B82F6, #6366F1);
    color: #fff;
}

.lg-ask-btn:hover { color: #fff; filter: brightness(1.08); }

.lg-bottom { padding-bottom: var(--hv1-space); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .lg-layout { grid-template-columns: 1fr; }
    .lg-toc { position: static; }
    .lg-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .lg .hv1-hero { padding: 48px 0 120px; }
    .lg-body { margin-top: -80px; }
    .lg-doc { padding: 1.6rem 1.3rem; }
    .lg-section { grid-template-columns: 1fr; gap: 0.6rem; }
    .lg-section h2 { margin-top: 0; }
    .lg-toc ol { grid-template-columns: 1fr; }
}
