/* ============================================================
   Moony Docs - three-column shell (sidebar · content · TOC)
   Builds on styles.css tokens + docs.css content components.
   ============================================================ */

/* ---------- docs topbar ---------- */
.dx-topbar {
  position: sticky; top: 0; z-index: 70; height: 56px;
  background: rgba(13,13,17,0.82); backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.dx-topbar-in { max-width: 1440px; margin: 0 auto; height: 100%; padding-inline: clamp(16px, 3vw, 26px); display: flex; align-items: center; gap: clamp(14px, 2.5vw, 26px); }
.dx-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.dx-brand .dx-glyph { width: 24px; height: 24px; display: block; }
.dx-brand .dx-wm { height: 16px; width: auto; display: block; opacity: 0.9; }
.dx-brand .dx-doctag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--line-2); }
@media (max-width: 600px) { .dx-brand .dx-doctag { display: none; } }

.dx-search { margin-left: auto; flex: 1; min-width: 0; max-width: 360px; display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg-1); color: var(--mute); cursor: text; transition: border-color .15s ease; }
.dx-search:hover, .dx-search:focus-within { border-color: var(--acc); }
.dx-search svg { width: 14px; height: 14px; flex: none; }
.dx-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font-family: var(--body); font-size: 13.5px; }
.dx-search input::placeholder { color: var(--mute); }
.dx-search .kbd { font-family: var(--mono); font-size: 10.5px; color: var(--mute); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 6px; flex: none; }
@media (max-width: 720px) { .dx-search .kbd { display: none; } }

.dx-top-links { display: flex; align-items: center; gap: 14px; flex: none; }
.dx-top-links > a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; color: var(--dim); text-decoration: none; transition: color .15s ease, background .15s ease; }
.dx-top-links > a:hover { color: var(--text); background: var(--bg-1); }
.dx-top-links > a svg { width: 17px; height: 17px; }se, background .15s ease; }
.dx-top-links a:hover { color: var(--text); background: var(--bg-1); }
.dx-top-links > a svg { width: 17px; height: 17px; }
@media (max-width: 600px) { .dx-top-links .dx-tl-label { display: none; } }
@media (max-width: 600px) { .dx-search { max-width: none; } .dx-top-links > a { display: none; } .dx-topbar-in { gap: 12px; } }

/* hamburger (mobile sidebar) */
.dx-burger { display: none; flex: none; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-1); color: var(--dim); align-items: center; justify-content: center; cursor: pointer; }
.dx-burger svg { width: 17px; height: 17px; }
@media (max-width: 820px) { .dx-burger { display: inline-flex; } }

/* ---------- three-column layout ---------- */
.dx-layout {
  max-width: 1440px; margin: 0 auto; padding-inline: clamp(16px, 3vw, 26px);
  display: grid; grid-template-columns: 252px minmax(0, 1fr) 196px;
  gap: clamp(26px, 3.5vw, 60px); align-items: start;
}
@media (max-width: 1180px) { .dx-layout { grid-template-columns: 232px minmax(0, 1fr); } .dx-onthispage { display: none; } }
@media (max-width: 820px) { .dx-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- left sidebar (page tree) ---------- */
.dx-sidebar { position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto; padding: 28px 14px 40px 0; }
.dx-sidebar::-webkit-scrollbar { width: 7px; }
.dx-sidebar::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
@media (max-width: 820px) {
  .dx-sidebar {
    position: fixed; top: 56px; left: 0; bottom: 0; width: 290px; z-index: 65;
    background: var(--bg); border-right: 1px solid var(--line); padding: 22px 18px 40px;
    transform: translateX(-102%); transition: transform .26s cubic-bezier(.2,.7,.2,1);
  }
  body.dx-nav-open .dx-sidebar { transform: none; }
  .dx-scrim { position: fixed; inset: 56px 0 0; z-index: 64; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity .26s ease; }
  body.dx-nav-open .dx-scrim { opacity: 1; pointer-events: auto; }
}

.dx-group { margin-bottom: 22px; }
.dx-group-t { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); padding: 0 0 10px 12px; }
.dx-group ul { list-style: none; margin: 0; padding: 0; }
.dx-group li { margin: 1px 0; }
.dx-group a {
  display: flex; align-items: center; gap: 9px; padding: 7px 12px; border-radius: 8px;
  font-size: 14px; line-height: 1.3; color: #cbc8d4; text-decoration: none;
  transition: color .14s ease, background .14s ease;
}
.dx-group a:hover { color: var(--text); background: var(--bg-1); }
.dx-group a.active { color: var(--acc-bright); background: color-mix(in oklab, var(--acc) 13%, transparent); font-weight: 500; }
.dx-group a.soon { color: var(--mute); cursor: default; pointer-events: none; }
.dx-group a.soon::after { content: "Soon"; margin-left: auto; font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); border: 1px solid var(--line); border-radius: 5px; padding: 1.5px 5px; }
.dx-group a .dx-i { flex: none; width: 15px; height: 15px; opacity: 0.8; }

/* ---------- center content ---------- */
.dx-main { min-width: 0; padding-block: clamp(30px, 4vw, 48px); max-width: 760px; }

/* ---------- right "on this page" ---------- */
.dx-onthispage { position: sticky; top: 56px; align-self: start; padding-block: clamp(30px, 4vw, 48px); }
.dx-otp-t { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); margin-bottom: 12px; }
.dx-otp { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.dx-otp a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; font-size: 12.5px; line-height: 1.4; color: var(--mute); text-decoration: none; transition: color .14s ease, border-color .14s ease; }
.dx-otp a:hover { color: var(--dim); }
.dx-otp a.active { color: var(--text); border-left-color: var(--acc-bright); }
.dx-otp a.sub { padding-left: 26px; font-size: 12px; }

/* ---------- prev / next pager ---------- */
.dx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: clamp(48px, 6vw, 72px); padding-top: 28px; border-top: 1px solid var(--line); }
@media (max-width: 520px) { .dx-pager { grid-template-columns: 1fr; } }
.dx-pager a { display: flex; flex-direction: column; gap: 5px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); text-decoration: none; transition: border-color .18s ease, transform .18s ease; }
.dx-pager a:hover { border-color: var(--line-2); transform: translateY(-2px); }
.dx-pager a.next { text-align: right; align-items: flex-end; }
.dx-pager .pg-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.dx-pager .pg-t { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--acc-bright); }

/* feedback / edit row */
.dx-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; font-family: var(--mono); font-size: 12px; color: var(--mute); }
.dx-foot a { color: var(--dim); text-decoration: none; }
.dx-foot a:hover { color: var(--acc-bright); }

/* page hero for docs */
.dx-eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--acc-bright); }
.dx-main > h1 { font-family: var(--display); font-size: clamp(32px, 4.6vw, 46px); letter-spacing: -0.03em; line-height: 1.05; margin: 14px 0 0; }
.dx-lead { font-size: clamp(16.5px, 1.5vw, 19px); color: var(--dim); line-height: 1.6; margin-top: 18px; max-width: 64ch; }

/* feature panel (mdx hero box, dark adaptation) */
.dx-feature-panel { display: grid; place-items: center; padding: clamp(40px, 6vw, 64px) 0; margin-bottom: clamp(20px, 3vw, 28px); border-radius: var(--r);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(139,92,246,0.12), transparent 62%),
    linear-gradient(rgba(231,217,253,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231,217,253,0.05) 1px, transparent 1px),
    var(--bg-1);
  background-size: auto, 32px 32px, 32px 32px, auto;
  border: 1px solid var(--line); }
.dx-feature-panel svg { width: clamp(56px, 8vw, 80px); height: clamp(56px, 8vw, 80px); color: var(--acc-bright); }

/* address card (token-address blocks) */
.addr-card { margin-top: 16px; }
.addr-card-h { font-family: var(--display); font-size: 15.5px; font-weight: 600; color: var(--text); }
.addr-card-d { font-size: 14px; color: var(--mute); line-height: 1.55; margin-top: 5px; max-width: 64ch; }
.addr-card .addr-row { margin-top: 12px; }
.addr-verify { font-family: var(--mono); font-size: 11.5px; color: var(--acc-bright); text-decoration: none; white-space: nowrap; padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 6px; transition: border-color .15s ease; }
.addr-verify:hover { border-color: var(--acc); }

