/* =====================================================================
   Ramlabs — legal / long-form document pages (Terms, Privacy)
   Scoped under .lp so it inherits the marketing design tokens
   (--lp-ink, --lp-head, --lp-muted, --lp-card, --lp-border, --lp-grad…)
   and stays theme-aware without redefining anything.
   ===================================================================== */

.lp-legal {
    max-width: 860px;
    margin: 0 auto;
    padding: 120px 22px 96px;
}

/* ---- Header ---- */
.lp-legal__head {
    margin-bottom: 40px;
}

.lp-legal__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lp-brand-1);
    margin-bottom: 14px;
}

.lp-legal__title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.08;
    font-weight: 800;
    color: var(--lp-head);
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.lp-legal__meta {
    font-size: 0.9rem;
    color: var(--lp-faint);
    margin: 0;
}

.lp-legal__lead {
    margin-top: 20px;
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--lp-muted);
}

.lp-legal__lead a { color: var(--lp-brand-1); }

/* ---- Table of contents ---- */
.lp-legal__toc {
    margin: 36px 0 12px;
    padding: 22px 24px;
    background: var(--lp-card);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow-sm);
}

.lp-legal__toc h2 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lp-faint);
    margin: 0 0 14px;
}

.lp-legal__toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: 32px;
    counter-reset: toc;
}

.lp-legal__toc li {
    counter-increment: toc;
    margin: 0 0 9px;
    break-inside: avoid;
    font-size: 0.95rem;
}

.lp-legal__toc a {
    color: var(--lp-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.lp-legal__toc a::before {
    content: counter(toc) ". ";
    color: var(--lp-faint);
    font-variant-numeric: tabular-nums;
}

.lp-legal__toc a:hover { color: var(--lp-brand-1); }

/* ---- Body prose ---- */
.lp-legal__body {
    counter-reset: section;
}

.lp-legal__body section {
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--lp-border);
}

.lp-legal__body section:first-child {
    border-top: none;
    margin-top: 18px;
}

.lp-legal__body h2 {
    counter-increment: section;
    font-size: 1.4rem;
    font-weight: 750;
    color: var(--lp-head);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
    scroll-margin-top: 90px;
}

.lp-legal__body h2::before {
    content: counter(section) ". ";
    color: var(--lp-brand-1);
    font-variant-numeric: tabular-nums;
}

.lp-legal__body h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--lp-head);
    margin: 26px 0 10px;
}

.lp-legal__body p,
.lp-legal__body li {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--lp-muted);
}

.lp-legal__body p { margin: 0 0 15px; }

.lp-legal__body ul,
.lp-legal__body ol {
    margin: 0 0 15px;
    padding-left: 24px;
}

.lp-legal__body li { margin-bottom: 8px; }

.lp-legal__body a {
    color: var(--lp-brand-1);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.lp-legal__body a:hover { border-bottom-color: currentColor; }

.lp-legal__body strong { color: var(--lp-ink); font-weight: 700; }

/* Highlighted callout for important notes (e.g. consumer rights, "not legal advice") */
.lp-legal__note {
    margin: 20px 0;
    padding: 16px 20px;
    background: var(--lp-grad-soft);
    border: 1px solid var(--lp-border-2);
    border-radius: 16px;
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--lp-ink);
}

.lp-legal__note strong { color: var(--lp-head); }

/* Definitions / key terms */
.lp-legal__body dl { margin: 0 0 15px; }
.lp-legal__body dt { font-weight: 700; color: var(--lp-head); margin-top: 12px; }
.lp-legal__body dd { margin: 4px 0 0; padding-left: 0; color: var(--lp-muted); line-height: 1.7; }

/* ---- Footer of the document: cross-link + contact ---- */
.lp-legal__foot {
    margin-top: 44px;
    padding-top: 26px;
    border-top: 1px solid var(--lp-border);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--lp-muted);
}

.lp-legal__foot a { color: var(--lp-brand-1); text-decoration: none; }
.lp-legal__foot a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .lp-legal { padding-top: 104px; }
    .lp-legal__toc ol { columns: 1; }
}
