/* Snapline — legal documents (/privacy/, /terms/, /refund/).
 *
 * A third ground, and the quietest one. The landing page is the undimmed
 * screen; the purchase pages are the dimmed screen with the offer in the one
 * clear rectangle. A legal document is neither: it is a page someone reads
 * carefully, usually because they are worried, so the capture grammar is spent
 * exactly once — on the summary at the top, the part that answers the worry —
 * and nothing else on the page competes with the text.
 *
 * Self-contained on purpose. `landing.css` is 1300 lines of demo machinery a
 * document page will never draw, and both other sheets already restate the
 * token block rather than depend on each other.
 */

:root {
  --paper: #fcfcfd;
  --paper-raised: #f4f5f7;
  --ink: #15171c;
  --ink-soft: #5b6270;
  --rule: #e4e6ea;

  --marquee: #0a84ff;
  --marquee-deep: #0071e3;

  --display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --step: 8px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--marquee);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Menu bar ────────────────────────────────────────────────────────────── */

.menubar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 52px;
  padding: 0 var(--gutter);
  background: rgba(252, 252, 253, 0.82);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13.5px;
}

.menubar__mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.menubar__logo { display: block; }

.menubar__nav {
  display: flex;
  gap: 18px;
  color: var(--ink-soft);
}

.menubar__nav a {
  text-decoration: none;
  transition: color 120ms ease;
}

.menubar__nav a:hover,
.menubar__nav [aria-current="page"] { color: var(--ink); }

.menubar__spacer { margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 24px;
  background: var(--marquee);
  color: #fff;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 140ms ease, transform 140ms ease;
  box-shadow: 0 1px 2px rgba(10, 132, 255, 0.3), 0 6px 16px -6px rgba(10, 132, 255, 0.5);
}

.btn:hover { background: var(--marquee-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.88rem;
  border-radius: 7px;
}

@media (max-width: 860px) {
  .menubar__nav { display: none; }
}

/* ── The document ────────────────────────────────────────────────────────── */

.doc {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 80px) var(--gutter) clamp(56px, 9vh, 104px);
}

.doc__head { margin-bottom: calc(var(--step) * 5); }

.doc__kicker {
  margin: 0 0 calc(var(--step) * 1.5);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.doc h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4.6vw, 3.1rem);
  font-weight: 650;
  font-stretch: 114%;
  letter-spacing: -0.036em;
  line-height: 1.04;
  text-wrap: balance;
}

.doc__dates {
  margin: calc(var(--step) * 2) 0 0;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* The one place the capture grammar is spent: the summary someone reads when
   they are trying to find out whether to trust the thing. It is measured, not
   captioned — `readout.js` reports the pane's real rendered size. */

.selection {
  position: relative;
  max-width: min(720px, 100%);
  margin: 0 0 calc(var(--step) * 6);
  outline: 1.5px solid var(--marquee);
  outline-offset: 0;
  border-radius: 2px;
}

.selection__pane {
  background: var(--paper-raised);
  border-radius: 2px;
  padding: clamp(22px, 3.4vw, 32px);
}

.selection__pane h2 {
  margin: 0 0 calc(var(--step) * 2);
  font-size: 1.12rem;
  font-weight: 650;
  font-stretch: 108%;
  letter-spacing: -0.015em;
}

.selection__pane ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.selection__pane li {
  position: relative;
  padding-left: 22px;
  margin-bottom: calc(var(--step) * 1.5);
  font-size: 16px;
  line-height: 1.55;
}

.selection__pane li:last-child { margin-bottom: 0; }

.selection__pane li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  background: var(--marquee);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.25);
}

.selection__handle {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--marquee);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.25);
}

.selection__handle--tl { top: -5px; left: -5px; }
.selection__handle--tr { top: -5px; right: -5px; }
.selection__handle--bl { bottom: -5px; left: -5px; }
.selection__handle--br { bottom: -5px; right: -5px; }
.selection__handle--tm { top: -5px; left: 50%; margin-left: -5px; }
.selection__handle--bm { bottom: -5px; left: 50%; margin-left: -5px; }
.selection__handle--ml { left: -5px; top: 50%; margin-top: -5px; }
.selection__handle--mr { right: -5px; top: 50%; margin-top: -5px; }

