/* =========================================================
   Next.js host integration — readable redesign
   Route: /articles/x402-ai-treasury-backend
   ========================================================= */

html:has(.x402-light-shell),
html:has(.x402-page) {
  color-scheme: light !important;
  background: #f4f6f2 !important;
}

html:has(.x402-light-shell) body,
html:has(.x402-page) body {
  --color-bg: #f4f6f2;
  --color-bg-elevated: #ffffff;
  --color-bg-card: rgba(12, 38, 61, 0.04);
  --color-fg: #0b1b28;
  --color-fg-muted: #60717c;
  --color-fg-subtle: #87949b;
  --color-accent-blue: #2979d8;
  --color-accent-blue-deep: #1d4ed8;
  --color-accent-blue-glow: rgba(41, 121, 216, 0.28);
  --color-accent-gold: #cb8a1b;
  --color-accent-gold-glow: rgba(203, 138, 27, 0.28);
  --color-accent-cyan: #0aa4aa;
  --color-accent-red: #bf505d;
  --color-accent-green: #0a7d57;
  --color-grid: rgba(10, 164, 170, 0.06);
  --color-grid-strong: rgba(10, 164, 170, 0.14);
  background: #f4f6f2 !important;
  color: #0b1b28 !important;
}

html:has(.x402-light-shell) body ::selection,
html:has(.x402-page) body ::selection {
  color: #fff;
  background: rgba(10, 164, 170, 0.55);
}

.x402-host,
.x402-light-shell {
  color-scheme: light;
  min-width: 0;
  width: 100%;
  background:
    radial-gradient(circle at 3% 0%, rgba(10, 164, 170, .055), transparent 27rem),
    radial-gradient(circle at 98% 13%, rgba(41, 121, 216, .045), transparent 32rem),
    #f4f6f2;
  color: #0b1b28;
  isolation: isolate;
}