/* formula block (math) */
.formula { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-1); padding: clamp(20px, 3vw, 28px); margin-top: 18px; }
.formula-eq { font-family: var(--mono); font-size: clamp(17px, 2vw, 22px); color: var(--lav); text-align: center; letter-spacing: 0.01em; padding: 6px 0 4px; }
.formula-eq sup { font-size: 0.7em; }
@media (max-width: 600px) {
  .formula { padding: 18px 14px; }
  .formula-eq { font-size: 14px; white-space: nowrap; overflow-x: auto; text-align: left; -webkit-overflow-scrolling: touch; }
}
.formula-vars { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.formula-vars li { position: relative; padding-left: 18px; color: var(--dim); font-size: 14px; line-height: 1.55; margin-top: 8px; }
.formula-vars li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: var(--acc-bright); opacity: 0.7; }
.formula-vars code { font-family: var(--mono); font-size: 0.9em; color: var(--lav); background: transparent; border: 0; padding: 0; }
.formula-src { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.formula-src a { color: var(--acc-bright); text-decoration: none; }
.formula-src a:hover { text-decoration: underline; }
.principle h3 code.ic { font-family: var(--mono); color: var(--acc-bright); background: transparent; border: 0; padding: 0; }

/* cards grid for the docs home */
.dx-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
@media (max-width: 640px) { .dx-cards { grid-template-columns: 1fr; } }
.dx-card { display: block; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); text-decoration: none; transition: border-color .18s ease, transform .18s ease; }
.dx-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.dx-card .dx-card-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--acc-bright); background: rgba(139,92,246,0.08); margin-bottom: 16px; }
.dx-card .dx-card-ic svg { width: 19px; height: 19px; }
.dx-card h3 { font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); margin: 0; }
.dx-card p { font-size: 14px; line-height: 1.55; color: var(--dim); margin: 7px 0 0; }


/* ============================================================
   ELEVATION PASS - premium polish layered over the base shell.
   (Loaded last; overrides earlier rules.)
   ============================================================ */

/* page texture + ambient glow on docs pages */
body[data-doc-page] { position: relative; }
body[data-doc-page]::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, rgba(139,92,246,0.12), transparent 60%);
}
body[data-doc-page]::after {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.dx-layout { position: relative; z-index: 1; }
.dx-topbar { background: rgba(11,11,15,0.7); padding-top: env(safe-area-inset-top, 0px); }

/* ---------- breadcrumb (no awkward wrap) ---------- */
.crumb { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.crumb span:last-child { overflow: hidden; text-overflow: ellipsis; }

/* ---------- hero ---------- */
.dx-eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); font-size: 11px; letter-spacing: 0.16em; color: var(--lav); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
.dx-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 9px var(--grad-1); flex: none; }
.dx-main > h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.035em; line-height: 1.02; }
.dx-lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--dim); max-width: 60ch; padding-bottom: clamp(26px, 4vw, 38px); border-bottom: 1px solid var(--line); margin-bottom: 4px; position: relative; }
.dx-lead::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 1px; background: var(--grad); }

/* ---------- feature panel → refined section medallion band ---------- */
.dx-feature-panel {
  position: relative; padding: clamp(30px, 4vw, 44px) 0; margin: 2px 0 clamp(22px, 3vw, 30px); overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px;
  background:
    radial-gradient(90% 120% at 50% -20%, rgba(139,92,246,0.16), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg));
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.06);
}
.dx-feature-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(231,217,253,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(231,217,253,0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(70% 80% at 50% 50%, #000, transparent 75%);
          mask-image: radial-gradient(70% 80% at 50% 50%, #000, transparent 75%);
}
.dx-feature-panel svg {
  position: relative; width: clamp(44px, 6vw, 58px); height: clamp(44px, 6vw, 58px); color: var(--acc-bright);
  filter: drop-shadow(0 6px 18px rgba(139,92,246,0.5));
}
/* concentric glow ring behind the icon */
.dx-feature-panel::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: clamp(96px, 13vw, 130px); height: clamp(96px, 13vw, 130px);
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(231,217,253,0.10);
  box-shadow: 0 0 0 12px rgba(231,217,253,0.03), 0 0 60px rgba(139,92,246,0.25) inset;
}

/* ---------- section headings ---------- */
.doc-section { scroll-margin-top: 78px; }
.doc-section > h2 { font-size: clamp(24px, 2.8vw, 32px); letter-spacing: -0.025em; align-items: center; gap: 14px; margin-top: 6px; }
.doc-section > h2 .sn { font-size: 0; width: 4px; height: 1.05em; border-radius: 3px; background: var(--grad); flex: none; box-shadow: 0 0 12px rgba(139,92,246,0.4); }
.doc-section h3 { font-size: 18.5px; letter-spacing: -0.01em; margin-top: 34px; }
/* divider rhythm between major sections */
#components, #fee-model, #usdf, #open-source, #why-it-matters, #scalability, #commerce, #inclusion, #opportunity, #flywheel, #how-participation-works, #transaction-formulas, #onchain, #price-integrity, #spot-price, #learn-more, #use-cases, #structure, #get-started, #addresses { border-top: 1px solid var(--line); margin-top: clamp(40px, 5vw, 60px); padding-top: clamp(34px, 4vw, 48px); }

/* ---------- prose ---------- */
.dx-main .doc-section p { font-size: 16px; line-height: 1.72; color: var(--dim); }
.dx-main .doc-section ul li { font-size: 16px; line-height: 1.68; }
.dx-main .doc-section a:not(.btn):not(.addr-verify) { background-image: linear-gradient(var(--acc-bright), var(--acc-bright)); background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%; border-bottom: 1px solid color-mix(in oklab, var(--acc-bright) 28%, transparent); transition: background-size .25s ease, border-color .2s ease; }
.dx-main .doc-section a:not(.btn):not(.addr-verify):hover { background-size: 100% 1px; border-bottom-color: transparent; }

/* ---------- principle cards ---------- */
.principles { gap: 16px; margin-top: 24px; }
.doc-section .principle {
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.doc-section .principle:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.08), 0 18px 40px -24px rgba(139,92,246,0.5); }
.doc-section .principle .pic {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: radial-gradient(circle at 30% 25%, rgba(139,92,246,0.32), rgba(139,92,246,0.07));
  border: 1px solid var(--line-2); color: var(--acc-bright);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.08);
}
.doc-section .principle h3 { font-size: 16.5px; letter-spacing: -0.01em; margin: 0; }
.doc-section .principle p { font-size: 14.5px; line-height: 1.6; margin-top: 8px; }
.doc-section .principle .meta { margin-top: 12px; }

/* ---------- callouts ---------- */
.callout { border-radius: 14px; padding: 18px 20px; gap: 14px; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
.callout .ci { width: 20px; height: 20px; }
.callout.note { border-left: 2px solid var(--acc-bright); }
.callout .cbody { font-size: 15px; line-height: 1.62; }

/* ---------- address cards ---------- */
.addr-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
.addr-card + .addr-card { margin-top: 14px; }
.addr-card .addr-row { background: var(--bg); border-color: var(--line-2); }

/* ---------- reference table ---------- */
.doc-table { border-radius: 14px; box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
.doc-table .dt-row:first-child { background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); }

/* ---------- formula ---------- */
.formula { border-radius: 16px; background: radial-gradient(120% 90% at 50% 0%, rgba(139,92,246,0.08), transparent 60%), linear-gradient(180deg, var(--bg-2), var(--bg-1)); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }

/* ---------- cards (docs home) ---------- */
.dx-card { border-radius: 16px; box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
.dx-card:hover { box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.08), 0 20px 44px -26px rgba(139,92,246,0.55); }

/* ---------- pager + sidebar active ---------- */
.dx-pager a { border-radius: 14px; box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.04); }
.dx-pager a:hover { box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.08), 0 16px 36px -24px rgba(139,92,246,0.5); }
.dx-group a.active { background: linear-gradient(90deg, color-mix(in oklab, var(--acc) 16%, transparent), transparent); box-shadow: inset 2px 0 0 0 var(--acc-bright); border-radius: 0 8px 8px 0; }


