/* Legal pages — terms, privacy, delete-account.
   Extends the share-landing palette. Same rule as the rest of the site:
   sharp corners everywhere, mint used sparingly, system fonts only (no
   webfont request on a page people open to read one paragraph). */

:root {
  color-scheme: dark;

  --ink:    #0e0c29;
  --panel:  #17143b;
  --raised: #221e55;
  --line:   #393377;
  --mint:   #03e29d;
  --text:   #f7f7ff;
  --muted:  #aaa8c7;
  --dim:    #77749d;
  --alert:  #ff5b6e;

  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 32px);

  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--text);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.masthead-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(3, 226, 157, .12);
  border: 1px solid rgba(3, 226, 157, .45);
  color: var(--mint);
  font-weight: 850;
  font-size: 12px;
  letter-spacing: -.5px;
  text-decoration: none;
}

.wordmark {
  font-weight: 750;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  margin-inline-end: auto;
}

/* Document switcher. Four docs, always all four visible — someone who
   lands on Terms looking for help or deletion should see the way out
   immediately. */
.docnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.docnav a {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  border: 1px solid var(--line);
  text-decoration: none;
}

.docnav a:hover { color: var(--text); border-color: var(--dim); }

.docnav a[aria-current="page"] {
  color: var(--mint);
  border-color: rgba(3, 226, 157, .45);
  background: rgba(3, 226, 157, .08);
}

/* ---------- page frame ---------- */

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 56px) var(--gutter) 80px;
}

/* Single-column pages (delete-account) have no TOC rail to fill the left,
   so the shell itself narrows — otherwise the content reads as dumped
   against the left edge of a wide empty page. */
.shell.narrow { max-width: 780px; }

.doc-head { margin-bottom: 40px; }

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mint);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.1;
  letter-spacing: -.02em;
  font-weight: 800;
}

.stamp {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--dim);
}

.lede {
  margin: 20px 0 0;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 17px;
}

/* ---------- two-column reading layout ---------- */

.layout { display: block; }

.toc {
  margin: 0 0 40px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 700;
}

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

.toc li { counter-increment: toc; }

.toc a {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  display: inline-block;
  width: 2.4em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.toc a:hover { color: var(--text); }
.toc a.active { color: var(--mint); }
.toc a.active::before { color: var(--mint); }

@media (min-width: 940px) {
  .layout {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
  .toc {
    position: sticky;
    top: 24px;
    margin: 0;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
}

/* ---------- document body ---------- */

.doc { max-width: var(--measure); }

.doc section { margin-bottom: 44px; scroll-margin-top: 24px; }

/* The signature: section numbers set as printed kit numbers. This app's
   entire product is a name and a number pressed onto a shirt, so the
   document wears its own numbering the same way. */
.doc h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -.01em;
}

.doc h2 .num {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--mint);
  font-size: 16px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}

.doc h3 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.doc p { margin: 0 0 14px; color: var(--muted); }
.doc strong { color: var(--text); font-weight: 700; }

.doc ul, .doc ol { margin: 0 0 14px; padding-inline-start: 22px; color: var(--muted); }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--dim); }

.doc a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.doc a:hover { text-decoration-thickness: 2px; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 460px;
}

th, td {
  padding: 11px 14px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

th {
  background: var(--raised);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

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

/* ---------- callouts ---------- */

.note {
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--mint);
  background: var(--panel);
}

.note p:last-child { margin-bottom: 0; }

.note.warn { border-inline-start-color: var(--alert); }
.note.warn strong { color: var(--alert); }

/* ---------- delete-account page ---------- */

.route {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.route-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--raised);
  font-weight: 750;
  font-size: 15px;
}

.route-body { padding: 20px; }
.route-body p { margin: 0 0 14px; color: var(--muted); }
.route-body > :last-child { margin-bottom: 0; }

/* In-app path, shown as the sequence of taps it actually is. */
.path {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

/* The number is the flex item; the sentence is wrapped in a <span> so it
   stays one item. Without the span, each <strong> becomes its own flex
   item and the sentence gets 12px holes punched through it. */
.path li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
}

.path li:last-child { border-bottom: 0; }

.path li::before {
  content: counter(step);
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.btn {
  min-height: 50px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: 15px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: transparent;
}

/* Beats `.doc a { text-decoration: underline }` — buttons are not links in
   running prose. */
.doc a.btn, a.btn { text-decoration: none; }

.btn:hover { border-color: var(--dim); }

.btn.primary {
  color: var(--ink);
  background: var(--mint);
  border-color: var(--mint);
}

.btn.primary:hover { filter: brightness(1.08); }

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.foot-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px var(--gutter);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: var(--dim);
}

.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot .spacer { margin-inline-start: auto; }

/* ---------- baseline quality ---------- */

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  :root { background: #fff; color: #000; }
  body { background: #fff; color: #000; }
  .masthead, .toc, .foot, .actions { display: none; }
  .doc, .shell { max-width: none; }
  .doc h2 .num { border-color: #999; background: none; color: #000; }
  .doc p, .doc li, td, th { color: #000; }
  .doc a { color: #000; }
}
