/* Legal pages (terms.html, privacy.html, refund.html): one document system.
   Dark like the app; prints dark-on-white. Loaded only by those pages. */
:root {
  --bg: #0a0a0a; --panel: #121214; --raised: #18181b; --line: #232327; --line-2: #2e2e33; --rule: #1c1c20;
  --label: #f4f4f5; --label-2: #b9b9c0; --label-3: #8e8e97; --label-4: #63636c; --tint: #9dff3a;
  --warn-bg: #17140c; --warn-line: #3a3118; --warn: #f1e3c0; --warn-icon: #f5c76b;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-data: -apple-system, BlinkMacSystemFont, 'Archivo', system-ui, sans-serif;
  --font-code: 'Cascadia Mono', 'Cascadia Code', Consolas, 'SF Mono', Menlo, 'Liberation Mono', monospace;
  --gutter: clamp(16px, 4vw, 32px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--label); font-family: var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { background: var(--tint); color: #000; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 3px; border-radius: 4px; }
a { color: var(--label); text-decoration: underline; text-decoration-color: var(--tint); text-decoration-thickness: 1px; text-underline-offset: 4px; overflow-wrap: anywhere; }
a:hover { color: #fff; text-decoration-thickness: 2px; }
code { font-family: var(--font-code); font-size: .86em; color: #e4e4e7; background: var(--raised); border: 1px solid #2a2a2f; border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--label); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Top bar: floating chrome, so it is the one blurred surface. */
.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--rule); }
.topbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10, 10, 10, .78); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand-logo svg { width: 80px; height: auto; display: block; }
.brand-sep { width: 1px; height: 20px; background: var(--line-2); }
.brand-sub { font-size: 14px; font-weight: 600; color: var(--label-2); }
.docnav { display: flex; gap: 4px; }
.docnav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--label-3); text-decoration: none; transition: color .15s, background-color .15s; }
.docnav a:hover { color: var(--label); background: var(--panel); }
.docnav a[aria-current="page"] { color: var(--label); font-weight: 600; background: var(--raised); }
.docnav a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tint); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--label); font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s; }
.btn:hover { border-color: #4a4a52; color: var(--label); }
.btn svg { width: 16px; height: 16px; flex: 0 0 16px; }
.btn-action { background: var(--label); border-color: var(--label); color: var(--bg); }
.btn-action:hover { background: #fff; border-color: #fff; color: var(--bg); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 96px) 0 clamp(28px, 4vw, 44px); max-width: 880px; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--label-3); }
.eyebrow span { color: #3f3f46; }
h1 { margin: 0 0 24px; font-size: clamp(2.5rem, 8.4vw, 4.75rem); line-height: .95; font-weight: 800; font-stretch: 125%; letter-spacing: -.025em; text-transform: uppercase; overflow-wrap: anywhere; }
.lede { margin: 0 0 28px; max-width: 720px; font-size: clamp(17px, 2vw, 19px); line-height: 1.65; color: var(--label-2); }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.date { margin: 0; font-size: 14px; line-height: 1.5; color: var(--label-3); }
.date strong { color: var(--label-3); font-weight: 500; }
.read-time { font-size: 14px; color: var(--label-3); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* The short version */
.summary { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.summary-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 20px; }
.summary-head h2 { margin: 0; font-size: 20px; font-weight: 700; font-stretch: 112%; }
.summary-head p { margin: 0; font-size: 13px; color: var(--label-3); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fact { margin: 0; padding: 20px 20px 22px; background: var(--panel); }
.fact dt { margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--label-3); }
.fact .big { display: block; font-size: clamp(24px, 3vw, 30px); font-weight: 700; font-stretch: 112%; line-height: 1.05; color: var(--label); }
.fact .big.tint { color: var(--tint); }
.fact dd { margin: 0; }
.fact dd p { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--label-2); }
.covers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.covers-label { margin-right: 4px; font-size: 13px; color: var(--label-3); }
.chip { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #111113; font-size: 13px; font-weight: 500; color: #d4d4d8; }

/* Document + contents */
.layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px clamp(40px, 6vw, 80px); padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 8vw, 96px); }
.toc-col { flex: 1 1 220px; max-width: 260px; }
.toc { margin: 0; }
.toc summary { display: none; }
.toc-label { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--label-3); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; font-size: 14px; line-height: 1.45; color: var(--label-3); text-decoration: none; transition: color .15s; }
.toc a:hover { color: var(--label); }
.toc a .n { min-width: 20px; font-size: 12px; color: var(--label-4); }
.toc a.is-active { color: var(--label); }
.toc a.is-active .n { color: var(--tint); }
.help { margin-top: 28px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.help strong { display: block; margin-bottom: 4px; font-size: 14px; }
.help p { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: var(--label-3); }
.help a { font-size: 13px; font-weight: 600; }
@media (min-width: 1024px) {
  .toc-col { position: sticky; top: 92px; max-height: calc(100vh - 112px); overflow-y: auto; padding-top: 52px; scrollbar-width: thin; }
}
@media (max-width: 1023.98px) {
  .toc-col { flex-basis: 100%; max-width: none; }
  .toc { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
  .toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
  .toc summary::-webkit-details-marker { display: none; }
  .toc summary::after { content: ""; width: 9px; height: 9px; margin-top: -4px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease-out); }
  .toc[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
  .toc summary span { color: var(--label-3); font-weight: 500; }
  .toc nav { padding: 2px 18px 14px; border-top: 1px solid var(--line); }
  .toc-label { display: none; }
  .toc a { min-height: 40px; align-items: center; }
  .help { display: none; }
}

.doc { flex: 999 1 560px; min-width: 0; max-width: 760px; }
.doc > section { padding: 48px 0 40px; border-top: 1px solid var(--rule); }
.doc > section:first-child { border-top: 0; padding-top: 8px; }
.doc h2 { margin: 0 0 22px; font-size: clamp(23px, 2.6vw, 28px); line-height: 1.2; font-weight: 700; font-stretch: 112%; letter-spacing: -.015em; color: var(--label); }
.doc h3 { margin: 32px 0 12px; font-size: 17px; line-height: 1.35; font-weight: 650; color: var(--label); }
.doc p, .doc li { font-size: 17px; line-height: 1.75; color: var(--label-2); }
.doc p { margin: 0 0 18px; }
.doc strong { color: var(--label); font-weight: 600; }
.doc ul, .doc ol { margin: 0 0 20px; padding-left: 22px; }
.doc li { margin-bottom: 10px; padding-left: 4px; }
.doc li::marker { color: var(--label-4); }

/* Lists with a hairline per row */
.doc .rows { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.doc .rows > li { display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.6; }
.doc .rows > li::before { content: ""; flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; background: no-repeat center / 20px 20px; background-image: radial-gradient(circle at center, var(--label-3) 0 2.5px, transparent 3px); }
.doc .rows.no > li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e97' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6M15 9l-6 6'/%3E%3C/svg%3E"); }
.doc .rows.yes > li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239dff3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.5 2.7 2.7L16 9.8'/%3E%3C/svg%3E"); }
.doc .rows.alpha { counter-reset: alpha; }
.doc .rows.alpha > li::before { counter-increment: alpha; content: counter(alpha, lower-alpha); background: none; color: var(--label-4); font-size: 14px; font-weight: 600; }
.doc .rows.terms > li { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 4px 20px; }
.doc .rows.terms > li::before { display: none; }
.doc .rows.terms > li > strong:first-child { font-weight: 600; }
@media (max-width: 559.98px) { .doc .rows.terms > li { grid-template-columns: minmax(0, 1fr); } }

/* Panels inside the document */
.note { margin: 28px 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.note > :last-child { margin-bottom: 0; }
.note-title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 16px; font-weight: 600; color: var(--label); }
.note-title svg { width: 20px; height: 20px; flex: 0 0 20px; }
.doc .note p, .doc .note li { font-size: 15px; line-height: 1.7; }
.warn { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 24px; padding: 16px 18px; border: 1px solid var(--warn-line); border-radius: 12px; background: var(--warn-bg); }
.warn svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 3px; }
.doc .warn p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--warn); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 24px 0 28px; padding: 0; list-style: none; }
.doc .cards > li, .card { margin: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.card-kicker { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; color: var(--label-3); }
.card-title { display: block; margin: 0 0 8px; font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--label); }
.doc .card p, .doc .cards > li p { margin: 0; font-size: 14px; line-height: 1.6; }
.badge { padding: 3px 7px; border-radius: 5px; background: var(--tint); color: #0a0a0a; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 50%; background: var(--label); color: var(--bg); font-size: 13px; font-weight: 700; }
.step-n.tint { background: var(--tint); }
.step-head { display: flex; align-items: center; margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--label); }
.keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 24px 0 28px; }
.keyfacts div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.keyfacts dt { margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--label-3); }
.keyfacts dd { margin: 0; font-size: 17px; font-weight: 600; color: var(--label); }

