/* App-only legal documents: openspec/design/legal-docs-web-spec.md (2026-09-07).
   WebView owns the scrolling h1; App owns the paper, return bar and safe area.
   Previous white/dark paper values and 56px bottom padding are superseded.
   Standalone website pages retain css/legal.css. */
html[data-embed] {
  --color-text-primary: #2f2d2a;
  --color-text-secondary: rgb(90, 88, 85);
  --color-text-muted: rgb(146, 144, 141);
  --legal-heading: #33312d;
  --color-border: rgba(74, 72, 70, .1);
  --color-border-strong: rgba(74, 72, 70, .2);
  --color-divider: rgba(74, 72, 70, .07);
  --container-pad: 20px;
  --header-h: 0px;
  height: 100%;
  overflow: hidden;
  background: transparent;
  scroll-padding-top: 0;
}
html[data-embed][data-theme="dark"] {
  --color-text-primary: rgba(242, 240, 236, 1);
  --color-text-secondary: rgba(242, 240, 236, .52);
  --color-text-muted: rgba(242, 240, 236, .34);
  --legal-heading: rgba(242, 240, 236, 1);
  --color-border: rgba(242, 240, 236, .075);
  --color-border-strong: rgba(242, 240, 236, .14);
  --color-divider: rgba(242, 240, 236, .055);
}
[data-embed] body {
  height: 100%;
  overflow: hidden;
  background: transparent;
}
[data-embed] .skip-link,
[data-embed] .header,
[data-embed] .sheet,
[data-embed] .footer { display: none; }
/* Mask the viewport-sized scrollport, not the full document: the fade stays at
   the visible bottom as the reader scrolls. No overlay or safe-area padding. */
[data-embed] #main {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 90%, rgba(0,0,0,.1) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 90%, rgba(0,0,0,.1) 100%);
  scroll-behavior: smooth;
}
[data-embed] .doc-grid { display: block; }
[data-embed] .toc { position: static; top: auto; margin-bottom: 40px; }
[data-embed] .toc__list { grid-template-columns: minmax(0, 1fr); }
[data-embed] .prose { max-width: none; }
[data-embed] .doc-head { padding-block: 28px 24px; }
[data-embed] .doc-body { padding-block: 32px 0; }
[data-embed] .doc-head__inner { max-width: none; gap: 12px; }
[data-embed] .doc-head h1 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.018em;
  color: var(--color-text-primary);
}
[data-embed] .doc-head .body-lg {
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: .005em;
  color: var(--color-text-primary);
}
[data-embed] .prose h2,
[data-embed] .prose h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .005em;
  color: var(--legal-heading);
  scroll-margin-top: 20px;
}
/* A .lede inside the article is still body copy, not a second introduction. */
[data-embed] .prose p,
[data-embed] .prose li,
[data-embed] .prose .lede,
[data-embed] .notice p {
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: .005em;
  color: var(--color-text-secondary);
}
[data-embed] .prose strong,
[data-embed] .prose a { color: inherit; }
[data-embed] .prose p.prose__note,
[data-embed] .doc-head__meta,
[data-embed] .doc-head .eyebrow,
[data-embed] .prose h2 .prose__num,
[data-embed] .toc__title,
[data-embed] .toc__list a::before,
[data-embed] .notice__label,
[data-embed] .prose__table caption {
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--color-text-muted);
}
[data-embed] .notice { background: transparent; }
[data-embed] .toc__list a {
  padding-block: 12px;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: .005em;
  color: var(--color-text-secondary);
}
[data-embed] .prose__table { font-size: 14px; }
@media (prefers-reduced-motion: reduce) {
  [data-embed] #main { scroll-behavior: auto; }
}
