/* legal.css — /legal/ privacy policy + terms.
 *
 * Standalone documents: no sidebar, no auth, no app chrome. They have to be
 * readable by a Google reviewer and by a customer's lawyer, neither of whom
 * has an account, so the page must not depend on anything the app loads after
 * sign-in. Tokens come from main.css + theme.css, which are static files.
 *
 * Long-form measure (68ch) rather than the app's dense data layout — these are
 * read start to finish, not scanned. */

/* main.css sets `body { overflow: hidden }` because the app scrolls an inner
   container (.stage / .center-scroll), so a page laid out in normal document
   flow simply cannot be scrolled. Same fix /welcome/ uses: the page element
   becomes its own scroller. */
.lg-page {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}


.lg-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.lg-doc { max-width: 68ch; }
.lg-doc h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-hi);
}
.lg-updated {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--muted-2);
}
.lg-lead {
  margin: 0 0 30px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.lg-doc h2 {
  margin: 34px 0 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-hi);
  scroll-margin-top: 20px;
}
.lg-doc h3 {
  margin: 22px 0 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1);
}
.lg-doc p,
.lg-doc li {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}
.lg-doc p { margin: 0 0 14px; }
.lg-doc ul { margin: 0 0 16px; padding-left: 20px; }
.lg-doc li { margin-bottom: 7px; }
.lg-doc strong { color: var(--text-1); font-weight: 600; }
.lg-doc a { color: var(--accent-text); text-decoration: none; }
.lg-doc a:hover { text-decoration: underline; }
.lg-doc code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(var(--wash-rgb), 0.06);
  color: var(--text-2);
  word-break: break-all;
}

/* The Limited Use paragraph is the one a Google reviewer looks for, and the
   one a user should not have to hunt for either. */
.lg-callout {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-left-width: 3px;
  border-radius: 10px;
}
.lg-callout p { margin: 0; color: var(--text-2); }
.lg-callout p + p { margin-top: 10px; }

/* Table of contents. A 4,000-word policy that can only be read top-to-bottom
   is a policy nobody reads — and a reviewer looking for one specific clause
   (Limited Use, California rights) should reach it in one click. */
.lg-toc {
  margin: 0 0 32px;
  padding: 16px 18px;
  background: rgba(var(--wash-rgb), 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.lg-toc-h {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-3);
}
.lg-toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 26px;
}
.lg-toc li {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.5;
  break-inside: avoid;
}
.lg-toc a { color: var(--muted); text-decoration: none; }
.lg-toc a:hover { color: var(--accent-text); text-decoration: underline; }

@media (max-width: 620px) {
  .lg-toc ol { columns: 1; }
}

.lg-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.lg-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13.5px;
}
.lg-table th {
  text-align: left;
  padding: 0 12px 8px 0;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-3);
  border-bottom: 1px solid var(--line-strong);
}
.lg-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.55;
  vertical-align: top;
}
.lg-table td:first-child { color: var(--text-2); white-space: nowrap; }

.lg-foot {
  max-width: 68ch;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted-3);
}
.lg-foot a { color: var(--muted); text-decoration: none; }
.lg-foot a:hover { color: var(--text); }

/* Index cards on /legal/ */
.lg-cards { display: grid; gap: 12px; margin-top: 26px; max-width: 68ch; }
.lg-card {
  display: block;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lg-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: var(--panel-2);
}
.lg-card b {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-hi);
}
.lg-card span { font-size: 13.5px; line-height: 1.6; color: var(--muted); }


@media (max-width: 620px) {
  .lg-wrap { padding: 28px 18px 60px; }
  .lg-doc h1 { font-size: 25px; }
}