/* ---------- editorial: stat band ---------- */
.dx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: clamp(8px,2vw,16px) 0 4px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
@media (max-width: 620px) { .dx-stats { grid-template-columns: 1fr 1fr; } }
.dx-stat { background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); padding: 22px 20px; }
.dx-stat .v { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.03em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dx-stat .k { font-size: 13px; color: var(--dim); margin-top: 10px; line-height: 1.4; }

/* ---------- editorial: buy <-> reserve <-> sell flow ---------- */
.dx-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 16px; margin-top: 22px; }
@media (max-width: 720px) { .dx-flow { grid-template-columns: 1fr; } .dx-flow .dx-hub { order: -1; } }
.dx-flow .dx-leg { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
.dx-flow .dx-leg .lh { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.dx-flow .dx-leg.buy .lh { color: var(--pos); }
.dx-flow .dx-leg.sell .lh { color: var(--warn); }
.dx-flow .dx-leg .lh .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
.dx-flow .dx-leg p { font-size: 14.5px; color: var(--dim); line-height: 1.6; margin-top: 12px; }
.dx-flow .dx-leg .fee { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--mute); }
.dx-flow .dx-leg .fee b { color: var(--text); font-weight: 500; }
.dx-flow .dx-hub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 4px; }
.dx-flow .dx-hub .core { width: 70px; height: 70px; border-radius: 18px; display: grid; place-items: center; color: var(--acc-bright); border: 1px solid var(--line-2); background: radial-gradient(circle at 30% 25%, rgba(139,92,246,0.3), rgba(139,92,246,0.06)); box-shadow: 0 0 40px -8px rgba(139,92,246,0.5), inset 0 1px 0 0 rgba(255,255,255,0.1); }
.dx-flow .dx-hub .core svg { width: 30px; height: 30px; }
.dx-flow .dx-hub .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); text-align: center; }
@media (min-width: 721px) { .dx-flow .dx-hub::before, .dx-flow .dx-hub::after { content: ""; position: absolute; } }


/* ---------- editorial: numbered cycle (flywheel) ---------- */
.dx-cycle { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; counter-reset: cyc; position: relative; }
@media (max-width: 640px) { .dx-cycle { grid-template-columns: 1fr; } }
.dx-step2 { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 24px 24px 24px 26px; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.dx-step2:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.08), 0 18px 40px -24px rgba(139,92,246,0.5); }
.dx-step2::before { counter-increment: cyc; content: counter(cyc, decimal-leading-zero); position: absolute; top: 20px; right: 22px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dx-step2 .st-arrow { position: absolute; bottom: 18px; right: 22px; color: var(--mute); width: 16px; height: 16px; }
.dx-step2 h3 { font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); margin: 0; padding-right: 36px; }
.dx-step2 p { font-size: 14.5px; line-height: 1.6; color: var(--dim); margin-top: 9px; }
.dx-cycle-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--acc-bright); }
.dx-cycle-note svg { width: 16px; height: 16px; }
.dx-cycle-note::before, .dx-cycle-note::after { content: ""; height: 1px; flex: 1; max-width: 90px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.dx-cycle-note::after { background: linear-gradient(90deg, var(--line-2), transparent); }

/* ---------- editorial: pull quote ---------- */
.dx-pull { margin: clamp(28px,4vw,40px) 0; padding: 4px 0 4px 24px; border-left: 2px solid transparent; border-image: var(--grad) 1; }
.dx-pull p { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2.5vw, 27px); line-height: 1.32; letter-spacing: -0.02em; color: var(--text); text-wrap: balance; }
.dx-pull p .g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* gradient-text helper + tasteful emphasis on big opening statements */
.gt,
#what .dx-opening b,
.dx-chapter > p b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}


/* ============================================================
   PRO FEEL - cinematic hero, airier rhythm, refined type.
   ============================================================ */

/* stronger ambient glow on docs pages */
body[data-doc-page]::before { background: radial-gradient(95% 50% at 50% -8%, rgba(139,92,246,0.16), transparent 62%); }

/* cinematic page hero */
.dx-main { padding-block: clamp(40px, 6vw, 72px) clamp(40px,4vw,56px); }
.dx-main > .crumb { margin-bottom: 26px; }
.dx-main > h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.04em; line-height: 0.98; margin-top: 18px; }
.dx-eyebrow { font-size: 11.5px; padding: 7px 15px 7px 13px; }
.dx-lead { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.55; color: var(--dim); margin-top: 22px; padding-bottom: clamp(34px, 5vw, 50px); max-width: 58ch; }
.dx-lead::after { width: 80px; height: 2px; bottom: -1px; }

/* airier section rhythm + larger, more confident headings */
.doc-section { padding-top: clamp(44px, 5vw, 60px); }
.doc-section > h2 { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -0.03em; gap: 16px; }
.doc-section > h2 .sn { width: 5px; height: 1.05em; }
.doc-section h3 { font-size: 19.5px; margin-top: 38px; }

/* roomier, more readable prose */
.dx-main .doc-section p { font-size: 16.5px; line-height: 1.78; margin-top: 18px; max-width: 70ch; }
.dx-main .doc-section ul { margin-top: 18px; }
.dx-main .doc-section ul li { font-size: 16.5px; line-height: 1.72; }

/* cinematic feature panel: taller, bigger icon, deeper glow */
.dx-feature-panel { padding: clamp(40px, 6vw, 68px) 0; margin: 6px 0 clamp(26px, 3.5vw, 36px); border-radius: 22px; background: radial-gradient(80% 130% at 50% -20%, rgba(139,92,246,0.22), transparent 58%), linear-gradient(180deg, var(--bg-1), var(--bg)); }
.dx-feature-panel svg { width: clamp(54px, 7vw, 72px); height: clamp(54px, 7vw, 72px); filter: drop-shadow(0 10px 28px rgba(139,92,246,0.6)); }
.dx-feature-panel::after { width: clamp(120px, 16vw, 168px); height: clamp(120px, 16vw, 168px); box-shadow: 0 0 0 16px rgba(231,217,253,0.025), 0 0 80px rgba(139,92,246,0.3) inset; }

/* stat band: a touch grander */
.dx-stat { padding: 26px 22px; }
.dx-stat .v { font-size: clamp(30px, 4vw, 44px); }
.dx-stat .k { font-size: 13.5px; margin-top: 12px; }


/* ============================================================
   APPLE-DOCS PASS - squircle symbol, metadata chips, calmer
   restraint, cleaner topic cards. (Overrides the PRO FEEL pass.)
   ============================================================ */

/* calmer ambient glow */
body[data-doc-page]::before { background: radial-gradient(80% 40% at 50% -6%, rgba(139,92,246,0.08), transparent 60%); }

/* metadata chips under the H1 (Apple "availability" pattern) */
.dx-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.dx-meta .chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: var(--bg-1); }
.dx-meta .chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); flex: none; }

/* squircle symbol - replaces the big glowing feature band */
.dx-feature-panel {
  display: inline-grid; place-items: center; width: clamp(64px, 9vw, 76px); height: clamp(64px, 9vw, 76px);
  padding: 0; margin: 4px 0 clamp(18px, 2.5vw, 24px); border-radius: 21px; overflow: visible;
  border: 1px solid var(--line-2);
  background: radial-gradient(120% 120% at 30% 20%, rgba(167,139,250,0.4), rgba(139,92,246,0.12) 55%, rgba(20,16,30,0.9));
  box-shadow: 0 14px 30px -14px rgba(139,92,246,0.6), inset 0 1px 0 0 rgba(255,255,255,0.14);
}
.dx-feature-panel::before, .dx-feature-panel::after { display: none; }
.dx-feature-panel svg { position: static; width: clamp(30px, 4vw, 36px); height: clamp(30px, 4vw, 36px); color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35)); }

/* calmer principle cards (less glow, more restraint) */
.doc-section .principle:hover { box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.07), 0 14px 30px -22px rgba(0,0,0,0.8); }
.doc-section .principle .pic { box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.06); }

