/* Legal pages. Standalone on purpose: landing.css carries scroll-motion and
   section machinery that a terms page has no use for, and a document people
   read top to bottom should not depend on JS having run. */

:root {
  --lg-ink: #18181B;
  --lg-ink-soft: #52525B;
  --lg-ink-faint: #71717A;
  --lg-rule: #E4E4E7;
  --lg-bg: #FFFFFF;
  --lg-bg-soft: #FAFAFA;
  --lg-accent: #2563EB;
  --lg-flag: #B45309;
  --lg-flag-bg: #FFFBEB;
  --lg-flag-rule: #FCD34D;
  --lg-wrap: 46rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }

body.lg {
  margin: 0;
  background: var(--lg-bg);
  color: var(--lg-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.lg-wrap { width: 100%; max-width: var(--lg-wrap); margin: 0 auto; padding: 0 1.5rem; }

/* ---- top bar ---- */

.lg-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--lg-rule);
}
.lg-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.lg-top__brand { display: inline-flex; align-items: center; }
.lg-top__brand img { display: block; height: 1.75rem; width: auto; }
.lg-top__back {
  color: var(--lg-ink-soft);
  text-decoration: none;
  font-size: .875rem;
  white-space: nowrap;
}
.lg-top__back:hover { color: var(--lg-ink); }

/* ---- document ---- */

.lg-main { padding-top: 3.5rem; padding-bottom: 5rem; }

.lg-h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 700;
}
.lg-meta { margin: 0 0 2.25rem; color: var(--lg-ink-faint); font-size: .875rem; }

.lg-callout {
  margin: 0 0 2.5rem;
  padding: 1.125rem 1.25rem;
  background: var(--lg-flag-bg);
  border: 1px solid var(--lg-flag-rule);
  border-radius: .75rem;
}
.lg-callout p { margin: 0; font-size: .9375rem; color: #78350F; }

/* ---- contents ---- */

.lg-toc {
  margin: 0 0 3rem;
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--lg-bg-soft);
  border: 1px solid var(--lg-rule);
  border-radius: .75rem;
}
.lg-toc__h {
  margin: 0 0 .75rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lg-ink-faint);
}
.lg-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .125rem 1.5rem;
}
.lg-toc__list a {
  display: flex;
  gap: .625rem;
  padding: .1875rem 0;
  color: var(--lg-ink-soft);
  text-decoration: none;
  font-size: .875rem;
  line-height: 1.5;
}
.lg-toc__list a:hover { color: var(--lg-accent); }
.lg-toc__n {
  flex: 0 0 1.25rem;
  color: var(--lg-ink-faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ---- sections ---- */

.lg-sec { margin: 0 0 2.75rem; scroll-margin-top: 5rem; }

.lg-h2 {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin: 0 0 .875rem;
  padding-top: .75rem;
  border-top: 1px solid var(--lg-rule);
  font-size: 1.1875rem;
  line-height: 1.35;
  letter-spacing: -.01em;
  font-weight: 700;
}
.lg-h2 > span {
  flex: 0 0 auto;
  min-width: 1.5rem;
  color: var(--lg-ink-faint);
  font-size: .8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lg-sec p { margin: 0 0 .875rem; color: var(--lg-ink-soft); }
.lg-sec p:last-child { margin-bottom: 0; }
.lg-sec strong { color: var(--lg-ink); font-weight: 600; }

/* Section 4 is the one people are most likely to skim past and most likely to
   argue about later, so it gets a rail. */
.lg-sec--flag { padding-left: 1.25rem; border-left: 3px solid var(--lg-flag); }
.lg-sec--flag .lg-h2 { color: var(--lg-flag); }
.lg-sec--flag .lg-h2 > span { color: var(--lg-flag); opacity: .7; }

.lg-ol { margin: 0 0 .875rem; padding-left: 1.5rem; color: var(--lg-ink-soft); }
.lg-ol--alpha { list-style: lower-alpha; }
.lg-ol li { margin-bottom: .3125rem; }

.lg-dl { margin: 0; }
.lg-dl dt {
  margin-top: .875rem;
  font-weight: 600;
  color: var(--lg-ink);
}
.lg-dl dt:first-child { margin-top: 0; }
.lg-dl dd { margin: .125rem 0 0; color: var(--lg-ink-soft); }

/* ---- contact ---- */

.lg-contact { margin-top: 1.25rem; }
.lg-btn {
  display: inline-block;
  padding: .625rem 1.125rem;
  background: var(--lg-ink);
  color: #fff;
  border-radius: .5rem;
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 600;
}
.lg-btn:hover { background: #000; }

/* ---- foot ---- */

.lg-foot {
  border-top: 1px solid var(--lg-rule);
  padding: 2rem 0 3rem;
  color: var(--lg-ink-faint);
  font-size: .8125rem;
}
.lg-foot p { margin: 0; }
.lg-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lg-link:hover { color: var(--lg-ink); }

/* ---- narrow ---- */

@media (max-width: 600px) {
  .lg-toc__list { grid-template-columns: minmax(0, 1fr); }
  .lg-main { padding-top: 2.5rem; }
  .lg-sec--flag { padding-left: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
