/* =========================================================================
   ForeverAfter.life — legal documents (Terms of Service, Privacy Policy)
   A quiet, readable prose page: the shared site header/footer, the same page
   shell and breadcrumb as /help, and a sticky in-page table of contents on
   wide screens. Tokens are the --ff-* set from foreverafter.css. Loaded only
   on /terms and /privacy.
   ========================================================================= */

body { background: var(--ff-surface-2); }

/* ---- Page shell ---- */
.lg-wrap { width: 100%; max-width: var(--ff-shell-max); margin: 0 auto; padding: 46px 32px 120px; }
@media (max-width: 600px) { .lg-wrap { padding: 32px 18px 90px; } }

/* ---- Page header ---- */
.lg-head { position: relative; overflow: hidden; padding-bottom: 30px; border-bottom: 1px solid var(--ff-line); margin-bottom: 36px; }
.b-crumb { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: var(--ff-ink-3); font-size: 0.9rem; font-weight: 500; margin-bottom: 14px; }
.b-crumb a { color: var(--ff-ink-3); transition: color .15s; }
.b-crumb a:hover { color: var(--ff-accent-deep); }
.b-crumb .sep { opacity: 0.6; }
.lg-head h1 { position: relative; z-index: 1; font-family: var(--ff-font-serif); font-weight: 500; font-size: clamp(2.1rem, 4vw, 2.9rem); line-height: 1.05; letter-spacing: -0.01em; }
.lg-effective { position: relative; z-index: 1; color: var(--ff-ink-3); font-size: 0.92rem; margin: 12px 0 0; }
.lg-lede { position: relative; z-index: 1; color: var(--ff-ink-2); font-size: 1.01rem; margin: 14px 0 0; max-width: 640px; }

/* ---- Two-column layout: sticky contents + prose ---- */
/* Columns stretch (no align-items: start) so the .lg-toc column spans the row's
   full height — that is the travel room .lg-toc-inner sticks within. */
.lg-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
@media (max-width: 900px) { .lg-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* 80px / 96px clear the sticky site header — the same offsets .a-nav and
   .a-section use in account-settings.css. */
.lg-toc-inner { position: sticky; top: 80px; }
@media (max-width: 900px) {
    .lg-toc-inner { position: static; background: var(--ff-surface); border: 1px solid var(--ff-line); border-radius: var(--ff-radius); padding: 18px 20px; box-shadow: var(--ff-shadow-sm); }
}
.lg-toc h2 { font-family: var(--ff-font-sans); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ff-ink-3); margin: 0 0 12px; }
.lg-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; counter-reset: lg-toc; }
.lg-toc li { counter-increment: lg-toc; }
.lg-toc a { display: block; font-size: 0.9rem; line-height: 1.35; color: var(--ff-ink-2); text-decoration: none; padding-left: 22px; text-indent: -22px; transition: color .15s; }
.lg-toc a::before { content: counter(lg-toc) "."; display: inline-block; width: 22px; text-indent: 0; color: var(--ff-ink-3); font-variant-numeric: tabular-nums; }
.lg-toc a:hover { color: var(--ff-accent-deep); }

/* ---- Prose ---- */
.lg-prose { max-width: 720px; }
.lg-prose section { scroll-margin-top: 96px; }
.lg-prose section + section { margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--ff-line-soft); }
.lg-prose h2 { font-family: var(--ff-font-serif); font-weight: 500; font-size: 1.55rem; line-height: 1.2; margin: 0 0 14px; }
.lg-prose h3 { font-family: var(--ff-font-sans); font-weight: 600; font-size: 1.02rem; color: var(--ff-ink); margin: 26px 0 8px; }
.lg-prose p { color: var(--ff-ink-2); font-size: 1rem; line-height: 1.68; margin: 0 0 14px; }
.lg-prose p:last-child, .lg-prose ul:last-child { margin-bottom: 0; }
.lg-prose strong { color: var(--ff-ink); font-weight: 600; }
.lg-prose a { color: var(--ff-accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.lg-prose ul { margin: 0 0 14px; padding-left: 22px; color: var(--ff-ink-2); font-size: 1rem; line-height: 1.68; }
.lg-prose li { margin-bottom: 7px; }
.lg-prose li::marker { color: var(--ff-ink-3); }
.lg-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: var(--ff-surface-2); border: 1px solid var(--ff-line-soft); border-radius: 5px; padding: 1px 5px; color: var(--ff-ink); }

/* ---- Data table (what we collect / why) ---- */
.lg-table-wrap { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--ff-line); border-radius: var(--ff-radius); background: var(--ff-surface); }
.lg-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.lg-table th, .lg-table td { text-align: left; padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--ff-line-soft); }
.lg-table thead th { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ff-ink-3); background: var(--ff-surface-2); }
.lg-table tbody tr:last-child th, .lg-table tbody tr:last-child td { border-bottom: 0; }
.lg-table tbody th { font-weight: 600; color: var(--ff-ink); white-space: nowrap; }
.lg-table td { color: var(--ff-ink-2); line-height: 1.55; }

/* ---- Callout ---- */
.lg-note { background: var(--ff-accent-tint); border: 1px solid var(--ff-accent-soft); border-radius: var(--ff-radius); padding: 16px 18px; margin: 0 0 14px; }
.lg-note p { margin: 0; color: var(--ff-ink-2); font-size: 0.95rem; }
.lg-note p + p { margin-top: 8px; }

/* ---- Cross-link footer ---- */
.lg-cross { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--ff-line); display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-size: 0.94rem; color: var(--ff-ink-3); }
.lg-cross a { color: var(--ff-accent-deep); font-weight: 600; }