/* cleaner topic cards (Apple grouped-section grid) */
.dx-cards { gap: 12px; }
.dx-card { padding: 20px; border-radius: 16px; box-shadow: none; background: var(--bg-1); transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.dx-card:hover { transform: none; background: var(--bg-2); border-color: var(--line-2); box-shadow: none; }
.dx-card .dx-card-ic { width: 34px; height: 34px; border-radius: 10px; margin-bottom: 14px; background: radial-gradient(120% 120% at 30% 20%, rgba(167,139,250,0.4), rgba(139,92,246,0.12)); border-color: var(--line-2); color: #fff; }
.dx-card .dx-card-ic svg { width: 17px; height: 17px; }

/* calmer feature glow already removed; keep stat band restrained */
.dx-stat { background: var(--bg-1); }


/* ---------- heading anchor links ---------- */
.doc-section > h2, .doc-section h3 { position: relative; }
.dx-anchor { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em; margin-left: 10px; vertical-align: middle; color: var(--mute); opacity: 0; text-decoration: none; transition: opacity .15s ease, color .15s ease; }
.dx-anchor svg { width: 0.85em; height: 0.85em; }
.doc-section > h2:hover .dx-anchor, .doc-section h3:hover .dx-anchor, .dx-anchor:focus { opacity: 1; }
.dx-anchor:hover { color: var(--acc-bright); }
.dx-anchor.ok { color: var(--pos); opacity: 1; }

/* ---------- search results dropdown ---------- */
.dx-search { position: relative; }
.dx-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 80; max-height: 70vh; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(16,16,22,0.96); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); box-shadow: 0 24px 60px -24px rgba(0,0,0,0.9), inset 0 1px 0 0 rgba(255,255,255,0.06); padding: 6px; }
.dx-result { display: block; padding: 11px 13px; border-radius: 9px; text-decoration: none; transition: background .12s ease; }
.dx-result:hover { background: var(--bg-2); }
.dx-result .rg { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.dx-result .rt { display: block; font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--text); margin-top: 3px; }
.dx-result .rs { display: block; font-size: 12.5px; color: var(--dim); margin-top: 3px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-result mark { background: color-mix(in oklab, var(--acc) 30%, transparent); color: var(--lav); border-radius: 3px; padding: 0 2px; }
.dx-nores { padding: 16px 14px; font-size: 13px; color: var(--mute); }
@media (max-width: 600px) { .dx-results { position: fixed; left: 12px; right: 12px; top: 60px; } }


/* ---------- hero lockup (squircle beside title) ---------- */
.dx-herolock { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 24px); margin: 6px 0 0; }
.dx-herolock .dx-feature-panel { margin: 0; flex: none; }
.dx-herotext { min-width: 0; }
.dx-herotext .dx-eyebrow { margin-bottom: 12px; }
.dx-herotext > h1 { margin-top: 0; }
@media (max-width: 540px) { .dx-herolock { gap: 16px; } .dx-herolock .dx-feature-panel { width: 58px; height: 58px; } }


/* ---------- section lockup (squircle beside h2) ---------- */
.dx-seclock { display: flex; align-items: center; gap: clamp(14px, 2vw, 20px); margin-top: clamp(40px, 5vw, 56px); }
.dx-seclock .dx-feature-panel { margin: 0; flex: none; width: clamp(50px, 6vw, 58px); height: clamp(50px, 6vw, 58px); border-radius: 16px; }
.dx-seclock .dx-feature-panel svg { width: clamp(24px, 3vw, 28px); height: clamp(24px, 3vw, 28px); }
.dx-seclock > h2 { margin: 0 !important; padding-top: 0 !important; border-top: 0 !important; }


/* ---------- disclaimer "last updated" ---------- */
.dx-updated { font-family: var(--mono); font-size: 12.5px; color: var(--mute); margin-top: 20px !important; padding-top: 16px; border-top: 1px solid var(--line); }


/* ---------- docs site footer ---------- */
.dx-sitefoot { border-top: 1px solid var(--line); margin-top: 40px; background: linear-gradient(180deg, transparent, rgba(139,92,246,0.03)); }
.dx-sitefoot-in { max-width: 1440px; margin: 0 auto; padding: clamp(40px, 5vw, 56px) clamp(16px, 3vw, 26px) clamp(36px, 4vw, 48px); }
.dx-foot-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.dx-foot-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.dx-foot-brand img { height: 20px; width: auto; display: block; opacity: 0.9; }
.dx-foot-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
@media (max-width: 540px) { .dx-foot-tag { display: none; } }
.dx-foot-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dx-foot-links > a { font-size: 13.5px; color: var(--dim); text-decoration: none; transition: color .15s ease; }
.dx-foot-links > a:hover { color: var(--text); }
.dx-foot-social { display: inline-flex; align-items: center; gap: 8px; }
.dx-foot-social a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--dim); transition: color .15s ease, border-color .15s ease, background .15s ease; }
.dx-foot-social a:hover { color: var(--text); border-color: var(--acc); background: rgba(139,92,246,0.08); }
.dx-foot-social svg { width: 15px; height: 15px; display: block; }
.dx-sitefoot p { font-size: 12px; color: var(--mute); line-height: 1.65; max-width: 96ch; }
.dx-sitefoot p a { color: var(--dim); text-decoration: none; }
.dx-sitefoot p a:hover { color: var(--acc-bright); }
/* per-page foot now just the edit link */
.dx-foot { justify-content: flex-end; }


/* ---------- principle cards: lighter, tighter refinement ---------- */
.principles { gap: 12px; margin-top: 20px; }
.doc-section .principle {
  padding: 17px 18px; border-radius: 13px; gap: 13px;
  background: var(--bg-1);
}
.doc-section .principle:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -20px rgba(0,0,0,0.9); }
.doc-section .principle .pic {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(139,92,246,0.1);
  box-shadow: none;
}
.doc-section .principle .pic svg { width: 15px; height: 15px; stroke-width: 1.6; }
.doc-section .principle h3 { font-size: 15px; }
.doc-section .principle p { font-size: 14px; line-height: 1.58; margin-top: 6px; color: var(--mute); }
.doc-section .principle .meta { margin-top: 10px; }


/* ============================================================
   COHESIVE LIGHTENING - flatten + tighten all box types so the
   docs feel calm and consistent with the slimmed principle cards.
   ============================================================ */

/* stat band */
.dx-stat { padding: 20px 18px; background: var(--bg-1); }
.dx-stat .v { font-size: clamp(27px, 3.4vw, 38px); }
.dx-stat .k { font-size: 13px; margin-top: 9px; }

/* callouts */
.callout { padding: 15px 17px; border-radius: 12px; background: var(--bg-1); box-shadow: none; }
.callout .cbody { font-size: 14.5px; line-height: 1.58; }

/* address cards */
.addr-card { padding: 17px 18px; border-radius: 12px; background: var(--bg-1); box-shadow: none; }
.addr-card + .addr-card { margin-top: 12px; }
.addr-card-h { font-size: 14.5px; }
.addr-card-d { font-size: 13.5px; }

/* buy / reserve / sell flow legs */
.dx-flow { gap: 14px; }
.dx-flow .dx-leg { padding: 18px 20px; border-radius: 13px; background: var(--bg-1); box-shadow: none; }
.dx-flow .dx-leg p { font-size: 14px; margin-top: 10px; }
.dx-flow .dx-hub .core { width: 60px; height: 60px; border-radius: 15px; }
.dx-flow .dx-hub .core svg { width: 26px; height: 26px; }

/* formula blocks */
.formula { padding: clamp(18px, 2.4vw, 24px); border-radius: 13px; background: var(--bg-1); box-shadow: none; }
.formula-vars li { font-size: 13.5px; }

/* topic cards (docs home / overviews) */
.dx-card { padding: 18px; border-radius: 13px; }
.dx-card h3 { font-size: 16px; }
.dx-card p { font-size: 13.5px; }

/* numbered cycle (incentives) */
.dx-step2 { padding: 19px 20px; border-radius: 13px; background: var(--bg-1); }
.dx-step2:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -20px rgba(0,0,0,0.9); }
.dx-step2 p { font-size: 14px; }


