/* Privacy, Terms and Support: long-text pages. Loads after style.css and uses its variables. */

.doc { padding-block: 24px 96px; }
.doc-inner { max-width: 68ch; margin-inline: auto; }

.doc h1 { font-size: clamp(38px, 5vw, 56px); font-weight: 700; text-wrap: balance; }
.doc .updated { margin-top: 14px; font-size: 15px; color: var(--ink2); }
.doc .intro { margin-top: 22px; font-size: 20px; line-height: 1.45; color: var(--ink2); }

.doc h2 {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line);
  font-size: 26px; font-weight: 700; line-height: 1.15; scroll-margin-top: 24px;
}
.doc h3 { margin-top: 28px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.doc p, .doc ul, .doc ol, .doc dl { margin: 14px 0 0; }
.doc h2 + p, .doc h3 + p, .doc h3 + ul { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-top: 8px; padding-left: 4px; }
.doc li::marker { color: var(--ink2); }
.doc a { color: var(--accent); text-underline-offset: 3px; }
.doc a:hover { text-decoration-thickness: 2px; }
.doc strong { font-weight: 650; }

/* Table of contents. Boxed headings use ".doc" too, so the phone rule for ".doc h2" can't override them. */
.toc { margin-top: 36px; padding: 22px 26px; background: var(--surface); border-radius: var(--radius-tile); }
.doc .toc h2 { margin: 0; padding: 0; border: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink2); }
.doc .toc ol { margin: 14px 0 0; padding-left: 1.6em; columns: 2; column-gap: 32px; font-size: 16px; }
.toc li { margin: 0 0 6px; break-inside: avoid; }

/* A short answer up front */
.summary { margin-top: 32px; padding: 22px 26px; border: 1px solid var(--line); border-radius: var(--radius-tile); }
.doc .summary h2 { margin: 0; padding: 0; border: 0; font-size: 19px; }
.summary ul { margin-top: 10px; }

/* Placeholders the owner still has to fill in */
mark.todo {
  background: #FFF3BF; color: var(--ink); padding: 1px 6px; border-radius: 6px;
  font-weight: 600; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* Support */
.faq { margin-top: 40px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 14px 4px; font-size: 18px; font-weight: 650; letter-spacing: -0.01em;
  list-style: none; cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px;
  border-right: 2px solid var(--ink2); border-bottom: 2px solid var(--ink2);
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.faq .answer { padding: 0 4px 22px; }
.faq .answer p:first-child { margin-top: 0; }
.faq .answer ol, .faq .answer ul { margin-top: 10px; }

.contact { margin-top: 48px; padding: 32px; background: var(--surface); border-radius: var(--radius-card); }
.doc .contact h2 { margin: 0; padding: 0; border: 0; font-size: 26px; }
.contact p { margin-top: 10px; }

/* Nav and footer: the current page in the footer */
.footer nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.wordmark { color: var(--ink); }

@media (max-width: 640px) {
  .doc { padding-block: 8px 72px; }
  .doc .intro { font-size: 18px; }
  .doc h2 { margin-top: 44px; font-size: 23px; }
  .toc { padding: 18px 20px; }
  .doc .toc ol { columns: 1; }
  .summary { padding: 18px 20px; }
  .contact { padding: 24px 20px; }
  .faq summary { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
  html { scroll-behavior: auto; }
}
