/* Docs, privacy and terms: the same ground and tokens as the home page, set for reading. */
.page-ground { position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100lvh; z-index: 0; overflow: hidden; pointer-events: none; background: var(--ink-950); }
.page-ground::before { content: ""; position: absolute; inset: -10%; background: radial-gradient(56% 70% at 104% 18%, rgba(36, 48, 255, .9), rgba(36, 48, 255, .34) 44%, rgba(36, 48, 255, 0) 74%); animation: pageAura var(--dur-drift) ease-in-out infinite alternate; }
@keyframes pageAura { 0% { transform: translate3d(0, -2%, 0) scale(1); opacity: .8; } 100% { transform: translate3d(-4%, 4%, 0) scale(1.1); opacity: 1; } }
.page-ground .stars { position: absolute; inset: 0; }
body { background: var(--ink-950); }

.doc-head, main.doc, footer.doc-foot { position: relative; z-index: 1; width: 100%; max-width: 46rem; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.doc-head { padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; animation: docIn var(--dur-in) var(--ease-out) both; }
.doc-head .back { color: var(--muted); font-weight: 650; font-size: var(--text-small); text-decoration: none; }
.doc-head .back:hover { color: var(--yellow); }
main.doc { padding-top: 28px; padding-bottom: 44px; animation: docIn var(--dur-in) var(--ease-out) .12s both; }
@keyframes docIn { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
.doc h1 { margin: 0; font: italic 900 clamp(2.3rem, 10.5vw, 4rem)/.92 var(--font-display); letter-spacing: -.035em; color: #fff; }
.doc h1.set { letter-spacing: 0; word-spacing: -.04em; }
.doc .updated, .doc .lede { margin: 14px 0 28px; color: var(--muted); }
.doc .lede { font-size: 1.15rem; max-width: 34em; }
.doc h2 { margin: 34px 0 10px; font: italic 900 clamp(1.3rem, 5.4vw, 1.6rem)/1.05 var(--font-display); letter-spacing: -.02em; color: #fff; }
.doc h2.set { letter-spacing: 0; word-spacing: -.04em; }
.doc h3 { margin: 22px 0 6px; font-size: 1.05rem; font-weight: 800; color: #fff; }
.doc p, .doc li { color: #DDE0FA; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 1.25em; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--yellow); font-weight: 800; }
.doc strong { color: #fff; }
.doc a { color: var(--yellow); font-weight: 650; overflow-wrap: anywhere; text-underline-offset: 3px; }
.doc code { font: .92em var(--font-mono); background: rgba(255, 255, 255, .08); padding: .1em .35em; border-radius: 6px; color: #fff; }

footer.doc-foot { padding-top: 20px; padding-bottom: calc(36px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--text-small); }
footer.doc-foot p { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px !important; }
.foot-links a { color: var(--muted); font-weight: 650; text-decoration: none; }
.foot-links a:hover, .foot-links a[aria-current] { color: var(--yellow); }
footer.doc-foot .credit { margin-top: 4px; font-size: .8rem; }
footer.doc-foot .credit a { color: var(--muted); font-weight: 650; text-underline-offset: 3px; }
footer.doc-foot .credit a:hover { color: var(--yellow); }

/* ---------- docs ---------- */
.toc { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin: 0 -20px 6px; padding: 4px 20px 10px; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; padding: 8px 14px; border-radius: var(--r-chip); background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: var(--text-small); font-weight: 700; text-decoration: none; transition: border-color .2s, color .2s; }
.toc a:hover { border-color: var(--yellow); color: var(--yellow); }
.card { position: relative; margin: 18px 0 0; padding: 22px 20px 12px; border-radius: var(--r-card); background: rgba(13, 16, 58, .92); border: 1px solid var(--line); box-shadow: var(--shadow-card); scroll-margin-top: 16px; }
.js .card.rise { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .6s var(--ease-out), transform .8s var(--ease-out); }
.js .card.rise.in { opacity: 1; transform: none; }
.card h2 { margin-top: 0; }
.card .pair { margin: 4px 0 6px; max-width: 420px; }
.card .pair + .said { margin-bottom: 16px; }
.said { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 420px; color: var(--muted); font-size: var(--text-small); text-align: center; }
.card .route { margin: 6px 0 16px; max-width: 420px; }
.limits { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 16px !important; }
.limits li { margin: 0; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.limits b { display: block; font: italic 900 1.5rem/1 var(--font-display); color: var(--yellow); letter-spacing: -.02em; }
.limits span { display: block; margin-top: 6px; font-size: var(--text-small); color: var(--muted); line-height: 1.35; }
.tiers { list-style: none; padding: 0 !important; display: grid; grid-template-columns: 1fr; gap: 10px; margin: 6px 0 10px !important; }
.tiers li { margin: 0; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 10px; }
.tiers h3 { margin: 0; font: italic 900 1.3rem/1 var(--font-display); letter-spacing: -.02em; }
.tiers em { font-style: normal; font-size: var(--text-small); color: var(--muted); text-align: right; align-self: center; }
.tiers dl { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.tiers dt { font-size: var(--text-small); color: var(--muted); }
.tiers dd { margin: 4px 0 0; font: italic 900 1.25rem/1.1 var(--font-display); color: var(--yellow); letter-spacing: -.02em; white-space: nowrap; }
@media (min-width: 700px) { .tiers { grid-template-columns: repeat(3, 1fr); } }
.coins { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.coins span.c { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: var(--r-chip); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-weight: 800; font-size: var(--text-small); }
.coins .coin { width: 30px; height: 30px; font-size: 9px; border-color: var(--ink-950); }
.xps { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 16px; }
.xps .xp { animation: xpBob 4.4s ease-in-out infinite; animation-delay: calc(var(--n, 0) * -.4s); }
@keyframes xpBob { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-4px) rotate(-3deg); } 90% { transform: translateY(1px); } }
@media (min-width: 700px) {
  .limits { grid-template-columns: repeat(2, 1fr); }
  .toc { overflow: visible; -webkit-mask: none; mask: none; }
  .card { padding: 28px 28px 16px; }
}
@media (prefers-reduced-motion: reduce) { .js .card.rise { opacity: 1; transform: none; } }

/* ---------- privacy: the opening (built by privacy-intro.js; never shown without JavaScript) ---------- */
.doc .kidding { margin: -14px 0 22px; color: var(--yellow); font-weight: 750; font-size: var(--text-small); }
html.ha-done .doc .kidding { animation: kidIn .7s var(--ease-out) .15s both; }
@keyframes kidIn { from { opacity: 0; transform: translate3d(0, 8px, 0) scale(.96); } }
html.ha-on body::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100lvh; z-index: 89; background: var(--ink-950); }
html.ha-on .scroller { overflow: hidden; }
.ha { position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100lvh; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--ink-950) radial-gradient(80% 70% at 100% 20%, rgba(36, 48, 255, .85), rgba(36, 48, 255, .3) 50%, rgba(36, 48, 255, 0) 100%) no-repeat; text-align: center; }
.ha.ha-hit .ha-skip { opacity: 0; }
.ha-in { width: 100%; max-width: 40rem; display: flex; flex-direction: column; align-items: center; }
.ha-line { margin: 0; font: italic 900 clamp(1.9rem, 8.4vw, 3.4rem)/1.02 var(--font-display); letter-spacing: -.03em; color: #fff; width: 100%; animation: haIn .5s var(--ease-out) both; }
.ha-fig { width: clamp(110px, 30vw, 150px); height: auto; margin: 26px 0 8px; overflow: visible; animation: haPop .45s var(--ease-out) .35s both; }
.ha-fig path, .ha-fig circle { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.ha-fig .ha-cap, .ha-fig .ha-arm-out circle { fill: var(--yellow); stroke: none; }
.ha-fig .ha-shadow { fill: rgba(0, 0, 0, .35); stroke: none; transform-box: view-box; transform-origin: 60px 152px; animation: haShadow .9s ease-in-out .8s infinite alternate; }
.ha-fig g { transform-box: view-box; }
.ha-body { transform-origin: 60px 148px; animation: haSway .9s ease-in-out .8s infinite alternate; }
.ha-head { transform-origin: 60px 48px; animation: haBob .45s ease-in-out .8s infinite alternate; }
.ha-arm-out { transform-origin: 60px 62px; animation: haWave .45s ease-in-out .8s infinite alternate; }
.ha-arm-in { transform-origin: 60px 62px; animation: haPump .45s ease-in-out .8s infinite alternate; }
.ha-leg-l { transform-origin: 60px 98px; animation: haLegL .9s ease-in-out .8s infinite alternate; }
.ha-leg-r { transform-origin: 60px 98px; animation: haLegR .9s ease-in-out .8s infinite alternate; }
.ha-words { margin: 6px 0 0; font: italic 900 clamp(1.2rem, 5.4vw, 1.8rem)/1.1 var(--font-display); color: var(--yellow); letter-spacing: -.01em; width: 100%; }
.ha-words span { display: inline-block; opacity: 0; animation: haWord .3s var(--ease-out) both; animation-delay: calc(1s + var(--i) * .5s); }
.ha-skip { position: absolute; right: 16px; top: calc(16px + env(safe-area-inset-top)); padding: 9px 16px; border-radius: var(--r-chip, 999px); border: 1px solid rgba(255, 255, 255, .4); background: rgba(6, 7, 28, .55); color: #fff; font: 700 var(--text-small)/1 var(--font-display); cursor: pointer; transition: opacity .2s; }
.ha-skip:hover { border-color: var(--yellow); color: var(--yellow); }
@keyframes haIn { from { opacity: 0; transform: translate3d(0, 14px, 0); } }
@keyframes haPop { from { opacity: 0; transform: scale(.6); } }
@keyframes haSway { from { transform: translateX(-16px) rotate(-6deg); } to { transform: translateX(16px) rotate(6deg); } }
@keyframes haShadow { from { transform: translateX(-16px); } to { transform: translateX(16px); } }
@keyframes haBob { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes haWave { from { transform: rotate(-14deg); } to { transform: rotate(12deg); } }
@keyframes haPump { from { transform: rotate(10deg); } to { transform: rotate(-16deg); } }
@keyframes haLegL { from { transform: rotate(-10deg); } to { transform: rotate(6deg); } }
@keyframes haLegR { from { transform: rotate(-6deg); } to { transform: rotate(10deg); } }
@keyframes haWord { 0% { opacity: 0; transform: translate3d(0, 10px, 0) scale(.8); } 60% { opacity: 1; transform: translate3d(0, -3px, 0) scale(1.12); } 100% { opacity: 1; transform: none; } }
#shatter { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 100; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ha { display: none; } html.ha-on body::after { display: none; } }
/* The risk line at the top of the terms, and the small footnotes. */
.doc .risk-top { margin: -12px 0 28px; padding: 14px 16px; border: 1px solid currentColor; border-radius: 12px; }
.doc .fine { margin: 6px 0 18px; color: var(--muted); font-size: .8rem; }
