/* ───── Legal / utility page shell ─────────────────────────────
   Shared by privacy.html, terms.html, security.html, changelog.html, status.html
   Minimal, calm, hairline-bordered. Senior-document feel. */

/* Page hero — calm header bar */
.lg-hero {
  position: relative;
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border-primary);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--white) 100%);
}
.lg-hero .crumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--fg-tertiary);
  margin-bottom: 14px;
}
.lg-hero .crumb a { color: var(--fg-tertiary); }
.lg-hero .crumb a:hover { color: var(--brand-deep); }
.lg-hero .crumb .sep { color: var(--gray-300); }
.lg-hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 4.4vw, 64px); line-height: 1.02;
  letter-spacing: -0.03em; color: var(--fg-primary);
  text-wrap: balance; max-width: 18ch;
}
.lg-hero p.lede {
  margin-top: 22px; max-width: 56ch;
  font-size: 17px; line-height: 1.55; color: var(--fg-secondary);
}
.lg-hero .meta {
  margin-top: 28px;
  display: flex; gap: 28px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--fg-tertiary);
}
.lg-hero .meta b { color: var(--fg-secondary); font-weight: 600; }

/* Body grid — sidebar TOC + content */
.lg-body {
  padding: 56px 0 96px;
}
.lg-grid {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px; align-items: start;
}

/* TOC sidebar */
.lg-toc { position: sticky; top: 100px; }
.lg-toc-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-quaternary); margin-bottom: 14px;
}
.lg-toc-list { display: flex; flex-direction: column; gap: 2px; }
.lg-toc-list a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--fg-tertiary); text-decoration: none;
  border-left: 2px solid transparent; margin-left: -2px;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
  line-height: 1.4;
}
.lg-toc-list a:hover { color: var(--brand-deep); background: var(--bg-brand-subtle); text-decoration: none; }
.lg-toc-list a.on {
  color: var(--brand-deep); font-weight: 600;
  border-left-color: var(--brand-deep); background: var(--bg-brand-subtle);
}

/* Content (long-form documents) */
.lg-content { max-width: 720px; }
.lg-content h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 26px; letter-spacing: -0.02em; line-height: 1.15;
  color: var(--fg-primary);
  margin: 56px 0 14px;
  scroll-margin-top: 96px;
}
.lg-content h2:first-child { margin-top: 0; }
.lg-content h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 17px; letter-spacing: -0.01em;
  color: var(--fg-primary);
  margin: 28px 0 8px;
}
.lg-content p {
  font-size: 15px; line-height: 1.7; color: var(--fg-secondary);
  margin: 12px 0; text-wrap: pretty;
}
.lg-content p b, .lg-content li b { color: var(--fg-primary); font-weight: 600; }
.lg-content ul, .lg-content ol {
  margin: 14px 0 14px 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.lg-content li {
  font-size: 15px; line-height: 1.6; color: var(--fg-secondary);
  padding-left: 4px;
}
.lg-content li::marker { color: var(--brand-deep); }
.lg-content a { color: var(--brand-deep); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(0,62,65,0.3); text-underline-offset: 3px; }
.lg-content a:hover { text-decoration-color: var(--brand-deep); }
.lg-content code, .lg-content kbd {
  font-family: var(--font-display); font-weight: 500; font-size: 13.5px;
  background: var(--gray-100); padding: 1px 6px; border-radius: 4px;
  color: var(--fg-primary);
}
.lg-content blockquote {
  margin: 22px 0; padding: 16px 20px;
  border-left: 3px solid var(--brand-deep);
  background: var(--bg-brand-subtle);
  border-radius: 0 8px 8px 0;
  font-size: 15px; line-height: 1.55; color: var(--fg-primary);
}
.lg-content .callout {
  margin: 22px 0; padding: 16px 18px;
  background: var(--bg-brand-subtle); border: 1px solid #C7DED5;
  border-radius: 10px;
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; line-height: 1.5; color: var(--fg-secondary);
}
.lg-content .callout .ic {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: var(--brand-deep); color: var(--brand-green);
  display: flex; align-items: center; justify-content: center;
}
.lg-content .callout b { color: var(--fg-primary); }
.lg-content table {
  width: 100%; border-collapse: collapse;
  margin: 22px 0;
  font-size: 14px;
}
.lg-content table th, .lg-content table td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--border-tertiary);
  color: var(--fg-secondary); line-height: 1.5;
}
.lg-content table th {
  font-weight: 600; color: var(--fg-primary);
  background: var(--bg-secondary); border-bottom-color: var(--border-secondary);
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
}
.lg-content table tr:last-child td { border-bottom: none; }

/* Doc footer */
.lg-doc-foot {
  margin-top: 56px; padding: 24px;
  background: var(--bg-secondary); border-radius: 12px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  font-size: 14px; color: var(--fg-secondary); line-height: 1.5;
}
.lg-doc-foot a { color: var(--brand-deep); font-weight: 600; }

/* Responsive */
@media (max-width: 980px) {
  .lg-grid { grid-template-columns: 1fr; gap: 32px; }
  .lg-toc { position: static; }
  .lg-toc-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .lg-toc-list a {
    border-left: 0; border: 1px solid var(--border-primary);
    border-radius: 9999px; padding: 6px 12px; font-size: 12.5px;
    background: var(--white);
  }
  .lg-toc-list a.on { background: var(--brand-deep); color: var(--white); border-color: var(--brand-deep); }
}
