/* Legal pages (privacy, terms, refund): a long document on the same ledger pad.
   Loads after site.css, which supplies the tokens, fonts, pad, header strip and footer. */

.strip nav a[aria-current="page"] { font-weight: 650; background-size: 100% 1.5px; }

.doc-head { padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(1.25rem, 3vw, 2rem); max-width: var(--sheet); }
.doc-head h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.8rem); line-height: 1; margin: 0 0 0.6rem; }
.effective { margin: 0; font: 500 0.95rem/1.4 var(--mono); color: var(--red-ink); }

/* The document is one sheet laid on the ruled pad: its own paper, so rules never run through words. */
.doc {
  max-width: 46rem;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0.25rem 0 2rem;
  background: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.7;
}
.doc h2 {
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem);
  line-height: 1.2;
  margin: 2.75rem 0 0.75rem;
  padding-top: 0.9rem;
  border-top: 3px double var(--red);
  scroll-margin-top: 1.5rem;
}
.doc > h2:first-child { margin-top: 0; }
.doc h3 { font-size: 1.15rem; line-height: 1.3; margin: 1.75rem 0 0.4rem; }
.doc p, .doc ul, .doc ol { margin: 0.8rem 0; }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin: 0.4rem 0; padding-left: 0.25rem; }
.doc li::marker { color: var(--red); }
.doc strong { font-weight: 650; }
.doc code {
  font: 500 0.88em/1 var(--mono);
  padding: 0.1em 0.35em;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  border-radius: 2px;
  overflow-wrap: anywhere;
}

/* Tables are ledger tables: a red double rule under the header, blue rules between rows,
   faint red rules between columns. */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; scrollbar-color: var(--rule) transparent; scrollbar-width: thin; }
.table-wrap:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 36rem; font-size: 0.95rem; line-height: 1.5; background: var(--paper); }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule); }
.doc th + th, .doc td + td, .doc th + td { border-left: 1px solid color-mix(in srgb, var(--red) 45%, transparent); }
.doc thead th { font: 600 0.82rem/1.3 var(--sans); color: var(--ink-2); vertical-align: bottom; border-bottom: 3px double var(--red); }
.doc tbody th { font-weight: 600; }
.doc th:first-child, .doc td:first-child { padding-left: 0; }

@media print {
  :root { --paper: #fff; --paper-2: #f2f2f2; --ink: #000; --ink-2: #333; --red: #000; --red-ink: #000; --rule: #999; }
  body { font-size: 11pt; background: #fff; }
  main { background: none; }
  .strip nav, .skip, .holes, .pad::before { display: none; }
  .pad { padding-left: 0; }
  .doc { max-width: none; margin: 0; }
  .doc a { text-decoration: underline; }
  .table-wrap { overflow: visible; }
  .doc table { min-width: 0; }
  .doc h2, .doc h3 { break-after: avoid; }
  .doc tr { break-inside: avoid; }
}
@media (max-width: 480px) { .strip-top { flex-wrap: wrap; } }