/* ---------- welcome "start here" CTA banner ---------- */
.dx-startcta { display: flex; align-items: center; gap: 16px; margin-top: clamp(22px, 3vw, 30px); padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 14px; text-decoration: none; background: linear-gradient(180deg, color-mix(in oklab, var(--acc) 10%, var(--bg-1)), var(--bg-1)); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); transition: border-color .18s ease, transform .18s ease; }
.dx-startcta:hover { border-color: var(--acc); transform: translateY(-2px); }
.dx-startcta-ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: radial-gradient(120% 120% at 30% 20%, rgba(167,139,250,0.5), rgba(139,92,246,0.18)); border: 1px solid var(--line-2); }
.dx-startcta-ic svg { width: 20px; height: 20px; }
.dx-startcta-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dx-startcta-txt b { font-family: var(--display); font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.dx-startcta-txt span { font-size: 13.5px; line-height: 1.5; color: var(--dim); }
.dx-startcta-arrow { flex: none; margin-left: auto; color: var(--acc-bright); transition: transform .18s ease; }
.dx-startcta-arrow svg { width: 18px; height: 18px; display: block; }
.dx-startcta:hover .dx-startcta-arrow { transform: translateX(3px); }
@media (max-width: 560px) { .dx-startcta-arrow { display: none; } }


/* ============================================================
   BREATHING ROOM - final pass. More generous vertical rhythm
   so nothing crowds; guaranteed space above every block module.
   ============================================================ */

/* roomier page padding + section separation */
.dx-main { padding-block: clamp(48px, 6vw, 80px) clamp(64px, 7vw, 96px); }
.doc-section { padding-top: clamp(58px, 6.5vw, 84px); }

/* hero: more air around the lead + chips */
.dx-main > .crumb { margin-bottom: 30px; }
.dx-herolock { margin-bottom: 6px; }
.dx-lead { margin-top: 26px; padding-bottom: clamp(34px, 5vw, 50px); }
.dx-meta { margin-top: 22px; }

/* consistent space above every block module inside a section */
.doc-section .callout,
.doc-section .formula,
.doc-section .term,
.doc-section .dx-flow,
.doc-section .dx-stats,
.doc-section .dx-cards,
.doc-section .principles,
.doc-section .doc-table,
.doc-section .dx-cycle,
.doc-section .dx-pull,
.doc-section .addr-card { margin-top: clamp(24px, 3vw, 32px); }

/* and breathing room *below* a module before prose resumes */
.doc-section .callout + p,
.doc-section .formula + p,
.doc-section .term + p,
.doc-section .dx-flow + p,
.doc-section .dx-stats + p,
.doc-section .principles + p,
.doc-section .doc-table + p,
.doc-section .dx-cards + p { margin-top: clamp(24px, 3vw, 32px); }

/* stat band: clear its tight default bottom */
.dx-stats { margin: clamp(20px, 2.6vw, 28px) 0 0; }

/* roomier grids */
.principles { gap: 16px; margin-top: clamp(22px, 2.8vw, 28px); }
.dx-cards { gap: 16px; }
.dx-flow { gap: 18px; }
.dx-cycle { gap: 18px; }

/* card internals: a little more padding */
.doc-section .principle { padding: 20px 20px; }
.dx-card { padding: 22px; }
.dx-flow .dx-leg { padding: 22px; }
.dx-step2 { padding: 22px 22px 22px 24px; }

/* list items get space between them */
.doc-section ul { margin-top: clamp(18px, 2.4vw, 24px); }
.doc-section ul li + li { margin-top: 10px; }

/* heading → first content gap */
.doc-section > h2 { margin-bottom: 4px; }
.doc-section h3 { margin-top: clamp(38px, 4.5vw, 48px); }
.doc-section h3 + p { margin-top: 14px; }

/* section lockup: more space above */
.dx-seclock { margin-top: clamp(56px, 7vw, 84px); }

/* pager + footer breathing */
.dx-pager { margin-top: clamp(64px, 8vw, 96px); }


/* ---------- section marker consistency ----------
   Squircle (lockup) sections use the squircle as their marker,
   so suppress the leftover "#"; non-lockup sections keep the
   gradient bar from the elevation pass. */
.dx-seclock > h2 .sn { display: none; }
.dx-seclock > h2 { gap: 0; }


/* ---------- command name as a tag inside section headers ---------- */
.doc-section > h2 { flex-wrap: wrap; row-gap: 8px; }
.doc-section > h2 code {
  font-family: var(--mono); font-size: 0.46em; font-weight: 500; letter-spacing: 0;
  color: var(--acc-bright); background: var(--bg-1);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: 0.32em 0.62em; white-space: nowrap; align-self: center;
}


/* ---------- welcome: developer jump link under the CTA ---------- */
.dx-devjump { margin-top: 14px; font-size: 14px; color: var(--mute); }
.dx-devjump a { display: inline-flex; align-items: center; gap: 6px; color: var(--acc-bright); text-decoration: none; font-weight: 500; }
.dx-devjump a svg { width: 14px; height: 14px; transition: transform .18s ease; }
.dx-devjump a:hover svg { transform: translateX(3px); }


/* ---------- welcome: dual entry CTAs ---------- */
.dx-cta-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: clamp(24px, 3vw, 32px); }
@media (max-width: 680px) { .dx-cta-pair { grid-template-columns: 1fr; } }
.dx-cta-pair .dx-startcta { margin-top: 0; height: 100%; }


/* ---------- welcome: core-components digest ---------- */
.dx-digest { margin-top: clamp(22px, 2.8vw, 30px); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.dx-digest .dg-item { display: flex; gap: 16px; padding: 20px 22px; text-decoration: none; border-bottom: 1px solid var(--line); transition: background .16s ease; }
.dx-digest .dg-item:last-child { border-bottom: 0; }
.dx-digest .dg-item:hover { background: var(--bg-1); }
.dx-digest .dg-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: radial-gradient(120% 120% at 30% 20%, rgba(167,139,250,0.42), rgba(139,92,246,0.14)); border: 1px solid var(--line-2); }
.dx-digest .dg-ic svg { width: 19px; height: 19px; }
.dx-digest .dg-body { min-width: 0; }
.dx-digest .dg-h { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.dx-digest .dg-h svg { width: 15px; height: 15px; color: var(--acc-bright); transition: transform .18s ease; }
.dx-digest .dg-item:hover .dg-h svg { transform: translateX(3px); }
.dx-digest .dg-d { display: block; font-size: 14.5px; line-height: 1.6; color: var(--dim); margin-top: 5px; }


/* ---------- standalone section link (welcome brief) ---------- */
.dx-more { display: inline-flex; align-items: center; gap: 8px; margin-top: clamp(16px,2vw,20px); font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--acc-bright); text-decoration: none; background-image: none; border-bottom: 0; }
.dx-more svg { width: 16px; height: 16px; transition: transform .18s ease; }
.dx-more:hover svg { transform: translateX(4px); }


/* ---------- welcome: editorial polish ---------- */
#what .dx-opening { font-size: clamp(19px, 2.1vw, 24px); line-height: 1.62; color: var(--text); max-width: 58ch; font-weight: 400; }
#what .dx-opening b { font-weight: 600; }

/* magazine-style chapters for the three main areas */
.dx-chapter { position: relative; border-top: 1px solid var(--line); }
.dx-chapter > h2, .dx-chapter > p { max-width: 58ch; }
.dx-chapter::after {
  content: attr(data-idx); position: absolute; top: clamp(44px, 5.5vw, 64px); right: 4px;
  font-family: var(--display); font-weight: 700; font-size: clamp(52px, 8vw, 92px); line-height: 1;
  letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px var(--line-2);
  pointer-events: none; user-select: none;
}
@media (max-width: 640px) { .dx-chapter::after { display: none; } }
.dx-chapter > p { font-size: 16.5px; line-height: 1.72; }


/* ---------- welcome: hero key-facts band ---------- */
.dx-stats-hero { margin-top: clamp(26px, 3.4vw, 38px); }


/* ---------- welcome: Apple-pro hero ---------- */
.dx-appicon { width: clamp(62px, 8vw, 78px); height: clamp(62px, 8vw, 78px); border-radius: 22px; display: grid; place-items: center; color: #fff; border: 1px solid var(--line-2); margin-bottom: clamp(24px, 3.2vw, 32px);
  background: radial-gradient(120% 120% at 30% 20%, rgba(167,139,250,0.5), rgba(139,92,246,0.16) 55%, rgba(20,16,30,0.92));
  box-shadow: 0 18px 38px -16px rgba(139,92,246,0.6), inset 0 1px 0 0 rgba(255,255,255,0.16); }
.dx-appicon svg { width: clamp(30px, 4vw, 38px); height: auto; }
.dx-main > h1.dx-hero-title { font-size: clamp(40px, 6.6vw, 74px); line-height: 1.0; letter-spacing: -0.045em; font-weight: 600; margin: 16px 0 0; text-wrap: balance; }
.dx-main > h1.dx-hero-title + .dx-lead { font-size: clamp(18px, 1.9vw, 22px); line-height: 1.55; color: var(--dim); margin-top: clamp(20px, 2.6vw, 28px); max-width: 50ch; }


/* ---------- prose: tighter, more even rag (no word-breaking) ---------- */
.dx-main .doc-section li { text-wrap: pretty; }


/* ---------- prose: justified (paired with hyphenation) ---------- */
.dx-main .doc-section p,
.dx-main .dx-opening { text-align-last: left; }


/* ---------- prose: tighter measure for cleaner justification ---------- */
.dx-main .doc-section p,
.dx-main .dx-opening { max-width: 73ch; }


/* prose: justified spacing removed; ragged-right */
.dx-main .doc-section p,
.dx-main .dx-opening { text-align-last: left; }