/* Subscription cards (Terms §5) */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; margin: 32px 0 28px; }
.plan { padding: 22px 22px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.doc .plan h3 { margin: 0; font-size: 19px; font-weight: 700; font-stretch: 112%; }
.plan-price { text-align: right; font-family: var(--font-data); font-size: 26px; font-weight: 700; line-height: 1; color: var(--label); white-space: nowrap; }
.plan-price small { display: block; margin-top: 5px; font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--label-3); }
.doc .plan ul { list-style: none; padding: 0; margin: 0; }
.doc .plan li { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; line-height: 1.65; }
.doc .plan li:last-child { border-bottom: 0; }

/* Tables (Privacy) */
.table-wrap { margin: 24px 0 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 20px; background: #0f0f11; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--label-3); }
td { padding: 16px 20px; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: 15px; line-height: 1.6; color: var(--label-2); }
td:first-child { width: 34%; color: var(--label); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 559.98px) {
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
  tr:last-child { border-bottom: 0; }
  td { display: block; width: auto !important; padding: 0; border: 0; }
  td:first-child { margin-bottom: 4px; }
}

.contact-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px 28px; margin: 24px 0 0; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.contact-card strong { display: block; margin-bottom: 4px; font-size: 18px; }
.doc .contact-card p { margin: 0; font-size: 15px; }
.contact-card .actions a { text-decoration: none; }

.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; padding-bottom: clamp(48px, 7vw, 72px); }
.related a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-decoration: none; transition: border-color .15s; }
.related a:hover { border-color: #3a3a40; }
.related small { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--label-3); }
.related span { font-size: 20px; font-weight: 700; font-stretch: 112%; }
.related svg { width: 22px; height: 22px; flex: 0 0 22px; transition: transform .2s var(--ease-out); }
.related a:hover svg { transform: translateX(3px); }

