/* ============================================================
   Legal pages (terms.html, privacy.html) — generated by build-policies.js.
   A long document set for reading: one measure-limited column, a contents
   list that stays in view on wide screens, numbered article heads.
   Loaded after styles.css; tokens come from there.
   ============================================================ */

.lg-hero { padding-bottom: 28px; border-bottom: 1px solid var(--rule-soft); }
.lg-hero h1 { max-width: 22ch; }
.lg-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 22px; }
.lg-meta div { display: flex; flex-direction: column; gap: 3px; }
.lg-meta dt { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--meta); }
.lg-meta dd { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.lg-note:empty { display: none; }
.lg-note, .lg-draft { margin-top: 18px; font-size: 14px; max-width: 60ch; }
.lg-note { color: var(--meta); }
.lg-draft { display: inline-block; padding: 8px 12px; border-radius: 8px; background: var(--people-wash); color: var(--people); }

/* ---- layout ---- */
section.lg-body { padding: 40px 0 72px; }
.lg-body .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 900px) {
  .lg-body .wrap { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
  .lg-side { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; }
}

/* ---- contents ---- */
.lg-toc summary {
  cursor: pointer; list-style: none; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--accent-text); padding: 10px 0;
}
.lg-toc summary::-webkit-details-marker { display: none; }
.lg-toc summary::after { content: " +"; }
.lg-toc[open] summary::after { content: " –"; }
.lg-toc ol { list-style: none; border-left: 1px solid var(--rule); }
.lg-toc li a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1.5px solid transparent;
  font-size: 13.5px; line-height: 1.35; color: var(--body); text-decoration: none; white-space: pre-wrap;
  transition: color .18s, border-color .18s;
}
.lg-toc li a:hover { color: var(--accent-text); border-left-color: var(--accent-text); }
.lg-toc li.annex { margin-top: 10px; }
.lg-toc li.annex a { font-weight: 600; color: var(--ink); }
@media (max-width: 899px) {
  .lg-toc { border: 1px solid var(--rule); border-radius: 12px; padding: 4px 16px; background: var(--card); }
  .lg-toc ol { margin-bottom: 12px; }
}

/* ---- the document ---- */
.lg-doc { max-width: 70ch; color: var(--body); font-size: 16px; line-height: 1.7; }
.lg-doc > * + * { margin-top: 14px; }
.lg-doc h2 {
  display: flex; gap: 12px; align-items: baseline;
  font-family: var(--display); font-weight: 600; color: var(--ink);
  font-size: clamp(22px, 2.6vw, 27px); line-height: 1.2; letter-spacing: -.015em;
  margin-top: 44px; scroll-margin-top: 84px; text-wrap: balance;
}
.lg-doc h2:first-child { margin-top: 0; }
.lg-doc h3 {
  display: flex; gap: 10px; align-items: baseline;
  font-family: var(--display); font-weight: 600; color: var(--ink);
  font-size: 18px; line-height: 1.3; margin-top: 28px; scroll-margin-top: 84px;
}
.lg-num {
  flex: none; font-family: var(--mono); font-weight: 500; font-size: .72em; letter-spacing: .02em;
  color: var(--accent-text); font-variant-numeric: tabular-nums;
}
.lg-doc h2.lg-annex {
  display: block; margin-top: 64px; padding-top: 28px; border-top: 2px solid var(--ink);
  font-size: clamp(24px, 3vw, 32px);
}
.lg-doc hr { border: 0; height: 1px; background: var(--rule-soft); margin: 36px 0 0; }
.lg-doc hr + h2 { margin-top: 36px; }
.lg-doc strong { color: var(--ink); font-weight: 600; }
.lg-doc a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.lg-doc code { font-family: var(--mono); font-size: .88em; background: var(--well); padding: 1px 5px; border-radius: 4px; }
.lg-doc ul, .lg-doc ol { padding-left: 22px; }
.lg-doc li + li { margin-top: 8px; }
.lg-doc ul li::marker { color: var(--accent-text); }
.lg-doc ol li::marker { color: var(--accent-text); font-family: var(--mono); font-size: .9em; }
.lg-doc .lg-aside { font-size: 14.5px; color: var(--meta); }
.lg-todo { background: var(--people-wash); color: var(--people); padding: 0 4px; border-radius: 4px; font-size: .94em; }

/* tables: a two-column fact sheet (no header) or a small data table */
.lg-tablewrap { overflow-x: auto; }
.lg-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.lg-table th, .lg-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.lg-table thead th { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--meta); border-bottom-color: var(--rule); }
.lg-facts { background: var(--card); border: 1px solid var(--rule-soft); border-radius: 12px; overflow: hidden; }
.lg-facts th { width: 38%; font-weight: 600; color: var(--ink); }
.lg-facts th strong { font-weight: 600; }
.lg-facts tr:last-child th, .lg-facts tr:last-child td { border-bottom: 0; }
.lg-top { margin-top: 48px !important; font-size: 14px; }

@media print {
  .nav, footer, .lg-side, .lg-top, .lg-note, .lg-draft { display: none !important; }
  .lg-body .wrap { display: block; }
  .lg-doc { max-width: none; }
}
