/* =====================================================================
   Legal pages (Privacy Policy, Terms of Service). Same shell as the FAQ:
   canvas hero, then the document on paper with a sticky table of
   contents, then the canvas "questions" panel. Loaded after theme.css.
   ===================================================================== */

/* Hero */
.lg-hero {
    margin-top: -86px;
    padding: 150px 0 56px;
    border-radius: 0 0 var(--r-panel) var(--r-panel);
    background:
        radial-gradient(45% 70% at 80% 100%, rgba(var(--accent-rgb), 0.30) 0%, rgba(var(--accent-rgb), 0) 70%),
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.12) 1px, transparent 1.4px) 0 0 / 22px 22px,
        #0B0C0F;
    color: #fff;
}
.lg-hero .section-label { margin: 0 0 20px; color: rgba(255, 255, 255, 0.62); }
.lg-hero h1 {
    margin: 0 0 20px;
    font: 700 clamp(40px, 5.6vw, 80px)/1 var(--display);
    letter-spacing: -0.035em;
    color: #fff;
}
.lg-hero h1 em { font: italic 400 1.12em/0.95 'Instrument Serif', Georgia, serif; letter-spacing: -0.01em; color: var(--accent-pale); }
.lg-lead { max-width: 56ch; margin: 0 0 32px; font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, 0.66); }

.lg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lg-updated {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    font: 400 12px/1 var(--mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}
.lg-updated .led { background: var(--accent-light); box-shadow: 0 0 0 3px rgba(var(--accent-light-rgb), 0.25); }

/* Privacy / Terms switch */
.lg-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.lg-switch a {
    padding: 8px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.7);
    font: 500 13px/1 var(--sans);
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}
.lg-switch a:hover { color: #fff; }
.lg-switch a[aria-current="page"] { background: #fff; color: var(--ink); }

/* Body: sticky contents + document */
.lg-body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 64px;
    padding-top: 80px;
    padding-bottom: 96px;
}
.lg-side { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 128px); overflow-y: auto; }
.lg-side-k { margin: 0 0 10px; font: 400 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); }
.lg-toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lg-toc a {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--slate);
    font: 500 14px/1.3 var(--sans);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.lg-toc a span { font: 400 11px/1.6 var(--mono); color: var(--slate); opacity: 0.7; }
.lg-toc a:hover { background: var(--mist); color: var(--ink); }
.lg-toc a.is-on { background: var(--mist); color: var(--ink); }
.lg-toc a.is-on span { color: var(--accent-text); opacity: 1; }

/* The document */
.lg-doc { max-width: 760px; color: var(--slate); font-size: 16px; line-height: 1.7; }
.lg-doc > p:first-child { margin-top: 0; }
.lg-doc p { margin: 0 0 16px; }
.lg-doc h2 {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 56px 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ink);
    font: 700 28px/1.15 var(--display);
    letter-spacing: -0.02em;
    color: var(--ink);
    scroll-margin-top: 110px;
}
.lg-num { flex: 0 0 auto; font: 400 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--accent-text); }
.lg-doc h3 { margin: 32px 0 10px; font: 600 18px/1.35 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.lg-doc strong { color: var(--ink); font-weight: 600; }
.lg-doc a { color: var(--accent-text); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), 0.35); text-underline-offset: 3px; }
.lg-doc a:hover { text-decoration-color: var(--accent); }
.lg-doc ul, .lg-doc ol { margin: 0 0 20px; padding: 0; list-style: none; }
.lg-doc li { position: relative; margin: 0 0 8px; padding-left: 22px; }
.lg-doc ul > li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--accent);
}
.lg-doc ol { counter-reset: lg; }
.lg-doc ol > li { counter-increment: lg; padding-left: 30px; }
.lg-doc ol > li::before { content: counter(lg, decimal-leading-zero); position: absolute; left: 0; font: 400 12px/2.2 var(--mono); color: var(--accent-text); }
.lg-doc hr { margin: 56px 0 0; border: 0; border-top: 1px solid var(--hair); }

/* Callout: the "Important" and "Acknowledgment" notes */
.lg-doc .important-notice {
    position: relative;
    margin: 0 0 32px;
    padding: 18px 20px 18px 22px;
    border-radius: 16px;
    background: var(--mist);
    box-shadow: inset 3px 0 0 var(--accent);
}
.lg-doc .important-notice p { margin: 0; color: var(--ink); }
.lg-doc hr + .important-notice { margin-top: 32px; }
.lg-end { margin-top: 32px !important; font-size: 14px; }

/* Questions panel */
.lg-ask {
    margin: 0 16px;
    padding: 72px 0;
    border-radius: var(--r-panel);
    background:
        radial-gradient(40% 80% at 90% 100%, rgba(var(--accent-rgb), 0.32) 0%, rgba(var(--accent-rgb), 0) 70%),
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.12) 1px, transparent 1.4px) 0 0 / 22px 22px,
        #0B0C0F;
    color: #fff;
}
.lg-ask + .site-footer { margin-top: 16px; }
.lg-ask-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.lg-ask .section-label { margin: 0 0 16px; color: rgba(255, 255, 255, 0.62); }
.lg-ask h2 { margin: 0 0 12px; font: 700 clamp(30px, 3.4vw, 44px)/1.05 var(--display); letter-spacing: -0.03em; color: #fff; }
.lg-ask-text { margin: 0; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.66); }
.lg-ask-text a { color: var(--accent-pale); }

/* The header CTA is a link on this page: keep it a button, not a nav link */
.header-nav a.btn { display: inline-flex; color: var(--paper); }

@media (max-width: 900px) {
    .lg-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 56px; }
    .lg-side { display: none; }
}
@media (max-width: 760px) {
    .header-nav a.btn { display: inline-flex; }
}
@media (max-width: 600px) {
    .lg-hero { padding: 120px 0 44px; border-radius: 0 0 24px 24px; }
    .lg-lead { font-size: 16px; }
    .lg-doc { font-size: 15px; }
    .lg-doc h2 { margin-top: 44px; font-size: 23px; }
    .lg-ask { margin: 0 8px; padding: 56px 0; border-radius: 24px; }
}