.selection__readout {
  position: absolute;
  right: 0;
  bottom: -26px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* ── Body + contents rail ────────────────────────────────────────────────── */

.doc__body {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

/* `min-width: 0` on both columns: a grid item's automatic minimum size is its
   content, and one wide table would otherwise push the whole document past the
   viewport instead of scrolling inside `.table-wrap`. */
.toc {
  position: sticky;
  top: 76px;
  min-width: 0;
  font-size: 14px;
}

.toc h2 {
  margin: 0 0 calc(var(--step) * 1.5);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li { margin-bottom: 7px; counter-increment: toc; }

/* Hanging indent: a wrapped entry lines up under its own text rather than
   under its number, so the numbers stay a readable column of their own. */
.toc a {
  display: block;
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  text-decoration: none;
  line-height: 1.35;
  transition: color 120ms ease;
}

.toc a::before {
  content: counter(toc) ".";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 11.5px;
}

.toc a:hover { color: var(--marquee); }

.prose {
  min-width: 0;
  max-width: 68ch;
}

.prose h2 {
  margin: calc(var(--step) * 6) 0 calc(var(--step) * 2);
  font-size: 1.5rem;
  font-weight: 620;
  font-stretch: 110%;
  letter-spacing: -0.022em;
  line-height: 1.15;
  scroll-margin-top: 76px;
  text-wrap: balance;
}

.prose > h2:first-child { margin-top: 0; }

.prose h3 {
  margin: calc(var(--step) * 4) 0 calc(var(--step) * 1);
  font-size: 1.06rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.prose p {
  margin: 0 0 calc(var(--step) * 2);
  text-wrap: pretty;
}

.prose ul {
  margin: 0 0 calc(var(--step) * 2);
  padding-left: 20px;
}

.prose li { margin-bottom: calc(var(--step) * 1); }

.prose a {
  color: var(--marquee);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.prose a:hover { color: var(--marquee-deep); }

.prose strong { font-weight: 650; }

/* A statement that answers the section's question outright. The pages are
   written to be quotable — by a reader in a hurry, and by whatever summarizes
   them — so the answer is never buried in the middle of a paragraph. */
.answer {
  margin: 0 0 calc(var(--step) * 2.5);
  padding: calc(var(--step) * 2) calc(var(--step) * 2.5);
  background: var(--paper-raised);
  border-left: 3px solid var(--marquee);
  border-radius: 0 6px 6px 0;
  font-size: 16.5px;
}

.answer p { margin: 0; }
.answer p + p { margin-top: calc(var(--step) * 1.5); }

.mono {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 5px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 4px;
  white-space: nowrap;
}

/* Wide content scrolls inside itself; the page never scrolls sideways. */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 calc(var(--step) * 3);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 650;
  font-size: 13px;
  letter-spacing: 0.01em;
  background: var(--paper-raised);
}

tbody tr:last-child td { border-bottom: 0; }

.doc__contact {
  margin-top: calc(var(--step) * 6);
  padding-top: calc(var(--step) * 3);
  border-top: 1px solid var(--rule);
  font-size: 16px;
  color: var(--ink-soft);
}

.doc__contact a { color: var(--marquee); }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--rule);
  padding: 22px 20px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}

.footer a { text-decoration-color: #c3c8cf; }

@media (max-width: 900px) {
  .doc__body { grid-template-columns: minmax(0, 1fr); }
  .toc {
    position: static;
    padding-bottom: calc(var(--step) * 3);
    border-bottom: 1px solid var(--rule);
  }
  .toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
  }
}

@media (max-width: 560px) {
  .selection__handle { display: none; }
  .selection__readout { display: none; }
  .selection { border-radius: 8px; outline-offset: -1px; }
  .selection__pane { border-radius: 8px; }
}