/* ---------- interactive pricing-curve widget ---------- */
.curve-widget { margin-top: clamp(22px,3vw,30px); border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, var(--bg-1), var(--bg)); padding: clamp(14px,2vw,20px); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
.curve-widget .cw-svg { width: 100%; height: auto; display: block; }
.curve-widget .cw-grid { stroke: var(--line); stroke-width: 1; }
.curve-widget .cw-ylab { fill: var(--mute); font-family: var(--mono); font-size: 11px; text-anchor: end; }
.curve-widget .cw-xlab { fill: var(--mute); font-family: var(--mono); font-size: 11px; text-anchor: middle; }
.curve-widget .cw-guide { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
.curve-widget .cw-dot { fill: #fff; stroke: var(--acc-bright); stroke-width: 2.5; filter: drop-shadow(0 0 8px rgba(139,92,246,0.8)); cursor: ew-resize; }
.curve-widget .cw-readouts { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
@media (max-width: 560px){ .curve-widget .cw-readouts { grid-template-columns: 1fr; } }
.curve-widget .cw-ro { background: var(--bg-1); padding: 14px 16px; }
.curve-widget .cw-ro-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.curve-widget .cw-ro-v { font-family: var(--display); font-size: clamp(20px,2.4vw,26px); font-weight: 600; letter-spacing: -0.02em; color: var(--text); margin-top: 6px; }
.curve-widget .cw-ro-v.cw-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.curve-widget .cw-slider { width: 100%; margin-top: 16px; -webkit-appearance: none; appearance: none; height: 5px; border-radius: 999px; background: linear-gradient(90deg, var(--acc), var(--lav)); outline: none; cursor: pointer; }
.curve-widget .cw-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--acc-bright); box-shadow: 0 2px 10px -2px rgba(139,92,246,0.8); cursor: grab; }
.curve-widget .cw-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--acc-bright); cursor: grab; }


/* ---------- PDA derivation tree ---------- */
.dx-tree { margin-top: clamp(20px,2.6vw,26px); border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); padding: 8px; font-family: var(--mono); }
.dx-tree-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 12px; border-radius: 8px; margin-left: calc(var(--depth) * 22px); position: relative; }
.dx-tree-row + .dx-tree-row { margin-top: 2px; }
.dx-tree-row::before { content: ""; position: absolute; left: calc(var(--depth) * 22px - 12px); top: 0; bottom: 50%; width: 1px; background: var(--line-2); display: var(--showline, block); }
.dx-tree-row[style*="--depth:0"]::before { display: none; }
.dx-tree-k { flex: none; font-size: 12.5px; color: var(--acc-bright); background: color-mix(in oklab, var(--acc) 14%, transparent); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 9px; letter-spacing: 0.02em; }
.dx-tree-s { font-size: 12.5px; color: var(--dim); }

/* instruction table: 3-col with mono first cell */
.dx-ix-table .dt-row { grid-template-columns: 1.1fr 2fr 0.7fr; }
.dx-ix-table .dt-row code { white-space: nowrap; }
@media (max-width: 600px){ .dx-ix-table .dt-row { grid-template-columns: 1fr; gap: 4px; } }


/* ---------- transaction flow diagram ---------- */
.dx-flowdiag { margin-top: clamp(18px,2.4vw,24px); border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); padding: clamp(16px,2vw,20px); }
.dx-flowdiag + .dx-flowdiag { margin-top: 14px; }
.dx-flowdiag-h { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--dim); margin-bottom: 16px; }
.dx-flowdiag-tag { font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 6px; letter-spacing: 0.02em; }
.dx-flowdiag-tag.buy { color: var(--pos); background: color-mix(in oklab, var(--pos) 16%, transparent); }
.dx-flowdiag-tag.sell { color: var(--warn); background: color-mix(in oklab, var(--warn) 16%, transparent); }
.dx-flowrow { display: flex; align-items: stretch; gap: 10px; }
@media (max-width: 640px){ .dx-flowrow { flex-direction: column; align-items: stretch; } }
.dx-flownode { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--bg); text-align: center; }
.dx-flownode.core { background: radial-gradient(120% 120% at 30% 20%, rgba(139,92,246,0.2), rgba(139,92,246,0.05)); border-color: var(--acc); }
.dx-flownode .nk { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.dx-flownode .ns { font-family: var(--mono); font-size: 11px; color: var(--mute); }
.dx-flowarrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--acc-bright); padding: 0 2px; }
.dx-flowarrow .amt { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.dx-flowarrow svg { width: 22px; height: 22px; }
@media (max-width: 640px){ .dx-flowarrow svg { transform: rotate(90deg); } }
.dx-flowfoot { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; color: var(--mute); }
.dx-flowfoot code { font-size: 0.92em; }


/* ---------- worked examples ---------- */
.dx-ex { margin-top: clamp(16px,2vw,22px); border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); padding: clamp(16px,2vw,20px); }
.dx-ex + .dx-ex { margin-top: 14px; }
.dx-ex-h { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.dx-ex-tag { font-family: var(--mono); font-size: 11.5px; font-weight: 400; padding: 3px 9px; border-radius: 6px; letter-spacing: 0.02em; flex: none; }
.dx-ex-tag.buy { color: var(--pos); background: color-mix(in oklab, var(--pos) 16%, transparent); }
.dx-ex-tag.spend { color: var(--acc-bright); background: color-mix(in oklab, var(--acc) 18%, transparent); }
.dx-ex-grid { margin-top: 16px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.dx-ex-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 15px; background: var(--bg); }
.dx-ex-row + .dx-ex-row { border-top: 1px solid var(--line); }
.dx-ex-row .k { font-size: 14px; color: var(--dim); }
.dx-ex-row .v { font-family: var(--mono); font-size: 14.5px; color: var(--text); font-weight: 500; white-space: nowrap; }
.dx-ex-row.hl { background: color-mix(in oklab, var(--acc) 9%, var(--bg)); }
.dx-ex-row.hl .v { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.dx-ex-foot { margin-top: 14px; font-size: 13.5px; line-height: 1.6; color: var(--mute); }
.dx-ex-foot code { font-size: 0.92em; }


/* ---------- account-relationship diagram ---------- */
.dx-arch { margin-top: clamp(20px,2.6vw,26px); border: 1px solid var(--line); border-radius: 16px; background: var(--bg-1); padding: clamp(20px,2.6vw,28px); display: flex; flex-direction: column; align-items: center; }
.dx-arch-program { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 13px 22px; border: 1px solid var(--acc); border-radius: 12px; background: radial-gradient(120% 140% at 50% 0%, rgba(139,92,246,0.22), rgba(139,92,246,0.05)); }
.dx-arch-program .dx-arch-plabel { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--text); }
.dx-arch-program code { font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.dx-arch-owns, .dx-arch-link span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); position: relative; padding: 16px 0; }
.dx-arch-owns::before, .dx-arch-link span::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 14px; background: var(--line-2); }
.dx-arch-owns::after, .dx-arch-link span::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 14px; background: var(--line-2); }
.dx-arch-accounts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.dx-arch-vaults { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.dx-arch-link { display: flex; justify-content: center; }
.dx-arch-node { display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center; padding: 13px 18px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--bg); min-width: 130px; }
.dx-arch-node.core { border-color: var(--acc); background: radial-gradient(120% 120% at 30% 20%, rgba(139,92,246,0.16), rgba(139,92,246,0.04)); }
.dx-arch-node.vault { border-style: dashed; }
.dx-arch-node .t { font-family: var(--mono); font-size: 13px; color: var(--acc-bright); }
.dx-arch-node .s { font-size: 11.5px; color: var(--mute); }
@media (max-width: 560px){ .dx-arch-accounts, .dx-arch-vaults { flex-direction: column; width: 100%; } .dx-arch-node { width: 100%; } }


/* ============================================================
   EDITORIAL POINT LIST — replaces the boxed .principles grid.
   Full-width rows, icon + title + description, hairline dividers.
   Immune to content-length imbalance. Loads last, wins.
   ============================================================ */
.doc-section .principles {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  margin-top: clamp(22px, 2.8vw, 30px) !important;
}
.doc-section .principle {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: clamp(22px, 2.8vw, 30px) 4px !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}
.doc-section .principle:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--line) !important;
}
.doc-section .principles .principle:last-child { border-bottom: 0 !important; }
/* left column: icon + title locked together */
.doc-section .principle > .pic {
  width: 38px !important; height: 38px !important;
  border-radius: 10px !important;
  display: grid !important; place-items: center;
  flex: none;
  color: var(--acc-bright) !important;
  background: radial-gradient(120% 120% at 30% 20%, rgba(167,139,250,0.4), rgba(139,92,246,0.1)) !important;
  border: 1px solid var(--line-2) !important;
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.08) !important;
  grid-row: 1; grid-column: 1;
  margin-bottom: 13px;
}
.doc-section .principle > .pic svg { width: 18px !important; height: 18px !important; }
/* icon left, title + description stacked together in the content column */
.doc-section .principle > .pic { grid-row: 1; grid-column: 1; margin-bottom: 0; }
.doc-section .principle > div:not(.pic) {
  grid-row: 1; grid-column: 2; padding-top: 4px;
}
.doc-section .principle h3 {
  font-family: var(--display); font-size: 18px !important; font-weight: 600;
  letter-spacing: -0.015em; color: var(--text); margin: 0 0 9px 0 !important;
  line-height: 1.25;
}
.doc-section .principle h3 ~ p,
.doc-section .principle > div:not(.pic) > p {
  font-size: 15.5px !important; line-height: 1.72 !important;
  color: var(--dim) !important; margin: 0 !important; max-width: 68ch;
}
.doc-section .principle .meta { display: block; margin-top: 12px !important; }


