.legal-page { --legal-sidebar: 224px; --legal-gap: 64px; }
.legal-hero {
  display: grid;
  grid-template-columns: var(--legal-sidebar) minmax(0, 1fr);
  column-gap: var(--legal-gap);
  align-items: start;
  padding-block: 68px 36px;
}
.legal-meta { padding-top: 9px; font-size: 15px; line-height: 1.65; color: var(--ink-muted); }
.legal-updated { margin-top: 28px; }
.legal-updated time { color: var(--ink-strong); }
.legal-hero .guide-title { font-size: clamp(52px, 5.2vw, 76px); }
.legal-lede { max-width: 32em; margin-top: 22px; font-size: 23px; line-height: 1.6; text-wrap: pretty; }
.legal-hero .guide-link { margin-top: 16px; color: var(--ink-muted); }
.legal-layout {
  display: grid;
  grid-template-columns: var(--legal-sidebar) minmax(0, 1fr);
  gap: var(--legal-gap);
  align-items: start;
  padding-block: 24px 80px;
}
.legal-contents { position: sticky; top: 32px; padding-top: 8px; font-size: 15px; }
.legal-contents > p { margin-bottom: 17px; color: var(--ink-muted); }
.legal-contents ol { list-style: none; counter-reset: contents; }
.legal-contents li { counter-increment: contents; }
.legal-contents li a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  min-height: 40px;
  padding-block: 8px;
  align-items: baseline;
  line-height: 1.5;
}
.legal-contents li a::before { content: counter(contents, decimal-leading-zero); color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.legal-contents a:hover { text-decoration: underline; text-underline-offset: 4px; }
.legal-contents .legal-license-link { margin-top: 24px; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.legal-body { min-width: 0; max-width: 760px; }
.legal-body section { scroll-margin-top: 36px; }
.legal-body section + section { margin-top: 52px; padding-top: 44px; border-top: 1px solid var(--edge); }
.legal-body h2 { font: 600 34px/1.2 var(--serif); letter-spacing: -.6px; text-wrap: pretty; }
.legal-body p, .legal-body dd { font-size: 17px; line-height: 1.85; text-wrap: pretty; }
.legal-body p { margin-top: 20px; }
.legal-body strong { font-weight: 600; }
.legal-body a { display: inline; min-height: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.legal-body a:hover { text-decoration-thickness: 2px; }
.legal-routes { margin-block: 28px 26px; }
.legal-routes > div + div { margin-top: 26px; }
.legal-routes dt { font-size: 17px; line-height: 1.5; font-weight: 600; }
.legal-routes dd { margin: 8px 0 0; }
.legal-license { margin-top: 24px; }
.legal-license summary { cursor: pointer; min-height: 44px; padding-block: 10px; font-size: 16px; line-height: 1.5; text-decoration: underline; text-underline-offset: 4px; }
.legal-license summary:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 5px; }
.legal-license pre { margin: 16px 0 0; padding: 24px; background: var(--surface-page); font: 13px/1.9 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.legal-page :target { scroll-margin-top: 36px; }
@media (max-width: 1100px) {
  .legal-page { --legal-sidebar: 200px; --legal-gap: 40px; }
}
@media (max-width: 960px) {
  .legal-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 32px 26px; }
  .legal-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; padding: 0; }
  .legal-updated { margin: 0; }
  .legal-updated br { display: none; }
  .legal-updated time::before { content: " "; white-space: pre; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 38px; width: min(760px, calc(100% - var(--page-gutter) * 2)); }
  .legal-hero { width: min(760px, calc(100% - var(--page-gutter) * 2)); }
  .legal-contents { position: static; padding-bottom: 28px; border-bottom: 1px solid var(--edge); }
  .legal-contents ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
  .legal-contents li a { min-height: 44px; }
  .legal-contents .legal-license-link { margin-top: 12px; }
}
@media (max-width: 520px) {
  .legal-hero .guide-title { font-size: 50px; }
  .legal-lede { font-size: 20px; line-height: 1.65; margin-top: 18px; }
  .legal-meta { font-size: 14px; gap: 6px 20px; }
  .legal-layout { padding-bottom: 48px; }
  .legal-contents ol { gap: 0 16px; }
  .legal-contents li a { grid-template-columns: 20px 1fr; gap: 5px; font-size: 14px; }
  .legal-body h2 { font-size: 29px; }
  .legal-body section + section { margin-top: 36px; padding-top: 32px; }
  .legal-body p, .legal-body dd { font-size: 16px; line-height: 1.8; }
  .legal-body p { margin-top: 17px; }
  .legal-license pre { padding: 18px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html:has(.legal-page) { scroll-behavior: auto; } }
@media (min-width: 961px) and (max-height: 650px) { .legal-contents { position: static; } }
@media print {
  .guide-header-wrap, .legal-meta > p:first-child, .guide-wave, .legal-contents, .legal-hero .guide-link, .s-13-footer, .to-top { display: none !important; }
  .legal-meta { display: block; padding: 0; }
  .legal-updated { margin: 0 0 12px; font-size: 10pt; }
  .legal-updated br { display: none; }
  .legal-updated time::before { content: " "; white-space: pre; }
  .legal-hero, .legal-layout { display: block; width: 100%; padding: 0; }
  .legal-page, .guide-opening { background: white; color: black; }
  .legal-hero .guide-title { font-size: 36pt; }
  .legal-lede { font-size: 14pt; margin-bottom: 28px; }
  .legal-body { max-width: none; }
  .legal-body p, .legal-body dd { font-size: 10.5pt; line-height: 1.6; }
  .legal-body h2 { font-size: 19pt; break-after: avoid; }
  .legal-body section + section { margin-top: 24px; padding-top: 22px; }
  .legal-body p { orphans: 3; widows: 3; }
}
