/* Light surfaces, emerald ink, hand illustrations, and measured large jade values. */
body { font-size: 18px; font-size: var(--text-body); }
p, .sub, .lede, .fine, .answer, figcaption, .field-help, .field-error, [role="status"], [data-visual-caption], .pool-state { font-size: var(--text-body); line-height: 1.55; max-width: 60ch; }
label, dt, dd, .mono, .chip, .card-label, .eyebrow, button, input, .button, .fine, caption, th, code { font-family: inherit; text-transform: none; letter-spacing: normal; font-size: var(--text-body); }
p, .hero p, .docs-copy p { max-width: 60ch; }
.eyebrow, dt, caption, .chain-strip, .chip, .muted { color: var(--ink); }
[hidden] { display: none !important; }
img, svg, canvas { max-width: 100%; }
.container > *, .card-row > *, .calc-fields > *, .participation > *, .docs-layout > * { min-width: 0; }
button, .button, input { max-width: 100%; }
[data-visual-caption] { display: flex; align-items: center; gap: .7rem; margin-block: .7rem; }
[data-visual-caption] > span, [data-fraction], [role="status"], .contract, output, dd { overflow-wrap: anywhere; }
.note-glyph { width: 24px; height: 24px; flex: 0 0 24px; }
.section { padding-block: clamp(72px, 7vw, 160px); }
.section-heading { align-items: center; }
.section h2::before { content: ''; display: block; width: 36px; height: 3px; margin-bottom: 24px; background: var(--jade); transform-origin: left; }
.motion-ready .section h2::before { transform: scaleX(0); transition: transform 700ms var(--ease); }
.motion-ready .section.revealed h2::before { transform: scaleX(1); }
.visual-card, .panel, .wallet-picker__card { position: relative; background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; padding: 32px; box-shadow: 0 1px 2px var(--shadow), 0 24px 48px var(--shadow); transition: transform 220ms cubic-bezier(0.22,1,0.36,1), box-shadow 220ms cubic-bezier(0.22,1,0.36,1); }
.visual-card::before, .panel::before, .wallet-picker__card::before { content: ''; pointer-events: none; position: absolute; inset: 0 12px auto; height: 1px; background: var(--surface); border-radius: 20px; }
@media (hover: hover) { .visual-card:hover, .panel:hover, .wallet-picker__card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px var(--shadow), 0 32px 64px var(--shadow); } }
.icon-plate { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ground); flex: 0 0 56px; }
.icon-plate svg { width: 44px; height: 44px; }
.card-row { margin-top: 48px; display: grid; gap: 24px; }
.grip-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.card-art { width: min(100%, 230px); height: 210px; margin: 16px auto 32px; }
.card-art svg { height: 100%; width: 100%; }
.visual-card h3 { font-size: var(--text-hook); line-height: 1.2; }
.live-value { display: block; font: 700 clamp(24px, 2vw, 40px)/1.2 var(--display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; margin-top: 20px; }
.live-value:empty { display: none; }
[data-ticker].ticking { animation: number-tick 320ms var(--ease); }
.move-card { grid-column: 1 / -1; display: grid; grid-template-columns: 56px 96px minmax(100px, 1fr) minmax(140px, 1fr) auto; align-items: center; gap: 20px; }
.move-card .card-art { width: 96px; height: 96px; margin: 0; }
.move-card .card-label { grid-column: 3; }
.move-card h3 { grid-column: 3; grid-row: 1; }
.move-card .card-label { grid-row: 2; }
.move-card .icon-plate, .move-card .card-art, .move-card button, .move-card .live-value { grid-row: 1 / 3; }
.move-card button { grid-column: 4; }
.move-card .live-value { grid-column: 5; margin: 0; }
.grip-track { height: 16px; margin-block: 24px 0; background: var(--ground); border-radius: 4px; overflow: visible; }
.grip-track span { position: relative; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--jade) 0 12px, transparent 12px 16px); }
.grip-track span::after { content: ''; position: absolute; right: 0; width: 4px; height: 100%; background: var(--diamond); box-shadow: 0 0 12px var(--jade-glow); }
.grip-track span:not([style])::after, .grip-track span[style="width: 0%;"]::after { opacity: 0; }
.receiving .hand-diamond { visibility: hidden; }
.receiving { position: relative; }
.receiving::after { content: ''; position: absolute; width: 22px; height: 30px; background: var(--jade); border-radius: 70% 30% 60% 40%; left: calc(50% - 11px); top: 28%; transform: rotate(45deg); }
.settle-diagram { position: relative; overflow: hidden; padding: 24px 0; }
.settle-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.settle-hand svg { display: block; width: 100%; }
.settle-sweep { position: absolute; inset: 0 auto 0 -12%; width: 12%; background: linear-gradient(90deg, transparent, var(--jade-glow), transparent); opacity: 0; }
.settle-diagram.revealed .settle-sweep { animation: light-sweep 1800ms var(--ease) both; }
.settle-diagram.revealed .hand-diamond { animation: hand-light 1800ms var(--ease) var(--sweep-delay) both; }
.calculator .icon-plate { margin-bottom: 24px; }
.share-output { font-size: var(--text-section); }
.sparkline { width: calc(100% + 64px); margin: 32px -32px -32px; }
.start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.start-grid .visual-card { display: flex; flex-direction: column; align-items: flex-start; }
.start-grid button, .start-grid .button { margin-top: 24px; }
.start-art { position: relative; align-self: center; width: 220px; max-width: 100%; }
.start-art > svg:first-child { width: 100%; }
.start-art .action-symbol { position: absolute; width: 56px; height: 56px; top: 12%; right: 0; background: var(--surface); border-radius: 12px; }
.questions { margin-top: 36px; gap: 0 64px; }
.questions .answer { margin-block: 0 24px; }
.position-card h1 { font-size: clamp(40px, 4.5vw, 80px); }
.position-hand { width: 150px; float: right; }
.position-hand .hand-diamond { transition: scale 450ms var(--ease); scale: var(--diamond-scale, .45); }
.position-lines { max-width: none; }
.position-lines .live-value { margin: 0; }
.pool-card > .icon-plate { grid-column: 1 / -1; }
.pool-card { gap: 24px; }
.docs-glyph { display: block; width: 72px; margin-bottom: 24px; }
.docs-copy .section h2::before { margin-bottom: 16px; }
.nav-links a, footer a { font-size: var(--text-body); }
@keyframes crowd-rise { from { opacity: 0; translate: 0 60%; } to { opacity: 1; translate: 0 0; } }
@keyframes number-tick { from { opacity: .4; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes light-sweep { 0% { left: -12%; opacity: 0; } 10%,85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes hand-light { 0%,100% { filter: brightness(1); } 40% { filter: brightness(1.4); } }
@media (max-width: 1100px) { .move-card { grid-template-columns: 56px 72px minmax(0, 1fr) minmax(0, 1fr); } .move-card .live-value { grid-column: 4; grid-row: 2; } .move-card button { grid-row: 1; } .move-card .card-art { width: 72px; } }
@media (max-width: 767px) {
  .hero { --hero-height: 90vh; min-height: auto; grid-template-columns: minmax(0, 1fr); padding-block: 48px 64px; gap: 24px; }
  .hero-copy { z-index: 3; }
  .hand-object { height: clamp(40vh, 90vw, 65vh); min-height: 40vh; }
  .crowd-wall { top: 45%; }
  .layer-0 .crowd-hand { width: 22%; }
  .layer-1 .crowd-hand { width: 28%; }
  .layer-2 .crowd-hand { width: 36%; }
  .grip-cards, .start-grid { grid-template-columns: minmax(0, 1fr); }
  .move-card { grid-column: auto; display: flex; flex-direction: column; align-items: flex-start; }
  .move-card .card-art { align-self: center; width: 160px; height: 140px; }
  .move-card .live-value { margin-top: 0; }
  .card-art { height: 200px; }
  .visual-card, .panel { padding: 32px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 24px; }
  .calc-result button { margin-top: 24px; }
  .diamond-crowd { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .topbar a, .topbar button, button, .button, summary, input, .docs-nav a, footer a { min-height: 44px; }
  .wordmark { display: inline-flex; align-items: center; }
  .position-hand { width: 96px; }
  .position-card h1 { clear: both; }
  .position-lines div { gap: 12px; }
  .position-lines dd { max-width: 55%; }
}
@media (prefers-reduced-motion: reduce) {
  .crowd-layer { transform: none !important; }
  .crowd-hand svg { opacity: 1; translate: none; }
  .motion-ready .section h2::before { transform: none; }
  .settle-sweep { display: none; }
  [data-ticker], .hand-diamond { animation: none !important; transition: none !important; }
}

/* Keep wallet feedback beside its control and navigation reachable on small screens. */
.wallet-wrap { display: grid; grid-template-columns: auto auto; gap: 4px 8px; min-width: 0; }
.wallet-wrap #navConnect { grid-column: 2; grid-row: 1; }
.wallet-wrap #navWalletIcon { grid-column: 1; grid-row: 1; }
#walletBalance { grid-column: 1 / -1; display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; font-size: var(--text-xs); }
.nav-burger { display: none; }
@media (max-width: 1023px) {
  button, a[href], input, summary { min-height: 44px; }
  a[href] { display: inline-flex; align-items: center; }
}
@media (max-width: 767px) {
  .topbar nav { display: grid; grid-template-columns: minmax(0,1fr) 44px; }
  .nav-burger { display: flex; flex-direction: column; gap: 4px; width: 44px; height: 44px; padding: 8px; justify-self: end; }
  .nav-burger span { display: block; width: 20px; height: 2px; background: currentColor; }
  .nav-links { display: none; grid-column: 1 / -1; margin: 0; }
  .nav-links.is-open { display: flex; flex-wrap: wrap; }
  .wallet-wrap { grid-column: 1 / -1; justify-self: end; max-width: 100%; }
}

/* Published settle readings remain legible on narrow screens. */
.settle-terms > div, [data-settle-receipt] dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin-block: .75rem; }
.settle-terms dd, [data-settle-receipt] dd { margin: 0; overflow-wrap: anywhere; max-width: 100%; }
[data-settle-receipt], [data-next-settle] { margin-block: 1rem; }