.site-footer { margin-top: auto; border-top: 1px solid var(--rule); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 26px; padding-bottom: 26px; font-size: 13px; color: var(--label-3); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--label-2); text-decoration: none; }
.site-footer a:hover { color: var(--label); text-decoration: underline; }

@media (max-width: 719.98px) {
  .topbar { position: relative; }
  .topbar-in { gap: 8px; }
  .docnav { order: 3; flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
  .docnav a { justify-content: center; padding: 0 6px; font-size: 13px; border-radius: 7px; }
  .docnav a[aria-current="page"] { background: var(--label); color: var(--bg); }
  .docnav a[aria-current="page"]::before { display: none; }
  .docnav .long { display: none; }
  .back-link .long { display: none; }
  .doc p, .doc li { font-size: 16px; line-height: 1.7; }
}

@media print {
  @page { margin: 18mm 16mm; }
  :root { --label: #111; --label-2: #222; --label-3: #555; --label-4: #777; --line: #ccc; --rule: #ddd; --panel: #fff; --tint: #111; }
  html, body { background: #fff !important; color: #111 !important; }
  .no-print, .topbar, .toc-col, .related, .site-footer, .actions, .skip { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .hero { padding: 0 0 12pt; }
  h1 { font-size: 26pt; text-transform: none; }
  .doc { max-width: none; }
  .doc p, .doc li { font-size: 10.5pt; color: #222; }
  .doc > section { padding: 14pt 0 8pt; break-inside: auto; }
  h2, h3 { break-after: avoid; }
  .note, .card, .plan, .summary, .cards > li, .warn, .table-wrap { break-inside: avoid; background: #fff !important; }
  .warn p { color: #222 !important; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chip, code, th { background: #f4f4f5 !important; color: #111 !important; border-color: #ddd !important; }
  .step-n { background: #111 !important; color: #fff !important; }
  .fact .big.tint, .badge { color: #111 !important; background: none !important; }
  a { color: #0b57d0; }
  .doc a[href^="http"]::after, .doc a[href^="/"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
