/* Terms of Service and Privacy Policy: a plain document, not the game. One text face for everything (no display
   font), about 70 characters a line, a numbered contents list that sits in a sticky left column on wide screens,
   and tables with horizontal rules only that stack into labelled rows on phones. Loaded after site.css. */

.legal .legal-page {
  display: grid; grid-template-columns: minmax(0, 680px); justify-content: center;
  padding: 40px 20px 72px; overflow-wrap: break-word;
  font-family: var(--f-text); font-size: 16.5px; line-height: 1.7; color: var(--text);
}
.legal .legal-head, .legal .legal-body { min-width: 0; }

/* headings: the body typeface, never the poster font */
.legal .legal-page h1, .legal .legal-page h2, .legal .legal-page h3 {
  font-family: var(--f-text); letter-spacing: normal; color: var(--text);
}
.legal .legal-page h1 { font-size: 34px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin: 0; }
.legal .legal-page h2 { font-size: 21px; font-weight: 600; line-height: 1.35; margin: 44px 0 10px; scroll-margin-top: 84px; }
.legal .legal-page h3 { font-size: 17px; font-weight: 600; line-height: 1.4; margin: 24px 0 6px; }
.legal .legal-body > h2:first-child { margin-top: 32px; }
.legal .legal-dates { color: var(--muted); font-size: 15px; margin: 8px 0 20px; }
.legal .legal-page p { margin: 0 0 14px; }
.legal .legal-page ul, .legal .legal-page ol { margin: 0 0 16px; padding-left: 24px; }
.legal .legal-page li { margin: 6px 0; }
.legal .legal-page a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(18, 18, 18, .4); text-underline-offset: 2px; }
.legal .legal-page a:hover { text-decoration-color: currentColor; }
.legal .caps { text-transform: uppercase; } /* the disclaimers: so the filled-in names are in capitals too */
.legal address { font-style: normal; margin: 0 0 14px; }
.legal .legal-page code { font-family: var(--f-mono); font-size: .86em; overflow-wrap: anywhere; }

/* the plain-English summary: a thin rule around it, no grey card */
.legal .legal-summary { border: 1px solid var(--line); border-radius: 4px; padding: 16px 20px 6px; margin: 0 0 8px; }
.legal .legal-page .legal-summary h2 { font-size: 16.5px; margin: 0 0 6px; }
.legal .legal-summary h2 span { font-weight: 400; color: var(--muted); }
.legal .legal-summary ul { margin-bottom: 10px; }

/* contents */
.legal .legal-toc { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0 12px; margin: 8px 0 0; font-size: 15px; line-height: 1.45; }
.legal .legal-page .legal-toc h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.legal .legal-toc ol { list-style: none; padding: 0; margin: 0; }
.legal .legal-toc li { margin: 0; }
.legal .legal-toc a { display: grid; grid-template-columns: 2em 1fr; padding: 4px 0; color: var(--muted); text-decoration: none; }
.legal .legal-toc a:hover { color: var(--text); text-decoration: underline; }

/* tables: horizontal rules only */
.legal .legal-page table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; font-variant-numeric: normal; margin: 6px 0 20px; }
.legal .legal-page th { text-align: left; vertical-align: bottom; font-weight: 600; color: var(--text); background: none; padding: 0 14px 8px 0; border-bottom: 1px solid var(--ui-line); }
.legal .legal-page td { vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.legal .legal-page th:last-child, .legal .legal-page td:last-child { padding-right: 0; }
.legal .legal-page td a { font-weight: inherit; text-decoration: underline; }

/* wide screens: contents in a sticky column on the left */
@media (min-width: 1024px) {
  .legal .legal-page {
    grid-template-columns: 220px minmax(0, 680px); column-gap: 56px; align-items: start;
    grid-template-areas: 'toc head' 'toc body';
  }
  .legal .legal-head { grid-area: head; }
  .legal .legal-body { grid-area: body; }
  .legal .legal-toc {
    grid-area: toc; position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto;
    border: 0; padding: 4px 0 0; margin: 0; font-size: 14px;
  }
  .legal .legal-toc a { padding: 5px 0; }
}

/* phones: each table row becomes a short labelled block */
@media (max-width: 600px) {
  .legal .legal-page { padding: 28px 20px 56px; font-size: 16px; }
  .legal .legal-page h1 { font-size: 28px; }
  .legal .legal-page h2 { font-size: 19px; margin-top: 36px; }
  .legal .legal-page thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .legal .legal-page table, .legal .legal-page tbody, .legal .legal-page tr, .legal .legal-page td { display: block; width: auto; }
  .legal .legal-page table { border-top: 1px solid var(--ui-line); }
  .legal .legal-page tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .legal .legal-page td { border: 0; padding: 2px 0; }
  .legal .legal-page td:first-child { font-weight: 600; padding-bottom: 6px; }
  .legal .legal-page td[data-label]:not(:first-child) { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); column-gap: 12px; }
  .legal .legal-page td[data-label]:not(:first-child)::before { content: attr(data-label); color: var(--muted); font-size: 14px; padding-top: 1px; }
}
@media (max-width: 600px) {
  .legal .legal-summary { padding: 14px 16px 4px; }
  .legal .legal-summary ul { padding-left: 20px; }
}
@media (max-width: 380px) {
  .legal .legal-page { padding-left: 16px; padding-right: 16px; }
}