/* Dark site ArticleNav → frosted light bar */
.x402-light-shell > nav {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(191, 202, 200, 0.9) !important;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.x402-light-shell > nav a {
  color: #60717c !important;
}
.x402-light-shell > nav a:hover {
  color: #0aa4aa !important;
}
.x402-light-shell > nav .text-fg-subtle {
  color: #87949b !important;
}
.x402-light-shell > nav .bg-accent-blue {
  background: #0aa4aa !important;
  box-shadow: 0 0 10px rgba(10, 164, 170, 0.35) !important;
}

/* Article sticky chrome sits under site nav (~57px) */
.x402-page .site-header {
  top: 57px;
  z-index: 100;
}
.x402-page .reading-progress {
  top: 57px;
  z-index: 110;
}
.x402-page {
  scroll-padding-top: 140px;
}

/* Dark islands keep light-on-dark text */
.x402-page .hero-diagram,
.x402-page .dark-figure,
.x402-page .summary-box,
.x402-page .combo-stack,
.x402-page .treasury-map,
.x402-page .layer-figure,
.x402-page .xrp-funnel-figure,
.x402-page .end-state {
  color-scheme: dark;
}

/* ArticleFooter Tailwind dark tokens → light cards */
.x402-light-shell > footer {
  color: #0b1b28 !important;
}
.x402-light-shell > footer > div[aria-hidden="true"] {
  background: linear-gradient(90deg, transparent, rgba(96, 113, 124, 0.28), transparent) !important;
}
.x402-light-shell > footer a.group.block,
.x402-light-shell > footer .rounded-2xl,
.x402-light-shell > footer .rounded-xl,
.x402-light-shell > footer .rounded-lg {
  border-color: rgba(191, 202, 200, 0.95) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 28px rgba(12, 38, 61, 0.06);
  color: #0b1b28 !important;
}
.x402-light-shell > footer a.group.block:hover,
.x402-light-shell > footer a.rounded-lg:hover {
  border-color: rgba(10, 164, 170, 0.45) !important;
  background: #f8fbfb !important;
}
.x402-light-shell > footer h3,
.x402-light-shell > footer .text-fg,
.x402-light-shell > footer strong {
  color: #0b1b28 !important;
}
.x402-light-shell > footer .text-fg-muted {
  color: #60717c !important;
}
.x402-light-shell > footer .text-fg-subtle {
  color: #87949b !important;
}
.x402-light-shell > footer .text-accent-blue {
  color: #2979d8 !important;
}
.x402-light-shell > footer a.group.block .p-4 {
  background: #ffffff !important;
}
.x402-light-shell > footer .border-white\/\[0\.12\],
.x402-light-shell > footer .border-white\/10,
.x402-light-shell > footer .border-white\/5 {
  border-color: rgba(191, 202, 200, 0.95) !important;
}
.x402-light-shell > footer .bg-white\/\[0\.04\],
.x402-light-shell > footer .bg-white\/5 {
  background: #ffffff !important;
}

html:has(.x402-light-shell) body > footer,
html:has(.x402-page) body > footer {
  color: #60717c;
}
html:has(.x402-light-shell) body > footer .text-fg,
html:has(.x402-page) body > footer .text-fg,
html:has(.x402-light-shell) body > footer strong.text-fg,
html:has(.x402-page) body > footer strong.text-fg {
  color: #0b1b28 !important;
}
html:has(.x402-light-shell) body > footer .text-fg-muted,
html:has(.x402-page) body > footer .text-fg-muted {
  color: #60717c !important;
}
html:has(.x402-light-shell) body > footer .text-fg-subtle,
html:has(.x402-page) body > footer .text-fg-subtle {
  color: #87949b !important;
}
html:has(.x402-light-shell) body > footer .rounded-xl,
html:has(.x402-page) body > footer .rounded-xl {
  border-color: rgba(191, 202, 200, 0.95) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 28px rgba(12, 38, 61, 0.06);
}
html:has(.x402-light-shell) body > footer .border-white\/10,
html:has(.x402-page) body > footer .border-white\/10 {
  border-color: rgba(191, 202, 200, 0.95) !important;
}
html:has(.x402-light-shell) body [class*="back-to-top"],
html:has(.x402-page) body [class*="back-to-top"] {
  color: #fff;
}

/* Undo accidental site preflight on article prose */
.x402-page button,
.x402-page input,
.x402-page textarea,
.x402-page select {
  font: inherit;
}


.x402-page {
  color-scheme: light;
  min-height: 100%;
  min-width: 320px;
  overflow-x: clip;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tailwind preflight zeroes margins — restore critical article rhythm */
.x402-page h1,
.x402-page h2,
.x402-page h3,
.x402-page h4,
.x402-page p,
.x402-page ul,
.x402-page ol,
.x402-page figure,
.x402-page blockquote {
  margin-block: revert;
}
.x402-page ul,
.x402-page ol {
  padding-inline-start: revert;
}

/*
  ZVYX — x402 readable redesign
  Standalone, dependency-free, responsive article system.
*/

.x402-page {
  --paper: #f4f6f2;
  --paper-2: #eef2ef;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --ink: #0b1b28;
  --ink-2: #223746;
  --muted: #60717c;
  --faint: #87949b;
  --line: #d8e0de;
  --line-strong: #bfcac8;
  --navy: #0c263d;
  --navy-2: #102f49;
  --navy-3: #173b57;
  --cyan: #0aa4aa;
  --cyan-bright: #54dfd0;
  --cyan-pale: #dff7f3;
  --blue: #2979d8;
  --blue-pale: #e8f2ff;
  --lime: #8fcf49;
  --lime-pale: #edf8dc;
  --amber: #cb8a1b;
  --amber-pale: #fff4d9;
  --violet: #7957c8;
  --violet-pale: #f0eafe;
  --red: #bf505d;
  --red-pale: #fce9eb;
  --shadow-sm: 0 1px 2px rgba(10, 34, 51, .04), 0 8px 24px rgba(10, 34, 51, .04);
  --shadow-md: 0 2px 4px rgba(10, 34, 51, .04), 0 20px 50px rgba(10, 34, 51, .08);
  --container: 1240px;
  --content: 790px;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --font-sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", "Noto Sans Mono CJK JP", monospace;
}

.x402-page, .x402-page *, .x402-page *::before, .x402-page *::after { box-sizing: border-box; }

.x402-page {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background: var(--paper);
}

.x402-page {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 3% 0%, rgba(10, 164, 170, .055), transparent 27rem),
    radial-gradient(circle at 98% 13%, rgba(41, 121, 216, .045), transparent 32rem),
    var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.78;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.x402-page, .x402-page button, input, textarea, select { font-family: var(--font-sans); }

.x402-page img, .x402-page svg, .x402-page video, .x402-page iframe { max-width: 100%; }
.x402-page svg { display: block; }
.x402-page a { color: inherit; text-underline-offset: .2em; }
.x402-page a:hover { color: var(--cyan); }
.x402-page button { color: inherit; }
.x402-page button, .x402-page summary, .x402-page a { -webkit-tap-highlight-color: transparent; }
.x402-page ::selection { color: #fff; background: var(--cyan); }

.x402-page :focus-visible {
  outline: 3px solid rgba(10, 164, 170, .56);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.page-shell {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.reading-progress {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  height: 3px;
  background: transparent;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-bright));
  transform-origin: left;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(191, 202, 200, .72);
  background: rgba(244, 246, 242, .88);
  backdrop-filter: blur(18px) saturate(1.25);
  transition: box-shadow .2s ease, background .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(12, 38, 61, .06); background: rgba(248, 250, 247, .95); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(calc(100% - 48px), var(--container));
  min-height: 72px;
  margin-inline: auto;
}
.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--cyan);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
}
.brand-mark svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: .93rem; letter-spacing: .14em; }
.brand-copy span { margin-top: 5px; color: var(--muted); font-family: var(--font-mono); font-size: .61rem; letter-spacing: .06em; text-transform: uppercase; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.header-nav a {
  padding: 8px 11px;
  color: var(--muted);
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}
.header-nav a:hover { color: var(--ink); background: rgba(255,255,255,.75); }
.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255,255,255,.82);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 800;
}
.copy-button:hover { border-color: var(--cyan); background: #fff; }
.copy-button svg, .share-conclusion svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hero {
  padding: clamp(64px, 9vw, 126px) 0 clamp(72px, 10vw, 132px);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(340px, .62fr);
  align-items: end;
  gap: clamp(48px, 7vw, 104px);
}
.eyebrow, .section-kicker, .panel-label, .figure-head p, .map-title, .toc-title {
  margin: 0;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.5;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 920px;
  margin: 22px 0 30px;
  font-size: clamp(2.65rem, 5.25vw, 5.65rem);
  font-weight: 780;
  letter-spacing: -.055em;
  line-height: 1.04;
}
.hero h1 em { color: var(--cyan); font-style: normal; }
.hero-lead {
  max-width: 850px;
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 1.35vw, 1.22rem);
  line-height: 1.9;
}
.hero-lead strong { color: var(--ink); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .67rem;
  letter-spacing: .035em;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero-meta strong { color: var(--ink-2); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(10, 164, 170, .1); }
.hero-answer {
  padding: 12px 0 0;
  border-top: 2px solid var(--ink);
}
.hero-answer .panel-label { color: var(--muted); margin-bottom: 8px; }
.answer-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.answer-row > span { color: var(--cyan); font-family: var(--font-mono); font-size: .69rem; font-weight: 800; }
.answer-row div { display: grid; gap: 3px; }
.answer-row small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.answer-row strong { font-size: .91rem; line-height: 1.55; }

.hero-diagram {
  margin-top: clamp(64px, 8vw, 112px);
  padding: clamp(28px, 4vw, 52px);
  color: #eefafa;
  border: 1px solid rgba(127, 224, 216, .16);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 50% -40%, rgba(84, 223, 208, .18), transparent 50%),
    var(--navy);
  background-size: 28px 28px, 28px 28px, auto, auto;
  box-shadow: var(--shadow-md);
}
.hero-diagram-head, .figure-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}
.hero-diagram-head p, .dark-figure .figure-head p { color: var(--cyan-bright); }
.hero-diagram-head h2 { max-width: 740px; margin: 7px 0 0; color: #fff; font-size: clamp(1.25rem, 2.15vw, 2.1rem); letter-spacing: -.025em; line-height: 1.35; }
.figure-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.status-fact { color: var(--cyan-bright); background: rgba(84,223,208,.08); }
.status-likely { color: #d7f286; background: rgba(143,207,73,.08); }
.status-open { color: #d6c6ff; background: rgba(121,87,200,.1); }
.status-neutral { color: var(--muted); background: #fff; }
.handshake-grid {
  display: grid;
  grid-template-columns: minmax(170px, .45fr) minmax(420px, 1fr) minmax(170px, .45fr);
  align-items: center;
  gap: 28px;
}
.handshake-party {
  display: grid;
  min-height: 168px;
  align-content: center;
  gap: 7px;
  padding: 24px;
  border: 1px solid rgba(216, 240, 240, .2);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}
.handshake-party small { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .64rem; font-weight: 800; letter-spacing: .12em; }
.handshake-party strong { color: #fff; font-size: 1.1rem; }
.handshake-party span { color: #b9cbd2; font-size: .8rem; }
.handshake-protocol { display: grid; gap: 10px; }
.protocol-step, .protocol-line {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(216, 240, 240, .17);
  border-radius: 10px;
  background: rgba(5,18,29,.45);
}
.protocol-step b, .protocol-line b { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .72rem; }
.protocol-step span, .protocol-line span { color: #dbe8eb; font-size: .78rem; font-weight: 700; }
.protocol-line::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -28px;
  width: 28px;
  height: 1px;
  background: rgba(84,223,208,.48);
}
.protocol-line::after {
  content: "";
  position: absolute;
  right: -29px;
  top: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--cyan-bright);
  border-right: 1px solid var(--cyan-bright);
  transform: rotate(45deg);
}
.protocol-line.reverse::before { right: auto; left: -28px; }
.protocol-line.reverse::after { right: auto; left: -29px; transform: rotate(-135deg); }
.diagram-note {
  margin: 30px 0 0;
  padding-top: 20px;
  color: #b9cbd2;
  border-top: 1px solid rgba(216,240,240,.15);
  font-size: .8rem;
}
.diagram-note strong { color: #fff; }

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(52px, 7vw, 104px);
  padding-top: clamp(72px, 9vw, 130px);
  padding-bottom: clamp(90px, 10vw, 150px);
}
.article-toc { min-width: 0; }
.toc-sticky { position: sticky; top: 102px; }
.toc-title { color: var(--muted); margin-bottom: 14px; }
.article-toc ol { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.article-toc a {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  min-height: 36px;
  padding: 4px 8px 4px 0;
  color: var(--muted);
  border-right: 2px solid transparent;
  font-size: .73rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}
.article-toc a span { color: var(--faint); font-family: var(--font-mono); font-size: .59rem; }
.article-toc a:hover, .article-toc a.is-active { color: var(--ink); }
.article-toc a.is-active { border-right-color: var(--cyan); }
.article-toc a.is-active span { color: var(--cyan); }
.toc-legend {
  display: grid;
  gap: 7px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.toc-legend span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .64rem; }
.toc-legend i { width: 7px; height: 7px; border-radius: 50%; }
.legend-fact { background: var(--cyan); }
.legend-likely { background: var(--lime); }
.legend-open { background: var(--violet); }
.article-content { min-width: 0; }

.article-section {
  padding: 0 0 clamp(88px, 10vw, 150px);
  scroll-margin-top: 100px;
}
.article-section + .article-section {
  padding-top: clamp(88px, 10vw, 150px);
  border-top: 1px solid var(--line);
}
.section-head { max-width: 990px; margin-bottom: 26px; }
.section-kicker { margin-bottom: 17px; }
.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 3.7vw, 4rem);
  font-weight: 760;
  letter-spacing: -.045em;
  line-height: 1.19;
}
.section-deck {
  max-width: var(--content);
  margin: 0 0 42px;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  line-height: 1.9;
}
.article-content > .article-section > p:not(.section-deck):not(.source-intro) {
  max-width: var(--content);
  color: var(--ink-2);
}
.source-ref {
  display: inline-grid;
  width: 1.45em;
  height: 1.45em;
  place-items: center;
  margin-left: .16em;
  color: var(--cyan);
  border: 1px solid rgba(10,164,170,.28);
  border-radius: 50%;
  background: rgba(223,247,243,.55);
  font-family: var(--font-mono);
  font-size: .6em;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  vertical-align: super;
}
.source-ref:hover { color: #fff; background: var(--cyan); }
code { padding: .1em .28em; color: #075f65; border-radius: 4px; background: var(--cyan-pale); font-family: var(--font-mono); font-size: .86em; }

.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 44px 0;
}
.question-card {
  position: relative;
  min-height: 210px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-sm);
}
.question-card > span { color: var(--cyan); font-family: var(--font-mono); font-size: .67rem; font-weight: 800; }
.question-card h3 { margin: 16px 0 10px; font-size: 1.03rem; line-height: 1.55; }
.question-card p { margin: 0; color: var(--muted); font-size: .84rem; }

.callout {
  position: relative;
  max-width: 940px;
  margin: 42px 0 0;
  padding: 24px 26px 24px 30px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
}
.callout::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(90deg, var(--callout-tint), transparent 60%); opacity: .42; }
.callout > * { position: relative; z-index: 1; }
.callout-fact { --callout-tint: var(--cyan-pale); border-left-color: var(--cyan); }
.callout-likely { --callout-tint: var(--lime-pale); border-left-color: var(--lime); }
.callout-open { --callout-tint: var(--violet-pale); border-left-color: var(--violet); }
.callout-caution { --callout-tint: var(--amber-pale); border-left-color: var(--amber); }
.callout-label { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-size: .87rem; font-weight: 850; }
.callout .signal { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.callout-fact .signal { color: var(--cyan); }
.callout-likely .signal { color: var(--lime); }
.callout-open .signal { color: var(--violet); }
.callout-caution .signal { color: var(--amber); }
.callout p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.82; }

.research-figure {
  width: min(100%, 1040px);
  margin: 48px 0;
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.dark-figure {
  color: #eaf4f6;
  border-color: rgba(24,72,96,.3);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 100% 0%, rgba(84,223,208,.10), transparent 42%),
    var(--navy);
  background-size: 26px 26px, 26px 26px, auto, auto;
  box-shadow: var(--shadow-md);
}
.figure-head { margin-bottom: 28px; }
.figure-head h3 { margin: 5px 0 0; font-size: clamp(1.22rem, 2.2vw, 2rem); letter-spacing: -.02em; line-height: 1.35; }
.light-head p { color: var(--cyan); }
.figure-note {
  margin: 28px 0 0;
  padding-top: 18px;
  color: #bfd0d5;
  border-top: 1px solid rgba(218,240,241,.16);
  font-size: .77rem;
  line-height: 1.75;
}
.dark-note { color: var(--muted); border-top-color: var(--line); }

.http-sequence { display: grid; gap: 9px; }
.http-row { display: grid; grid-template-columns: 155px minmax(0, 1fr) 155px; align-items: center; gap: 18px; }
.http-endpoint { display: grid; gap: 2px; padding: 14px; border: 1px solid rgba(218,240,241,.17); border-radius: 12px; background: rgba(255,255,255,.045); }
.http-endpoint small { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .59rem; font-weight: 800; letter-spacing: .1em; }
.http-endpoint strong { color: #fff; font-size: .86rem; }
.http-endpoint.ghost { visibility: hidden; }
.http-message {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid rgba(218,240,241,.18);
  border-radius: 10px;
  background: rgba(3,16,26,.45);
}
.http-message::after { content: ""; position: absolute; right: -18px; width: 18px; height: 1px; background: var(--cyan-bright); }
.http-message::before { content: ""; position: absolute; right: -19px; width: 6px; height: 6px; border-top: 1px solid var(--cyan-bright); border-right: 1px solid var(--cyan-bright); transform: rotate(45deg); }
.http-message.inbound::after { right: auto; left: -18px; }
.http-message.inbound::before { right: auto; left: -19px; transform: rotate(-135deg); }
.http-message b { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .74rem; }
.http-message span { color: #c4d4d8; font-size: .75rem; text-align: right; }
.http-message.success { background: rgba(84,223,208,.08); }
.definition-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(280px, .7fr); align-items: stretch; gap: 22px; margin-top: 30px; }
.code-window { overflow: hidden; color: #dce9eb; border: 1px solid rgba(15,56,81,.36); border-radius: var(--radius); background: #0e2334; box-shadow: var(--shadow-sm); }
.code-bar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 18px; color: #a8bdc3; border-bottom: 1px solid rgba(220,240,242,.12); background: #102b40; font-family: var(--font-mono); font-size: .66rem; font-weight: 800; letter-spacing: .06em; }
.code-bar i, .code-bar i::before, .code-bar i::after { width: 7px; height: 7px; border-radius: 50%; background: #567080; }
.code-bar i { position: relative; margin-right: 18px; }
.code-bar i::before, .code-bar i::after { content: ""; position: absolute; top: 0; }
.code-bar i::before { left: 11px; }
.code-bar i::after { left: 22px; }
.code-window pre { margin: 0; padding: 24px; overflow-x: auto; }
.code-window code { padding: 0; color: #dce9eb; background: none; font-family: var(--font-mono); font-size: .78rem; line-height: 1.75; }
.pull-quote, .wide-quote {
  margin: 0;
  padding: clamp(26px, 4vw, 44px);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--cyan-pale), #fff 68%);
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  font-weight: 750;
  letter-spacing: -.015em;
  line-height: 1.7;
}

.layer-figure { padding: 0; background: var(--navy); border-color: var(--navy); }
.layer-figure .figure-head { padding: 34px 34px 0; color: #fff; }
.layer-figure .figure-head p { color: var(--cyan-bright); }
.layer-figure .status-neutral { color: #c5d4d8; border-color: rgba(218,240,241,.28); background: rgba(255,255,255,.04); }
.layer-stack { display: grid; }
.layer-row { display: grid; grid-template-columns: 150px minmax(0,1fr) 180px; align-items: center; gap: 22px; min-height: 96px; padding: 18px 34px; color: #eaf4f6; border-top: 1px solid rgba(218,240,241,.13); }
.layer-row.is-core { color: #082637; background: var(--cyan-bright); border-color: transparent; }
.layer-index, .layer-owner { font-family: var(--font-mono); font-size: .63rem; font-weight: 800; letter-spacing: .06em; }
.layer-index { color: #91aab3; }
.layer-owner { color: #9fb5bc; text-align: right; }
.layer-row.is-core .layer-index, .layer-row.is-core .layer-owner { color: #15545b; }
.layer-row > div { display: grid; gap: 3px; }
.layer-row strong { font-size: .94rem; }
.layer-row small { color: #afc2c8; font-size: .72rem; }
.layer-row.is-core small { color: #245d62; }
.layer-figure .figure-note { margin-inline: 34px; padding-bottom: 28px; }
.scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin: 42px 0; }
.scope-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.scope-card .panel-label { color: var(--muted); }
.scope-card h3 { margin: 8px 0 18px; font-size: 1.2rem; }
.scope-in { border-top: 3px solid var(--cyan); }
.scope-out { border-top: 3px solid var(--amber); }
.check-list, .dash-list, .model-card ul, .compare-card ul, .boundary-card ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.check-list li, .dash-list li, .model-card li, .compare-card li, .boundary-card li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: .84rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--cyan); font-weight: 900; }
.dash-list li::before { content: "—"; position: absolute; left: 0; color: var(--amber); font-weight: 900; }

.payment-tabs { margin: 45px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.tab-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.tab-list button { display: grid; gap: 3px; min-height: 82px; padding: 17px 20px; color: var(--muted); border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.tab-list button:last-child { border-right: 0; }
.tab-list button:hover { color: var(--ink); background: #fff; }
.tab-list button[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: inset 0 -3px var(--cyan); }
.tab-list small { color: var(--faint); font-family: var(--font-mono); font-size: .59rem; font-weight: 800; letter-spacing: .09em; }
.tab-list strong { font-size: .9rem; }
.tab-panel { padding: clamp(24px, 4vw, 40px); }
.x402-page.js .tab-panel[hidden] { display: none; }
.x402-page.no-js .tab-panel + .tab-panel { border-top: 1px solid var(--line); }
.scheme-flow { display: grid; grid-template-columns: repeat(7, auto); align-items: center; gap: 10px; }
.scheme-flow > i { color: var(--cyan); font-style: normal; }
.scheme-node { display: grid; min-width: 0; min-height: 128px; align-content: center; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.scheme-node > span { color: var(--cyan); font-family: var(--font-mono); font-size: .63rem; font-weight: 900; }
.scheme-node strong { font-size: .84rem; line-height: 1.45; }
.scheme-node small { color: var(--muted); font-size: .69rem; line-height: 1.5; }
.scheme-meta { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 20px 0 0; }
.scheme-meta div { padding: 14px 16px; border-radius: 10px; background: var(--paper-2); }
.scheme-meta dt { color: var(--muted); font-size: .68rem; font-weight: 700; }
.scheme-meta dd { margin: 3px 0 0; font-size: .83rem; font-weight: 800; }

.treasury-map { display: grid; grid-template-columns: minmax(160px,.7fr) 56px minmax(260px,1.2fr) 56px minmax(160px,.7fr); gap: 12px; align-items: stretch; }
.treasury-column { display: grid; align-content: start; gap: 10px; }
.map-title { color: #91aab3; margin-bottom: 2px; }
.map-card { display: grid; gap: 4px; min-height: 104px; align-content: center; padding: 16px; border: 1px solid rgba(218,240,241,.16); border-radius: 12px; background: rgba(255,255,255,.04); }
.map-card small { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .56rem; font-weight: 800; letter-spacing: .07em; }
.map-card strong { color: #fff; font-size: .8rem; line-height: 1.45; }
.map-card span { color: #aebfc5; font-size: .68rem; line-height: 1.5; }
.map-card.treasury { border-color: rgba(84,223,208,.32); background: rgba(84,223,208,.065); }
.map-card.rail { border-color: rgba(121,87,200,.32); background: rgba(121,87,200,.065); }
.map-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--cyan-bright); }
.map-arrow i { position: relative; width: 100%; height: 1px; background: rgba(84,223,208,.48); }
.map-arrow i::after { content: ""; position: absolute; right: 0; top: -3px; width: 6px; height: 6px; border-top: 1px solid var(--cyan-bright); border-right: 1px solid var(--cyan-bright); transform: rotate(45deg); }
.map-arrow span { color: #8ca5ae; font-family: var(--font-mono); font-size: .51rem; letter-spacing: .05em; text-align: center; writing-mode: vertical-rl; }
.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin: 38px 0; }
.model-card { position: relative; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.model-card.recommended { border-color: rgba(10,164,170,.58); background: linear-gradient(145deg, var(--cyan-pale), #fff 55%); box-shadow: 0 16px 36px rgba(10,164,170,.1); }
.model-rank { color: var(--muted); font-family: var(--font-mono); font-size: .59rem; font-weight: 900; letter-spacing: .09em; }
.model-card.recommended .model-rank { color: var(--cyan); }
.model-card h3 { margin: 13px 0 9px; font-size: 1.02rem; }
.model-card p { margin: 0 0 16px; color: var(--muted); font-size: .79rem; }
.model-card li { font-size: .75rem; }
.model-card li::before, .compare-card li::before, .boundary-card li::before { content: "•"; position: absolute; left: 3px; color: var(--cyan); }

.table-shell { width: 100%; margin: 42px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.comparison-table { width: 100%; min-width: 850px; border-collapse: collapse; table-layout: fixed; }
.comparison-table th, .comparison-table td { padding: 18px 17px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .76rem; line-height: 1.62; }
.comparison-table thead th { color: var(--muted); background: var(--paper-2); font-family: var(--font-mono); font-size: .61rem; letter-spacing: .06em; }
.comparison-table tbody tr:last-child th, .comparison-table tbody tr:last-child td { border-bottom: 0; }
.comparison-table tbody th { width: 170px; color: var(--ink); background: var(--surface-soft); font-size: .8rem; }
.comparison-table tbody th > span { display: block; margin-bottom: 4px; color: var(--cyan); font-family: var(--font-mono); font-size: .6rem; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .07em;
  line-height: 1;
  white-space: nowrap;
}
.badge-fact { color: #087b82; background: var(--cyan-pale); }
.badge-likely { color: #587f26; background: var(--lime-pale); }
.badge-open { color: #6746ae; background: var(--violet-pale); }
.subhead { max-width: 900px; margin: 58px 0 24px; font-size: clamp(1.35rem, 2.5vw, 2.25rem); letter-spacing: -.025em; line-height: 1.42; }
.trust-ladder { display: grid; grid-template-columns: repeat(7, auto); align-items: center; gap: 10px; margin: 30px 0 42px; }
.trust-ladder article { display: grid; min-height: 150px; align-content: center; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.trust-ladder article span { color: var(--cyan); font-family: var(--font-mono); font-size: .56rem; font-weight: 900; letter-spacing: .06em; }
.trust-ladder article strong { font-size: .78rem; line-height: 1.5; }
.trust-ladder article small { color: var(--muted); font-size: .66rem; line-height: 1.5; }
.trust-ladder > i { color: var(--cyan); font-style: normal; }
.wide-quote { max-width: 960px; margin: 44px 0 0; border-left: 4px solid var(--cyan); border-radius: 0 var(--radius) var(--radius) 0; }

.compare-grid { display: grid; grid-template-columns: minmax(0,1fr) 56px minmax(0,1fr); align-items: stretch; gap: 16px; margin: 42px 0; }
.compare-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare-card.is-accent { border-color: rgba(10,164,170,.4); background: linear-gradient(150deg, var(--cyan-pale), #fff 55%); }
.compare-card .panel-label { color: var(--muted); }
.compare-card h3 { margin: 9px 0 20px; font-size: 1.35rem; }
.compare-card li { font-size: .82rem; }
.compare-symbol { display: grid; place-items: center; color: var(--cyan); font-size: 1.5rem; font-weight: 700; }
.combo-stack { display: grid; max-width: 960px; margin: 28px 0 30px; overflow: hidden; color: #e9f5f5; border: 1px solid var(--navy); border-radius: var(--radius); background: var(--navy); }
.combo-stack > div { display: grid; grid-template-columns: 120px 230px 1fr; align-items: center; gap: 20px; min-height: 82px; padding: 16px 24px; border-bottom: 1px solid rgba(218,240,241,.13); }
.combo-stack > div:last-child { border-bottom: 0; }
.combo-stack span { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .58rem; font-weight: 900; letter-spacing: .07em; }
.combo-stack strong { font-size: .86rem; }
.combo-stack small { color: #b1c4ca; font-size: .72rem; }

.actor-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin: 40px 0; }
.actor-card { display: grid; align-content: start; gap: 14px; min-height: 244px; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.actor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.actor-head h3 { margin: 0; font-size: 1.02rem; line-height: 1.5; }
.actor-card p { margin: 0; color: var(--ink-2); font-size: .82rem; }
.actor-card > small { margin-top: auto; padding-top: 14px; color: var(--muted); border-top: 1px solid var(--line); font-size: .69rem; line-height: 1.6; }

.ripple-flow { display: grid; grid-template-columns: minmax(150px,.7fr) 34px minmax(260px,1.2fr) 34px minmax(150px,.7fr); align-items: center; gap: 12px; }
.ripple-flow > i { color: var(--cyan-bright); font-style: normal; text-align: center; }
.ripple-block { display: grid; min-height: 180px; align-content: center; gap: 7px; padding: 22px; border: 1px solid rgba(218,240,241,.17); border-radius: 15px; background: rgba(255,255,255,.045); }
.ripple-block.core { border-color: rgba(84,223,208,.42); background: rgba(84,223,208,.075); }
.ripple-block small { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .57rem; font-weight: 900; letter-spacing: .07em; }
.ripple-block strong { color: #fff; font-size: .83rem; line-height: 1.55; }
.ripple-block span { color: #aec0c6; font-size: .68rem; line-height: 1.55; }
.boundary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin: 38px 0; }
.boundary-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fact-boundary { border-top: 3px solid var(--cyan); }
.likely-boundary { border-top: 3px solid var(--lime); }
.open-boundary { border-top: 3px solid var(--violet); }
.boundary-card h3 { margin: 15px 0 7px; font-size: 1rem; }
.boundary-card > p { margin: 0 0 16px; color: var(--muted); font-size: .75rem; }
.boundary-card li { font-size: .73rem; }
.future-stack { display: grid; margin: 28px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.future-row { display: grid; grid-template-columns: 140px minmax(0,1fr) auto; align-items: center; gap: 22px; min-height: 88px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.future-row:last-child { border-bottom: 0; }
.future-row > span { color: var(--muted); font-family: var(--font-mono); font-size: .58rem; font-weight: 900; letter-spacing: .06em; }
.future-row > div { display: grid; gap: 3px; }
.future-row strong { font-size: .86rem; }
.future-row small { color: var(--muted); font-size: .71rem; }
.future-row.possible { background: linear-gradient(90deg, var(--lime-pale), #fff 40%); }
.future-row.open { background: linear-gradient(90deg, var(--violet-pale), #fff 40%); }

.xrp-funnel-figure { padding: 0; background: var(--surface); }
.xrp-funnel-figure .figure-head { padding: 34px 34px 0; }
.xrp-funnel { display: grid; gap: 8px; padding: 0 34px; }
.funnel-step {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) minmax(160px,.45fr);
  align-items: center;
  gap: 16px;
  width: var(--step-width);
  min-height: 82px;
  padding: 12px 16px;
  color: #e9f5f5;
  border-radius: 11px;
  background: var(--navy);
}
.funnel-step:nth-child(2) { margin-left: 3.5%; background: #11314a; }
.funnel-step:nth-child(3) { margin-left: 7%; background: #153952; }
.funnel-step:nth-child(4) { margin-left: 10.5%; background: #19415b; }
.funnel-step:nth-child(5) { margin-left: 14%; background: #1d4964; }
.funnel-no { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .65rem; font-weight: 900; }
.funnel-step > div { display: grid; gap: 3px; }
.funnel-step strong { font-size: .82rem; }
.funnel-step small { color: #b3c7cd; font-size: .67rem; }
.funnel-step > b { color: #d8e6e9; font-size: .68rem; text-align: right; }
.xrp-funnel-figure .figure-note { margin-inline: 34px; padding-bottom: 28px; }
.scenario-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin: 38px 0; }
.scenario-card { display: grid; min-height: 230px; align-content: start; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.scenario-card.high-upside { border-color: rgba(121,87,200,.42); background: linear-gradient(145deg, var(--violet-pale), #fff 52%); }
.scenario-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.scenario-head h3 { margin: 0; font-size: .98rem; line-height: 1.5; }
.scenario-card p { margin: 18px 0; color: var(--ink-2); font-size: .8rem; }
.impact { margin-top: auto; padding-top: 14px; color: var(--cyan); border-top: 1px solid var(--line); font-size: .72rem; }

.end-state { display: grid; grid-template-columns: minmax(180px,.5fr) 56px minmax(350px,1.2fr); align-items: center; gap: 18px; }
.end-state-side { display: grid; gap: 10px; }
.end-state-side > div { display: grid; gap: 4px; padding: 16px; border: 1px solid rgba(218,240,241,.16); border-radius: 11px; background: rgba(255,255,255,.04); }
.end-state-side strong { color: #fff; font-size: .78rem; }
.end-state-side span { color: #aec0c6; font-size: .65rem; }
.end-state-arrow { color: var(--cyan-bright); font-size: 1.5rem; text-align: center; }
.end-state-core { padding: 24px; border: 1px solid rgba(84,223,208,.35); border-radius: 16px; background: rgba(84,223,208,.06); }
.end-state-core h4 { margin: 0 0 18px; color: #fff; font-size: 1rem; }
.end-state-layers { display: grid; gap: 7px; }
.end-state-layers > div { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 11px 13px; border: 1px solid rgba(218,240,241,.14); border-radius: 9px; background: rgba(3,16,26,.35); }
.end-state-layers strong { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .66rem; }
.end-state-layers span { color: #b5c8ce; font-size: .66rem; }
.criteria-list { display: grid; max-width: 900px; margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.criteria-list li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.criteria-list li > span { color: var(--cyan); font-family: var(--font-mono); font-size: .68rem; font-weight: 900; }
.criteria-list p { margin: 0; color: var(--ink-2); font-size: .88rem; }

.watch-list { display: grid; margin-top: 42px; border-top: 1px solid var(--line-strong); }
.watch-list article { display: grid; grid-template-columns: 54px minmax(0,1fr) minmax(150px,.25fr); align-items: center; gap: 20px; min-height: 110px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.watch-list article > span { color: var(--cyan); font-family: var(--font-mono); font-size: .72rem; font-weight: 900; }
.watch-list article > div { display: grid; gap: 4px; }
.watch-list strong { font-size: .9rem; line-height: 1.5; }
.watch-list p { margin: 0; color: var(--muted); font-size: .75rem; }
.watch-status { justify-self: end; color: var(--muted); font-size: .68rem; font-weight: 750; text-align: right; }
.watch-status.important { color: var(--violet); }

.conclusion-section { padding-bottom: clamp(88px,10vw,130px); }
.summary-box { max-width: 980px; overflow: hidden; color: #e9f4f5; border: 1px solid var(--navy); border-radius: var(--radius-lg); background: var(--navy); box-shadow: var(--shadow-md); }
.summary-title { margin: 0; padding: 28px 30px; color: #fff; border-bottom: 1px solid rgba(218,240,241,.14); font-size: 1.05rem; font-weight: 800; }
.summary-line { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 22px 30px; border-bottom: 1px solid rgba(218,240,241,.12); }
.summary-line:last-child { border-bottom: 0; }
.summary-line > span { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .66rem; font-weight: 900; letter-spacing: .04em; }
.summary-line p { margin: 0; color: #c1d1d5; font-size: .8rem; }
.closing-copy { max-width: var(--content); margin: 42px 0 0; }
.closing-copy p { color: var(--ink-2); font-size: 1rem; line-height: 1.9; }
.share-conclusion { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 18px; padding: 0 18px; color: #fff; border: 0; border-radius: 11px; background: var(--navy); cursor: pointer; font-size: .79rem; font-weight: 800; }
.share-conclusion:hover { background: var(--navy-2); }

.faq-list { display: grid; max-width: 980px; margin-top: 38px; border-top: 1px solid var(--line-strong); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; padding: 16px 0; cursor: pointer; font-size: .94rem; font-weight: 780; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { position: relative; flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; }
.faq-list summary span::before, .faq-list summary span::after { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 1px; background: var(--ink); transform: translate(-50%,-50%); }
.faq-list summary span::after { transform: translate(-50%,-50%) rotate(90deg); transition: transform .2s ease; }
.faq-list details[open] summary span::after { transform: translate(-50%,-50%) rotate(0); }
.faq-list details > div { max-width: var(--content); padding: 0 50px 24px 0; }
.faq-list details p { margin: 0; color: var(--muted); font-size: .84rem; }

.sources-section { padding-bottom: 0; }
.source-intro { max-width: var(--content); color: var(--muted); font-size: .82rem; }
.source-list { display: grid; max-width: 980px; margin: 34px 0 0; padding: 0; list-style: none; counter-reset: source; border-top: 1px solid var(--line); }
.source-list li { counter-increment: source; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 54px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.source-list li::before { content: counter(source, decimal-leading-zero); color: var(--cyan); font-family: var(--font-mono); font-size: .62rem; font-weight: 900; }
.source-list a { overflow-wrap: anywhere; color: var(--ink-2); font-size: .74rem; font-weight: 680; text-decoration: none; }
.source-list a:hover { color: var(--cyan); text-decoration: underline; }
.source-list span { color: var(--faint); font-family: var(--font-mono); font-size: .55rem; letter-spacing: .04em; text-transform: uppercase; }

.site-footer { color: #d7e5e8; background: #081b2a; }
.footer-inner { display: grid; grid-template-columns: .8fr 1.2fr auto; align-items: start; gap: 50px; padding-block: 58px; }
.footer-inner > div { display: grid; gap: 6px; }
.footer-inner strong { color: #fff; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; }
.footer-inner span { color: #8ea6af; font-size: .72rem; }
.footer-inner p { margin: 0; color: #8ea6af; font-size: .7rem; line-height: 1.75; }
.footer-inner nav { display: flex; gap: 16px; }
.footer-inner nav a { color: #b9cbd1; font-size: .69rem; text-decoration: none; }
.footer-inner nav a:hover { color: var(--cyan-bright); }

.back-to-top {
  position: fixed;
  z-index: 90;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  opacity: 0;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 10px 30px rgba(8,27,42,.2);
  cursor: pointer;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 26px;
  padding: 10px 14px;
  opacity: 0;
  color: #fff;
  border-radius: 9px;
  background: rgba(8,27,42,.94);
  box-shadow: var(--shadow-md);
  font-size: .76rem;
  font-weight: 800;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

.x402-page.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.x402-page.js .reveal.is-visible { opacity: 1; transform: none; }

.listing-page { min-height: 100vh; display: grid; place-items: center; }
.listing-shell { width: min(calc(100% - 40px), 780px); }
.listing-shell h1 { margin: 10px 0 32px; font-size: clamp(2.6rem,8vw,5rem); letter-spacing: -.05em; }
.listing-card { display: grid; gap: 10px; padding: 30px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-md); text-decoration: none; }
.listing-card span { color: var(--cyan); font-family: var(--font-mono); font-size: .66rem; font-weight: 900; text-transform: uppercase; }
.listing-card strong { font-size: clamp(1.3rem,4vw,2rem); line-height: 1.45; }
.listing-card small { color: var(--muted); }

@media (max-width: 1120px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
  .article-layout { grid-template-columns: 190px minmax(0,1fr); gap: 48px; }
  .treasury-map { grid-template-columns: minmax(150px,.7fr) 36px minmax(230px,1.15fr) 36px minmax(150px,.7fr); }
  .map-arrow span { display: none; }
  .trust-ladder { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .trust-ladder > i { display: none; }
  .trust-ladder article { min-height: 130px; }
  .combo-stack > div { grid-template-columns: 100px 190px 1fr; }
  .footer-inner { grid-template-columns: .8fr 1.2fr; }
  .footer-inner nav { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .page-shell, .header-inner { width: min(calc(100% - 36px), var(--container)); }
  .header-nav { display: none; }
  .copy-button { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-answer { max-width: 680px; }
  .handshake-grid { grid-template-columns: 1fr; gap: 15px; }
  .handshake-party { min-height: 112px; }
  .handshake-protocol { padding-inline: 18px; }
  .protocol-line::before, .protocol-line::after { display: none; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { display: none; }
  .http-row { grid-template-columns: 125px minmax(0,1fr) 125px; gap: 12px; }
  .scheme-flow { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .scheme-flow > i { display: none; }
  .treasury-map { grid-template-columns: 1fr; }
  .map-arrow { min-height: 38px; }
  .map-arrow i { width: 1px; height: 38px; }
  .map-arrow i::after { right: -3px; top: auto; bottom: 0; transform: rotate(135deg); }
  .map-title { margin-top: 8px; }
  .treasury-column { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .treasury-column .map-title { grid-column: 1 / -1; }
  .model-grid { grid-template-columns: 1fr; }
  .model-card { min-height: 0; }
  .actor-grid { grid-template-columns: 1fr; }
  .actor-card { min-height: 0; }
  .ripple-flow { grid-template-columns: 1fr; }
  .ripple-flow > i { transform: rotate(90deg); }
  .ripple-block { min-height: 130px; }
  .boundary-grid { grid-template-columns: 1fr; }
  .end-state { grid-template-columns: 1fr; }
  .end-state-arrow { transform: rotate(90deg); }
  .end-state-side { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner nav { grid-column: auto; }
}

@media (max-width: 720px) {
  :root { --radius: 14px; --radius-lg: 20px; }
  .x402-page { scroll-padding-top: 82px; }
  .x402-page { font-size: 15px; }
  .page-shell, .header-inner { width: min(calc(100% - 28px), var(--container)); }
  .header-inner { min-height: 64px; }
  .brand-copy span { display: none; }
  .copy-button span { display: none; }
  .copy-button { width: 40px; justify-content: center; padding: 0; }
  .hero { padding-top: 52px; }
  .hero h1 { margin-top: 17px; font-size: clamp(2.35rem, 11.5vw, 4.15rem); line-height: 1.08; }
  .hero-lead { font-size: .99rem; line-height: 1.82; }
  .hero-meta { display: grid; gap: 7px; }
  .hero-diagram { margin-top: 52px; padding: 22px 18px; }
  .hero-diagram-head, .figure-head { display: grid; gap: 12px; }
  .figure-status { width: fit-content; }
  .handshake-protocol { padding-inline: 0; }
  .protocol-step, .protocol-line { grid-template-columns: 48px 1fr; padding-inline: 12px; }
  .article-layout { padding-top: 74px; padding-bottom: 90px; }
  .article-section { padding-bottom: 82px; }
  .article-section + .article-section { padding-top: 82px; }
  .section-head h2 { font-size: clamp(1.85rem, 9vw, 3.1rem); line-height: 1.22; }
  .section-deck { margin-bottom: 32px; font-size: .96rem; }
  .question-grid, .scope-grid, .definition-grid, .scenario-grid { grid-template-columns: 1fr; }
  .question-card { min-height: 0; padding: 24px; }
  .callout { padding: 22px 20px 22px 24px; }
  .research-figure { padding: 22px 18px; margin-block: 36px; }
  .http-row { grid-template-columns: 1fr; gap: 8px; }
  .http-endpoint { min-height: 64px; }
  .http-endpoint.ghost { display: none; }
  .http-message { min-height: 64px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; }
  .http-message span { text-align: left; }
  .http-message::before, .http-message::after { display: none; }
  .layer-figure { padding: 0; }
  .layer-figure .figure-head { padding: 24px 18px 0; }
  .layer-row { grid-template-columns: 1fr; gap: 4px; min-height: 0; padding: 18px; }
  .layer-owner { text-align: left; }
  .layer-figure .figure-note { margin-inline: 18px; }
  .payment-tabs { border-radius: var(--radius); }
  .tab-list { grid-template-columns: 1fr; }
  .tab-list button { min-height: 66px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tab-list button:last-child { border-bottom: 0; }
  .tab-list button[aria-selected="true"] { box-shadow: inset 3px 0 var(--cyan); }
  .scheme-flow { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .scheme-node { min-height: 118px; }
  .scheme-meta { grid-template-columns: 1fr; }
  .treasury-column { grid-template-columns: 1fr; }
  .treasury-column .map-title { grid-column: auto; }
  .map-card { min-height: 94px; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-symbol { min-height: 34px; }
  .combo-stack > div { grid-template-columns: 1fr; gap: 4px; min-height: 0; padding: 18px; }
  .future-row { grid-template-columns: 1fr; gap: 7px; min-height: 0; padding: 18px; }
  .future-row .badge { justify-self: start; }
  .xrp-funnel-figure { padding: 0; }
  .xrp-funnel-figure .figure-head { padding: 24px 18px 0; }
  .xrp-funnel { padding-inline: 18px; }
  .funnel-step { grid-template-columns: 34px 1fr; width: 100% !important; margin-left: 0 !important; min-height: 0; padding: 14px; }
  .funnel-step > b { grid-column: 2; text-align: left; color: var(--cyan-bright); }
  .xrp-funnel-figure .figure-note { margin-inline: 18px; }
  .end-state-side { grid-template-columns: 1fr; }
  .end-state-layers > div { grid-template-columns: 1fr; gap: 4px; }
  .criteria-list li { grid-template-columns: 38px 1fr; }
  .watch-list article { grid-template-columns: 38px 1fr; gap: 12px; padding: 18px 0; }
  .watch-status { grid-column: 2; justify-self: start; text-align: left; }
  .summary-line { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .summary-title { padding: 23px 20px; }
  .source-list li { grid-template-columns: 28px 1fr; }
  .source-list span { grid-column: 2; }
  .footer-inner { padding-block: 44px; }
}

@media (max-width: 430px) {
  .hero h1 { font-size: 2.35rem; }
  .hero-answer { padding-top: 8px; }
  .answer-row { grid-template-columns: 28px 1fr; padding: 15px 0; }
  .answer-row strong { font-size: .84rem; }
  .handshake-party { padding: 18px; }
  .scheme-flow { grid-template-columns: 1fr; }
  .scheme-node { min-height: 0; }
  .trust-ladder { grid-template-columns: 1fr; }
  .trust-ladder article { min-height: 0; }
  .actor-head, .scenario-head { display: grid; }
  .actor-head .badge, .scenario-head .badge { justify-self: start; }
  .back-to-top { right: 14px; bottom: 14px; }
  .toast { width: calc(100% - 28px); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .x402-page { scroll-behavior: auto; }
  .x402-page, .x402-page *, .x402-page *::before, .x402-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .x402-page.js .reveal { opacity: 1; transform: none; }
}

@media (prefers-contrast: more) {
  :root { --muted: #40545f; --faint: #586b74; --line: #9eadaa; --line-strong: #71837f; }
  .dark-figure, .hero-diagram { border-width: 2px; }
}

@media (forced-colors: active) {
  .hero-diagram, .dark-figure, .summary-box, .combo-stack { border: 2px solid CanvasText; }
  .figure-status, .badge { border: 1px solid CanvasText; }
  .reading-progress span { background: Highlight; }
}

@media print {
  .site-header, .reading-progress, .back-to-top, .toast, .copy-button, .share-conclusion, .article-toc { display: none !important; }
  .x402-page { color: #000; background: #fff; font-size: 10pt; }
  .page-shell { width: 100%; }
  .hero { padding: 30px 0; }
  .hero-grid, .article-layout { display: block; }
  .hero-answer { margin-top: 24px; }
  .hero-diagram, .dark-figure, .summary-box, .combo-stack { color: #000; border: 1px solid #777; background: #fff !important; box-shadow: none; }
  .hero-diagram *, .dark-figure *, .summary-box *, .combo-stack * { color: #000 !important; }
  .article-section { break-inside: auto; padding-bottom: 32px; }
  .research-figure, .callout, .question-card, .scope-card, .model-card, .actor-card, .scenario-card { break-inside: avoid; box-shadow: none; }
  .x402-page a { text-decoration: none; }
  .site-footer { color: #000; background: #fff; border-top: 1px solid #777; }
}


/* Fallback: when documentElement has .js (from other pages) but article root also gets it */
html.js .x402-page .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
html.js .x402-page .reveal.is-visible { opacity: 1; transform: none; }
html.js .x402-page .tab-panel[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .x402-page .reveal { opacity: 1; transform: none; }
}
