/* ============================================================
   Legal pages (Terms / Privacy / DPA) — Quiet Ledger redress
   Scoped via .legal-v2 + .lgl-* class names.
   ============================================================ */

.legal-v2 {
    --lgl-primary: #4058da;
    --lgl-primary-deep: #2f3d63;
    --lgl-primary-soft: #e9eeff;
    --lgl-paper: #ffffff;
    --lgl-canvas: #f7f9fd;
    --lgl-border: #e7ecf4;
    --lgl-border-subtle: #edf0f6;
    --lgl-ink: #1f2937;
    --lgl-ink-strong: #1b2438;
    --lgl-ink-muted: #55617e;
    --lgl-ink-faint: #8a96af;

    color: var(--lgl-ink);
    /* Match the homepage .shell max-width (1280px) so legal pages don't
       feel like a narrow letter inside the otherwise full-width chrome.
       Inner paragraph blocks are still readable thanks to .lgl-section's
       text-wrap rules and the 1.6 line-height; the wider canvas just lets
       headings + TOC breathe like the homepage hero does. */
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 56px) 80px;
    line-height: 1.6;
    font-size: 1rem;
}

.lgl-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lgl-primary);
    margin-bottom: 12px;
}

.lgl-title {
    font-size: clamp(1.85rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--lgl-ink-strong);
    letter-spacing: -0.02em;
    line-height: 1.18;
    margin: 0 0 12px;
}

.lgl-subtitle {
    font-size: 1.05rem;
    color: var(--lgl-ink-muted);
    margin: 0 0 8px;
    line-height: 1.55;
}

.lgl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 0.85rem;
    color: var(--lgl-ink-faint);
    margin: 0 0 36px;
}

.lgl-meta strong {
    color: var(--lgl-ink-muted);
    font-weight: 600;
}

/* Page-top TL;DR / Summary block. Sits right after the divider, before the
   numbered sections. Tinted background so it reads as "the gist" without a
   side-stripe (banned aesthetic). AI search engines (Perplexity, ChatGPT,
   Claude) weight the first 200 chars of a page heavily — labeling this
   block "Summary" makes them quote it verbatim. */
.lgl-tldr {
    background: var(--lgl-primary-soft);
    color: var(--lgl-ink-strong);
    padding: 18px 22px;
    border-radius: 12px;
    margin: 0 0 32px;
    font-size: 0.98rem;
    line-height: 1.55;
}

.lgl-tldr-label {
    display: inline-block;
    font-weight: 700;
    color: var(--lgl-primary-deep);
    margin-right: 6px;
}

.lgl-tldr p {
    margin: 0;
    display: inline;
}

.lgl-tldr p + p {
    margin-top: 10px;
    display: block;
}

.lgl-divider {
    height: 1px;
    background: var(--lgl-border);
    border: 0;
    margin: 28px 0 32px;
}

.lgl-toc {
    background: var(--lgl-canvas);
    border: 1px solid var(--lgl-border-subtle);
    border-radius: 0.85rem;
    padding: 18px 22px;
    margin-bottom: 40px;
}

.lgl-toc-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--lgl-ink-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.lgl-toc ol {
    margin: 0;
    padding: 0 0 0 1.2rem;
    counter-reset: lgl-toc;
    columns: 2;
    column-gap: 24px;
}

.lgl-toc li {
    margin: 4px 0;
    font-size: 0.92rem;
    break-inside: avoid;
}

.lgl-toc a {
    color: var(--lgl-ink);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 150ms ease, border-color 150ms ease;
}

.lgl-toc a:hover {
    color: var(--lgl-primary);
    border-color: var(--lgl-primary-soft);
}

.lgl-section {
    margin-bottom: 36px;
    scroll-margin-top: 80px;
}

.lgl-section h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--lgl-ink-strong);
    letter-spacing: -0.005em;
    margin: 0 0 12px;
    line-height: 1.3;
}

.lgl-section h2 .lgl-num {
    color: var(--lgl-ink-faint);
    font-weight: 500;
    margin-right: 10px;
    font-variant-numeric: tabular-nums;
}

.lgl-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--lgl-ink-strong);
    margin: 22px 0 8px;
    letter-spacing: -0.005em;
}

.lgl-section p,
.lgl-section li {
    color: var(--lgl-ink);
    font-size: 1rem;
}

.lgl-section p {
    margin: 0 0 14px;
}

.lgl-section ul,
.lgl-section ol {
    margin: 0 0 16px;
    padding-left: 1.4rem;
}

.lgl-section li {
    margin: 6px 0;
    line-height: 1.55;
}

.lgl-section a {
    color: var(--lgl-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--lgl-primary-soft);
    transition: border-color 150ms ease;
}

.lgl-section a:hover {
    border-color: var(--lgl-primary);
}

/* Anchor-as-button exception: the .lgl-section a rule above forces every
   link to inline-text-link styling (blue text + underline border). When a
   page like /about embeds a CTA via <a class="btn btn--primary">, that
   inline-link cascade clobbers the button's color and adds a stray border.
   Reset both so the redesign/styles.css .btn rules win again. */
.lgl-section a.btn {
    color: var(--bg);
    border-bottom: 0;
}

.lgl-section:not(.ch-cta-section) a.btn--ghost,
.lgl-section:not(.ch-cta-section) a.btn--light {
    color: var(--ink);
}

.lgl-section code,
.lgl-inline-code {
    background: var(--lgl-canvas);
    border: 1px solid var(--lgl-border-subtle);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--lgl-ink-strong);
}

.lgl-callout {
    background: var(--lgl-primary-soft);
    border-left: 3px solid var(--lgl-primary);
    border-radius: 0.55rem;
    padding: 14px 18px;
    margin: 18px 0;
    color: var(--lgl-primary-deep);
    font-size: 0.95rem;
}

.lgl-callout strong {
    color: var(--lgl-primary-deep);
}

.lgl-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 0.95rem;
}

.lgl-table th,
.lgl-table td {
    border: 1px solid var(--lgl-border);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

.lgl-table th {
    background: var(--lgl-canvas);
    font-weight: 600;
    color: var(--lgl-ink-strong);
}

.lgl-foot {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--lgl-border);
    color: var(--lgl-ink-muted);
    font-size: 0.88rem;
}

.lgl-foot p {
    margin: 0 0 6px;
}

/* Responsive */
@media (max-width: 640px) {
    .lgl-toc ol {
        columns: 1;
    }

    .lgl-title {
        line-height: 1.22;
    }
}
