/* /terms + /privacy (views/pages/legal.njk). Own prefix .lg-, part of the CSS bundle (src/lib/css-bundle.ts). */
.lg { --lg-card: #fff; --lg-line: #e1eaf7; --lg-ink: #14233a; --lg-text: #3a4a63; --lg-muted: #5f6f89; --lg-soft: #eef4fc; --lg-accent: #1d68c4;
  display: flex; flex-direction: column; gap: 20px; width: 100%; color: var(--lg-text); overflow-wrap: break-word; }
html[data-theme="dark"] .lg { --lg-card: #202531; --lg-line: #2f3748; --lg-ink: #eaedf1; --lg-text: #c0c8d6; --lg-muted: #93a1b5; --lg-soft: #283042; --lg-accent: #6ab8ff; }
.lg h1, .lg h2, .lg p, .lg ol, .lg ul { margin: 0; }
.lg-box { background: var(--lg-card); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--lg-line), 0 18px 34px -28px rgba(20, 70, 160, .55); }

.lg-head { display: flex; flex-direction: column; gap: 22px; padding-top: 6px; }
.lg-head-txt { display: flex; flex-direction: column; gap: 10px; }
.lg .lg-head h1 { font-size: 36px; line-height: 1.15; font-weight: 700; color: var(--lg-ink); }
.lg-intro { max-width: 70ch; font-size: 17px; line-height: 1.65; }
.lg-date { font-size: 13.5px; color: var(--lg-muted); }
.lg-date b { font-weight: 700; color: var(--lg-ink); }
.lg-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.lg .lg-tabs a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 20px; border-radius: 999px; background: var(--lg-card); box-shadow: inset 0 0 0 1px var(--lg-line); color: var(--lg-text); font-size: 14px; font-weight: 700; text-decoration: none; }
.lg .lg-tabs a:hover { background: var(--lg-soft); color: var(--lg-accent); }
.lg .lg-tabs a[aria-current="page"] { background: #2276d0; box-shadow: none; color: #fff; }

.lg-cols { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.lg-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.lg-toc { position: sticky; top: 108px; max-height: calc(100vh - 128px); overflow-y: auto; padding: 18px 12px; }
.lg .lg-toc-t { padding: 0 10px 10px; font-size: 15px; font-weight: 700; color: var(--lg-ink); }
.lg .lg-toc-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lg .lg-toc-list a { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--lg-text); font-size: 14px; line-height: 1.4; text-decoration: none; }
.lg .lg-toc-list a:hover { background: var(--lg-soft); color: var(--lg-accent); }
.lg .lg-toc-list a[aria-current] { background: var(--lg-soft); color: var(--lg-accent); font-weight: 700; }
.lg-toc-n { flex: 0 0 18px; text-align: right; color: var(--lg-muted); font-variant-numeric: tabular-nums; }
.lg-toc-m { display: none; }

.lg-doc { padding: 8px 40px; }
.lg-sec { padding: 30px 0; scroll-margin-top: 104px; }
.lg-sec + .lg-sec { border-top: 1px solid var(--lg-line); }
.lg .lg-sec h2 { display: flex; align-items: center; gap: 14px; font-size: 21px; line-height: 1.3; font-weight: 700; color: var(--lg-ink); }
.lg-num { flex: 0 0 34px; display: grid; place-items: center; height: 34px; border-radius: 10px; background: var(--lg-soft); color: var(--lg-accent); font-size: 15px; }
.lg-body { display: flex; flex-direction: column; gap: 12px; max-width: 72ch; margin: 14px 0 0 48px; font-size: 15.5px; line-height: 1.75; }
.lg .lg-body ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.lg-body li { position: relative; padding-left: 20px; }
.lg-body li::before { content: ''; position: absolute; left: 2px; top: .68em; width: 7px; height: 7px; border-radius: 2px; background: #3b93e0; }

.lg-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 40px; }
.lg .lg-help h2 { font-size: 18px; font-weight: 700; color: var(--lg-ink); }
.lg .lg-help p { margin-top: 4px; font-size: 14.5px; }
.lg .lg-help-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border-radius: 10px; background: #2276d0; color: #fff; font-weight: 700; text-decoration: none; }
.lg .lg-help-btn:hover { background: #1a5ec1; color: #fff; }

@media (max-width: 1000px) {
  .lg-cols { grid-template-columns: minmax(0, 1fr); }
  .lg-side { display: none; }
  .lg-toc-m { display: block; padding: 0 12px; }
  .lg-toc-m summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 8px; color: var(--lg-ink); font-weight: 700; cursor: pointer; list-style: none; }
  .lg-toc-m summary::-webkit-details-marker { display: none; }
  .lg-toc-m summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
  .lg-toc-m[open] summary::after { transform: translateY(2px) rotate(225deg); }
  .lg-toc-m .lg-toc-list { padding-bottom: 12px; }
  .lg .lg-toc-m a { min-height: 40px; align-items: center; }
  .lg-sec { scroll-margin-top: 90px; }
}
@media (max-width: 640px) {
  .lg { gap: 16px; }
  .lg .lg-head h1 { font-size: 28px; }
  .lg-intro { font-size: 15.5px; }
  .lg-tabs { gap: 6px; }
  .lg .lg-tabs a { padding: 0 14px; font-size: 13px; }
  .lg-doc { padding: 2px 18px; }
  .lg-sec { padding: 22px 0; }
  .lg .lg-sec h2 { gap: 12px; font-size: 18px; }
  .lg-num { flex-basis: 30px; height: 30px; font-size: 14px; }
  .lg-body { margin-left: 0; font-size: 15px; line-height: 1.7; }
  .lg-help { padding: 20px 18px; }
  .lg .lg-help-btn { width: 100%; }
}
