/* Long documents: the privacy policy, the terms and the page for parents.
   A .prose text column, plus a "Contents" card built from the page's h2s that sticks on wide
   screens and sits above the text on phones. The words are counsel-approved: style them, never
   rewrite them. */

.doc-dates { margin-top: 18px; font-size: 15px; color: var(--ink-2); }

.doc {
  display: grid;
  grid-template-columns: minmax(0, 44rem) minmax(240px, 300px);
  justify-content: space-between;
  gap: 64px;
  align-items: start;
}
.doc-text { grid-column: 1; grid-row: 1; }

/* contents */
.toc {
  grid-column: 2; grid-row: 1;
  position: sticky; top: 24px;
  max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--paper-hi); border: 1px solid var(--rule);
  padding: 20px 22px 18px;
}
.toc-h { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--rule); }
.toc li + li { border-top: 1px dotted var(--rule); }
.toc a { display: block; padding: 7px 0; font-size: 15px; line-height: 1.35; color: var(--ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--leaf); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.toc-num a { display: grid; grid-template-columns: 2em minmax(0, 1fr); }
.toc .n { color: var(--forest); font-weight: 600; font-variant-numeric: tabular-nums; }

/* the text */
.doc-text h2 {
  font-size: clamp(26px, 2.3vw, 33px); line-height: 1.12;
  margin-top: 2.1em; padding-top: 0.9em; border-top: 1px solid var(--rule);
}
.doc-text > h2:first-child { margin-top: 0; }
.doc-text h2 .n {
  font-style: italic; font-weight: 500; color: var(--forest);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.doc-text h3 { font-size: 19px; }
.doc-text h2[id], .doc-text h3[id] { scroll-margin-top: 24px; }
.doc-text ul ul { margin-top: 0.45em; margin-bottom: 0.45em; }
.doc-text ul ul li::before { background: transparent; border: 1.5px solid var(--leaf-dk); }

/* boxed passages */
.doc-text .notice { font-size: 17px; padding: 20px 24px; }
.doc-text .notice > * + * { margin-top: 0.8em; }
.notice-title { font-family: var(--display); font-weight: 600; font-variation-settings: 'opsz' 36, 'SOFT' 100; font-size: 21px; line-height: 1.25; }
.notice-title strong { font-weight: 600; }
.notice-warn { border-left: 4px solid var(--st-mythic); background: #FCEFE9; }
.prose .notice-warn ul li::before { background: var(--st-mythic); }
.notice-kids { border-left: 4px solid var(--leaf); background: #EFF6E3; }

/* tables scroll sideways on phones instead of squashing; the shadows show there is more */
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, var(--paper) 30%, rgba(251, 248, 241, 0)) left center / 32px 100% no-repeat local,
    linear-gradient(to left, var(--paper) 30%, rgba(251, 248, 241, 0)) right center / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(26, 26, 46, 0.16), transparent) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(26, 26, 46, 0.16), transparent) right center / 12px 100% no-repeat scroll;
}
.table-scroll:focus-visible { outline-offset: 2px; }
.doc-text table { border-top: 1.5px solid var(--ink); }
.doc-text thead th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); background: var(--sand-lo); border-bottom: 1.5px solid var(--ink); }
.doc-text td:first-child { font-weight: 500; }

@media (max-width: 980px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .doc-text, .toc { grid-column: 1; grid-row: auto; }
  .toc { position: static; max-height: none; max-width: 44rem; }
}
@media (max-width: 560px) {
  .doc-text h2 { font-size: 26px; }
  .doc-text .notice { padding: 16px 18px; font-size: 16px; }
  .notice-title { font-size: 19px; }
  .table-scroll table { min-width: 34rem; }
  .table-scroll table.wide { min-width: 44rem; }
  .doc-text table { font-size: 14px; }
  .doc-text th, .doc-text td { padding: 9px 10px; }
}
