/* The glass braid is the page's focal object. Its surfaces and motion come from
   the shared /how renderer; the surrounding page stays quiet and readable. */
@font-face { font-family: 'Sentient'; src: url('/fonts/Sentient-Variable.woff2') format('woff2'); font-weight: 200 700; font-style: normal; font-display: optional; }
@font-face { font-family: 'Sentient'; src: url('/fonts/Sentient-VariableItalic.woff2') format('woff2'); font-weight: 200 700; font-style: italic; font-display: optional; }
:root {
  --paper: #fdfdfd;
  --site-panel: #ffffff;
  --site-inset: #eef1f5;
  --site-panel-edge: #9ba4b2;
  --site-panel-shadow: 0 4px 18px #18233316;
  --ink: #252626;
  --ink2: #4d4f4f;
  --mute: #666868;
  --floor: #232728;
  --floor-ink: #f0f3f4;
  --floor-mute: #bdc6c9;
  --serif: 'Sentient', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(24px, 5.5vw, 88px);
  --wide: 1380px;
  --link: #525656;
  --logo-filter: brightness(.55);
  --market-ink: #415560;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* Continuous pinch zoom remains available for reading; rapid taps are actions. */
html { touch-action:manipulation; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 108px; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:where(a,button,summary,input,select,textarea) { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus { outline: none; }
:is(a,button,input,select,textarea,summary,[tabindex]:not([tabindex='-1'])):focus-visible { box-shadow: none; outline: 2px solid var(--silver-ink, var(--ink)); outline-offset: 2px; }
@media (forced-colors: active) { :focus-visible { outline: 2px solid Highlight !important; outline-offset: 3px; } }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 24px; top: -80px; z-index: 50; padding: 12px 18px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }
.section-wrap { width: min(var(--wide), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.text-link, .tlink { display: inline-flex; align-items: center; gap: .6em; font-size: .94rem; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: #9ca9ae; }
.text-link:hover, .tlink:hover { color: var(--link); text-decoration-color: currentColor; }
.text-link span { text-decoration: none; }
.arrow { display: inline-block; vertical-align: baseline; }

/* One shared masthead, including the legal pages. */
.nav-wrap { position: absolute; inset: 0 0 auto; z-index: 20; padding: 0 var(--gutter); }
.nav { width: min(var(--wide), 100%); min-height: 96px; margin: auto; display: flex; gap: 32px; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 104px; font: 400 1.6rem/1 var(--serif); text-decoration: none; }
.brand img { height: 41px; width: auto; filter: var(--logo-filter); }
.links { display: flex; align-items: center; gap: 28px; margin: 0 auto; }
.links a, .mail { display: block; padding: 12px 0; color: var(--ink2); text-decoration: none; font-size: .9rem; }
.links a:hover, .mail:hover { color: var(--ink); }
.nav a[aria-current='page'] { color: var(--ink); }
.nav .links a { font-weight: 500; }
.tools { display: flex; align-items: center; gap: 20px; }
.x { display: grid; place-items: center; width: 40px; height: 44px; color: var(--ink2); }
.x:hover { color: var(--ink); }
.menu { display: none; margin-left: auto; }
.menu summary { cursor: pointer; list-style: none; width: 60px; text-align: right; padding: 12px 0 12px 10px; font-size: .95rem; }
.menu summary::-webkit-details-marker { display: none; }
.m-close { display: none; }
.menu[open] .m-open { display: none; }
.menu[open] .m-close { display: inline; }
.sheet { position: absolute; inset: 82px var(--gutter) auto; display: grid; padding: 18px 22px; background: var(--paper); box-shadow: none; border: 1px solid #e9edef; border-radius: 4px; }
.sheet a { text-decoration: none; padding: 12px 0; font: 400 1.25rem/1.4 var(--serif); }
.sheet a:last-child { font: 400 .94rem/1.5 var(--sans); color: var(--ink2); }
.sheet a:hover { color: #59717d; }

/* Full-width sculpture. Desktop follows the original orthographic projection;
   mobile uses the original portrait geometry and its own optical light maps. */
.hero { min-height: 100svh; width: min(1556px, 100%); margin: auto; padding: 142px var(--gutter) 46px; display: flex; flex-direction: column; justify-content: center; }
.hero-heading { text-align: center; }
.hero h1 { font: 400 clamp(3rem, 5.1vw, 5.3rem)/1.15 var(--serif); letter-spacing: -.025em; }
.phone-break { display: none; }
.weave { margin-top: clamp(34px, 5vh, 64px); }
.weave-stage { --weave-label-step: 5.077cqw; --weave-market-x: 87%; --weave-market-y: 50%; --weave-market-size: 2.91cqw; position: relative; height: clamp(300px, 28vw, 425px); isolation: isolate; container-type: inline-size; }
.weave-canvas, .weave-fallback { position: absolute; inset: 0; pointer-events: none; }
.weave-canvas { visibility: hidden; }
.weave-canvas canvas { display: block; width: 100%; height: 100%; }
.weave[data-render='ready'] .weave-canvas { visibility: visible; }
.weave[data-render='ready'] .weave-fallback { visibility: hidden; }
html[data-weave-entrance='pending'] .weave-fallback { visibility: hidden; }
.weave-fallback { display: flex; align-items: center; overflow: hidden; }
.weave-fallback picture, .weave-fallback img { display: block; width: 100%; height: auto; }
.weave-chains { position: absolute; inset: 0; pointer-events: none; }
.weave-chain { position: absolute; left: 1.3%; top: calc(50% + var(--strand) * var(--weave-label-step)); transform: translateY(calc(-100% - .8cqw)); color: var(--ink2); font: 400 clamp(.9rem, 1.5vw, 1.25rem)/1.3 var(--serif); white-space: nowrap; }
.chain-sol { --strand: -2; }
.chain-bnb { --strand: -1; }
.chain-rh { --strand: 0; }
.chain-base { --strand: 1; }
.chain-arc { --strand: 2; }
.weave-title { position: absolute; left: var(--weave-market-x); top: var(--weave-market-y); transform: translate(-50%, -50%); white-space: nowrap; color: var(--market-ink); font: 400 var(--weave-market-size)/1.2 var(--serif); pointer-events: none; }
.weave-caption { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 20px; margin: 2px 1.3% 0; color: var(--mute); font-size: .79rem; }
.replay { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; border: 0; padding: 8px 0 8px 12px; background: transparent; color: var(--ink2); cursor: pointer; font-size: .8rem; }
.replay:hover { color: var(--ink); }
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 36px; padding: 32px 1.3% 0; }
.hero-intro { color: var(--ink2); line-height: 1.6; max-width: 38rem; font-size: clamp(1rem, 1.3vw, 1.12rem); }
.launch-status { text-align: right; flex-shrink: 0; }
.launch-status p { font-size: .83rem; color: var(--mute); margin-bottom: 5px; }
.launch-status .text-link { font-size: .87rem; }

/* Product details are short, plain reading rather than a grid of claims. */
h2 { font: 400 clamp(2rem, 3.3vw, 3.3rem)/1.14 var(--serif); letter-spacing: -.017em; }
.market-section, .fees-section { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(56px, 9vw, 144px); padding: 100px 0; align-items: start; }
.market-section { padding-top: 114px; }
.market-copy, .fees-copy { color: var(--ink2); }
.market-copy > p, .fees-copy > p { max-width: 34rem; }
.market-copy > p + p, .fees-copy > p + p { margin-top: 18px; }
.read-more { margin-top: 28px; }
.read-more summary { display: list-item; cursor: pointer; color: var(--ink); font-size: .92rem; padding: 10px 0; list-style-position: inside; }
.read-more summary::marker { font-size: .68em; }
.read-more > div { padding-top: 14px; color: var(--ink2); font-size: .95rem; }
.read-more > div p + p { margin-top: 16px; }
.read-more > div .text-link { margin-top: 20px; }
.fees-section { padding-top: 65px; }
.fees-copy h2 { color: var(--ink); margin-bottom: 24px; }
.fee-schedule table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.fee-schedule caption { text-align: left; font-size: .85rem; color: var(--mute); padding-bottom: 18px; }
.fee-schedule th, .fee-schedule td { padding: 8px 0; text-align: left; vertical-align: baseline; font-weight: 400; }
.fee-schedule th { color: var(--ink2); }
.fee-schedule td { text-align: right; font: 400 2.4rem/1.25 var(--serif); }
.fee-schedule td span { font-size: 1.2rem; margin-left: .1em; }
.fee-total th, .fee-total td { padding-top: 23px; color: var(--ink); }
.fee-total td { font-size: 3.1rem; }
.fee-note { margin-top: 22px; color: var(--mute); font-size: .83rem; line-height: 1.7; max-width: 34rem; }

/* The approved Crystal mark and its charcoal form the closing composition. */
.first-coin { background: var(--floor); color: var(--floor-ink); }
.first-coin-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(56px, 9vw, 144px); padding-block: 104px; }
.first-coin-art img { display: block; width: 166px; height: auto; margin: auto; }
.first-coin-copy { max-width: 34rem; }
.first-coin h2 { margin-bottom: 26px; }
.first-coin p { color: var(--floor-mute); }
.first-coin p + p { margin-top: 16px; }
.first-coin .read-more summary, .first-coin .text-link { color: var(--floor-ink); }
.first-coin-copy > .text-link { margin-top: 30px; }
.first-coin .text-link:hover { color: white; }
.site-footer { background: var(--floor); color: var(--floor-mute); padding: 20px 0 38px; font-size: .82rem; }
.footer-row { display: flex; align-items: center; gap: 28px; }
.footer-brand { font: 400 1.4rem var(--serif); color: var(--floor-ink); text-decoration: none; }
.footer-row nav { display: flex; gap: 24px; margin-left: auto; }
.footer-row a { text-decoration: none; padding-block: 10px; }
.footer-row a:hover { color: white; }
.footer-note { padding-top: 22px; font-size: .75rem; line-height: 1.65; }

/* Preserve readable, working legal pages and their existing footer. */
.doc { width: min(800px, calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 152px 0 100px; }
.doc h1, .notfound h1 { font: 400 clamp(2.4rem, 5vw, 4rem)/1.1 var(--serif); margin-bottom: 24px; letter-spacing: -.018em; }
.doc .intro { font-size: 1.15rem; color: var(--ink2); margin-bottom: 32px; }
.doc h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 48px 0 12px; }
.doc p { margin-top: 12px; color: var(--ink2); }
.doc ul { padding-left: 1.3rem; list-style: disc; }
.doc li { margin-top: 8px; color: var(--ink2); }
.doc a { text-underline-offset: 4px; text-decoration-color: #9ca9ae; }
.doc .stamp { color: var(--mute); font-size: .9rem; }
.notfound { min-height: 75svh; display: grid; align-content: center; justify-items: start; gap: 20px; padding: 120px var(--gutter) 60px; max-width: 54rem; margin: auto; }
.foot { background: var(--floor); color: var(--floor-ink); }
.foot-in { width: min(var(--wide), calc(100% - 2 * var(--gutter))); margin: auto; padding-block: 56px; }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-name { font: 400 1.6rem var(--serif); margin-bottom: 12px; }
.foot-brand > p:last-child { max-width: 25rem; color: var(--floor-mute); }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.foot-h { color: var(--floor-mute); margin-bottom: 6px; }
.foot-col a { text-decoration: none; overflow-wrap: anywhere; }
.fine { margin-top: 28px; max-width: 54rem; color: var(--floor-mute); font-size: .8rem; }
.fine + .fine { margin-top: 10px; }
.wordmark { display: none; }

@media (min-width: 1500px) and (min-height: 950px) {
  .hero { padding-top: 160px; }
  .weave { margin-top: 64px; }
  .hero-bottom { padding-top: 46px; }
}
@media (max-width: 1050px) {
  .links { gap: 20px; }
  .tools .mail { display: none; }
  .nav { gap: 20px; }
}
@media (max-width: 860px) {
  .links, .tools { display: none; }
  .menu { display: block; }
  .nav { min-height: 82px; }
  .hero { padding-top: 116px; }
  .desktop-break { display: none; }
  .market-section, .fees-section { gap: 40px; }
  .first-coin-inner { gap: 44px; }
  .first-coin-art img { width: 144px; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 24px; }
  .hero { padding: 116px var(--gutter) 40px; }
  .hero h1 { font-size: clamp(2.6rem, 10.5vw, 4.2rem); line-height: 1.12; }
  .phone-break { display: block; }
  .weave { margin-top: 44px; }
  .weave-stage { --weave-height: clamp(490px, 137vw, 620px); --weave-label-step: calc(var(--weave-height) * 1.353 / 16.1); --weave-market-x: 50%; --weave-market-y: 89.13%; --weave-market-size: 1.4rem; height: var(--weave-height); }
  .weave-chain { top: 0; left: calc(50% + var(--strand) * var(--weave-label-step)); transform: translateX(-50%); font: 400 clamp(.62rem, 2.55vw, .9rem)/1.35 var(--sans); text-align: center; }
  .chain-suffix { display: block; }
  .weave-fallback picture, .weave-fallback img { height: 100%; width: auto; margin: auto; }
  .weave-caption { gap: 12px; margin-top: 8px; font-size: .68rem; }
  .replay { font-size: .73rem; gap: 6px; padding-left: 4px; }
  .replay svg { width: 14px; height: 14px; }
  .hero-bottom { display: block; padding-top: 28px; }
  .hero-intro { max-width: 32rem; font-size: 1rem; }
  .launch-status { text-align: left; margin-top: 24px; display: flex; gap: 20px; align-items: baseline; }
  .launch-status p { margin: 0; }
  .market-section, .fees-section { grid-template-columns: 1fr; gap: 28px; padding-block: 54px; }
  h2 { font-size: clamp(2rem, 7.5vw, 2.8rem); }
  .fee-schedule { padding-top: 8px; }
  .fee-schedule td { font-size: 2.1rem; }
  .fee-total td { font-size: 2.7rem; }
  .first-coin-inner { grid-template-columns: 1fr; gap: 40px; padding-block: 64px; }
  .first-coin-art img { width: 106px; margin: 0; }
  .first-coin h2 { font-size: 2.3rem; }
  .footer-row { flex-wrap: wrap; gap: 10px 24px; }
  .footer-row nav { margin-left: auto; gap: 20px; }
  .footer-row > span { margin-left: auto; }
  .footer-note { padding-top: 20px; }
  .doc { padding-top: 126px; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Appearance follows the device until the visitor chooses a mode. The approved
   logo keeps its geometry; a graphite finish gives it contrast on white. */
:root[data-theme='dark'] {
  --site-panel: #343a43; --site-inset: #1d242e;
  --site-panel-edge: #596675; --site-panel-shadow: 0 5px 20px #0005;
  --paper: #252626; --ink: #f2f3f3; --ink2: #d2d4d4; --mute: #b2b5b5;
  --floor: #1c2021; --floor-ink: #f0f3f4; --floor-mute: #b9c4c8;
  --link: #dedfdf; --logo-filter: none; --market-ink: #dfe1e1;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --site-panel: #343a43; --site-inset: #1d242e;
    --site-panel-edge: #596675; --site-panel-shadow: 0 5px 20px #0005;
    --paper: #252626; --ink: #f2f3f3; --ink2: #d2d4d4; --mute: #b2b5b5;
    --floor: #1c2021; --floor-ink: #f0f3f4; --floor-mute: #b9c4c8;
    --link: #dedfdf; --logo-filter: none; --market-ink: #dfe1e1;
    color-scheme: dark;
  }
}
.nav-actions { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.launch-action { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 21px; border-radius: 5px; background: var(--ink); color: var(--paper); font-size: .78rem; font-weight: 600; letter-spacing: .025em; text-decoration: none; }
.launch-action:hover { background: var(--ink2); }
.nav .launch-action[aria-current='page'] { color: var(--paper); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 64px; flex: none; padding: 12px 0; min-height: 44px; background: transparent; border: 0; color: var(--ink2); font-size: .85rem; cursor: pointer; }
:root:not(.js) .theme-toggle { visibility: hidden; }
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { flex: none; }
/* A short whole-view crossfade includes the WebGL braid and chart canvases. */
:root.theme-fading::view-transition { pointer-events: none; }
:root.theme-fading::view-transition-group(root) { animation: none; }
:root.theme-fading::view-transition-old(root),
:root.theme-fading::view-transition-new(root) { animation-duration: 220ms; animation-timing-function: ease-out; }
/* Older browsers still interpolate colors without moving or hiding content. */
:root.theme-color-fallback, :root.theme-color-fallback *,
:root.theme-color-fallback *::before, :root.theme-color-fallback *::after {
  transition: color 220ms ease-out, background-color 220ms ease-out, border-color 220ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  :root.theme-fading::view-transition-old(root), :root.theme-fading::view-transition-new(root) { animation: none; }
  :root.theme-color-fallback, :root.theme-color-fallback * { transition: none; }
}
.links { margin-left: auto; margin-right: auto; gap: 36px; }
.sheet { border-color: color-mix(in srgb, var(--ink) 10%, transparent); }
.sheet a:hover { color: var(--link); }
.hero { padding-top: 154px; padding-bottom: 74px; }
.hero h1 { font-size: clamp(3rem, 5.1vw, 5.3rem); }
.weave { margin-top: 42px; }
.weave-stage { height: clamp(320px, 29vw, 425px); }
.hero-bottom { width: 100%; padding-top: 28px; gap: 48px; align-items: flex-start; }
.hero-story { max-width: 50rem; }
.hero-story h2 { font: 500 1.45rem/1.3 var(--serif); letter-spacing: 0; margin-bottom: 12px; }
.hero-intro { max-width: 46rem; line-height: 1.6; font-size: 1.07rem; }
.launch-status { text-align: left; display: flex; align-items: baseline; gap: 24px; margin-top: 18px; }
.launch-status p { margin: 0; }
.story-link { display: inline-flex; gap: 14px; align-items: center; margin-top: 10px; padding-block: 12px; flex-shrink: 0; color: var(--ink2); font-size: .96rem; text-decoration: none; }
.story-link:hover { color: var(--link); }
.site-footer { padding-top: 34px; }
.footer-columns { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1fr .8fr; gap: 32px; padding-block: 20px 40px; }
.footer-identity p { margin-top: 16px; font-size: .82rem; line-height: 1.8; }
.footer-columns nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-columns h2 { font: 500 .79rem/1.4 var(--sans); letter-spacing: 0; color: var(--floor-ink); margin-bottom: 9px; }
.footer-columns nav a { text-decoration: none; padding-block: 3px; }
.footer-columns nav a:hover { color: var(--floor-ink); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; gap: 44px; align-items: flex-start; padding-top: 22px; border-top: 1px solid rgb(240 243 244 / .13); font-size: .72rem; line-height: 1.8; }
.footer-bottom p { max-width: 48rem; }
.footer-bottom span { margin-left: auto; white-space: nowrap; }
:root[data-theme='dark'] .weave-fallback img { filter: brightness(.83); }
.weave-title {
  transform: translate(-50%, calc(-50% - 1.5px * var(--weave-pulse-strength, 0))) scale(calc(1 + .035 * var(--weave-pulse-strength, 0)));
  color: color-mix(in srgb, var(--market-ink) calc(100% - 18% * var(--weave-pulse-strength, 0)), #fff);
  text-shadow: 0 0 calc(3px * var(--weave-pulse-strength, 0)) rgb(255 255 255 / calc(var(--weave-pulse-strength, 0) * .85)), 0 0 calc(14px * var(--weave-pulse-strength, 0)) rgb(255 255 255 / calc(var(--weave-pulse-strength, 0) * .5));
}

/* Dedicated reading pages: useful headings and one quiet, consistent axis. */
.guide { padding-top: 160px; padding-bottom: 100px; }
.guide-heading { padding-left: calc(25% + 38px); padding-bottom: 70px; }
.guide h1, .fees-page h1, .docs-article h1 { font: 400 clamp(2.6rem, 4.4vw, 4.2rem)/1.12 var(--serif); letter-spacing: -.02em; }
.guide-heading .intro { max-width: 42rem; color: var(--ink2); font-size: 1.14rem; line-height: 1.65; margin-top: 22px; }
.guide-layout { display: grid; grid-template-columns: 1fr 3fr; gap: 50px; align-items: start; }
.guide-index { position: sticky; top: 40px; display: flex; flex-direction: column; gap: 18px; font-size: .9rem; color: var(--mute); }
.guide-index a { text-decoration: none; padding-block: 5px; }
.guide-index a:hover { color: var(--ink); }
.guide-copy { max-width: 48rem; color: var(--ink2); line-height: 1.8; }
.guide-copy section { margin-bottom: 65px; }
.guide-copy section:last-child { margin-bottom: 0; }
.guide-copy h2 { font-size: 1.75rem; color: var(--ink); margin-bottom: 20px; letter-spacing: -.012em; }
.guide-copy p + p { margin-top: 18px; }
.guide-copy a { text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--mute) 65%, transparent); }
.guide-copy .text-link { margin-top: 28px; }
.trade-explanation { margin-block: 28px; display: grid; gap: 26px; }
.trade-explanation dt { font-size: 1rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.trade-explanation dd { max-width: 43rem; }
.guide-note { font-size: .94rem; color: var(--mute); }
.fees-page { display: grid; grid-template-columns: 1.1fr .8fr; align-items: start; gap: clamp(60px, 10vw, 156px); min-height: calc(100svh - 174px); padding-block: 180px 110px; }
.fees-page h1 { margin-bottom: 28px; }
.fees-page .fee-schedule { margin-top: 12px; }
.fees-page .fees-copy { max-width: 40rem; }

/* Grouped chapters, a comfortable reading column and section links. */
.docs-layout { display: grid; grid-template-columns: 204px minmax(0, 1fr) 160px; gap: 40px; align-items: start; padding-block: 150px 100px; min-height: calc(100svh - 174px); }
.docs-index { position: sticky; top: 32px; padding-top: 4px; max-height: calc(100svh - 64px); overflow-y: auto; scrollbar-width: thin; }
.chapter-menu summary { display: none; }
.chapter-menu nav { display: block; }
.index-cover { display: block; font: 500 .92rem/1.4 var(--sans); margin-bottom: 26px; padding: 3px 0; color: var(--ink); text-decoration: none; }
.chapter-group + .chapter-group { margin-top: 25px; }
.chapter-group h2 { font: 600 .73rem/1.4 var(--sans); letter-spacing: 0; color: var(--ink2); margin-bottom: 9px; }
.docs-index .chapter-menu li a { display: block; padding: 7px 0; color: var(--mute); text-decoration: none; font-size: .81rem; line-height: 1.4; }

.docs-index li a { display: block; padding: 7px 0; color: var(--mute); text-decoration: none; font-size: .81rem; line-height: 1.4; }
.docs-index a[aria-current='page'] { color: var(--ink); font-weight: 600; }
.docs-index a:hover { color: var(--ink); }
.docs-search { margin-bottom: 27px; }
.docs-search input { font: 400 .83rem/1.4 var(--sans); width: 100%; min-width: 0; height: 42px; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 4px; color: var(--ink); background: var(--paper); }
.docs-search input::placeholder { color: var(--mute); }
.docs-search-results { margin-top: 18px; }
.docs-search-results > p { font-size: .74rem; color: var(--mute); margin-bottom: 10px; }
.docs-search-results li + li { margin-top: 14px; }
.docs-search-results a { font-size: .85rem; color: var(--ink); line-height: 1.6; text-decoration: none; }
.docs-search-results small { display: block; font-size: .73rem; font-weight: 400; color: var(--mute); margin-top: 5px; }
.docs-article { width: 100%; max-width: 720px; min-width: 0; }
.chapter-context { display: flex; gap: 12px; margin-bottom: 24px; color: var(--mute); font-size: .82rem; }
.chapter-context a { text-decoration: none; }
.doc-body { color: var(--ink2); line-height: 1.85; font-size: .97rem; overflow-wrap: anywhere; }
.doc-body h1 { color: var(--ink); margin-bottom: 24px; }
.doc-body h2 { font-size: 1.7rem; margin-top: 46px; margin-bottom: 16px; color: var(--ink); }
.doc-body h3 { font-size: 1rem; color: var(--ink); margin-block: 28px 12px; font-weight: 600; }
.doc-body .intro { font-size: 1.14rem; margin-bottom: 20px; line-height: 1.7; }
.doc-body p + p { margin-top: 18px; }
.doc-body > ul, .doc-body > ol, .doc-body section > ul, .doc-body section > ol { padding-left: 1.2rem; margin-block: 18px; list-style: disc; }
.doc-body > ol, .doc-body section > ol { list-style: decimal; }
.doc-body li + li { margin-top: 9px; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: .87rem; margin-block: 28px; }
.doc-body caption { color: var(--mute); text-align: left; padding-bottom: 12px; }
.doc-body th, .doc-body td { text-align: left; vertical-align: top; padding: 13px 10px 13px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.doc-body th { font-weight: 500; color: var(--ink); }
.doc-body pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; background: color-mix(in srgb, var(--ink) 5%, var(--paper)); padding: 20px; margin-block: 24px; border-radius: 4px; }
.doc-body code { font-size: .88em; }
.doc-body a { text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--mute) 65%, transparent); }
.doc-body .stamp { font-size: .82rem; color: var(--mute); }
.doc-body .read-more { margin-top: 28px; }
.doc-body > .text-link { margin-top: 30px; }
.docs-status { max-width: 38rem; font-size: .9rem; color: var(--mute); }
.docs-contents { margin-top: 42px; }
.docs-contents h2 { font: 500 1.25rem/1.5 var(--serif); margin-block: 38px 14px; }
.doc-body .docs-contents ul { list-style: none; padding: 0; margin: 0; }
.docs-contents li + li { margin: 0; }
.docs-contents a { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.docs-contents strong { font-size: .98rem; font-weight: 500; }
.docs-contents a:hover { color: var(--link); }
.docs-contents small { display: block; color: var(--mute); font-size: .8rem; margin-top: 3px; line-height: 1.7; }
.chapter-arrow { font-size: 1.05rem; flex: none; color: var(--mute); }
.docs-toc { position: sticky; top: 40px; padding-top: 5px; }
.docs-toc h2 { font: 500 .72rem/1.4 var(--sans); color: var(--ink2); letter-spacing: 0; margin-bottom: 15px; }
.docs-toc li + li { margin-top: 12px; }
.docs-toc a { font-size: .75rem; color: var(--mute); text-decoration: none; line-height: 1.65; display: block; }
.docs-toc a:hover, .docs-toc a[aria-current='location'] { color: var(--ink); }
.chapter-turns { display: flex; justify-content: space-between; gap: 28px; margin-top: 72px; }
.chapter-turns a { display: flex; flex-direction: column; text-decoration: none; max-width: 50%; gap: 8px; color: var(--ink2); }
.chapter-turns a:last-child { text-align: right; margin-left: auto; }
.chapter-turns a:hover { color: var(--link); }
.chapter-turns small { font-size: .73rem; color: var(--mute); }
.chapter-turns span { font: 400 1.28rem/1.35 var(--serif); }
.docs-fees .fee-schedule { margin-top: 40px; max-width: 35rem; }
.docs-fees .fees-copy h1 { font-size: clamp(2.4rem, 3.6vw, 3.4rem); }
.launch-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 100px; padding-block: 166px 100px; min-height: 75svh; }
.launch-page h1 { font: 400 clamp(2.8rem, 5vw, 4.5rem)/1.12 var(--serif); letter-spacing: -.02em; max-width: 7em; margin-bottom: 24px; }
.launch-page .intro { font-size: 1.08rem; color: var(--ink2); max-width: 35rem; }
.launch-availability { font-size: .87rem; color: var(--mute); margin-top: 26px; max-width: 34rem; }
.launch-page .text-link { margin-top: 28px; }
.launch-outline { padding-top: 10px; }
.launch-outline h2 { font: 500 1.35rem/1.5 var(--serif); letter-spacing: 0; margin-bottom: 24px; }
.launch-outline ol { list-style: decimal; padding-left: 1.25rem; }
.launch-outline li { padding-left: 12px; color: var(--ink2); }
.launch-outline li + li { margin-top: 24px; }
.launch-outline li strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 6px; }
.launch-outline p { color: var(--mute); font-size: .88rem; margin-top: 28px; }

@media (max-width: 1100px) {
  .links { gap: 24px; }
  .docs-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 50px; }
  .docs-toc { display: none; }
  .footer-columns { grid-template-columns: 1.3fr 1fr 1.3fr 1fr; gap: 30px; }
  .footer-columns nav:last-child { grid-column: 2; }
  .launch-page { gap: 60px; }
}
@media (max-width: 860px) {
  .nav { gap: 20px; }
  .nav .brand { min-height: 44px; }
  .nav-actions { gap: 16px; }
  .nav-actions .theme-toggle span { display: none; }
  .theme-toggle { width: 44px; justify-content: center; }
  .nav-actions .x { display: none; }
  .menu { margin-left: 0; }
  .hero { padding-top: 128px; }
  .hero-bottom { gap: 24px; }
  .story-link { margin-top: 10px; }
  .guide { padding-top: 132px; padding-bottom: 64px; }
  .guide-heading { padding-left: 0; padding-bottom: 36px; }
  .guide-layout { display: block; }
  .guide-index { position: static; flex-direction: row; gap: 12px 28px; flex-wrap: wrap; margin-bottom: 44px; font-size: .84rem; }
  .guide-copy { max-width: 100%; }
  .fees-page { gap: 48px; padding-block: 140px 80px; }
  .docs-layout { display: block; padding-top: 124px; padding-bottom: 70px; }
  .docs-index { position: static; margin-bottom: 36px; max-height: none; overflow: visible; }
  .chapter-menu summary { display: list-item; list-style-position: inside; cursor: pointer; padding: 12px 0; color: var(--ink2); font-size: .9rem; }
  .chapter-menu summary::marker { font-size: .7em; }
  .chapter-menu nav { padding: 22px 0 12px; }
  .chapter-menu nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .index-cover { grid-column: 1 / -1; margin: 0; }
  .chapter-group + .chapter-group { margin: 0; }
  .docs-search { max-width: 420px; margin-bottom: 14px; }
  .docs-index li + li { margin: 0; }
}
@media (max-width: 720px) {
  .hero { padding: 120px var(--gutter) 54px; }
  .hero h1 { max-width: 8em; margin-inline: auto; font-size: clamp(2.6rem, 10.1vw, 4.2rem); }
  .weave { margin-top: 40px; }
  .weave-stage { height: var(--weave-height); }
  .hero-bottom { padding-top: 32px; }
  .hero-story h2 { font-size: 1.55rem; margin-bottom: 14px; }
  .hero-intro { font-size: 1rem; }
  .launch-status { flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; }
  .story-link { margin-top: 22px; padding-block: 10px; }
  .guide h1, .fees-page h1, .docs-article h1 { font-size: clamp(2.3rem, 8vw, 3.5rem); }
  .fees-page { display: block; padding-top: 134px; padding-bottom: 70px; }
  .fees-page .fee-schedule { margin-top: 46px; }
  .guide-copy h2, .doc-body h2 { font-size: 1.55rem; }
  .docs-contents a { grid-template-columns: 24px 1fr; gap: 4px 16px; padding-block: 10px; }
  .docs-contents small { grid-column: 2; }
  .chapter-context { margin-bottom: 20px; }
  .chapter-turns { margin-top: 50px; gap: 24px; }
  .chapter-turns span { font-size: 1.15rem; }
  .chapter-content { min-height: 180px; }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 30px; padding-block: 8px 32px; }
  .footer-identity { grid-column: 1 / -1; }
  .footer-columns nav:last-child { grid-column: auto; }
  .footer-columns nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: 14px; }
  .launch-page { display: block; padding-block: 128px 70px; }
  .launch-outline { margin-top: 50px; }
}
@media (max-width: 420px) {
  .nav { gap: 12px; }
  .brand { font-size: 1.4rem; gap: 7px; }
  .brand img { height: 34px; }
  .nav-actions { gap: 8px; }
  .launch-action { padding-inline: 12px; font-size: .72rem; }
  .menu summary { padding-left: 5px; font-size: .83rem; }
  .chapter-menu nav { grid-template-columns: 1fr; }
  .index-cover { grid-column: auto; }
  .doc-body table { font-size: .8rem; }
}
@media (max-width: 380px) {
  .theme-toggle { font-size: .8rem; gap: 5px; }
  .nav { gap: 8px; }
  .brand { gap: 8px; min-width: 0; flex: none; }
  .brand img { height: 36px; }
  .brand { font-size: 1.4rem; }
  .menu summary { width: 48px; padding-left: 0; font-size: .88rem; }
  .nav-actions .launch-action { display: none; }
  .chapter-menu ol { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .weave-title { transform: translate(-50%, -50%); color: var(--market-ink); text-shadow: none; }
}

/* Five terminal panes share one rolling OHLC history and one trade clock. */
.shared-example { padding-block: 38px 88px; max-width: 1240px; --buy-ink: #087e43; --sell-ink: #c53f45; --plot-paper: #f8f8f8; --plot-grid: #e3e4e4; }
:root[data-theme='dark'] .shared-example { --buy-ink: #84e8a8; --sell-ink: #ff857e; --plot-paper: #292a2a; --plot-grid: #383a3a; }
.shared-explanation { display: grid; grid-template-columns: 1fr 1.25fr; align-items: start; gap: clamp(44px, 7vw, 106px); }
.shared-explanation h2 { font-size: clamp(2rem, 3.5vw, 3.3rem); line-height: 1.16; }
.shared-explanation p { max-width: 42rem; color: var(--ink2); line-height: 1.75; font-size: 1.02rem; }
.shared-explanation p + p { margin-top: 18px; }
.shared-demo { margin-top: 48px; padding: 0; }
.shared-metrics { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.example-coin { flex: 0 0 auto; }
.example-coin h3 { font: 500 1.28rem/1.3 var(--sans); }
.example-coin h3 span { color: var(--mute); font-size: .74rem; font-weight: 400; margin-left: 6px; }
.example-coin p { margin-top: 5px; color: var(--mute); font-size: .74rem; }
.shared-metrics > p { display: flex; flex-direction: column; gap: 5px; }
.shared-metrics > p > span { font-size: .71rem; color: var(--mute); }
.shared-metrics strong { font: 500 clamp(1.35rem,2.1vw,1.85rem)/1.2 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.example-label { font-size: .68rem; color: var(--mute); width: 100%; margin-top: -6px; }
.shared-market-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 28px; margin-top: 26px; align-items: start; }
.shared-chains { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 24px 18px; }
.shared-chains li { grid-column: span 2; min-width: 0; }
/* The material is a rendered crystal sheet beneath live chart data. Nine-slice
   edges preserve its optical bevel as panes change size; content stays crisp. */
.shared-chains li, .combined-book { position: relative; isolation: isolate; padding: 20px; border: 0; border-radius: 12px; background: var(--glass-fill); }
.shared-chains li:nth-child(4) { grid-column: 2 / span 2; }
.shared-chains li:nth-child(5) { grid-column: 4 / span 2; }
.chart-chain { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 24px; }
.chart-shared-header { display: none; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; font-size: .83rem; }
.chart-chain-logos { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.chart-chain-logos > span { display: flex; align-items: center; }
.example-chain-name { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: .77rem; line-height: 1.3; white-space: nowrap; }
.chart-currency { font-size: .6rem; color: var(--mute); }
.chart-readout { display: flex; align-items: center; gap: 7px; margin: 7px 0 10px; min-height: 20px; }
.example-chain-price { font-size: .76rem; font-variant-numeric: tabular-nums; color: var(--ink2); white-space: nowrap; }
.chart-interval { margin-left: auto; color: var(--mute); font-size: .65rem; }
.trade-flash { --trade-ink: var(--buy-ink); color: var(--trade-ink); font-size: .65rem; font-weight: 650; opacity: var(--trade-pulse,0); }
[data-origin='sell'] .trade-flash { --trade-ink: var(--sell-ink); }
.candle-stage { position: relative; width: 100%; height: 174px; overflow: hidden; background: transparent; }
.candle-fallback, .candle-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.candle-canvas { visibility: hidden; }
/* These illustrative plots must let a held touch continue into a page swipe. */
@media (any-pointer: coarse) { .candle-canvas { pointer-events: none; } }
[data-candle-render='ready'] .candle-canvas { visibility: visible; }
[data-candle-render='ready'] .candle-fallback { visibility: hidden; }
.candle-grid { stroke: var(--plot-grid); stroke-width: .7; }
.candle-up { fill: var(--buy-ink); stroke: var(--buy-ink); }
.candle-down { fill: var(--sell-ink); stroke: var(--sell-ink); }
.candle-axis { fill: var(--mute); font: 11px var(--sans); }
.candle-average { stroke-width: 1; }
.candle-average-buy { stroke: var(--buy-ink); }
.candle-average-sell { stroke: var(--sell-ink); stroke-dasharray: 5 4; }
.chart-averages { margin-top: 9px; display: grid; gap: 5px; font-size: .65rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.chart-averages[hidden] { display: none; }
.chart-averages p { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; }
.chart-averages [data-average-side='buy'] { color: var(--buy-ink); }
.chart-averages [data-average-side='sell'] { color: var(--sell-ink); }
.chart-averages strong { font-weight: 550; white-space: nowrap; }
.chart-averages p span::before { content: ''; display: inline-block; width: 12px; margin-right: 6px; border-top: 1px solid currentColor; vertical-align: middle; }
.chart-averages [data-average-side='sell'] span::before { border-top-style: dashed; }
.chart-average-chain { color: var(--mute); }
.shared-demo figcaption { margin-top: 24px; text-align: left; }
.shared-event { font: 400 .91rem/1.6 var(--sans); min-height: 1.6em; color: var(--ink2); }
.combined-book { min-width: 0; }
.combined-book h3 { font: 500 .95rem/1.3 var(--sans); }
.book-intro { color: var(--mute); font-size: .7rem; margin-top: 5px; }
.trade-book { width: 100%; border-collapse: separate; border-spacing: 0 3px; margin-top: 20px; font-size: .72rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.trade-book th { padding: 0 8px 11px 0; text-align: left; font-size: .6rem; font-weight: 400; color: var(--mute); white-space: nowrap; }
.trade-book td { padding: 9px 8px 9px 0; vertical-align: middle; }
.trade-book th:first-child, .trade-book td:first-child { padding-left: 8px; }
.trade-book th:last-child, .trade-book td:last-child { padding-right: 8px; }
.trade-book td:first-child { border-radius: 6px 0 0 6px; }
.trade-book td:last-child { border-radius: 0 6px 6px 0; }
.trade-book th:nth-last-child(-n+2), .trade-book td:nth-last-child(-n+2) { text-align: right; }
.trade-book tr { --entry-ink: var(--buy-ink); }
.trade-book tr[data-book-side='sell'] { --entry-ink: var(--sell-ink); }
.book-side { color: var(--entry-ink); font-weight: 600; }
.book-chain { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.book-chain small { display: block; font-size: .6rem; color: var(--mute); margin-top: 3px; }
.book-mark { width: 16px; height: 16px; object-fit: contain; flex: 0 0 16px; }
.book-mark-dark { display: none; }
:root[data-theme='dark'] .book-mark-light { display: none; }
:root[data-theme='dark'] .book-mark-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .shared-example { --buy-ink: #84e8a8; --sell-ink: #ff857e; --plot-paper: #292a2a; --plot-grid: #383a3a; }
  :root:not([data-theme]) .book-mark-light { display: none; }
  :root:not([data-theme]) .book-mark-dark { display: block; }
}
.book-value, .book-quantity { color: var(--ink2); white-space: nowrap; }
.trade-book tr[data-book-side] td { background: color-mix(in srgb, var(--entry-ink) 6%, transparent); }
.trade-book tr[data-book-latest] td { background: color-mix(in srgb, var(--entry-ink) 11%, transparent); }
.trade-book [data-book-latest] .book-value { color: var(--entry-ink); font-weight: 600; }
.book-side small { display: block; color: var(--mute); font-size: .55rem; font-weight: 400; margin-top: 3px; }

.shared-controls { flex: 1 1 400px; max-width: 440px; min-width: 0; margin-right: auto; }
.shared-controls h4 { margin: 0 0 8px; font: 500 .86rem/1.4 var(--sans); }
.instant-toolbar { display: grid; grid-template-columns: minmax(152px,1fr) 110px 124px; gap: 8px; align-items: end; }
.instant-chain, .instant-amount { display: flex; min-width: 0; flex-direction: column; gap: 4px; font-size: .7rem; line-height: 1.4; color: var(--ink2); }
.instant-chain select, .instant-amount input { width: 100%; min-width: 0; height: 44px; padding: 10px; border: 1px solid color-mix(in srgb,var(--ink) 15%,transparent); border-radius: 9px; background: var(--paper); color: var(--ink); font: 400 .8rem/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.instant-amount input[aria-invalid='true'] { border-color: var(--sell-ink); }
.instant-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.instant-help { margin-top: 5px; color: var(--mute); font-size: .65rem; line-height: 1.5; }
.shared-controls button, .example-playback button { min-height: 44px; padding: 10px 13px; border: 0; border-radius: 9px; cursor: pointer; font-size: .78rem; background: color-mix(in srgb,var(--ink) 5%,var(--paper)); }
.shared-controls button:hover { background: color-mix(in srgb,var(--ink) 10%,var(--paper)); }
.shared-controls [data-manual-side] { touch-action: manipulation; }
.shared-controls [data-manual-side='buy'] { color: var(--buy-ink); background: color-mix(in srgb,var(--buy-ink) 9%,var(--paper)); }
.shared-controls [data-manual-side='sell'] { color: var(--sell-ink); background: color-mix(in srgb,var(--sell-ink) 8%,var(--paper)); }
.shared-controls [data-manual-side]:hover { background: color-mix(in srgb,currentColor 16%,var(--paper)); }
.shared-controls [data-manual-side]:active { background: color-mix(in srgb,currentColor 22%,var(--paper)); }
.shared-controls button:disabled { opacity: .4; cursor: default; }
.instant-chain { position: relative; }
.shared-controls .chain-picker-trigger { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid color-mix(in srgb,var(--ink) 15%,transparent); background: var(--paper); font-size: .8rem; }
.chain-picker-trigger > span:not(.chain-picker-chevron) { flex: 1; }
.shared-controls .chain-picker-trigger[aria-expanded='true'] { background: color-mix(in srgb,var(--ink) 7%,var(--paper)); }
.chain-picker-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -3px 2px 0 4px; }
.chain-picker-trigger[aria-expanded='true'] .chain-picker-chevron { transform: rotate(225deg); margin-top: 3px; }
.chain-picker-menu { position: absolute; inset: calc(100% + 6px) auto auto 0; z-index: 10; width: max(100%,240px); max-width: calc(100vw - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 12px; color: var(--ink); background: var(--paper); box-shadow: none; outline: 1px solid color-mix(in srgb,var(--ink) 10%,transparent); outline-offset: -1px; }
[data-menu-side='above'] .chain-picker-menu { top: auto; bottom: 50px; }
.chain-picker-menu [role='option'] { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 10px; border-radius: 7px; font-size: .8rem; cursor: pointer; }
.chain-picker-menu [role='option'] > span:not(.chain-picker-check) { flex: 1; }
.chain-picker-menu small { font-size: .65rem; color: var(--mute); }
.chain-picker-menu [data-active] { background: color-mix(in srgb,var(--ink) 8%,var(--paper)); }
.chain-picker-menu [aria-selected='true'] { font-weight: 550; }
.chain-picker-check { width: 12px; visibility: hidden; }
.chain-picker-menu [aria-selected='true'] .chain-picker-check { visibility: visible; }
.demo-position { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-top: 14px; padding-top: 12px; border-top: 1px solid color-mix(in srgb,var(--ink) 10%,transparent); }
.demo-position > p:not(.position-help) { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.demo-position > p > span, .position-help { color: var(--mute); font-size: .7rem; }
.demo-position strong { font-size: .85rem; font-weight: 500; white-space: nowrap; }
[data-position-pnl][data-pnl='profit'] { color: var(--buy-ink); }
[data-position-pnl][data-pnl='loss'] { color: var(--sell-ink); }
.example-playback { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.example-playback button { padding-inline: 5px; background: transparent; color: var(--ink2); }
.example-playback button:hover { background: transparent; color: var(--ink); }
.example-note { color: var(--mute); font-size: .68rem; text-align: left; margin-top: 20px; }
.example-note a { text-underline-offset: 3px; }
@media (max-width: 1150px) {
  .example-coin { margin-right: auto; }
  .shared-controls { order: 4; flex-basis: 100%; max-width: 580px; }
  .example-label { order: 5; }
  .shared-market-layout { grid-template-columns: minmax(0,1fr); gap: 30px; }
  .combined-book { width: min(100%,560px); margin-inline: auto; }
}
@media (max-width: 960px) {
  .shared-explanation { gap: 40px; }
}
/* Keep one shared chart before JavaScript starts, if it fails, and after a
   phone rotates. The controller uses this same query to mount only one chart. */
@media (max-width: 860px), (max-width: 960px) and (any-pointer: coarse) {
  .shared-chains { display: block; }
  .shared-chains > li + li { display: none; }
  .shared-chains > li:first-child > .chart-chain { display: none; }
  .chart-shared-header { display: flex; }
  .shared-chains > li:first-child .trade-flash { display: none; }
}
@media (max-width: 600px) {
  .shared-example { padding-block: 16px 58px; }
  .shared-explanation { display: block; }
  .shared-explanation h2 { font-size: clamp(1.8rem,7.5vw,2.8rem); margin-bottom: 24px; }
  .shared-explanation p { font-size: .97rem; line-height: 1.75; }
  .shared-demo { margin-top: 32px; }
  .shared-metrics { gap: 18px 20px; }
  .example-coin { width: 100%; }
  .shared-metrics strong { font-size: clamp(1.15rem,5vw,1.55rem); }
  .shared-metrics > p > span { font-size: .65rem; }
  .example-label { font-size: .63rem; margin-top: -2px; }
  .shared-market-layout { margin-top: 24px; }
  .candle-stage { height: 186px; }
  .example-chain-name { font-size: .83rem; }
  .chart-currency, .chart-interval { font-size: .68rem; }
  .chart-readout { margin-top: 8px; }
  .example-chain-price { font-size: .8rem; }
  .shared-event { font-size: .83rem; }
  .trade-book { font-size: .75rem; }
  .trade-book th { font-size: .625rem; padding-right: 5px; }
  .trade-book td { padding-right: 5px; }
  .book-chain { gap: 5px; }
  .book-mark { width: 14px; height: 14px; flex-basis: 14px; }
  .book-chain small { font-size: .625rem; }
  .shared-controls { max-width: none; }
  .shared-controls h4 { font-size: .9rem; }
  .instant-toolbar { grid-template-columns: minmax(0,1fr) 116px; gap: 10px; }
  .instant-chain, .instant-amount { font-size: .75rem; }
  .instant-chain select, .instant-amount input { font-size: 1rem; }
  .instant-actions { grid-column: 1 / -1; gap: 10px; }
  .instant-help { font-size: .7rem; margin-top: 7px; }
  .shared-controls button { font-size: .76rem; padding-inline: 10px; }
  .demo-position { gap: 6px 18px; }
  .demo-position > p:not(.position-help) { flex-direction: column; gap: 2px; }
  .demo-position strong { font-size: .9rem; }
  .position-help { width: 100%; }
  .example-playback { width: 100%; margin-left: 0; gap: 20px; }
  .example-playback button { font-size: .7rem; }
  .example-playback button { padding-inline: 0; }
  .example-note { font-size: .63rem; }
}
@media (max-width: 380px) {
  .instant-toolbar { grid-template-columns: minmax(0,1fr) 134px; }
  .instant-chain { grid-column: 1 / -1; }
  .instant-actions { grid-column: auto; }
}
@media (max-width: 600px) and (max-height: 700px) {
  .shared-metrics { gap: 12px 20px; }
  .shared-controls h4 { margin-bottom: 4px; }
  .instant-toolbar { gap: 6px 10px; }
  /* Keep amount and P&L explanations available to assistive technology while
     giving short phones enough room to see the chart beside the controls. */
  .shared-demo[data-render='ready'] .example-label, .instant-help, .position-help {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .demo-position { margin-top: 10px; padding-top: 8px; gap: 4px 18px; }
  .shared-market-layout { margin-top: 12px; }
  .shared-chains li { padding: 16px; }
  .candle-stage { height: 166px; }
}
@media (any-pointer: coarse) {
  .instant-chain select, .instant-amount input { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .book-arrival .book-value { animation: none; } }

/* Reading colors are independent of the live optical decoration. */
:root {
  --reader-paper: #fff; --reader-surface: rgb(255 255 255 / .32);
  --reader-ink: #2a2c2c; --reader-muted: #555959;
  --reader-edge: #dedfdf; --reader-selected: rgb(255 255 255 / .65); --reader-offset: 48px;
  --glass-fill: transparent;
}
:root[data-theme='dark'] {
  --reader-paper: #2a2b2b; --reader-surface: rgb(255 255 255 / .035);
  --reader-ink: #f0f2f2; --reader-muted: #c5c8c8;
  --reader-edge: #414444; --reader-selected: rgb(255 255 255 / .055);
  --glass-fill: transparent;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --reader-paper: #2a2b2b; --reader-surface: rgb(255 255 255 / .035);
    --reader-ink: #f0f2f2; --reader-muted: #c5c8c8;
    --reader-edge: #414444; --reader-selected: rgb(255 255 255 / .055);
    --glass-fill: transparent;
  }
}
.section-lead, .market-explanation, .reader-nav, .guide-note, .reading-note,
.docs-status, .fee-receipt, .budget-ledger > div, .definition-pair > div,
.trade-explanation > div, .bonding-comparison > div { position: relative; isolation: isolate; }
/* Guided reading keeps the article open, with one persistent document tree. */
html:has(.docs-page, .guide-page) { scroll-behavior: auto; scroll-padding-top: 0; }
.guide, .docs-layout { max-width: 1220px; padding-block: 142px 100px; }
.guide-heading { padding-left: 280px; padding-bottom: 42px; }
.guide-heading .intro, .doc-opening .intro { max-width: 65ch; color: var(--reader-muted); line-height: 1.75; }
.guide-layout, .docs-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 32px; align-items: start; }
.guide-index, .docs-index { position: sticky; top: 24px; z-index: 12; padding: 0; max-height: none; overflow: visible; }
.guide-index { display: block; }
.guide-copy, .docs-article { min-width: 0; width: 100%; max-width: none; color: var(--reader-ink); line-height: 1.8; }
.docs-article { padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.doc-body { color: var(--reader-ink); font-size: 1rem; }
.doc-opening { padding: 0 8px 36px; }
.doc-opening h1 { margin-bottom: 22px; }
.doc-opening > p { max-width: 65ch; }
.chapter-context { padding-left: 8px; color: var(--reader-muted); margin-bottom: 22px; }
.reading-section { display: grid; grid-template-columns: 182px minmax(0, 1fr); gap: 30px; margin-bottom: 48px; }
.reading-heading { padding-top: 24px; }
.reading-heading h2, .reading-heading h3 { margin: 12px 0 0; font: 400 1.4rem/1.4 var(--serif); scroll-margin-top: var(--reader-offset); }
.section-position { flex: none; white-space: nowrap; font: 500 .8rem/1 var(--sans); color: var(--reader-muted); font-variant-numeric: tabular-nums; }
.reading-copy { min-width: 0; }
.reading-copy > p, .guide-copy section > p { max-width: 68ch; }
.reading-copy > p + p { margin-top: 22px; }
.section-lead { padding: 26px 28px; border-radius: 12px; background: var(--glass-fill); color: var(--reader-ink); transition: background-color .2s ease; }
.reading-copy p.section-lead { margin-top: 0; }
.guide-copy section { margin-bottom: 54px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; scroll-margin-top: var(--reader-offset); }
.guide-copy h2 { margin-bottom: 22px; }
.guide-copy .section-lead { margin-bottom: 24px; }
.guide-copy mark { padding: 1px 3px; border-radius: 3px; color: inherit; background: color-mix(in srgb,var(--reader-ink) 9%,var(--reader-selected)); }
.guide-note, .reading-note, .docs-status { padding: 20px 24px; border-radius: 12px; background: color-mix(in srgb,var(--reader-surface) 72%,transparent); color: var(--reader-muted); font-size: .92rem; line-height: 1.75; }
.reading-note strong { color: var(--reader-ink); font-weight: 600; }
.docs-status { margin-top: 24px; }
.doc-body table { margin-block: 24px; border-collapse: separate; border-spacing: 0; background: var(--reader-paper); border: 1px solid var(--reader-edge); border-radius: 12px; overflow: hidden; width: 100%; }
.doc-body th, .doc-body td { padding: 14px 16px; border-bottom-color: var(--reader-edge); }
.doc-body tr:last-child td { border-bottom: 0; }
.doc-body th { color: var(--reader-muted); font-size: .8rem; font-weight: 500; }

.market-explanation { margin: 30px 0; padding: 30px 26px 24px; border-radius: 16px; background: var(--glass-fill); }
.market-path { display: grid; grid-template-columns: minmax(0,1fr) 70px minmax(0,1.1fr) 70px minmax(0,1fr); align-items: center; gap: 10px; min-height: 156px; }
.market-place { min-width: 0; text-align: center; }
.market-place h3 { font: 500 .9rem/1.4 var(--sans); margin: 0 0 12px; }
.market-place p { font-size: .75rem; line-height: 1.65; color: var(--reader-muted); margin-top: 12px; }
.market-venues { display: flex; gap: 10px 16px; justify-content: center; flex-wrap: wrap; }
.market-venues span { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; }
.market-venues img, .market-core > img { object-fit: contain; }
.market-core > img { margin: 0 auto 12px; }
.market-core h3 { font: 500 1.15rem/1.4 var(--serif); }
.market-delivery { font-weight: 500; font-size: .9rem; }
.market-strands { width: 100%; height: 66px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.strand-under { stroke: color-mix(in srgb,var(--reader-muted) 35%,transparent); stroke-width: 9; }
.strand-over { stroke: color-mix(in srgb,var(--reader-muted) 75%,var(--reader-paper)); stroke-width: 7; }
.strand-light { stroke: color-mix(in srgb,var(--reader-ink) 45%,var(--reader-paper)); stroke-width: 1.6; }
.market-explanation figcaption { margin-top: 20px; color: var(--reader-muted); font-size: .77rem; line-height: 1.7; max-width: 72ch; }
.trade-explanation { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 28px; counter-reset: trade-stage; }
.trade-explanation > div { padding: 22px; border-radius: 12px; background: var(--reader-paper); counter-increment: trade-stage; }
.trade-explanation dt { font: 500 1rem/1.5 var(--sans); margin-bottom: 12px; }
.trade-explanation dt::before { content: counter(trade-stage); display: inline-block; margin-right: 10px; color: var(--reader-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.trade-explanation dd { color: var(--reader-muted); font-size: .9rem; line-height: 1.75; margin: 0; }
.bonding-comparison, .definition-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 26px; }
.bonding-comparison > div, .definition-pair > div { padding: 23px; background: var(--reader-paper); border-radius: 12px; }
.bonding-comparison dt, .definition-pair dt { font: 500 1rem/1.4 var(--sans); margin-bottom: 12px; color: var(--reader-ink); }
.bonding-comparison dd, .definition-pair dd { margin: 0; color: var(--reader-muted); font-size: .92rem; line-height: 1.75; }
.definition-pair > div:nth-child(2) { background: var(--reader-surface); }

.fee-receipt { padding: 26px; border-radius: 18px; background: var(--reader-paper); margin: 26px 0; }
.fee-receipt figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.fee-receipt figcaption strong { font: 500 1.25rem/1.4 var(--serif); }
.fee-receipt figcaption span { color: var(--reader-muted); font-size: .75rem; }
.fee-receipt-split { margin: 0; font-variant-numeric: tabular-nums; }
.fee-receipt-split > div { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 16px; padding: 16px 0; }
.fee-receipt-split dt { font-size: .9rem; }
.fee-receipt-split dt span, .fee-receipt-split dt small { display: block; color: var(--reader-muted); font-size: .75rem; margin-top: 4px; }
.fee-receipt-split dd { margin: 0; font: 500 1.6rem/1.3 var(--serif); white-space: nowrap; }
.fee-receipt-split > .fee-receipt-total { margin-top: 10px; padding: 18px 20px; border-radius: 10px; background: var(--reader-surface); }
.fee-receipt > p { color: var(--reader-muted); font-size: .77rem; line-height: 1.7; margin-top: 20px; }
.budget-ledger { display: grid; gap: 8px; margin-block: 28px; }
.budget-ledger > div { padding: 22px 24px; background: var(--reader-paper); border-radius: 12px; }
.budget-ledger dt { color: var(--reader-muted); font-size: .8rem; margin-bottom: 9px; }
.budget-ledger dd { margin: 0; }
.budget-ledger dd strong { display: block; font: 500 1rem/1.6 var(--sans); color: var(--reader-ink); }
.budget-ledger dd span { display: block; color: var(--reader-muted); font-size: .86rem; line-height: 1.75; margin-top: 10px; }
.infrastructure-costs { display: grid; gap: 9px; }
.infrastructure-costs > div { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 22px; padding: 20px 22px; background: var(--reader-paper); border-radius: 12px; }
.infrastructure-costs dt { color: var(--reader-ink); font-weight: 500; }
.infrastructure-costs dd { color: var(--reader-muted); font-size: .91rem; line-height: 1.75; margin: 0; }
.docs-contents { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; margin-top: 38px; }
.docs-contents section { min-width: 0; }
.docs-contents h2 { font-size: 1.5rem; margin-bottom: 18px; }
.docs-contents ul { display: grid; gap: 9px; }
.docs-contents li + li { margin: 0; }
.docs-contents a { display: grid; grid-template-columns: minmax(0,1fr) 18px; align-items: start; gap: 18px; padding: 20px 22px; background: var(--reader-surface); border-radius: 4px 14px 14px 14px; }
.docs-contents a:hover { background: var(--reader-selected); }
.docs-contents strong { display: block; font: 500 .94rem/1.5 var(--sans); }
.docs-contents small { display: block; color: var(--reader-muted); font-size: .79rem; line-height: 1.7; margin-top: 9px; }
.chapter-arrow { margin-top: 3px; color: var(--reader-muted); }
.chapter-turns { margin-top: 48px; gap: 24px; padding: 24px; border-radius: 14px; background: var(--reader-surface); }
.chapter-turns small { color: var(--reader-muted); }
.chapter-turns span { font-size: 1.3rem; line-height: 1.4; }

.chapter-menu { position: relative; margin-bottom: 14px; }
.chapter-menu summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 78px; padding: 16px 18px; cursor: pointer; list-style: none; border-radius: 14px; background: var(--reader-surface); border: 0; }
.chapter-menu summary::-webkit-details-marker { display: none; }
.chapter-menu summary > span:first-child { display: grid; gap: 6px; }
.chapter-menu summary small { color: var(--reader-muted); font-size: .72rem; }
.chapter-menu summary strong { font: 500 .84rem/1.5 var(--sans); }
.chapter-menu nav { position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 3; display: block; max-height: min(580px, calc(100svh - 200px)); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 20px; background: var(--reader-paper); border: 1px solid var(--reader-edge); border-radius: 14px; box-shadow: none; }
.docs-index .chapter-menu li a { padding: 9px 8px; color: var(--reader-muted); font-size: .83rem; line-height: 1.5; }
.docs-index a[aria-current='page'] { color: var(--reader-ink); background: var(--reader-selected); border-radius: 7px; font-weight: 500; }
.docs-search { position: relative; margin-bottom: 12px; }
:root:not(.js) .docs-search { display: none; }
.docs-search input { font-size: .87rem; height: 46px; padding: 12px 16px; border: 0; border-radius: 12px; background: var(--reader-surface); color: var(--reader-ink); }
.docs-search input::placeholder { color: var(--reader-muted); }
.docs-search-results { position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 5; margin: 0; max-height: min(580px, calc(100svh - 120px)); overflow: auto; overscroll-behavior: contain; padding: 20px; border: 1px solid var(--reader-edge); border-radius: 14px; background: var(--reader-paper); }
.docs-search-results > p, .docs-search-results small { color: var(--reader-muted); }
.docs-search-results small { font-size: .76rem; }
.reader-nav { position: relative; color: var(--reader-ink); border: 0; border-radius: 16px; background: var(--glass-fill); }
.reader-trigger { display: flex; align-items: center; gap: 12px; width: 100%; height: 88px; padding: 16px; list-style: none; }
summary.reader-trigger { cursor: pointer; }
.reader-trigger::-webkit-details-marker { display: none; }
.reader-ring { flex: none; fill: none; stroke: color-mix(in srgb,var(--reader-muted) 40%,var(--reader-surface)); stroke-width: 2; transform: rotate(-90deg); }
.reader-ring-progress { stroke: var(--reader-muted); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .18s ease-out; }
.reader-label { display: grid; gap: 5px; flex: 1; min-width: 0; }
.reader-label > span { font-size: .71rem; color: var(--reader-muted); }
.reader-label strong { font-size: .81rem; line-height: 1.5; font-weight: 500; }
.reader-chevron { flex: none; transition: rotate .16s ease; }
.reader-menu[open] .reader-chevron, .chapter-menu[open] > summary > .reader-chevron { rotate: 180deg; }
.reader-popover { position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 4; max-height: min(440px, calc(100svh - 210px)); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 6px; border: 1px solid var(--reader-edge); border-radius: 14px; background: var(--reader-paper); box-shadow: none; }
.reader-outline { position: relative; inset: auto; max-height: min(380px,calc(100svh - 390px)); border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 4px 8px; }
.guide-index .reader-outline { max-height: min(460px,calc(100svh - 200px)); }
.reader-popover ol { margin: 0; padding: 0; list-style: none; }
.reader-popover li + li { margin: 2px 0 0; }
.reader-popover a { display: flex; align-items: start; gap: 10px; min-height: 44px; padding: 11px 12px; border-radius: 9px; font-size: .8rem; line-height: 1.55; color: var(--reader-muted); text-decoration: none; transition: background-color .16s ease, color .16s ease; }
.reader-popover a:hover, .reader-popover a[aria-current='location'] { color: var(--reader-ink); background: var(--reader-selected); }
.reader-number { flex: none; min-width: 16px; color: var(--reader-muted); font-size: .7rem; line-height: 1.8; font-variant-numeric: tabular-nums; }
.reader-controls { display: flex; align-items: center; gap: 4px; padding: 6px 10px 8px 18px; }
.reader-count { font-size: .72rem; font-variant-numeric: tabular-nums; color: var(--reader-muted); margin-right: auto; }
.reader-controls button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--reader-ink); cursor: pointer; }
.reader-controls button:hover:not(:disabled) { background: var(--reader-selected); }
.reader-controls button:disabled { color: var(--reader-muted); opacity: .5; cursor: default; }
.reader-chapter-turn { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px 18px; border-radius: 0 0 16px 16px; color: var(--reader-ink); background: color-mix(in srgb,var(--reader-paper) 48%,transparent); text-decoration: none; }
.reader-chapter-turn small { display: block; font-size: .66rem; color: var(--reader-muted); margin-bottom: 4px; }
.reader-chapter-turn strong { display: block; font-size: .74rem; line-height: 1.5; font-weight: 500; }
.reader-chapter-turn:hover { background: var(--reader-selected); }
:root:not(.js) .reader-controls, :root:not(.js) [data-reader-title], :root:not(.js) .reader-ring { display: none; }
.reader-mobile { display: none; }
.docs-desktop-navigation { display: block; }
.docs-navigation { color: var(--reader-ink); }
.docs-navigation .index-cover { margin: 8px 0 24px; padding: 9px 10px; font-size: .9rem; }
.docs-navigation .chapter-group + .chapter-group { margin-top: 26px; }
.docs-navigation .chapter-group h2 { margin: 0 10px 8px; font: 600 .73rem/1.5 var(--sans); color: var(--reader-muted); }
.docs-navigation ul { padding: 0; margin: 0; list-style: none; }
.docs-navigation li + li { margin: 0; }
.docs-navigation a { display: block; color: var(--reader-muted); text-decoration: none; padding: 9px 10px; font-size: .82rem; line-height: 1.5; border-radius: 8px; }
.docs-navigation a:hover { color: var(--reader-ink); background: color-mix(in srgb,var(--reader-ink) 4%,transparent); }
.docs-navigation [data-docs-active] > a { color: var(--reader-ink); font-weight: 650; }
.docs-navigation .docs-section-links { margin: 4px 0 10px 10px; }
.js .docs-navigation li:not([data-docs-active]) > .docs-section-links { display: none; }
.docs-navigation .docs-section-links a { font-size: .74rem; padding: 7px 12px; }
.docs-navigation a[aria-current='location'] { color: var(--reader-ink); background: color-mix(in srgb,var(--reader-ink) 6%,transparent); }
.docs-index { max-height: calc(100svh - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 8px 8px 0; }
.docs-search-results { position: static; margin: 14px 0 20px; max-height: none; overflow: visible; padding: 16px; border: 0; border-radius: 10px; background: var(--reader-paper); box-shadow: none; }
.docs-search input { background: color-mix(in srgb,var(--reader-ink) 4%,transparent); }
.docs-mobile-navigation { display: none; }
.docs-chapter { scroll-margin-top: var(--reader-offset); margin-top: 72px; }
.docs-chapter .doc-opening { padding-bottom: 28px; }
.doc-body .docs-chapter-title { font: 400 clamp(1.9rem,3.2vw,2.65rem)/1.2 var(--serif); margin: 0 0 18px; letter-spacing: -.015em; }
.docs-chapter .doc-opening > p { max-width: 68ch; }
.docs-document-opening { padding-inline: 8px; }
.docs-document-opening h1 { margin-bottom: 22px; }
.docs-document-opening .intro { max-width: 65ch; }
.reading-heading { position: relative; }
.docs-legacy-anchor { position: absolute; top: 0; left: 0; width: 0; height: 0; scroll-margin-top: var(--reader-offset); }
.guide-note, .reading-note, .docs-status, .fee-receipt, .budget-ledger > div,
.definition-pair > div, .definition-pair > div:nth-child(2), .trade-explanation > div,
.bonding-comparison > div { background: transparent; }
.market-core > img { filter: var(--logo-filter); }
.guide-index .reader-controls { padding-bottom: 18px; }
.reader-nav a:focus-visible, .reader-nav button:focus-visible, summary.reader-trigger:focus-visible, .chapter-menu summary:focus-visible { outline-color: var(--reader-muted); outline-offset: -4px; border-radius: 9px; }
@media (max-width: 1160px) {
  .guide-layout, .docs-layout { grid-template-columns: 220px minmax(0,1fr); gap: 28px; }
  .guide-heading { padding-left: 248px; }
  .reading-section { grid-template-columns: 140px minmax(0,1fr); gap: 24px; }
  .market-path { grid-template-columns: minmax(0,1fr) 42px minmax(0,1.1fr) 42px minmax(0,1fr); gap: 8px; }
}
@media (max-width: 1000px) {
  .reading-section { display: block; }
  .reading-heading { display: flex; align-items: baseline; gap: 16px; padding: 0; margin-bottom: 20px; }
  .reading-heading h2, .reading-heading h3 { margin: 0; font-size: 1.5rem; }
  .reading-copy > p { max-width: none; }
  .market-path { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .market-strands { width: 90px; height: 40px; margin: 0 auto; transform: rotate(90deg); }
  .market-place { padding-block: 10px; }
  .market-place p { margin-top: 7px; }
}
@media (max-width: 860px) {
  .guide, .docs-layout { display: block; padding-block: 124px 70px; }
  .guide-heading { padding-left: 0; padding-bottom: 32px; }
  .guide-layout { display: block; }
  .guide-index { display: none; }
  .docs-index { position: relative; top: auto; margin-bottom: 32px; max-height: none; overflow: visible; padding: 0; }
  .docs-index > .reader-nav { display: none; }
  .docs-search { max-width: none; }
  .chapter-menu nav { display: block; max-height: min(580px, calc(100svh - 220px)); }
  .chapter-group + .chapter-group { margin-top: 22px; }
  .reader-mobile { display: block; position: sticky; top: 12px; z-index: 10; margin-bottom: 30px; }
  .reader-mobile .reader-trigger { height: 80px; padding: 12px 108px 12px 12px; gap: 9px; }
  .reader-mobile .reader-label > span { display: none; }
  .reader-mobile .reader-label strong { font-size: .78rem; line-height: 1.5; }
  .reader-mobile .reader-chevron { display: none; }
  .reader-mobile .reader-ring { width: 22px; height: 22px; }
  .reader-mobile .reader-controls { position: absolute; top: 18px; right: 6px; padding: 0; gap: 2px; }
  .reader-mobile .reader-count { display: none; }
  .reader-mobile .reader-controls button { width: 44px; height: 44px; }
  .reader-mobile .reader-chapter-turn { min-height: 60px; padding: 10px 14px; font-size: .75rem; line-height: 1.5; }
  .reader-mobile .reader-chapter-turn small { display: inline; margin: 0 7px 0 0; }
  .reader-mobile .reader-chapter-turn strong { display: inline; font-size: .75rem; }
  .reader-mobile .reader-popover { max-height: calc(100svh - 200px); }
  :root:not(.js) .reader-mobile .reader-trigger { padding-right: 14px; }
  :root:not(.js) .reader-mobile .reader-label > span, :root:not(.js) .reader-mobile .reader-chevron { display: block; }
  .guide-page { --reader-offset: 106px; }
  .docs-page { --reader-offset: 24px; }
  .doc-opening { padding: 0 0 30px; }
  .chapter-context { padding-left: 0; }
  .reading-section { margin-bottom: 40px; }
  .reading-heading h2, .reading-heading h3, .guide-copy h2 { font-size: 1.55rem; }
  .reading-heading .section-position { font-size: .74rem; }
  .market-path { grid-template-columns: minmax(0,1fr) 48px minmax(0,1.1fr) 48px minmax(0,1fr); }
  .market-strands { width: 100%; height: 66px; transform: none; }
  .docs-contents { gap: 28px 18px; }
  .docs-desktop-navigation { display: none; }
  .docs-mobile-navigation { display: block; border-radius: 10px; background: color-mix(in srgb,var(--reader-ink) 4%,transparent); }
  .docs-mobile-navigation > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; min-height: 52px; cursor: pointer; list-style: none; font-size: .86rem; }
  .docs-mobile-navigation > summary::-webkit-details-marker { display: none; }
  .docs-mobile-navigation [data-docs-current-label] { display: none; }
  .docs-mobile-navigation[open] > summary > svg { rotate: 180deg; }
  .docs-mobile-navigation > .docs-navigation { padding: 10px 14px 18px; }
  .docs-chapter { margin-top: 56px; }
  .docs-document-opening { padding-inline: 0; }
}
@media (max-width: 620px) {
  .section-lead, .guide-note, .reading-note { padding: 20px; }
  .doc-opening h1, .guide h1 { font-size: clamp(2.15rem,8.7vw,3.1rem); }
  .reading-heading { gap: 12px; }
  .reading-heading h2, .reading-heading h3 { font-size: 1.35rem; }
  .reading-copy > p, .guide-copy section > p { font-size: .94rem; line-height: 1.85; }
  .market-path { grid-template-columns: 1fr; gap: 8px; }
  .market-strands { width: 90px; height: 40px; transform: rotate(90deg); }
  .market-place p { font-size: .8rem; }
  .trade-explanation, .bonding-comparison, .definition-pair, .docs-contents { grid-template-columns: 1fr; }
  .trade-explanation > div, .definition-pair > div { padding: 20px; }
  .infrastructure-costs > div { display: block; }
  .infrastructure-costs dt { margin-bottom: 12px; }
  .fee-receipt { padding: 22px; }
  .fee-receipt figcaption { display: block; }
  .fee-receipt figcaption span { display: block; margin-top: 8px; }
  .fee-receipt-split dd { font-size: 1.4rem; }
  .fee-receipt-split > .fee-receipt-total { padding-inline: 14px; }
  .doc-body table { font-size: .8rem; }
  .doc-body th, .doc-body td { padding: 12px 10px; }
  .chapter-turns { padding: 20px; gap: 20px; }
  .chapter-turns span { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reader-ring-progress, .reader-chevron, .reader-popover a, .section-lead { transition: none; }
}

/* Three optical surfaces follow the title, index, and full document.
   All content stays in the page's native scrolling flow. */
.docs-page { --reader-offset: 24px; background: #f4f4f3; }
:root[data-theme='dark'] .docs-page { background: #252626; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .docs-page { background: #252626; }
}
.docs-shell { display: grid; grid-template-rows: auto auto; gap: 24px; height: auto; min-height: 0; max-width: 1320px; padding-block: 138px 72px; }
.docs-title-panel, .docs-index, .docs-article { position: relative; isolation: isolate; border: 0; border-radius: 28px; background: transparent; }
.docs-title-panel { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1fr); align-items: center; gap: 18px 48px; padding: 30px 36px; }
.docs-title-panel h1 { margin: 0; font: 400 clamp(2.35rem,3.5vw,3.1rem)/1.2 var(--serif); letter-spacing: -.015em; }
.docs-title-panel .intro { max-width: 58ch; margin: 0; font-size: .96rem; line-height: 1.75; }
.docs-title-panel .docs-status { grid-column: 1 / -1; padding: 0; margin: 0; background: transparent; font-size: .8rem; }
.docs-title-panel .docs-status::before { content: none; }
.docs-shell > .docs-layout { display: grid; grid-template-columns: 272px minmax(0,1fr); gap: 24px; padding: 0; min-height: 0; max-width: none; margin: 0; align-items: start; }
.docs-shell .docs-index { display: block; position: sticky; top: 24px; min-height: 0; max-height: calc(100svh - 48px); overflow: visible; padding: 22px 18px; margin: 0; z-index: 12; }
.docs-index-content, .docs-article > .doc-body { height: auto; max-height: none; overflow: visible; }
/* Only a long contents list can scroll inside its pinned surface. The article
   keeps its full height and continues to use the page's native scrollbar. */
.docs-index-content { max-height: calc(100svh - 92px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 8px 14px 2px; }
.docs-index-content a:focus-visible, .docs-index-content input:focus-visible, .docs-index-content summary:focus-visible { outline-color: var(--reader-muted); outline-offset: -3px; }
.docs-shell .docs-article { display: block; min-height: 0; padding: 22px 20px 22px 28px; }
.docs-article > .doc-body { padding: 12px 16px 28px 8px; }
.docs-shell .docs-chapter { margin-top: 64px; }
.docs-shell .docs-chapter:first-child { margin-top: 0; }
.docs-shell .docs-chapter .doc-opening { padding-inline: 0; }
.docs-shell .doc-body .docs-chapter-title { font-size: clamp(1.85rem,2.65vw,2.35rem); }
.docs-shell .reading-section { display: block; margin-bottom: 44px; }
.docs-shell .reading-heading { display: flex; align-items: baseline; gap: 16px; padding: 0; margin-bottom: 20px; }
.docs-shell .reading-heading h3 { margin: 0; font-size: 1.35rem; }
.docs-shell .section-lead { padding: 0; margin-top: 0; background: transparent; }
.docs-shell .section-lead::before { content: none; }
.docs-shell .reading-copy > p { max-width: 76ch; }
.docs-shell .docs-search input { border-radius: 9px; background: color-mix(in srgb,var(--reader-ink) 5%,transparent); }
.docs-shell .docs-navigation .index-cover { margin-top: 12px; }
@media (max-width: 1160px) {
  .docs-shell > .docs-layout { grid-template-columns: 242px minmax(0,1fr); gap: 20px; }
  .docs-title-panel { gap: 18px 32px; padding-inline: 30px; }
  .docs-shell .docs-article { padding-left: 22px; }
}
@media (max-width: 860px) {
  .docs-shell { display: block; height: auto; min-height: 0; padding-block: 124px 56px; }
  .docs-title-panel { display: block; padding: 26px; }
  .docs-title-panel h1 { margin-bottom: 16px; }
  .docs-title-panel .docs-status { margin-top: 18px; }
  .docs-shell > .docs-layout { display: block; margin-top: 20px; }
  .docs-shell .docs-index { display: block; position: relative; top: auto; max-height: none; padding: 16px; margin-bottom: 20px; z-index: auto; }
  .docs-index-content { max-height: none; overflow: visible; padding: 0; }
  .docs-shell .docs-search input { font-size: 1rem; }
  .docs-navigation a, .docs-search-results a { display: block; min-height: 44px; }
  .docs-shell .docs-article { display: block; padding: 28px 24px; }
  .docs-article > .doc-body { padding: 0; }
  .docs-shell .docs-chapter { margin-top: 52px; }
}
@media (max-width: 620px) {
  .docs-title-panel { padding: 24px; }
  .docs-title-panel h1 { font-size: clamp(1.9rem,8vw,2.6rem); }
  .docs-title-panel .intro { font-size: .9rem; }
  .docs-shell .docs-article { padding: 26px 20px; }
  .docs-shell .doc-body .docs-chapter-title { font-size: clamp(1.65rem,7vw,2rem); }
  .docs-shell .reading-heading { gap: 12px; }
  .docs-shell .reading-heading h3 { font-size: 1.25rem; }
}

/* The scene and rounded lenses are rendered together beneath semantic HTML.
   Native translucency is the quiet fallback when optical rendering is absent. */
:root { --liquid-surface: rgb(255 255 255 / .26); --liquid-highlight: rgb(255 255 255 / .64); --liquid-edge: rgb(40 43 43 / .09); }
:root[data-theme='dark'] { --liquid-surface: rgb(32 33 33 / .24); --liquid-highlight: rgb(255 255 255 / .16); --liquid-edge: rgb(255 255 255 / .045); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --liquid-surface: rgb(32 33 33 / .24); --liquid-highlight: rgb(255 255 255 / .16); --liquid-edge: rgb(255 255 255 / .045); }
}
/* Refractive bevels frame UI controls, not the braid hero artwork. Keep them flat. */
.liquid-glass-canvas { display: none; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body > main, body > .site-footer { position: relative; z-index: 1; }
body [data-liquid-glass], .shared-chains > li[data-liquid-glass] { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; outline: 1px solid var(--liquid-edge); outline-offset: -1px; }
html[data-liquid-glass='active'] [data-liquid-glass-ready='true'] { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.shared-chains > li, .combined-book { border-radius: 22px; }
.guide-page .section-lead, .guide-page .market-explanation, .guide-page .reader-nav { border-radius: 24px; }
/* A pinned reader crosses HTML text, which the optical canvas cannot refract. */
@media screen and (max-width: 860px) {
  html[data-liquid-glass='active'] .reader-mobile[data-liquid-glass-ready='true'] { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.docs-shell .reading-note, .docs-shell .fee-receipt, .docs-shell .budget-ledger > div, .docs-shell .definition-pair > div, .docs-shell .infrastructure-costs > div { background: color-mix(in srgb,var(--reader-paper) 18%,transparent); }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body [data-liquid-glass], .shared-chains > li[data-liquid-glass] { background: var(--reader-paper); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; outline: 1px solid var(--reader-edge); outline-offset: -1px; }
  html[data-liquid-glass='active'] .reader-mobile[data-liquid-glass-ready='true'] { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
  body [data-liquid-glass], .shared-chains > li[data-liquid-glass] { background: Canvas; border: 1px solid CanvasText; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  html[data-liquid-glass='active'] .reader-mobile[data-liquid-glass-ready='true'] { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .liquid-glass-canvas { display: none; }
}
@media print {
  .liquid-glass-canvas { display: none; }
  body [data-liquid-glass], .shared-chains > li[data-liquid-glass] { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
}

/* Copy is a progressive enhancement of the authored API route table. */
.docs-copy-route-cell > code { overflow-wrap: anywhere; white-space: normal; }
.docs-copy-route-cell > [data-docs-copy-button] { display: inline-flex; align-items: center; justify-content: center; inline-size: 4.8em; min-block-size: 36px; margin-inline-start: 10px; padding: 6px 8px; border: 0; border-radius: 6px; background: color-mix(in srgb,var(--reader-ink) 7%,var(--reader-paper)); color: var(--reader-ink); font-size: .78rem; font-weight: 500; line-height: 1.2; vertical-align: middle; cursor: pointer; }
.docs-copy-route-cell > [data-docs-copy-button]:hover { background: color-mix(in srgb,var(--reader-ink) 12%,var(--reader-paper)); }
.docs-copy-route-cell > [data-docs-copy-button]:focus-visible { outline-color: var(--reader-muted); outline-offset: 2px; }
.docs-copy-route-cell > [data-docs-copy-button][aria-disabled='true'] { cursor: wait; }
.docs-copy-status { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.docs-copy-status[data-copy-failure] { position: static; display: block; inline-size: auto; block-size: auto; margin-block-start: 8px; overflow: visible; clip-path: none; white-space: normal; color: var(--reader-ink); font-size: .78rem; line-height: 1.5; }
@media (max-width: 620px) {
  .docs-copy-route-cell > code { display: block; }
  .docs-copy-route-cell > [data-docs-copy-button] { display: flex; min-block-size: 44px; margin-inline-start: 0; margin-block-start: 8px; }
}
@media (forced-colors: active) {
  .docs-copy-route-cell > [data-docs-copy-button] { border: 1px solid ButtonText; background: ButtonFace; color: ButtonText; }
}
@media print {
  .docs-copy-route-cell > [data-docs-copy-button], .docs-copy-status { display: none; }
}

/* The entry sits at the center of the space between the brand and controls. */
.nav-center { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px; }
.nav-center .links { margin: 0; gap: 26px; white-space: nowrap; }
.nav-center .links:first-child { justify-content: flex-end; }
.nav .nav-actions { margin-left: 0; }
.nav-entry { padding: 13px 24px; white-space: nowrap; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; gap: 16px; }
/* The entry is a flat control; optical artwork remains in the hero. */
.nav .nav-entry { position: relative; border-radius:14px; color:var(--ink); background:var(--paper); outline:1px solid var(--ink2); outline-offset:-1px; }
.nav .nav-entry:hover, .nav .nav-entry[aria-current='page'] { color:var(--ink); background:color-mix(in srgb,var(--ink) 7%,var(--paper)); }
.nav-entry::before, .nav-entry::after, .nav-entry-water { display:none; }
@media (forced-colors: active) {
  .nav .nav-entry, .nav .nav-entry:hover { background: ButtonFace !important; color: ButtonText !important; border: 1px solid ButtonText; box-shadow: none; }
  .nav-entry::before, .nav-entry::after, .nav-entry-water { display: none; }
}
.hero-story .hero-intro { font-size: clamp(1.2rem, 1.75vw, 1.55rem); line-height: 1.55; max-width: 48rem; color: var(--ink); }
.hero-story h2 { font-size: clamp(1.3rem, 2.25vw, 1.9rem); margin-bottom: 20px; }
.hero-vision { max-width: 44rem; margin-top: 18px; line-height: 1.65; color: var(--ink2); font-size: 1rem; }
.developer-page { max-width: 1080px; padding-block: 160px 100px; }
.developer-page h1 { font: 400 clamp(2.7rem, 6vw, 5rem)/1.1 var(--serif); }
.developer-lead { max-width: 42rem; margin-top: 28px; font-size: 1.2rem; line-height: 1.6; color: var(--ink2); }
.developer-resources { margin-top: 64px; border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.developer-resources > a { display: grid; grid-template-columns: 1fr 24px; gap: 24px; padding: 30px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); text-decoration: none; }
.developer-resources > a > span { color: var(--mute); }
.developer-resources h2 { font: 500 1.25rem/1.4 var(--sans); }
.developer-resources p { margin-top: 8px; color: var(--ink2); line-height: 1.6; }
.developer-resources a:hover h2 { text-decoration: underline; text-underline-offset: 5px; }
.developer-note { margin-top: 30px; color: var(--mute); line-height: 1.6; }
@media (max-width: 1000px) {
  .nav { gap: 22px; }
  .nav-center { gap: 20px; }
  .nav-center .links { gap: 18px; }
}
@media (max-width: 860px) {
  .nav-center { display: flex; justify-content: center; }
  .nav-center .links { display: none; }
  .nav-entry { padding: 11px 18px; gap: 10px; }
  .nav .menu { margin-left: 0; }
}
@media (max-width: 480px) {
  .nav { gap: 12px; }
  .nav .nav-actions { display: flex; }
  .nav .theme-toggle { width: 28px; }
  .nav .theme-toggle [data-theme-label] { display: none; }
  .nav-entry > span { display: none; }
  .nav-entry { font-size: .85rem; padding: 11px 14px; }
  .nav .menu summary { width: auto; padding-left: 0; }
  .hero-story .hero-intro { font-size: 1.2rem; }
  .developer-page { padding-block: 125px 64px; }
  .developer-resources > a { gap: 14px; grid-template-columns: 1fr 20px; }
}

@media (max-width: 360px) {
  .nav .brand > span { display: none; }
}

/* Feature status labels, definition lists and diagrams in the documentation. */
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; font: 500 .72rem/1.6 var(--sans); white-space: nowrap; vertical-align: .08em; }
.tag-live { color: #2f6b4f; }
.tag-built { color: #4a6280; }
.tag-planned { color: #7a5a1f; }
.tag-after { color: var(--mute); }
:root[data-theme='dark'] .tag-live { color: #8fd1ad; }
:root[data-theme='dark'] .tag-built { color: #a9c3e2; }
:root[data-theme='dark'] .tag-planned { color: #e2c48a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .tag-live { color: #8fd1ad; }
  :root:not([data-theme]) .tag-built { color: #a9c3e2; }
  :root:not([data-theme]) .tag-planned { color: #e2c48a; }
}
.doc-body tbody th { font-weight: 500; }
.doc-body dl { margin-block: 18px; }
.doc-body dt { color: var(--ink); font-weight: 600; margin-top: 18px; }
.doc-body dd { margin: 4px 0 0; }
.doc-body figure.diagram { margin-block: 28px; }
.doc-body figcaption { color: var(--mute); font-size: .82rem; margin-top: 10px; }
.diagram-svg { display: block; width: 100%; height: auto; color: var(--ink2); font: 400 13px/1 var(--sans); }
.diagram-svg text { fill: currentColor; }
.diagram-svg .d-sub { fill: var(--mute); font-size: 12px; }
.diagram-svg .d-axis, .diagram-svg .d-line { stroke: currentColor; stroke-width: 1.4; fill: none; }
.diagram-svg .d-grid { stroke: color-mix(in srgb, var(--ink) 14%, transparent); stroke-width: 1; }
.diagram-svg .d-curve { stroke: var(--ink); stroke-width: 2.2; fill: none; }
.diagram-svg .d-mark circle { fill: var(--paper); stroke: currentColor; stroke-width: 1.6; }
.diagram-svg .d-strong circle { fill: currentColor; }
.diagram-svg .d-box { fill: color-mix(in srgb, var(--ink) 5%, var(--paper)); stroke: color-mix(in srgb, var(--ink) 30%, transparent); }
.diagram-svg .d-fill-a { fill: color-mix(in srgb, var(--ink) 70%, var(--paper)); }
.diagram-svg .d-fill-b { fill: color-mix(in srgb, var(--ink) 40%, var(--paper)); }
.diagram-svg .d-fill-c { fill: color-mix(in srgb, var(--ink) 15%, var(--paper)); }
@media (max-width: 560px) { .doc-body table { font-size: .8rem; } .diagram-svg { font-size: 15px; } }

/* Chapter metadata, the phone and tablet jump menu, and the per-chapter risk pointer. */
.chapter-group-title { font: 600 .73rem/1.4 var(--sans); color: var(--ink2); margin: 0 0 9px; }
.doc-body .chapter-meta { font-size: .8rem; color: var(--mute); margin: -8px 0 22px; }
.docs-status p + p { margin-top: 10px; }
.docs-status .tag { margin: 2px 2px; }
.docs-jump { display: none; margin-bottom: 26px; border-block: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.docs-jump summary { cursor: pointer; padding: 12px 0; font-size: .86rem; color: var(--ink2); }
.docs-jump ul { padding: 0 0 14px 1rem; list-style: disc; }
.docs-jump li + li { margin-top: 6px; }
.docs-jump a { font-size: .86rem; color: var(--ink2); text-decoration: none; }
.docs-jump a:hover { color: var(--ink); text-decoration: underline; }
.chapter-risk { margin-top: 48px; font-size: .86rem; color: var(--mute); }
.chapter-risk a { color: var(--ink2); }
@media (max-width: 1100px) { .docs-jump { display: block; } }
.doc-body th, .doc-body td { overflow-wrap: break-word; }
.doc-body td code { overflow-wrap: anywhere; }

/* Phone navigation and reading: content stays available, controls stay tappable. */
@media (max-width: 860px) {
  .sheet { max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; }
  .docs-shell { --reader-offset: 100px; }
  .docs-shell .docs-index { position: sticky; top: 8px; z-index: 15; padding: 10px; background: var(--paper); border-radius: 18px; }
  .docs-index-content { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .docs-index .docs-search { margin: 0; max-width: none; min-width: 0; }
  .docs-index .docs-search input { min-height: 48px; width: 100%; font-size: 16px; }
  .docs-mobile-navigation > summary { min-height: 48px; padding: 10px 12px; gap: 8px; font-size: 14px; }
  .docs-mobile-navigation > .docs-navigation { position: absolute; top: calc(100% + 6px); inset-inline: 0; max-height: min(60dvh,480px); overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-radius: 14px; box-shadow: none; outline: 1px solid var(--edge); outline-offset: -1px; padding: 16px; }
  .docs-index .docs-search-results { max-height: 60dvh; overflow-y: auto; overscroll-behavior: contain; }
  .docs-shell :is(.docs-chapter,.reading-heading h3) { scroll-margin-top: 100px; }
  .docs-shell .docs-navigation a { font-size: 14px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .nav-wrap { padding-inline: max(var(--gutter),env(safe-area-inset-left)) max(var(--gutter),env(safe-area-inset-right)); }
  .nav { min-height: 80px; gap: 8px; }
  .nav .nav-actions { gap: 0; }
  .nav .theme-toggle { width: 44px; min-height: 44px; }
  .nav .menu summary { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 0; }
  .nav-entry { padding-inline: 12px; }
  .hero { padding-top: 104px; }
  .weave-chain { font-size: 12px; letter-spacing: -.25px; }
  .weave-chain.chain-bnb { transform: translateX(calc(-50% - 6px)); }
  .weave-chain.chain-base { transform: translateX(calc(-50% + 6px)); }
  .weave-caption { flex-wrap: wrap; font-size: 12px; }
  .replay { min-height: 44px; padding: 10px 4px; font-size: 13px; }
  .hero-story .hero-intro { font-size: 18px; }
  .hero-story h2 { margin-bottom: 16px; }
  .shared-controls .chain-picker-trigger, .chain-picker-menu [role=option] { font-size: 16px; }
  .chain-picker-menu { max-width: calc(100vw - 32px); }
  .shared-controls button, .example-playback button { font-size: 14px; }
  .instant-help, .position-help, .example-label, .example-note { font-size: 12px; line-height: 1.6; }
  .shared-demo[data-render=ready] .example-label, .instant-help, .position-help { position: static; width: auto; height: auto; margin: 7px 0 0; overflow: visible; clip-path: none; white-space: normal; }
  .shared-chains > li, .combined-book { padding: 16px; }
  .trade-book { font-size: 13px; }
  .trade-book th, .book-chain small { font-size: 11px; }
  .trade-book :is(th,td):first-child { padding-left: 8px; }
  .trade-book :is(th,td):last-child { padding-right: 8px; }
  .book-chain { white-space: normal; }
  .example-playback { gap: 8px 20px; }
  .example-playback button { padding-inline: 8px; }
  .docs-title-panel { padding: 22px; }
  .docs-title-panel .intro, .docs-title-panel .docs-status { font-size: 14px; line-height: 1.6; }
  .docs-title-panel .docs-status { margin-top: 12px; }
  .docs-shell .doc-body { font-size: 16px; overflow-wrap: anywhere; }
  .docs-shell .doc-body .section-lead { font-size: 17px; }
  .doc-body :is(pre,code) { overflow-wrap: anywhere; }
  .docs-copy-button { min-height: 44px; }
  .developer-page { padding-block: 112px 56px; }
  .developer-lead { font-size: 18px; }
  .developer-resources { margin-top: 36px; }
  .launch-coming-soon { padding-top: 112px; }
  .site-footer { padding-bottom: max(24px,env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .nav .brand { min-width: 26px; }
  .weave-chain { font-size: 11.5px; }
  .combined-book { padding: 12px; }
  .trade-book { font-size: 12px; }
  .trade-book th { font-size: 10px; }
}

@media(max-width:860px) {
 .guide-layout > .reader-nav:not(.reader-mobile) { display:none; }
 .guide-layout > .reader-mobile { top:8px; border-radius:16px; background:var(--reader-paper); margin-bottom:24px; }
 .guide-layout > .reader-mobile .reader-trigger { height:60px; }
 .guide-layout > .reader-mobile .reader-label strong { font-size:14px; }
 .guide-layout > .reader-mobile .reader-controls { top:8px; }
 .guide-layout > .reader-mobile .reader-popover a { font-size:14px; }
 .guide-page { --reader-offset:84px; }
}

/* Selected and framed controls retain a separate keyboard focus indicator. */
html body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:2px solid var(--silver-ink, var(--ink)); outline-offset:2px; }

/* Public-page panels use the same opaque surface hierarchy as Studio. Keep the
   glass sculpture and liquid Launch action decorative; reading/trading surfaces
   must stay distinct from the surrounding page in either theme. Paint only. */
html:root:root body:not(.launch-app) :is(
  .shared-chains>li,.combined-book,.docs-title-panel,.docs-index,.docs-article,
  .reader-nav,.sheet,.chain-picker-menu
) {
  background:var(--site-panel);
  outline:1px solid var(--site-panel-edge);
  outline-offset:-1px;
  box-shadow:var(--site-panel-shadow);
}
html:root:root body:not(.launch-app) :is(
  .guide-note,.reading-note,.docs-status,.fee-receipt,.budget-ledger>div,
  .definition-pair>div,.trade-explanation>div,.bonding-comparison>div,
  .infrastructure-costs>div,.chapter-menu>summary,.reader-chapter-turn
) {
  background:var(--site-inset);
  outline:1px solid var(--site-panel-edge);
  outline-offset:-1px;
}
/* On the white landing canvas, pale slate gives demo panes a distinct fill. */
html:root:root[data-theme=light] body:not(.launch-app) :is(.shared-chains>li,.combined-book) {background:var(--site-inset)}
/* The status text inside a title panel does not need another panel boundary. */
html:root:root body:not(.launch-app) .docs-title-panel .docs-status {background:transparent;outline:0}
@media(print),(forced-colors:active) {
  html:root:root body:not(.launch-app) :is(.shared-chains>li,.combined-book,.docs-title-panel,.docs-index,.docs-article,.reader-nav) {background:Canvas;outline-color:CanvasText;box-shadow:none}
}