/* ============================================================
   JUSTIFIED PROSE (Mintlify-style) — even both-edge wrapping
   with auto-hyphenation so word spacing stays tight. Loads last.
   ============================================================ */
/* ---- Mintlify-style justified prose: justify + auto-hyphenation ----
   Renders flush both edges; the browser's hyphenation dictionary breaks
   long words at line ends so spaces stay tight (no gaps). Requires the
   viewing browser to have hyphenation dictionaries (all modern Mac/iOS
   and most desktop browsers do). No text-wrap:pretty (it suppresses
   hyphenation) and no word-spacing hacks. */
.dx-main .doc-section p,
.dx-main .dx-opening,
.doc-section .principle > div:not(.pic) > p,
.doc-section .principle p {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  text-wrap: wrap;
  word-spacing: normal;
  letter-spacing: normal;
}
.dx-main .doc-section p,
.dx-main .dx-opening { max-width: none; }
.doc-section .principle > div:not(.pic) > p,
.doc-section .principle p { max-width: none; }


/* ============================================================
   GRADIENT HOVER ACCENTS — subtle brand-gradient interactions.
   ============================================================ */

/* point-list rows: no row highlight on hover */
.doc-section .principle > .pic { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease !important; }
.doc-section .principle:hover > .pic {
  border-color: var(--acc) !important;
  box-shadow: 0 0 0 1px rgba(139,92,246,0.35), 0 6px 18px -6px rgba(139,92,246,0.6), inset 0 1px 0 0 rgba(255,255,255,0.12) !important;
  transform: translateY(-1px);
}

/* topic cards: gradient top-edge sweep + lift */
.dx-card { position: relative; overflow: hidden; }
.dx-card::after {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.dx-card:hover::after { transform: scaleX(1); }
.dx-card .dx-card-ic { transition: transform .25s ease, box-shadow .25s ease; }
.dx-card:hover .dx-card-ic { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(139,92,246,0.6); }

/* sidebar links: gradient left-bar grows in on hover */
.dx-group a { position: relative; }
.dx-group a:not(.active)::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0);
  width: 2px; height: 60%; border-radius: 2px; background: var(--grad);
  transition: transform .2s ease;
}
.dx-group a:not(.active):hover::before { transform: translateY(-50%) scaleY(1); }

/* pager cards: gradient edge + title tint */
.dx-pager a { position: relative; overflow: hidden; }
.dx-pager a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--grad); transform: scaleX(0); transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.dx-pager a.next::after { transform-origin: right; }
.dx-pager a:hover::after { transform: scaleX(1); }

/* stat cells: faint gradient wash on hover */
.dx-stat { transition: background .25s ease; }
.dx-stats:hover .dx-stat:hover {
  background: linear-gradient(180deg, color-mix(in oklab, var(--acc) 10%, var(--bg-1)), var(--bg-1));
}

/* address rows: gradient border on hover */
.addr-row { transition: border-color .2s ease, box-shadow .2s ease; }
.addr-card:hover .addr-row { border-color: var(--acc); box-shadow: 0 0 0 1px rgba(139,92,246,0.18); }


/* 3-column stat band variant */
.dx-stats.dx-stats-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 620px){ .dx-stats.dx-stats-3 { grid-template-columns: 1fr; } }


/* ============================================================
   WELCOME HERO — cinematic, Pro-site energy.
   ============================================================ */
body[data-doc-page="introduction"] .dx-main { padding-top: clamp(48px, 7vw, 88px); }
.dx-appicon-hero { width: clamp(72px, 9vw, 92px); height: clamp(72px, 9vw, 92px); border-radius: 24px; margin-bottom: clamp(28px, 4vw, 40px); box-shadow: 0 22px 50px -18px rgba(139,92,246,0.7), inset 0 1px 0 0 rgba(255,255,255,0.18); }
.dx-appicon-hero svg { width: clamp(34px, 4.4vw, 44px); height: auto; }
body[data-doc-page="introduction"] .dx-eyebrow { margin-bottom: clamp(18px, 2.4vw, 24px); }
body[data-doc-page="introduction"] .dx-main > h1.dx-hero-title {
  font-size: clamp(44px, 7vw, 82px); line-height: 0.98; letter-spacing: -0.045em; margin: 0;
}
body[data-doc-page="introduction"] .dx-main > h1.dx-hero-title + .dx-lead {
  font-size: clamp(18px, 1.9vw, 22px); line-height: 1.5; color: var(--dim);
  margin-top: clamp(24px, 3vw, 32px); max-width: 50ch;
  padding-bottom: clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--line); position: relative;
}
body[data-doc-page="introduction"] .dx-main > h1.dx-hero-title + .dx-lead::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 84px; height: 2px; background: var(--grad);
}


/* ---------- sidebar nav icons ---------- */
.dx-group a .dx-nav-ic { flex: none; display: inline-flex; width: 16px; height: 16px; color: var(--mute); transition: color .15s ease; }
.dx-group a .dx-nav-ic svg { width: 16px; height: 16px; display: block; }
.dx-group a:hover .dx-nav-ic { color: var(--dim); }
.dx-group a.active .dx-nav-ic { color: var(--acc-bright); }
.dx-group a.soon .dx-nav-ic { opacity: 0.5; }
/* keep the hover gradient-bar from colliding with the icon */
.dx-group a:not(.active)::before { left: -2px; }


/* search result keyboard selection */
.dx-results .dx-result.sel { background: var(--bg-2); }
.dx-results .dx-result.sel .rt { color: var(--acc-bright); }


/* ---------- copy page (LLM) button ---------- */
.dx-copypage { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; height: 30px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-1); color: var(--dim); font-family: var(--body); font-size: 13px; cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.dx-copypage:hover { color: var(--text); border-color: var(--acc); }
.dx-copypage svg { width: 15px; height: 15px; flex: none; }
.dx-copypage.ok { color: var(--pos); border-color: var(--pos); }
@media (max-width: 920px) { .dx-copypage .dx-cp-label { display: none; } .dx-copypage { padding: 0; width: 30px; justify-content: center; } }


/* ---------- copy-page split button + dropdown ---------- */
.dx-copygrp { position: relative; display: inline-flex; align-items: stretch; }
.dx-copygrp .dx-copypage { border-radius: 8px 0 0 8px; border-right: none; }
.dx-copycaret { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 30px; border: 1px solid var(--line-2); border-radius: 0 8px 8px 0; background: var(--bg-1); color: var(--dim); cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.dx-copycaret:hover, body.dx-copy-open .dx-copycaret { color: var(--text); border-color: var(--acc); background: var(--bg-2); }
.dx-copycaret svg { width: 14px; height: 14px; transition: transform .2s ease; }
body.dx-copy-open .dx-copycaret svg { transform: rotate(180deg); }

.dx-copymenu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 90; width: 320px; max-width: 86vw; padding: 7px; border: 1px solid var(--line-2); border-radius: 13px; background: rgba(16,16,22,0.97); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); box-shadow: 0 24px 60px -24px rgba(0,0,0,0.9), inset 0 1px 0 0 rgba(255,255,255,0.06); }
.dx-cmi { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 9px 11px; border: 0; border-radius: 9px; background: none; color: inherit; text-decoration: none; cursor: pointer; font-family: var(--body); transition: background .12s ease; }
.dx-cmi:hover { background: var(--bg-2); }
.dx-cmi .ic { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--dim); background: var(--bg-1); }
.dx-cmi:hover .ic { color: var(--acc-bright); border-color: var(--line-2); }
.dx-cmi .ic svg { width: 16px; height: 16px; }
.dx-cmi .tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dx-cmi .tx b { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: -0.01em; color: var(--text); }
.dx-cmi .tx b .ext { width: 12px; height: 12px; color: var(--mute); }
.dx-cmi .tx i { font-style: normal; font-size: 12.5px; line-height: 1.4; color: var(--mute); }
@media (max-width: 920px) { .dx-copymenu { right: auto; left: 0; } }
@media (max-width: 600px) { .dx-copymenu { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; max-width: none; } }


