/* RADIUS CARD OS / V22
   A unified, interactive card language for market decisions and proof states. */
:root {
  --violet: #aa8cff;
  --electric: #63a8ff;
  --card-radius: 20px;
  --card-border: rgba(234, 242, 238, 0.11);
  --card-border-hover: rgba(142, 243, 219, 0.38);
  --card-bg: rgba(16, 21, 27, 0.84);
  --card-bg-raised: rgba(22, 28, 35, 0.92);
  --ease-card: cubic-bezier(0.2, 0.8, 0.2, 1);
}

body {
  background:
    radial-gradient(circle at 8% 18%, rgba(99, 168, 255, 0.07), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(170, 140, 255, 0.08), transparent 32rem),
    #07090d;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 88%);
}

.ui-atmosphere {
  --aura-x: 72vw;
  --aura-y: 24vh;
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.ui-atmosphere i {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0.2;
}

.ui-atmosphere i:first-child {
  top: 0;
  left: 0;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(142, 243, 219, 0.23), transparent 68%);
  transform: translate3d(var(--aura-x), var(--aura-y), 0) translate(-50%, -50%);
  transition: transform 0.38s var(--ease-card);
  will-change: transform;
}

.ui-atmosphere i:nth-child(2) {
  top: 42%;
  left: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(170, 140, 255, 0.13);
  transform: skewX(-18deg);
  animation: radius-orbit-slow 22s linear infinite;
}

.ui-atmosphere i:nth-child(3) {
  right: -210px;
  bottom: 4%;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(255, 179, 108, 0.11);
  animation: radius-orbit-slow 28s linear infinite reverse;
}

@keyframes radius-orbit-slow {
  to {
    rotate: 360deg;
  }
}

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 160;
  height: 2px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.025);
}

.page-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--acid), var(--violet));
  box-shadow: 0 0 18px rgba(142, 243, 219, 0.42);
  transform: scaleX(0);
  transform-origin: left center;
}

body:has(.page--home) .page-progress {
  opacity: 0;
}

.topbar {
  padding: 8px 0;
  border-bottom: 0;
  background: linear-gradient(to bottom, rgba(7, 9, 13, 0.84), rgba(7, 9, 13, 0));
  backdrop-filter: none;
}

.topbar-inner {
  height: 60px;
  padding: 0 10px 0 14px;
  border: 1px solid rgba(243, 242, 235, 0.1);
  border-radius: 18px;
  background: rgba(12, 15, 20, 0.78);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px) saturate(130%);
}

.brand-mark {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(72, 207, 164, 0.32);
  border-radius: 9px;
  background: #050807;
  box-shadow: 0 0 24px rgba(72, 207, 164, 0.16);
}

.brand-mark::after {
  display: none;
}

.brand-mark img,
.footer-mark img,
.card-monogram img,
.network-monogram img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes brand-scan {
  0%,
  72% {
    transform: translateX(-140%);
  }
  100% {
    transform: translateX(140%);
  }
}

.nav-button,
.utility-button {
  border-radius: 11px;
}

.nav-button:hover,
.nav-button.active,
.utility-button:hover {
  border-color: rgba(243, 242, 235, 0.1);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.nav-button.active {
  color: var(--paper);
  background: linear-gradient(135deg, rgba(142, 243, 219, 0.13), rgba(170, 140, 255, 0.08));
}

.button {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), #76dccb);
  box-shadow: 0 10px 30px rgba(54, 170, 148, 0.12);
}

.button::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, 0.42), transparent 68%);
  transform: translateX(-140%);
  transition: transform 0.55s var(--ease-card);
}

.button:hover::after {
  transform: translateX(140%);
}

.button.secondary,
.button.ghost,
.button.danger {
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.035);
}

.button[data-magnetic] {
  --mag-x: 0px;
  --mag-y: 0px;
  --button-lift: 0px;
  transform: translate3d(var(--mag-x), calc(var(--mag-y) + var(--button-lift)), 0);
}