/* ============================================================
   BRANDING PAGE
   ============================================================ */
.brand-uni { font-family: var(--mono); font-size: 0.82em; color: var(--mute); }

/* glyph + wordmark recolored via CSS mask */
.brand-glyph { display: inline-block; width: calc(var(--h, 34px) * 0.9375); height: var(--h, 34px); -webkit-mask: url("glyph.svg") center / contain no-repeat; mask: url("glyph.svg") center / contain no-repeat; background: #fff; }
.brand-glyph-grad { background: linear-gradient(120deg, #D8C5FD, #FFF2D9); }
.brand-rot { transform: rotate(90deg); }
.brand-wm { display: inline-block; height: var(--h, 24px); width: calc(var(--h, 24px) * 4.68); -webkit-mask: url("moony-wordmark.svg") center / contain no-repeat; mask: url("moony-wordmark.svg") center / contain no-repeat; background: #fff; }
.brand-wm-grad { background: linear-gradient(110deg, #D8C5FD, #FFF2D9); }

/* symbol panel (mark + rotated binary echo) */
.brand-symbol-panel { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 6vw, 64px); margin: clamp(20px, 3vw, 28px) 0; padding: clamp(28px, 5vw, 44px); border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(90% 120% at 50% 0%, rgba(139,92,246,0.12), transparent 62%), var(--bg-1); }
.brand-symbol-cell { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.brand-cap { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.brand-symbol-arrow { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--acc-bright); }
.brand-symbol-arrow svg { width: 24px; height: 24px; }
.brand-symbol-arrow span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }

/* swatch grids */
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
@media (max-width: 820px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .brand-grid { grid-template-columns: 1fr 1fr; } .brand-grid-wm { grid-template-columns: 1fr; } }
.brand-swatch-card { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--bg-1); }
.brand-swatch { height: 104px; display: grid; place-items: center; }
.brand-swatch.on-light { background: #fff; }
.brand-swatch.on-dark { background: #1A1A1A; }
.brand-swatch-meta { display: flex; align-items: baseline; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--line); }
.brand-swatch-meta b { font-family: var(--display); font-size: 13.5px; font-weight: 600; color: var(--text); }
.brand-swatch-meta span { font-family: var(--mono); font-size: 11px; color: var(--mute); }

/* color palette */
.brand-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
@media (max-width: 640px) { .brand-colors { grid-template-columns: 1fr; } }
.brand-color { display: flex; flex-direction: column; gap: 4px; }
.brand-color .brand-color-chip { height: 76px; border-radius: 12px; border: 1px solid var(--line); }
.brand-color-split { display: flex; overflow: hidden; }
.brand-color-split span { flex: 1; }
.brand-color b { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--text); margin-top: 6px; }
.brand-color code { font-family: var(--mono); font-size: 12px; color: var(--mute); background: none; padding: 0; }


/* branding symbol — premium moon-over-horizon stage */
.brand-symbol-stage { position: relative; overflow: hidden; display: grid; place-items: center; gap: 20px; padding: clamp(44px, 8vw, 78px) 24px clamp(26px, 4vw, 38px); margin: clamp(20px, 3vw, 28px) 0 14px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, #0c0712, #07060b); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
.brand-symbol-stage .bss-moonglow { position: absolute; top: 42%; left: 50%; width: clamp(190px, 36vw, 280px); height: clamp(190px, 36vw, 280px); transform: translate(-50%, -60%); border-radius: 50%; background: radial-gradient(circle, rgba(167,139,250,0.22), rgba(167,139,250,0.04) 58%, transparent 72%); filter: blur(10px); pointer-events: none; }
.brand-symbol-stage .bss-horizon { position: absolute; left: 0; right: 0; bottom: clamp(46px, 7vw, 74px); height: 1px; background: linear-gradient(90deg, transparent, rgba(216,197,253,0.5) 28%, rgba(255,242,217,0.45) 68%, transparent); pointer-events: none; }
.brand-symbol-stage .bss-mark { position: relative; z-index: 1; background: linear-gradient(120deg, #EBDFFE, #FFF6E6); filter: drop-shadow(0 4px 22px rgba(167,139,250,0.6)); }
.brand-symbol-stage .bss-cap { position: relative; z-index: 1; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.brand-binary { display: flex; align-items: center; gap: clamp(12px, 2vw, 18px); flex-wrap: wrap; padding: 16px 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg-1); }
.brand-binary .brand-rot { flex: none; }
.brand-binary .bb-arrow { color: var(--mute); font-family: var(--mono); font-size: 18px; flex: none; }
.brand-binary .bb-bits { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 4vw, 36px); letter-spacing: 0.16em; background: linear-gradient(120deg, #D8C5FD, #FFF2D9); -webkit-background-clip: text; background-clip: text; color: transparent; flex: none; }
.brand-binary .bb-note { font-size: 14.5px; line-height: 1.5; color: var(--dim); flex: 1; min-width: 200px; }


/* branding symbol marks as inline svg (robust) */
.brand-symbol-stage svg.bss-mark { background: none; height: clamp(108px, 18vw, 138px); width: auto; position: relative; z-index: 1; filter: drop-shadow(0 4px 22px rgba(167,139,250,0.55)); }
.brand-binary svg.bb-mark { height: 46px; width: auto; transform: rotate(90deg); flex: none; }


/* inline icon-mark swatches */
.brand-swatch .bsg { height: 38px; width: auto; display: block; }

.brand-swatch .bwm { height: 24px; width: auto; display: block; }

/* swatch download links */
.brand-swatch-meta { justify-content: space-between; align-items: center; }
.brand-swatch-meta .bsm-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.brand-dl { display: inline-flex; gap: 11px; flex: none; }
.brand-dl a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--mute); text-decoration: none; transition: color .15s ease; }
.brand-dl a:hover { color: var(--acc-bright); }


/* swatch footer — stacked, no overlap, no doc-link underline bleed */
.brand-swatch-meta { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 9px; padding: 13px 14px 14px; }
.brand-swatch-meta .bsm-name { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.brand-swatch-meta .bsm-name b { font-size: 13.5px; }
.brand-swatch-meta .bsm-name span { white-space: nowrap; font-size: 11px; }
.brand-dl { display: flex; gap: 16px; }
.dx-main .doc-section .brand-dl a { border-bottom: 0 !important; background-image: none !important; padding: 0; }
.dx-main .doc-section .brand-dl a:hover { color: var(--acc-bright); }

/* canonical Moony texture on docs pages (replaces generic noise grain) */
body[data-doc-page]::after {
  z-index: 0; opacity: 0.05; mix-blend-mode: normal;
  background-image: url("moony-texture.webp");
  background-repeat: repeat; background-size: 75px;
}

/* icon swatch as real png — size by height */
.brand-swatch img.bsg { height: 52px; width: auto; display: block; }

/* branding — wordmark display panel under "The name" */
.brand-name-stage { display: grid; place-items: center; padding: clamp(40px, 7vw, 72px) 24px; margin-bottom: clamp(22px, 3vw, 30px); border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(110% 130% at 50% 0%, rgba(139,92,246,0.12), transparent 60%), linear-gradient(180deg, #0c0712, #07060b); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05); }
.brand-name-wm { width: clamp(180px, 32vw, 300px); height: auto; display: block; opacity: 0.96; }

/* symbol marks now use the real canon png */
.brand-symbol-stage img.bss-mark { background: none !important; height: clamp(112px, 19vw, 150px); width: auto; position: relative; z-index: 1; filter: drop-shadow(0 6px 26px rgba(167,139,250,0.5)); }
.brand-binary img.bb-mark { height: 46px; width: auto; transform: rotate(90deg); flex: none; }


/* ---------- footer sitemap columns ---------- */
.dx-foot-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .dx-foot-top { grid-template-columns: 1fr 1fr; row-gap: 34px; } .dx-foot-brandcol { grid-column: 1 / -1; } }
@media (max-width: 480px) { .dx-foot-top { grid-template-columns: 1fr 1fr; } }
.dx-foot-brandcol { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.dx-foot-brandcol .dx-foot-brand { display: block; }
.dx-foot-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px; font-weight: 500; }
.dx-foot-col a { display: block; font-size: 13.5px; color: var(--dim); text-decoration: none; padding: 5px 0; transition: color .15s ease; }
.dx-foot-col a:hover { color: var(--text); }