.button[data-magnetic]:hover {
  --button-lift: -2px;
}

.button[data-magnetic].is-resetting {
  transition:
    transform 0.24s var(--ease-card),
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.page {
  position: relative;
}

.page.page-enter {
  animation: radius-page-in 0.62s var(--ease-card) both;
}

@keyframes radius-page-in {
  from {
    opacity: 0;
    translate: 0 10px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.app-header {
  padding: 42px 0 18px;
  border-bottom: 0;
}

.app-header-card {
  position: relative;
  min-height: 330px;
  padding: 52px 52px 30px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 30px;
  background:
    linear-gradient(125deg, rgba(23, 30, 38, 0.94), rgba(12, 16, 22, 0.91) 58%, rgba(25, 20, 38, 0.9)),
    var(--panel);
  box-shadow:
    0 44px 100px rgba(0, 0, 0, 0.28),
    inset 0 1px rgba(255, 255, 255, 0.04);
  isolation: isolate;
}

.app-header-card::after {
  position: absolute;
  inset: auto -10% -55% 38%;
  z-index: -1;
  height: 90%;
  content: "";
  border: 1px solid rgba(142, 243, 219, 0.12);
  border-radius: 50%;
  transform: rotate(-11deg) skewX(-18deg);
}

.app-header-row {
  position: relative;
  z-index: 2;
  min-height: 192px;
}

.app-header h1 {
  max-width: 850px;
  margin-top: 20px;
  font-size: clamp(48px, 6vw, 86px);
}

.app-header p {
  max-width: 650px;
  font-size: 14px;
}

.app-header-orbit {
  position: absolute;
  top: -180px;
  right: -120px;
  z-index: -1;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(170, 140, 255, 0.15);
  border-radius: 50%;
  animation: header-orbit 18s linear infinite;
}

.app-header-orbit::before,
.app-header-orbit::after,
.app-header-orbit i {
  position: absolute;
  content: "";
  border: 1px solid rgba(142, 243, 219, 0.12);
  border-radius: 50%;
}

.app-header-orbit::before {
  inset: 70px;
}

.app-header-orbit::after {
  inset: 150px;
  border-color: rgba(255, 179, 108, 0.15);
}

.app-header-orbit i:first-child {
  top: 50%;
  left: -5px;
  width: 11px;
  height: 11px;
  border: 0;
  background: var(--cyan);
  box-shadow: 0 0 30px var(--cyan);
}

.app-header-orbit i:nth-child(2) {
  top: 86px;
  right: 52px;
  width: 7px;
  height: 7px;
  border: 0;
  background: var(--violet);
  box-shadow: 0 0 24px var(--violet);
}

.app-header-orbit i:nth-child(3) {
  right: 104px;
  bottom: 52px;
  width: 5px;
  height: 5px;
  border: 0;
  background: var(--amber);
}

@keyframes header-orbit {
  to {
    rotate: 360deg;
  }
}

.app-header-signals {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding-top: 19px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-header-signals span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #b8c3c0;
  background: rgba(255, 255, 255, 0.025);
  font: 9px var(--mono);
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.app-content {
  padding-top: 18px;
}

.surface,
.market-card,
.kpi,
.membership-surface,
.network-console,
.home-market-card,
.footer-card {
  border-color: var(--card-border);
  border-radius: var(--card-radius);
  background-color: var(--card-bg);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.035);
}

.surface:not([data-tilt]):not([data-reactive]):hover {
  border-color: var(--card-border);
}

[data-tilt],
[data-reactive] {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --card-lift: 0px;
  position: relative;
  isolation: isolate;
}

[data-tilt] {
  transform: perspective(1050px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translate3d(0, var(--card-lift), 0);
  transform-style: preserve-3d;
  transition:
    transform 0.22s var(--ease-card),
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}

[data-reactive] {
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}

[data-tilt]::before,
[data-reactive]::before {
  position: absolute;
  inset: 1px;
  z-index: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(360px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(142, 243, 219, 0.13), rgba(170, 140, 255, 0.035) 42%, transparent 72%);
  transition: opacity 0.2s ease;
}

[data-tilt] > * {
  position: relative;
  z-index: 1;
}

.app-header-card > .app-header-orbit {
  position: absolute;
  z-index: -1;
}

.home-market-card > .market-card-action {
  position: absolute;
  z-index: 2;
}

[data-tilt]:hover,
[data-tilt].is-interacting {
  --card-lift: -5px;
  border-color: var(--card-border-hover);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(142, 243, 219, 0.035),
    inset 0 1px rgba(255, 255, 255, 0.055);
  will-change: transform;
}

[data-reactive]:hover {
  border-color: rgba(142, 243, 219, 0.16);
}

[data-tilt].is-interacting::before,
[data-reactive].is-interacting::before {
  opacity: 1;
}

.motion-ready [data-reveal] {
  opacity: 0;
  translate: 0 22px;
}

.motion-ready [data-reveal].is-revealed {
  opacity: 1;
  translate: 0 0;
  transition:
    opacity 0.5s ease,
    translate 0.68s var(--ease-card);
  transition-delay: min(calc(var(--reveal-index, 0) * 60ms), 180ms);
}

.toolbar {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: rgba(15, 20, 26, 0.75);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
}

.search-box input,
.form-field input,
.form-field select,
.command-search input {
  border-color: rgba(243, 242, 235, 0.12);
  border-radius: 12px;
  background: rgba(5, 8, 12, 0.54);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.search-box input:focus,
.form-field input:focus,
.form-field select:focus,
.command-search input:focus {
  border-color: rgba(142, 243, 219, 0.7);
  background: rgba(10, 15, 20, 0.9);
  box-shadow: 0 0 0 4px rgba(142, 243, 219, 0.075);
  outline: none;
}

.form-field input[readonly] {
  color: #aeb8b3;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
}

.filter,
.state-pill {
  border-radius: 999px;
}

.filter {
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.022);
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.filter:hover {
  transform: translateY(-1px);
}

.filter.active {
  color: #08100e;
  border-color: var(--cyan);
  background: var(--cyan);
}

.market-grid,
.home-market-grid,
.kpi-grid {
  gap: 18px;
  border: 0;
  background: transparent;
}

.market-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.market-card {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  padding: 25px;
  overflow: visible;
  background:
    linear-gradient(145deg, rgba(24, 31, 39, 0.92), rgba(12, 16, 22, 0.92)),
    var(--panel);
}

.market-card:nth-child(3n + 2) {
  background:
    linear-gradient(145deg, rgba(25, 28, 42, 0.92), rgba(13, 16, 23, 0.94)),
    var(--panel);
}

.market-card:nth-child(3n + 3) {
  background:
    linear-gradient(145deg, rgba(37, 28, 24, 0.9), rgba(15, 17, 21, 0.94)),
    var(--panel);
}

.market-card:hover {
  background-color: var(--card-bg-raised);
}

.market-card h3 {
  margin-top: 52px;
  font-size: 30px;
}

.market-card > p {
  min-height: 58px;
}

.market-card .button {
  margin-top: auto;
}

.market-stats {
  gap: 8px;
  margin-top: 24px;
  border-top: 0;
}

.market-stat {
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.market-stat:nth-child(odd) {
  margin-right: 0;
}

.home-market-grid {
  perspective: 1200px;
}

.home-market-card {
  min-height: 460px;
  border: 1px solid var(--card-border);
  background:
    linear-gradient(145deg, rgba(21, 28, 33, 0.95), rgba(12, 16, 20, 0.94)),
    #111716;
}

.home-market-card.tone-2 {
  background: linear-gradient(145deg, rgba(26, 25, 40, 0.96), rgba(12, 16, 21, 0.94));
}

.home-market-card.tone-3 {
  background: linear-gradient(145deg, rgba(42, 29, 22, 0.92), rgba(16, 17, 20, 0.96));
}

.home-market-card:hover {
  color: var(--paper);
  background-color: var(--card-bg-raised);
}

.home-market-card:hover > div:first-child,
.home-market-card:hover p,
.home-market-card:hover dt,
.home-market-card:hover .market-card-action {
  color: inherit;
}

.home-market-card:hover > div:first-child b {
  color: var(--paper);
}

.home-market-card:hover::after {
  border-color: rgba(142, 243, 219, 0.26);
  transform: rotate(-12deg) skewX(-20deg) scale(1.12);
}

.home-market-card h3 {
  margin-top: 66px;
  font-size: 30px;
}

.home-market-line span {
  animation: market-point-pulse 2.2s ease-in-out infinite;
}

@keyframes market-point-pulse {
  50% {
    scale: 1.6;
    box-shadow: 0 0 28px var(--acid);
  }
}

.surface-pad {
  padding: 28px;
}

.series-top,
.payoff-layout,
.protocol-layout,
.dashboard-grid,
.docs-layout,
.builder-layout {
  gap: 18px;
}

.series-top > .surface,
.payoff-layout > .surface,
.builder-layout > .surface,
.docs-layout > .surface,
.protocol-layout > .surface,
.dashboard-grid > .surface {
  background:
    linear-gradient(145deg, rgba(21, 27, 34, 0.92), rgba(12, 16, 21, 0.92)),
    var(--panel);
}

.series-metrics,
.builder-preview-stats,
.modal-summary {
  gap: 9px;
  border-top: 0;
}

.series-metric,
.builder-preview-stats > div,
.modal-summary > div,
.scenario-box,
.network-console-grid > div {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}

.term-row,
.status-item,
.position-row,
.address-row,
.rulebook-line,
.bid-row,
.account-mini-row {
  margin-top: 7px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.024);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    translate 0.18s ease;
}

.term-row:hover,
.status-item:hover,
.position-row:hover,
.address-row:hover,
.rulebook-line:hover,
.bid-row:hover {
  border-color: rgba(142, 243, 219, 0.2);
  background: rgba(142, 243, 219, 0.035);
}

.term-row:first-child,
.status-item:first-child,
.address-row:first-child,
.rulebook-line:first-child {
  margin-top: 0;
}

.kpi-grid {
  background: transparent;
}

.kpi {
  position: relative;
  min-height: 180px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background:
    linear-gradient(145deg, rgba(21, 29, 34, 0.94), rgba(12, 16, 21, 0.94)),
    var(--panel);
}

.kpi::after {
  position: absolute;
  right: -36px;
  bottom: -62px;
  width: 150px;
  height: 150px;
  content: "";
  border: 1px solid rgba(142, 243, 219, 0.13);
  border-radius: 50%;
}

.kpi:nth-child(2)::after {
  border-color: rgba(170, 140, 255, 0.17);
}

.kpi:nth-child(3)::after {
  border-color: rgba(255, 179, 108, 0.16);
}

.kpi strong {
  position: relative;
  z-index: 1;
  font-size: clamp(36px, 4vw, 54px);
}

.clearing-board {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(420px, 1.22fr);
  gap: 34px;
  margin-top: 18px;
  padding: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 20%, rgba(170, 140, 255, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(19, 28, 33, 0.96), rgba(11, 15, 20, 0.96));
}

.clearing-board-copy h3 {
  max-width: 430px;
  margin: 15px 0 14px;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 0.98;
}

.clearing-board-copy > p {
  max-width: 430px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.clearing-board-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 24px;
}

.clearing-board-metrics > div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.clearing-board-metrics span,
.depth-head {
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: 0.08em;
}

.clearing-board-metrics strong {
  display: block;
  margin-top: 7px;
  color: var(--paper);
  font: 12px var(--mono);
}

.auction-depth {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.depth-head,
.depth-row {
  display: grid;
  grid-template-columns: 1fr 1fr 88px;
  gap: 12px;
  align-items: center;
}

.depth-head {
  padding: 0 13px 8px;
}

.depth-row {
  position: relative;
  min-height: 50px;
  padding: 8px 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  isolation: isolate;
}

.depth-row > i {
  position: absolute;
  inset: 4px;
  z-index: -1;
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(99, 168, 255, 0.13), rgba(99, 168, 255, 0.02));
  transform: scaleX(var(--depth, 0));
  transform-origin: left center;
  animation: depth-fill 0.72s var(--ease-card) var(--depth-delay, 0ms) both;
}

.depth-row.is-clearing {
  border-color: rgba(216, 255, 124, 0.42);
  box-shadow: 0 0 28px rgba(216, 255, 124, 0.055);
}

.depth-row.is-clearing > i {
  background: linear-gradient(90deg, rgba(216, 255, 124, 0.2), rgba(142, 243, 219, 0.04));
}

@keyframes depth-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(var(--depth, 0));
  }
}

.depth-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.depth-price b,
.depth-quantity {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.depth-price b {
  color: var(--paper);
  font-size: 15px;
}

.depth-price small {
  color: var(--muted);
  font: 8px var(--mono);
}

.depth-quantity {
  color: var(--soft);
  font-size: 11px;
}

.depth-row em {
  justify-self: end;
  padding: 5px 7px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font: normal 8px var(--mono);
}

.depth-row.is-clearing em {
  color: var(--acid);
  border-color: rgba(216, 255, 124, 0.25);
}

.depth-empty {
  padding: 28px;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Documentation becomes a navigable specification deck, not a plain sidebar. */
.docs-index {
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background:
    radial-gradient(circle at 0 0, rgba(170, 140, 255, 0.11), transparent 36%),
    linear-gradient(160deg, rgba(21, 26, 35, 0.97), rgba(11, 15, 20, 0.96));
}

.docs-index > .eyebrow {
  margin: 8px 9px 14px;
}

.doc-nav {
  min-height: 54px;
  gap: 10px;
  margin-top: 6px;
  padding: 10px 11px;
  color: var(--soft);
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.doc-nav span {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.doc-nav:hover {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.doc-nav.active {
  color: var(--paper);
  border-color: rgba(142, 243, 219, 0.19);
  background:
    linear-gradient(90deg, rgba(142, 243, 219, 0.09), rgba(170, 140, 255, 0.035));
  box-shadow: inset 3px 0 var(--cyan);
}

.doc-nav.active span {
  color: var(--ink);
  border-color: var(--cyan);
  background: var(--cyan);
}

.doc-nav svg {
  flex: 0 0 auto;
  margin-left: auto;
}

.docs-index-note {
  margin: 24px 9px 5px;
  padding: 16px 2px 0;
  border-top-color: rgba(255, 255, 255, 0.07);
}

.docs-content {
  min-height: 560px;
  padding: clamp(24px, 4vw, 52px);
  overflow: hidden;
  background:
    radial-gradient(circle at 96% 4%, rgba(142, 243, 219, 0.09), transparent 30%),
    linear-gradient(145deg, rgba(20, 27, 33, 0.96), rgba(11, 15, 20, 0.96));
}

.docs-content h3 {
  max-width: 720px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.98;
}

.docs-content > p {
  max-width: 720px;
  font-size: 13px;
}

.doc-flow {
  gap: 10px;
  margin-top: 34px;
  border: 0;
  background: transparent;
}

.doc-flow > div {
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

.doc-flow > div:nth-child(2) {
  border-color: rgba(170, 140, 255, 0.16);
}

.doc-flow > div:nth-child(3) {
  border-color: rgba(255, 179, 108, 0.16);
}

.doc-flow > div:nth-child(4) {
  border-color: rgba(216, 255, 124, 0.16);
}

.doc-flow b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--ink);
  border-radius: 9px;
  background: var(--cyan);
}

.doc-flow span {
  margin-top: auto;
  color: var(--paper);
  font-size: 14px;
}

.code-block {
  border: 1px solid rgba(142, 243, 219, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(7, 12, 16, 0.96), rgba(14, 20, 26, 0.96));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

/* Page-specific accents keep Proof, Protocol and Account from feeling generic. */
.page--proof .protocol-layout > .surface:first-child,
.page--protocol .protocol-layout > .surface:first-child {
  border-top-color: rgba(142, 243, 219, 0.42);
}

.page--proof .protocol-layout > .surface:last-child,
.page--protocol .protocol-layout > .surface:last-child {
  border-top-color: rgba(170, 140, 255, 0.38);
}

.status-list {
  margin-top: 20px;
  border-top: 0;
}

.status-value {
  align-self: center;
  padding: 6px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  line-height: 1;
}

.builder-form,
.builder-preview {
  border-top-color: rgba(142, 243, 219, 0.3);
}

.builder-form .form-field {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.builder-form .form-field:focus-within {
  border-color: rgba(142, 243, 219, 0.24);
  background: rgba(142, 243, 219, 0.028);
}

.builder-form .builder-grid {
  gap: 9px;
}

.membership-surface {
  background:
    radial-gradient(circle at 12% 50%, rgba(170, 140, 255, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(23, 25, 37, 0.95), rgba(12, 16, 21, 0.95));
}

.position-row {
  border-left: 2px solid rgba(142, 243, 219, 0.28);
}

.modal {
  border-color: rgba(243, 242, 235, 0.13);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(24, 31, 38, 0.98), rgba(10, 14, 19, 0.98)),
    var(--panel);
  box-shadow: 0 48px 140px rgba(0, 0, 0, 0.56);
}

.modal-backdrop {
  background: rgba(3, 5, 8, 0.74);
  backdrop-filter: blur(18px) saturate(80%);
}

.toast {
  border: 1px solid rgba(142, 243, 219, 0.22);
  border-radius: 14px;
  background: rgba(13, 20, 23, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.footer {
  padding: 22px 0 30px;
  border-top: 0;
}

.footer-card {
  min-height: 92px;
  padding: 18px 20px;
  border: 1px solid var(--card-border);
}

.footer-brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-mark {
  width: 38px;
  height: 38px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(72, 207, 164, 0.28);
  border-radius: 11px;
  background: #050807;
}

.card-monogram {
  overflow: hidden;
  border-color: rgba(72, 207, 164, 0.3);
  border-radius: 6px;
  background: #050807;
}

.network-monogram {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(72, 207, 164, 0.3);
  border-radius: 10px;
  background: #050807;
}

.footer-brand-block b,
.footer-brand-block small {
  display: block;
}

.footer-brand-block b {
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.footer-brand-block small {
  margin-top: 4px;
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: 0.05em;
}

.footer-links button {
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.footer-links button:hover {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 1100px) {
  .app-header-card {
    padding: 42px 36px 28px;
  }

  .clearing-board {
    grid-template-columns: 1fr;
  }

  .clearing-board-copy {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 22px;
  }

  .clearing-board-copy .eyebrow,
  .clearing-board-copy h3 {
    grid-column: 1;
  }

  .clearing-board-copy > p {
    grid-column: 1;
  }

  .clearing-board-metrics {
    grid-column: 2;
    grid-row: 1 / span 3;
    grid-template-columns: 1fr;
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --card-radius: 16px;
  }

  body::before {
    background-size: 44px 44px;
  }

  .ui-atmosphere i:first-child {
    top: 20%;
    left: 80%;
    width: 280px;
    height: 280px;
  }

  .ui-atmosphere i:nth-child(2),
  .ui-atmosphere i:nth-child(3) {
    display: none;
  }

  .topbar {
    padding: 0 !important;
    background: rgba(7, 9, 13, 0.9);
    backdrop-filter: blur(18px);
  }

  .topbar-inner {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .app-header {
    padding: 24px 0 12px;
  }

  .app-header-card {
    min-height: 0;
    padding: 30px 22px 22px;
    border-radius: 22px;
  }

  .app-header-row {
    min-height: 0;
    display: grid;
    align-items: start;
  }

  .app-header h1 {
    margin-top: 16px;
    font-size: clamp(40px, 12vw, 58px);
  }

  .app-header-row > .button {
    width: 100%;
    margin-top: 22px;
  }

  .app-header-orbit {
    top: -160px;
    right: -230px;
    opacity: 0.66;
  }

  .app-header-signals {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .app-header-signals::-webkit-scrollbar {
    display: none;
  }

  .app-header-signals span {
    flex: 0 0 auto;
  }

  .app-content {
    padding-top: 10px;
  }

  .surface-pad {
    padding: 20px;
  }

  .toolbar {
    align-items: stretch;
    padding: 10px;
  }

  .filter-set {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .filter-set::-webkit-scrollbar {
    display: none;
  }

  .filter {
    flex: 0 0 auto;
  }

  .market-grid,
  .home-market-grid,
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .market-card {
    min-height: 390px;
    padding: 21px;
  }

  .home-market-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 21px;
  }

  .home-market-card h3 {
    margin-top: 48px;
  }

  .home-market-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 15px;
  }

  .home-market-card[data-tilt] > .market-card-action {
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-start;
    margin-top: 24px;
  }

  .scenario-output {
    grid-template-columns: 1fr;
  }

  .status-item {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
  }

  .status-value {
    grid-column: 2;
    justify-self: start;
  }

  .series-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .clearing-board {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 22px;
  }

  .clearing-board-copy {
    display: block;
  }

  .clearing-board-metrics {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .depth-head,
  .depth-row {
    grid-template-columns: 1fr 0.9fr 72px;
    gap: 7px;
  }

  .depth-row {
    padding-inline: 10px;
  }

  .depth-quantity {
    font-size: 9px;
  }

  .term-row,
  .address-row,
  .rulebook-line {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .term-row strong,
  .address-row code,
  .rulebook-line code {
    text-align: left;
    overflow-wrap: anywhere;
  }

  .builder-preview-stats strong {
    overflow: visible;
    font-size: 14px;
    text-overflow: clip;
    white-space: normal;
  }

  .docs-index {
    position: static;
    display: flex;
    gap: 6px;
    padding: 9px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .docs-index::-webkit-scrollbar {
    display: none;
  }

  .docs-index > .eyebrow,
  .docs-index-note {
    display: none;
  }

  .doc-nav {
    width: auto;
    min-height: 44px;
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 11px;
    scroll-snap-align: start;
  }

  .doc-nav span {
    width: 24px;
    min-width: 24px;
    height: 24px;
  }

  .doc-nav svg {
    display: none;
  }

  .docs-content {
    min-height: 0;
    padding: 22px;
  }

  .doc-flow {
    margin-top: 24px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }

  .modal-head,
  .modal-body {
    padding: 18px;
  }

  .footer-card {
    display: grid;
    gap: 18px;
    padding: 18px;
  }

  .footer-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .footer-links button {
    text-align: left;
  }

  [data-tilt] {
    transform: none;
  }

  [data-tilt]:hover,
  .home-market-card[data-tilt]:hover {
    --card-lift: 0px;
    transform: none;
  }
}

@media (max-width: 380px) {
  .depth-head,
  .depth-row {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.75fr) 60px;
    gap: 4px;
  }

  .depth-head {
    padding-inline: 8px;
  }

  .depth-row {
    padding-inline: 8px;
  }

  .depth-price b {
    font-size: 13px;
  }

  .depth-price small {
    display: none;
  }

  .depth-quantity {
    overflow-wrap: anywhere;
  }

  .depth-row em {
    padding-inline: 5px;
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-atmosphere i,
  .brand-mark::after,
  .app-header-orbit,
  .home-market-line span,
  .depth-row > i,
  .page {
    animation: none !important;
  }

  [data-tilt],
  [data-reactive],
  [data-magnetic],
  [data-reveal] {
    transform: none !important;
    translate: none !important;
    transition: none !important;
  }

  [data-tilt]::before,
  [data-reactive]::before,
  .button::after {
    display: none;
  }

  .filter,
  .term-row,
  .status-item,
  .position-row,
  .address-row,
  .rulebook-line,
  .bid-row,
  .home-market-card::after,
  .asset-card {
    transition: none !important;
  }

  .filter:hover {
    transform: none;
  }

  .scroll-story.is-static-story {
    height: auto;
  }

  .scroll-story.is-static-story .story-sticky {
    position: relative;
    top: auto;
    height: auto;
    overflow: visible;
  }

  .scroll-story.is-static-story .story-progress-head,
  .scroll-story.is-static-story .story-progress-track,
  .scroll-story.is-static-story .story-field,
  .scroll-story.is-static-story .story-dots {
    display: none;
  }

  .scroll-story.is-static-story .story-grid {
    width: min(1180px, calc(100% - 48px));
    height: auto;
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
    grid-template-rows: none;
    gap: 18px;
    padding: 64px 0;
  }

  .scroll-story.is-static-story .story-copy-stack,
  .scroll-story.is-static-story .story-visual {
    display: contents;
  }

  .scroll-story.is-static-story .story-copy,
  .scroll-story.is-static-story .story-card {
    position: relative;
    inset: auto;
    width: 100%;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    pointer-events: auto;
  }

  .scroll-story.is-static-story .story-copy {
    align-self: stretch;
    padding: 30px;
    border: 1px solid var(--card-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
  }

  .scroll-story.is-static-story .story-copy p {
    display: block;
  }

  .scroll-story.is-static-story .story-card {
    min-height: 390px;
    height: auto;
  }

  .scroll-story.is-static-story .story-copy[data-story-copy="0"] { order: 1; }
  .scroll-story.is-static-story .story-card[data-story-card="0"] { order: 2; }
  .scroll-story.is-static-story .story-copy[data-story-copy="1"] { order: 3; }
  .scroll-story.is-static-story .story-card[data-story-card="1"] { order: 4; }
  .scroll-story.is-static-story .story-copy[data-story-copy="2"] { order: 5; }
  .scroll-story.is-static-story .story-card[data-story-card="2"] { order: 6; }
  .scroll-story.is-static-story .story-copy[data-story-copy="3"] { order: 7; }
  .scroll-story.is-static-story .story-card[data-story-card="3"] { order: 8; }
  .scroll-story.is-static-story .story-copy[data-story-copy="4"] { order: 9; }
  .scroll-story.is-static-story .story-card[data-story-card="4"] { order: 10; }
  .scroll-story.is-static-story .story-copy[data-story-copy="5"] { order: 11; }
  .scroll-story.is-static-story .story-card[data-story-card="5"] { order: 12; }

  .motion-ready [data-reveal] {
    opacity: 1 !important;
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .scroll-story.is-static-story .story-grid {
    width: calc(100% - 28px);
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 54px 0 64px;
  }

  .scroll-story.is-static-story .story-copy {
    padding: 24px 20px;
  }
}

/* Hero and narrative cards keep their special layouts while sharing the new material language. */
.asset-card,
.story-card {
  border-radius: 18px;
  box-shadow:
    0 28px 76px rgba(0, 0, 0, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.07);
}

.asset-card:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 42px 100px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(142, 243, 219, 0.05),
    inset 0 1px rgba(255, 255, 255, 0.1);
}

@media (min-width: 761px) and (pointer: fine) {
  .home-market-card[data-tilt]:hover {
    color: var(--paper);
    background:
      radial-gradient(circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(142, 243, 219, 0.1), transparent 42%),
      linear-gradient(145deg, rgba(21, 28, 33, 0.98), rgba(12, 16, 20, 0.96));
    transform: perspective(1050px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translate3d(0, var(--card-lift), 0);
  }
}

.home-market-card:hover .home-market-line {
  border-color: rgba(142, 243, 219, 0.2);
}

.home-market-card:hover .home-market-line::before {
  border-color: var(--cyan);
}

.home-market-card:hover .home-market-line::after {
  border-color: var(--acid);
}
