:root {
  --bg: #F1F2EC;
  --band: #FAFAFA;
  --black: #0a0a0a;
  --muted: #6C6F6B;
  --lime: #CCFF21;
  --lime-soft: #E6FF91;
  --lime-mid: #B4E325;
  --placeholder: #DEE0DE;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Inter", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 28px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--black);
  font-family: var(--sans);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; }
h2 { font-size: 34px; line-height: 1.1; }
h3 { font-size: 20px; font-weight: 400; line-height: 1.2; }
p { margin: 0; }
.center { text-align: center; }

.section-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 12px;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 18px;
  font-family: var(--serif);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--black);
  border-radius: 0;
  white-space: nowrap;
}
.btn-dark { background: var(--black); color: #fff; }
.btn-light { background: transparent; color: var(--black); }

/* header */
.site-header { height: 88px; display: flex; align-items: center; }
.header-inner {
  width: 100%;
  padding: 0 60px;
  display: flex;
  align-items: center;
  position: relative;
}
.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--black);
  text-decoration: none;
}
.logo img { display: block; height: 28px; width: auto; }
.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--black);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nav a:hover, .nav a.active {
  background: var(--lime);
  border-color: var(--black);
  text-decoration: none;
}

/* hero */
.hero { position: relative; padding: 90px 0 210px; }
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 640px; margin: 0 auto; padding: 0 20px; }
.hero-title { font-size: 54px; line-height: 1.18; }
.highlight {
  color: #7FBF00;
  box-shadow: inset 0 -0.32em 0 var(--lime);
}
.hero-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 26px;
}
.hero-buttons {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* smileys */
.smiley { position: absolute; z-index: 1; pointer-events: none; display: block; animation: drift 7s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: 0 -11px; rotate: 2.2deg; }
}
.sm-hero-top { animation-duration: 5.5s; animation-delay: -1.2s; }
.sm-hero-left { animation-duration: 8s; animation-delay: -3s; }
.sm-hero-right { animation-duration: 10s; animation-delay: -5s; }
.sm-play-left { animation-duration: 6.5s; animation-delay: -2s; }
.sm-play-right { animation-duration: 7.5s; animation-delay: -4.4s; }
.sm-foot { animation-duration: 9s; animation-delay: -1.8s; }
@media (prefers-reduced-motion: reduce) {
  .smiley { animation: none; }
}
.sm-hero-top { width: 68px; height: auto; top: 14px; right: 24%; }
.sm-hero-left { width: 175px; height: auto; top: 310px; left: 5%; }
.sm-hero-right { width: 400px; height: auto; top: 160px; right: -130px; z-index: 3; }
.sm-play-left { width: 86px; height: auto; top: 58px; left: -20px; z-index: 0; }
.sm-play-right { width: 140px; height: auto; right: -60px; bottom: -80px; }
.sm-foot { width: 240px; height: auto; left: -70px; bottom: -120px; transform: scaleX(-1); }

/* waves */
.wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 90px;
  display: block;
}

/* how it works band */
.band-white {
  position: relative;
  background: var(--band);
  padding: 70px 0 130px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--black);
  padding: 11px;
}
.ph { background: var(--placeholder); }
.ph-card { width: 100%; height: 190px; margin-bottom: 24px; }

/* card animated graphics */
.graphic {
  position: relative;
  width: 100%;
  height: 190px;
  margin-bottom: 24px;
  border: 1px solid var(--black);
  background: var(--band);
  overflow: hidden;
}
/* --- how-it-works card graphics: terminal/schematic --- */
:root { --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace; }
.tui-head {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--black);
  padding: 5px 8px;
  border-bottom: 1px solid var(--black);
  background: #fff;
}
.tui-dot { width: 7px; height: 7px; background: var(--lime); border: 1px solid var(--black); display: inline-block; }
.tui-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  padding: 5px 8px;
  border-top: 1px solid var(--black);
  background: #fff;
}
.fee-total { color: var(--black); background: var(--lime); padding: 1px 5px; font-size: 10px; }

/* card 1: fee ticker */
.gr-fees .fee-rows {
  position: absolute; top: 25px; bottom: 25px; left: 0; right: 0;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 6px 10px 8px;
}
.fee-row {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 2.05;
  color: var(--muted);
  white-space: nowrap;
  display: flex; justify-content: space-between;
  animation: rowIn 0.35s ease-out;
}
.fee-row .fr-amt { color: var(--black); }
.fee-row.fresh { background: var(--lime); color: var(--black); }
.fee-row.fresh .fr-amt { color: var(--black); }
@keyframes rowIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* card 2: pipeline schematic */
.gr-pipe .pipe-svg { position: absolute; left: 0; right: 0; top: 28px; width: 100%; height: auto; padding: 0 4px; }
.pnode { fill: #fff; stroke: var(--black); stroke-width: 1; }
.pnode-mid { fill: var(--lime); }
.plabel {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--black);
  text-anchor: middle;
}
.pline {
  stroke: var(--black); stroke-width: 1; fill: none;
  stroke-dasharray: 4 3;
  animation: dashFlow 1.2s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -14; } }
.pclock-face { fill: #fff; stroke: var(--black); stroke-width: 1; }
.pclock-hand { stroke: var(--black); stroke-width: 1.4; stroke-linecap: square; transform-origin: 142px 15px; animation: sweep 4s linear infinite; }
.pclock-hand-h { stroke: var(--black); stroke-width: 1.4; stroke-linecap: square; }
@keyframes sweep { to { transform: rotate(360deg); } }
.gr-pipe.pulse .pnode-mid { fill: var(--lime-mid); }
.gr-pipe.pulse .pline { stroke: #7FBF00; stroke-width: 1.6; }

/* card 3: claim terminal */
.gr-claim { background: var(--black); }
.gr-claim .tui-head { background: var(--black); color: var(--band); border-bottom-color: #333; }
.claim-body {
  position: absolute; top: 25px; left: 0; right: 0; bottom: 0;
  padding: 14px 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 2.15;
  color: #d8dbd2;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
}
.claim-body .cl-prompt { color: var(--lime); }
.claim-body .cl-key { background: var(--lime); color: var(--black); padding: 1px 5px; white-space: nowrap; }
.claim-body .cl-dim { color: #7c7f78; }
.cl-cursor {
  display: inline-block;
  width: 6px; height: 11px;
  background: var(--lime);
  vertical-align: -1px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .pline, .pclock-hand, .fee-row { animation: none; }
}

/* legacy card 1: coins into treasury */
.gr-coins .treasury {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  width: 92px; height: 58px;
  background: var(--lime);
  border: 1px solid var(--black);
}
.gr-coins .treasury::after {
  content: "";
  position: absolute; left: 12px; top: 14px;
  width: 68px; height: 2px;
  background: var(--black);
  box-shadow: 0 10px 0 var(--black), 0 20px 0 var(--black);
}
.gr-coins .coin {
  position: absolute;
  top: -16px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--lime);
  border: 1px solid var(--black);
  animation: coinDrop 2.4s linear infinite;
}
.gr-coins .coin1 { left: 36%; animation-delay: 0s; }
.gr-coins .coin2 { left: 50%; animation-delay: 0.7s; }
.gr-coins .coin3 { left: 62%; animation-delay: 1.3s; }
.gr-coins .coin4 { left: 44%; animation-delay: 1.9s; }
@keyframes coinDrop {
  0% { top: -16px; opacity: 0; }
  12% { opacity: 1; }
  70% { top: 96px; opacity: 1; }
  82% { top: 108px; opacity: 0; }
  100% { top: 108px; opacity: 0; }
}
/* card 2: clock + sparkles */
.gr-clock .clock {
  position: absolute;
  left: 50%; top: 46px;
  transform: translateX(-50%);
  width: 74px; height: 74px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--black);
}
.gr-clock .hand {
  position: absolute;
  left: 50%; bottom: 50%;
  transform-origin: bottom center;
  background: var(--black);
}
.gr-clock .hand-h { width: 3px; height: 20px; margin-left: -1.5px; animation: spin 8s linear infinite; }
.gr-clock .hand-m { width: 2px; height: 28px; margin-left: -1px; animation: spin 2s linear infinite; }
.gr-clock .pivot {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--black); border-radius: 50%;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gr-clock .spark {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--lime);
  border: 1px solid var(--black);
  transform: rotate(45deg);
  animation: sparkle 2.2s ease-in-out infinite;
}
.gr-clock .sp1 { right: 22px; top: 40px; animation-delay: 0s; }
.gr-clock .sp2 { right: 30px; top: 96px; animation-delay: 0.7s; }
.gr-clock .sp3 { left: 24px; top: 120px; animation-delay: 1.4s; }
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: rotate(45deg) scale(0.4); }
  50% { opacity: 1; transform: rotate(45deg) scale(1); }
}
/* card 3: terminal + key */
.gr-key .term {
  position: absolute;
  left: 14px; right: 14px; top: 20px;
  background: var(--black);
  padding: 12px;
  font-family: monospace;
  font-size: 11px;
  color: var(--lime);
  line-height: 1.7;
}
.gr-key .term-line { display: block; white-space: nowrap; }
.gr-key .cursor {
  display: inline-block;
  width: 7px; height: 12px;
  background: var(--lime);
  vertical-align: -2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.gr-key .keyicon {
  position: absolute;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  animation: keyBob 2.2s ease-in-out infinite;
}
.gr-key .key-bow {
  display: block;
  width: 22px; height: 22px;
  border: 3px solid var(--black);
  border-radius: 50%;
  background: var(--lime);
}
.gr-key .key-stem {
  position: absolute; left: 50%; top: 20px;
  width: 3px; height: 20px; margin-left: -1.5px;
  background: var(--black);
}
.gr-key .key-tooth {
  position: absolute; left: 50%; top: 34px;
  width: 9px; height: 3px;
  background: var(--black);
}
@keyframes keyBob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-4deg); }
  50% { transform: translateX(-50%) translateY(-5px) rotate(4deg); }
}
.card h3 { min-height: 50px; margin-bottom: 12px; }
.dotted { border-top: 1px dotted #8a8d88; margin: 12px 0 14px; }
.card p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 14px;
}

/* playground */
.playground { padding: 24px 0 40px; position: relative; }
.playground-head { position: relative; }
.panel {
  background: #fff;
  border: 1px solid var(--black);
  padding: 11px;
  position: relative;
  z-index: 2;
}
.prompt-panel { margin-top: 30px; }
.prompt-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.prompt-panel-head .panel-label { margin-bottom: 12px; }
.btn-mini { height: 30px; padding: 0 12px; font-size: 12px; flex: none; }
.panel-label { font-family: var(--serif); font-size: 18px; margin-bottom: 12px; }
.prompt-box {
  border: 1px dotted #8a8d88;
  min-height: 120px;
  padding: 16px;
  font-size: 12px;
  color: var(--muted);
}
.model-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.model-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.model-name { font-family: var(--serif); font-size: 18px; }
.badge {
  background: var(--lime);
  font-size: 11px;
  padding: 5px 10px;
}
.model-body {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 24px;
}
.model-foot {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* pool */
.pool { padding: 10px 0 30px; }
.pool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 26px;
}
.pool-meter { display: flex; flex-direction: column; }
.pool-meter .panel-label { margin-bottom: 0; }
.ph-meter { flex: 1; min-height: 230px; margin-top: 14px; }

/* pool readout above tank */
.pool-readout { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; font-size: 12px; letter-spacing: 0.06em; }
.pool-readout-lab { font-size: 10px; letter-spacing: 0.14em; color: var(--muted); }
.pool-readout-num { font-size: 18px; color: var(--black); background: var(--lime); padding: 1px 6px; }
.pool-readout-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime-mid); border: 1px solid var(--black); align-self: center; animation: blink 1.6s step-end infinite; }
@media (prefers-reduced-motion: reduce) { .pool-readout-dot { animation: none; } }

/* pool tank liquid */
.pool-tank {
  position: relative;
  flex: 1;
  min-height: 230px;
  margin-top: 14px;
  border: 1px solid var(--black);
  background: #fff;
  overflow: hidden;
}
.pool-liquid {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0%;
  background: var(--lime);
  transition: height 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.pool-tank.in-view .pool-liquid { height: 72%; }
.pool-bubble {
  position: absolute;
  bottom: -14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(10,10,10,0.5);
  background: rgba(255,255,255,0.75);
  opacity: 0;
}
.pool-tank.in-view .pool-bubble { animation: bubbleUp 4.2s linear infinite; }
.pool-bubble.b1 { left: 18%; animation-delay: 0.4s !important; width: 6px; height: 6px; }
.pool-bubble.b2 { left: 38%; animation-delay: 1.8s !important; }
.pool-bubble.b3 { left: 57%; animation-delay: 3s !important; width: 5px; height: 5px; }
.pool-bubble.b4 { left: 74%; animation-delay: 0.9s !important; width: 7px; height: 7px; }
.pool-bubble.b5 { left: 88%; animation-delay: 2.4s !important; width: 5px; height: 5px; }
@keyframes bubbleUp {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: 0.9; }
  45% { transform: translateY(-80px) translateX(5px); }
  80% { opacity: 0.9; }
  100% { transform: translateY(-165px) translateX(-4px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pool-liquid { transition: none; height: 72%; }
  .pool-wave, .pool-wave2 { animation: none; }
  .pool-tank.in-view .pool-bubble { animation: none; }
}
.pool-wave {
  position: absolute;
  top: -14px; left: -50%;
  width: 200%; height: 28px;
  background: var(--lime);
  border-radius: 45%;
  animation: slosh 5s ease-in-out infinite;
}
.pool-wave2 {
  background: var(--lime-mid);
  opacity: 0.6;
  animation: slosh 7s ease-in-out infinite reverse;
}
@keyframes slosh {
  0%, 100% { transform: translateX(-4%) rotate(0deg); }
  50% { transform: translateX(4%) rotate(2deg); }
}
.pool-mark {
  position: absolute;
  left: 0; right: 0;
  bottom: 72%;
  border-top: 1px dashed var(--black);
  opacity: 0;
  transition: opacity 0.6s ease 1.2s;
}
.pool-tank.in-view .pool-mark { opacity: 1; }
.pool-mark-label {
  position: absolute;
  right: 8px; top: -22px;
  font-family: var(--serif);
  font-size: 16px;
  background: var(--black);
  color: var(--lime);
  padding: 2px 8px;
}
.meter-caption { font-size: 11px; color: var(--muted); margin-top: 10px; }
.pool-rows { display: flex; flex-direction: column; gap: 12px; }
.pool-row h3 { margin-bottom: 6px; }
.pool-row p { font-size: 11px; line-height: 1.5; color: var(--muted); }

/* fee split */
.feesplit { position: relative; padding: 10px 0 150px; overflow: hidden; }
.feesplit-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.feesplit-pool { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.feesplit-pool span { background: var(--lime); color: var(--black); padding: 1px 5px; }
.split-bar {
  display: flex;
  height: 30px;
  margin-top: 24px;
  border: 1px solid var(--black);
}
.seg { display: block; height: 100%; width: 0; transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
.split-bar.in-view .seg-a { width: 60%; }
.split-bar.in-view .seg-b { width: 25%; transition-delay: 0.15s; }
.split-bar.in-view .seg-c { width: 15%; transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .seg { transition: none; }
  .split-bar .seg-a { width: 60%; }
  .split-bar .seg-b { width: 25%; }
  .split-bar .seg-c { width: 15%; }
}
.seg-num { font-size: 12px; }
.seg-a { background: var(--lime); }
.seg-b { background: var(--lime-mid); }
.seg-c { background: var(--lime-soft); }
.legend {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  font-size: 13px;
  color: var(--muted);
}
.legend strong { color: var(--black); font-weight: 500; }
.legend li { display: flex; align-items: baseline; }
.legend .swatch { flex-shrink: 0; position: relative; top: 1px; }
@media (max-width: 720px) {
  .legend li { display: block; line-height: 1.55; }
  .legend .swatch { display: inline-block; margin-right: 8px; vertical-align: baseline; }
}
.swatch {
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-right: 10px;
  flex: none;
}

/* mcp page */
.container-narrow { max-width: 720px; }
.mcp-wrap { position: relative; padding: 40px 0 160px; overflow: hidden; }
.mcp-title { font-size: 44px; line-height: 1.15; text-align: center; }
.mcp-wrap .section-sub { text-align: center; }
.tabs-row { text-align: center; }
.tabs {
  display: inline-flex;
  margin: 28px 0 24px;
  border: 1px solid var(--black);
  background: #fff;
}
.tab {
  font-family: var(--serif);
  font-size: 13px;
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--black);
  cursor: pointer;
  color: var(--black);
}
.tab:last-child { border-right: none; }
.tab-active { background: var(--lime); }
.tab-panel { display: none; }
.tab-panel-active { display: block; }
.mcp-intro, .mcp-foot {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 18px 0;
}
.mcp-intro code, .mcp-foot code {
  font-family: monospace;
  background: var(--band);
  border: 1px solid #d7d9d3;
  padding: 1px 5px;
  font-size: 12px;
  color: var(--black);
}
.codeblock {
  border: 1px solid var(--black);
  background: #fff;
  margin: 16px 0;
}
.code-head {
  position: relative;
  font-family: monospace;
  font-size: 11px;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--black);
  background: var(--band);
}
.copy-btn {
  position: absolute;
  right: 8px; top: 5px;
  background: transparent;
  border: none;
  font-size: 15px;
  cursor: pointer;
  color: var(--black);
  line-height: 1;
}
.code-body {
  margin: 0;
  padding: 14px 12px;
  font-family: monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.code-body .cmd { color: var(--black); }
.code-body .url { color: #a9702e; }
.code-body .cmt { color: #9aa09a; }

/* docs page */
.docs-layout { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 40px 0 120px; align-items: start; }
.docs-side { position: sticky; top: 24px; }
.docs-side ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.docs-side a {
  font-family: var(--serif); font-size: 13px; color: var(--black); text-decoration: none;
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.docs-side a:hover, .docs-side a.active {
  background: var(--lime);
  border-color: var(--black);
  text-decoration: none;
}
.docs-main h1 { font-size: 40px; margin-bottom: 10px; }
.docs-main h2 { font-size: 26px; margin: 44px 0 12px; }
.docs-main h3 { font-size: 18px; margin: 22px 0 8px; }
.docs-main p, .docs-main li { font-size: 14px; line-height: 1.65; color: var(--muted); }
.docs-main strong { color: var(--black); font-weight: 500; }
.docs-main ul { padding-left: 20px; }
.docs-main li { margin-bottom: 8px; }
.formula {
  border: 1px solid var(--black);
  background: var(--band);
  padding: 16px;
  margin: 16px 0;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--black);
  white-space: pre-wrap;
  overflow-x: auto;
}
.formula .hl { background: var(--lime); padding: 0 3px; }
.docs-code {
  border: 1px solid var(--black);
  background: #0a0a0a;
  color: var(--lime);
  padding: 14px;
  margin: 16px 0;
  font-family: monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
}
.docs-chart { border: 1px solid var(--black); background: #fff; padding: 18px; margin: 18px 0; }
.docs-chart svg { display: block; width: 100%; height: auto; }
.chart-cap { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* fee split viz */
.fv-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 10px;
}
.fv-head .fv-title { font-family: var(--serif); font-size: 15px; color: var(--black); letter-spacing: 0; }
.fv-bar {
  display: flex;
  height: 54px;
  border: 1px solid var(--black);
  overflow: hidden;
  background: var(--band);
}
.fv-seg {
  position: relative;
  width: 0%;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding-left: 10px;
  overflow: hidden;
  white-space: nowrap;
  border-right: 1px solid var(--black);
  transition: width 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.fv-seg:last-child { border-right: none; }
.fv-a { background: var(--lime); }
.fv-b { background: var(--lime-mid); transition-delay: 0.15s; }
.fv-c { background: var(--lime-soft); transition-delay: 0.3s; }
.fee-viz.in-view .fv-a { width: 60%; }
.fee-viz.in-view .fv-b { width: 25%; }
.fee-viz.in-view .fv-c { width: 15%; }
.fv-num { font-family: var(--mono); font-size: 16px; color: var(--black); }
.fv-lab { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--black); opacity: 0.65; }

/* refill viz */
.refill-viz .rf-path { stroke: var(--black); stroke-width: 2; fill: none; }
.refill-viz .rf-fill { fill: var(--lime); fill-opacity: 0; transition: fill-opacity 0.8s ease 1.6s; }
.refill-viz.in-view .rf-fill { fill-opacity: 0.45; }
.refill-viz .rf-tick { fill: var(--lime); stroke: var(--black); stroke-width: 1; opacity: 0; transition: opacity 0.3s ease; }
.refill-viz.in-view .rf-tick { opacity: 1; }

/* twab timeline viz */
.tw-track {
  position: relative;
  display: flex;
  height: 46px;
  border: 1px solid var(--black);
  background: repeating-linear-gradient(-45deg, #fff 0 6px, #eef0ea 6px 12px);
  overflow: hidden;
}
.tw-hold {
  width: 0%;
  background: var(--lime);
  border-right: 1px dashed var(--black);
  display: flex; align-items: center; padding-left: 10px;
  font-family: var(--mono); font-size: 10.5px; color: var(--black);
  white-space: nowrap; overflow: hidden;
  transition: width 2s linear;
}
.twab-viz.in-view .tw-hold { width: 66.666%; }
.tw-zero {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  opacity: 0; transition: opacity 0.5s ease 2s;
}
.twab-viz.in-view .tw-zero { opacity: 1; }
.tw-playhead {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 2px; background: var(--black);
  transition: left 3s linear;
}
.twab-viz.in-view .tw-playhead { left: calc(100% - 2px); }
.tw-scale {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 9.5px; color: var(--muted);
  margin-top: 6px;
}
.tw-result {
  margin-top: 14px;
  font-family: var(--mono); font-size: 13px; color: var(--black);
}
.tw-result .hl { background: var(--lime); padding: 1px 5px; }

@media (prefers-reduced-motion: reduce) {
  .fv-seg, .tw-hold, .tw-zero, .tw-playhead, .refill-viz .rf-fill, .refill-viz .rf-tick { transition: none; }
  .fee-viz .fv-a { width: 60%; }
  .fee-viz .fv-b { width: 25%; }
  .fee-viz .fv-c { width: 15%; }
  .twab-viz .tw-hold { width: 66.666%; }
  .twab-viz .tw-zero { opacity: 1; }
  .twab-viz .tw-playhead { left: calc(100% - 2px); }
  .refill-viz .rf-fill { fill-opacity: 0.45; }
  .refill-viz .rf-tick { opacity: 1; }
}
.faq-q { font-family: var(--serif); font-size: 16px; color: var(--black); margin: 20px 0 4px; }

/* responsive */
@media (max-width: 860px) {
  .sm-hero-right { width: 260px; height: 260px; right: -90px; }
}
@media (max-width: 720px) {
  .site-header { height: 64px; position: relative; z-index: 60; }
  .header-inner { padding: 0 20px; justify-content: space-between; flex-wrap: wrap; }
  .hero { padding-top: 50px; }
  .hero-title { font-size: 33px; }
  .smiley { z-index: 0; }
  .sm-hero-left { width: 64px; height: auto; top: auto; bottom: 118px; left: 6%; }
  .sm-hero-right { width: 88px; height: auto; top: auto; bottom: 104px; right: 6%; }
  .sm-hero-top { width: 40px; height: auto; top: 6px; right: 10%; }
  .sm-play-left { width: 40px; height: auto; top: -10px; left: 2px; }
  .sm-foot { display: none; }
  .cards-3 { grid-template-columns: 1fr; }
  .card h3 { min-height: 0; }
  .model-row { grid-template-columns: 1fr; }
  .pool-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sm-play-right { display: none; }
  h2 { font-size: 24px; }
  .docs-layout { grid-template-columns: 1fr; gap: 20px; }
  .docs-side { position: static; }
  .docs-side ul { flex-direction: row; flex-wrap: wrap; gap: 14px; }
  .mcp-title { font-size: 30px; }
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1; }
}

/* ============ reveal animations ============ */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 0.4s ease, transform 0.4s ease; }
.rv-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ============ app page ============ */
.mono { font-family: var(--mono); }
.app-body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.app-body .app-main { flex: 1 0 auto; width: 100%; }
.app-view[hidden] { display: none !important; }
.app-body .site-foot { margin-top: auto; }
.container-wide { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.app-header { border-bottom: 1px solid var(--black); height: auto; padding: 14px 0; background: var(--band); }
.app-header .header-inner { padding: 0 28px; }
.app-nav a { padding: 4px 10px; border: 1px solid transparent; }
.app-nav a:hover, .app-nav a.active { background: var(--lime); border-color: var(--black); }

.app-main { padding: 34px 20px 60px; }

/* dispatch grid */
.dispatch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.model-panel { padding: 16px; display: flex; flex-direction: column; min-height: 480px; }
.mp-title-row { display: flex; justify-content: space-between; align-items: baseline; }
.mp-title { font-size: 26px; }
.mp-sub {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-left: 8px; font-weight: 400;
}
.avail-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--black); background: var(--band);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  padding: 4px 9px;
}
.avail-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime-mid); border: 1px solid var(--black); }

.model-select { position: relative; margin-top: 14px; }
.ms-btn {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--black); background: #fff;
  padding: 9px 12px;
  cursor: pointer;
  font-family: var(--sans);
  text-align: left;
}
.ms-icon {
  width: 26px; height: 26px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--black); color: #fff;
  font-family: var(--mono); font-size: 13px;
}
.ms-text { display: flex; flex-direction: column; }
.ms-vendor { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ms-name { font-family: var(--serif); font-size: 15px; }
.ms-caret { margin-left: auto; font-size: 11px; }
.ms-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% - 1px);
  margin: 0; padding: 0; list-style: none;
  border: 1px solid var(--black); background: #fff;
  max-height: 260px; overflow-y: auto;
}
.ms-list li button {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: transparent; border: none; border-bottom: 1px dotted #c9ccc5;
  cursor: pointer; text-align: left;
}
.ms-list li:last-child button { border-bottom: none; }
.ms-list li button:hover { background: var(--lime-soft); }
.ms-price { margin-left: auto; font-size: 10px; color: var(--muted); }

.price-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--black); border-top: none;
  background: #fff;
}
.pc {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px; gap: 3px;
  border-right: 1px solid var(--black);
}
.pc:last-child { border-right: none; }
.pc-num { font-size: 15px; }
.pc-route .pc-num { font-family: var(--serif); font-style: italic; }
.pc-lab { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }

.mp-output {
  flex: 1;
  margin-top: 14px;
  border: 1px dotted #8a8d88;
  min-height: 220px;
  padding: 14px;
  display: flex;
}
.mp-empty {
  margin: auto; text-align: center;
  color: var(--muted); font-size: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.mp-rule { display: block; width: 44px; border-top: 1px solid #8a8d88; }
.mp-stream { font-size: 12.5px; line-height: 1.7; color: var(--black); }
.mono-body { font-family: var(--mono); }
.mp-foot {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--muted);
  margin-top: 10px; padding-top: 8px; border-top: 1px dotted #c9ccc5;
}

/* dispatch bottom row */
.dispatch-bottom {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
  margin-top: 16px;
}
.prompt-lib { padding: 14px; }
.pl-head { display: flex; align-items: flex-start; gap: 8px; }
.pl-spark { color: var(--black); font-size: 15px; }
.pl-head h3 { font-size: 19px; }
.pl-count { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; }
.pl-arrow { margin-left: auto; font-size: 18px; color: var(--muted); }
.pl-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; }
.pl-list button {
  width: 100%; text-align: left;
  background: transparent; border: none; border-top: 1px dotted #c9ccc5;
  padding: 8px 2px;
  font-family: var(--sans); font-size: 12px; color: var(--muted);
  cursor: pointer; min-height: 34px;
}
.pl-list button:hover { color: var(--black); background: var(--lime-soft); }

.prompt-area { padding: 14px; display: flex; flex-direction: column; }
.pa-top { display: flex; justify-content: space-between; align-items: center; }
.pa-label { font-size: 9px; letter-spacing: 0.12em; color: var(--muted); }
.pa-free { font-family: var(--serif); font-size: 12px; font-style: italic; color: var(--muted); }
.prompt-area textarea {
  margin-top: 10px;
  width: 100%; resize: vertical;
  border: 1px dotted #8a8d88; background: transparent;
  padding: 12px; font-family: var(--sans); font-size: 13px;
  min-height: 74px;
}
.prompt-area textarea:focus { outline: 2px solid var(--lime); }
.pa-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 12px; flex-wrap: wrap; }
.pa-note { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.run-btn {
  font-family: var(--serif); font-size: 16px;
  background: var(--lime); border: 1px solid var(--black);
  padding: 10px 20px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
}
.run-btn:hover { background: var(--lime-mid); }
.run-btn.running { opacity: 0.6; cursor: wait; }
.rb-arrow { font-size: 18px; }

/* account view */
.acct-idrow {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 20px;
  border-bottom: 1px solid #d7d9d3;
}
.acct-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acct-avatar {
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--black); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.acct-avatar img { width: 30px; height: auto; }
.acct-addr { font-size: 13px; word-break: break-all; }
.acct-chain { font-size: 11px; color: var(--muted); margin-top: 2px; }
.icon-btn {
  background: transparent; border: none; cursor: pointer;
  font-size: 13px; color: var(--muted); text-decoration: none;
  padding: 4px;
}
.icon-btn:hover { color: var(--black); }
.acct-actions { display: flex; gap: 18px; align-items: center; }
.acct-link { font-family: var(--serif); font-size: 13px; color: var(--black); text-decoration: underline; }

.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.acct-card { padding: 18px; }
.acct-wide { grid-column: 1 / -1; }
.acct-lab { font-size: 9.5px; letter-spacing: 0.14em; color: var(--muted); }
.acct-big { font-family: var(--serif); font-size: 56px; font-weight: 700; margin: 10px 0 6px; }
.acct-sublines { display: flex; gap: 22px; font-size: 11px; color: var(--muted); margin-bottom: 16px; }
.claim-btn { cursor: pointer; font-size: 14px; height: 44px; padding: 0 22px; }
.claim-btn:disabled { opacity: 0.55; cursor: default; }
.acct-note { font-size: 11px; color: var(--muted); margin-top: 10px; }
.key-body { min-height: 130px; display: flex; margin-top: 8px; }
.key-empty { margin: auto; text-align: center; max-width: 300px; }
.key-title { font-size: 13px; color: var(--black); margin-bottom: 6px; }
.key-sub { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.key-issued { margin: auto 0; width: 100%; }
.key-issued code {
  display: block;
  background: var(--lime); border: 1px solid var(--black);
  padding: 8px 10px; font-size: 11px; word-break: break-all;
  margin-bottom: 8px;
}
.acct-cardhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.acct-body { font-size: 13px; color: var(--muted); line-height: 1.6; }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-list li {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 12px; color: var(--muted);
  padding: 10px 0; border-top: 1px dotted #c9ccc5;
}
.act-list li:first-child { border-top: none; }
.act-empty { justify-content: flex-start !important; }

.app-foot {
  border-top: 1px solid var(--black);
  padding: 20px 28px;
  display: flex; gap: 22px;
  font-family: var(--serif); font-size: 12px; color: var(--muted);
}
.app-foot a { color: var(--black); }

/* ============ app responsive ============ */
@media (max-width: 980px) {
  .dispatch-grid { grid-template-columns: 1fr; }
  .model-panel { min-height: 0; }
  .mp-output { min-height: 150px; }
  .dispatch-bottom { grid-template-columns: 1fr; }
  .acct-grid { grid-template-columns: 1fr; }
  .app-header .header-inner { flex-wrap: wrap; row-gap: 12px; }
  .app-nav { position: static; transform: none; order: 3; width: 100%; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .acct-big { font-size: 42px; }
  .mp-title { font-size: 21px; }
  .acct-addr { font-size: 11px; }
  .pa-bottom { flex-direction: column; align-items: stretch; }
  .run-btn { justify-content: center; }
}

/* ============ docs sidebar mobile pills ============ */
@media (max-width: 720px) {
  .docs-side { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px 8px; }
  .docs-side ul { flex-wrap: nowrap; gap: 8px; width: max-content; }
  .docs-side a {
    display: inline-block;
    border: 1px solid var(--black); background: #fff;
    padding: 8px 12px; white-space: nowrap;
  }
  .docs-side a:hover { text-decoration: none; background: var(--lime-soft); }
  .nav a, .btn { min-height: 32px; }
}

/* wallet connect */
.wallet-slot { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.wallet-btn {
  font-family: var(--serif); font-size: 13px;
  background: var(--black); color: #fff;
  border: 1px solid var(--black);
  height: 36px; padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.wallet-btn .wb-short { display: none; }
.wallet-btn:hover { background: var(--lime); color: var(--black); }
.wallet-btn.connecting { background: var(--lime); color: var(--black); cursor: default; }
.wallet-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--black); background: var(--lime);
  height: 36px; padding: 0 12px;
}
.wallet-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--black); }
.wallet-addr { font-size: 11px; color: var(--black); }
.wallet-x {
  background: transparent; border: none; cursor: pointer;
  font-size: 15px; line-height: 1; color: var(--black); padding: 0 2px;
}
.wallet-x:hover { opacity: 0.6; }
.wallet-launch {
  font-family: var(--serif); font-size: 12px;
  color: #fff; background: var(--black);
  border: 1px solid var(--black);
  text-decoration: none;
  height: 36px; display: inline-flex; align-items: center; padding: 0 14px;
  white-space: nowrap;
}
.wallet-launch:hover { background: var(--lime); color: var(--black); }

/* per-view docs CTA */
.view-docs-cta { margin-top: 26px; text-align: center; }
.view-docs-cta a {
  font-family: var(--serif); font-size: 13px;
  color: var(--black); text-decoration: none;
  border-bottom: 2px solid var(--lime);
  padding-bottom: 2px;
}
.view-docs-cta a:hover { background: var(--lime); border-bottom-color: var(--black); }

/* mcp inside app */
#view-mcp .mcp-title { text-align: center; margin-top: 10px; }

@media (max-width: 720px) {
  .wallet-slot { margin-left: auto; }
  .header-right { margin-left: 0; }
}

/* ============ mobile burger menu ============ */
.burger { display: none; }
.nav-wrap { display: contents; }
@media (max-width: 720px) {
  .burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 9px;
    margin-left: 10px;
    flex: 0 0 auto;
    background: var(--band); border: 1px solid var(--black);
    cursor: pointer;
  }
  .burger span { display: block; height: 2px; background: var(--black); transition: transform 0.25s ease, opacity 0.2s ease; }
  .menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .burger span:nth-child(2) { opacity: 0; }
  .menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-wrap {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--band);
    border-top: 1px solid var(--black); border-bottom: 1px solid var(--black);
    display: flex; flex-direction: column; gap: 16px;
    padding: 18px 20px 22px;
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 55;
    box-shadow: 0 10px 24px rgba(10,10,10,0.12);
  }
  .menu-open .nav-wrap { opacity: 1; transform: none; visibility: visible; }
  body.menu-open { overflow: hidden; }

  .nav-wrap .nav { position: static; transform: none; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  .nav-wrap .nav a { font-size: 15px; padding: 9px 12px; }

  /* wallet stays in the top bar next to the burger */
  .wallet-slot { gap: 8px; min-width: 0; }
  .wallet-btn { height: 38px; padding: 0 12px; font-size: 12px; }
  .wallet-chip { height: 38px; padding: 0 10px; gap: 6px; min-width: 0; }
  .wallet-addr { font-size: 10px; }
  .wallet-slot .wallet-launch { display: none; }
  .header-right { margin-left: 0; }

  /* app header: tabs stay visible as a full-width row under the logo */
  .app-header .header-inner { row-gap: 10px; }
  .app-nav { position: static; transform: none; order: 3; width: 100%; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .wallet-btn .wb-long { display: none; }
  .wallet-btn .wb-short { display: inline; }
  .wallet-btn { padding: 0 10px; }
  .header-inner { padding: 0 14px; }
  .wallet-chip { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-wrap { transition: none; }
  .burger span { transition: none; }
}

html { overflow-x: hidden; }
@media (max-width: 480px) {
  .docs-code, .formula { font-size: 11px; }
}

@media (max-width: 480px) {
  .mp-title-row { flex-wrap: wrap; gap: 6px; }
  .mp-sub { display: block; margin-left: 0; }
}

/* ============ site footer ============ */
.site-foot { background: var(--black); color: #d8dbd2; margin-top: 0; position: relative; z-index: 4; border-top: 1px solid var(--black); }
.foot-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 28px 40px;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
  align-items: start;
}
.foot-wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  color: var(--lime);
  display: flex;
  align-items: center;
  gap: 12px;
}
.foot-smiley { width: 44px; height: auto; animation: drift 7s ease-in-out infinite; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col-title { font-size: 10px; letter-spacing: 0.16em; color: var(--lime); margin-bottom: 6px; }
.foot-col a {
  font-family: var(--serif);
  font-size: 14px;
  color: #d8dbd2;
  text-decoration: none;
  width: fit-content;
  padding: 2px 6px;
  margin-left: -6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.foot-col a:hover { background: var(--lime); color: var(--black); }
.foot-soon { font-size: 9px; color: #7c7f78; letter-spacing: 0.1em; margin-left: 4px; }
.foot-col a:hover .foot-soon { color: var(--black); }
.foot-base {
  border-top: 1px solid #2a2a2a;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 28px 20px;
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #7c7f78;
}
@media (max-width: 720px) {
  .foot-inner { grid-template-columns: 1fr; gap: 32px; padding: 40px 20px 32px; }
  .foot-wordmark { font-size: 48px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-base { flex-direction: column; gap: 6px; padding: 14px 20px 18px; }
}

/* ============ tactile button hovers ============ */
.btn, .run-btn, .claim-btn, .wallet-btn, .wallet-launch, .tab, .ms-btn, .copy-btn, .pl-list button, .icon-btn {
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover, .run-btn:hover, .claim-btn:hover:not(:disabled), .wallet-btn:hover, .wallet-launch:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--black);
}
.btn-dark:hover, .claim-btn:hover:not(:disabled), .wallet-btn:hover, .wallet-launch:hover {
  background: var(--lime);
  color: var(--black);
}
.btn-light:hover { background: var(--lime); }
.site-foot .btn:hover { box-shadow: 3px 3px 0 var(--lime); }
.btn:active, .run-btn:active, .claim-btn:active:not(:disabled), .wallet-btn:active, .wallet-launch:active {
  transform: translate(0, 0);
  box-shadow: none;
  transition-duration: 0.05s;
}
.run-btn:hover { background: var(--lime); }
.tab:hover:not(.tab-active) { background: var(--lime-soft); }
.ms-btn:hover { background: var(--lime-soft); }
.ms-list button:hover { background: var(--lime-soft); }
.pl-list button:hover { background: var(--lime-soft); transform: translateX(3px); }
.copy-btn:hover { background: var(--lime); }
.icon-btn:hover { background: var(--lime); color: var(--black); }
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .run-btn:hover, .claim-btn:hover, .wallet-btn:hover, .wallet-launch:hover, .pl-list button:hover { transform: none; box-shadow: none; }
}


/* ============ smiley proximity ============ */
.smiley { will-change: transform; }
.smiley .smiley, img.smiley { transition: transform 0.25s ease-out; }

/* ============ account pool instrument panel ============ */
.pool-live { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; letter-spacing: 0.12em; color: var(--black); border: 1px solid var(--black); background: var(--band); padding: 3px 8px; }
.pool-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime-mid); border: 1px solid var(--black); animation: blink 1.6s step-end infinite; }
.pool-panel-grid { display: grid; grid-template-columns: 220px 1fr; gap: 18px; margin-top: 6px; }
.pool-tank-sm { min-height: 240px; margin-top: 0; flex: none; }
.tank-tick {
  position: absolute; left: 0; right: 0;
  border-top: 1px dotted rgba(10,10,10,0.35);
  pointer-events: none;
}
.tank-tick i {
  position: absolute; left: 6px; top: -14px;
  font-style: normal;
  font-family: var(--mono); font-size: 8.5px; color: rgba(10,10,10,0.5);
}
.pool-readouts { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pr-cell { border: 1px solid var(--black); background: var(--band); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.pr-lab { font-size: 8.5px; letter-spacing: 0.14em; color: var(--muted); }
.pr-num { font-size: 22px; color: var(--black); line-height: 1.1; }
.pr-num em { font-style: normal; font-size: 11px; color: var(--muted); }
.pr-count { background: var(--lime); align-self: flex-start; padding: 0 6px; }
.pr-spark { border: 1px solid var(--black); background: var(--band); padding: 10px 12px; }
.pr-spark svg { display: block; width: 100%; height: 44px; margin-top: 6px; }
.spark-line { stroke: var(--black); stroke-width: 1.5; }
.spark-fill { fill: var(--lime); opacity: 0.55; }
.pr-cap { border: 1px solid var(--black); background: var(--band); padding: 10px 12px; }
.cap-segs { display: flex; gap: 3px; margin-top: 8px; height: 16px; }
.cap-seg { flex: 1; border: 1px solid var(--black); background: #fff; }
.cap-seg.on { background: var(--lime); }
.cap-seg.mark { border-width: 2px; }
@media (max-width: 720px) {
  .pool-panel-grid { grid-template-columns: 1fr; }
  .pool-tank-sm { min-height: 180px; }
  .pr-num { font-size: 18px; }
}

/* ============ account stat blocks ============ */
.acct-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 18px; }
.acct-stat { border: 1px solid var(--black); background: var(--band); padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.acct-stat-lab { font-size: 8.5px; letter-spacing: 0.16em; color: var(--muted); }
.acct-stat-num { font-size: 24px; color: var(--black); line-height: 1.1; }
.acct-stat-bar { display: block; height: 6px; border: 1px solid var(--black); background: #fff; margin-top: 3px; overflow: hidden; }
.acct-stat-fill { display: block; height: 100%; width: 0; background: var(--lime); transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.2s; }
.acct-stat.in-view .acct-stat-fill { width: var(--w); }
.acct-stat-sub { font-size: 9px; color: var(--muted); }
@media (max-width: 480px) { .acct-stats { grid-template-columns: 1fr 1fr; } .acct-stat-num { font-size: 19px; } }
@media (prefers-reduced-motion: reduce) { .acct-stat-fill { transition: none; width: var(--w); } .pool-live-dot { animation: none; } }

/* demo wallet tag */
.wallet-demo-tag{font-size:.6em;opacity:.6;border:1px solid currentColor;border-radius:4px;padding:0 4px;margin-left:4px;vertical-align:middle}
.key-issued .icon-btn{margin-left:6px}

/* ============ chat tab ============ */
.chat-wrap { max-width: 820px; padding-top: 28px; padding-bottom: 40px; }
.chat-gate { padding: 44px 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; background: var(--band); border: 1px solid var(--black); }
.chat-gate-title { font-size: 30px; }
.chat-gate-sub { font-size: 14px; color: var(--muted); line-height: 1.55; max-width: 480px; }
.chat-gate-note { font-size: 12px; color: var(--muted); line-height: 1.5; max-width: 480px; }
.chat-gate-note a { color: var(--black); }
.chat-key-row { display: flex; gap: 8px; width: 100%; max-width: 480px; }
.chat-key-input { flex: 1; height: 36px; border: 1px solid var(--black); background: #fff; padding: 0 12px; font-family: var(--mono); font-size: 12px; border-radius: 0; }
.chat-key-input:focus { outline: 2px solid var(--lime); }
.chat-key-bad { outline: 2px solid #d33 !important; }

.chat-topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.chat-model-select { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-model-select select { font-family: var(--mono); font-size: 12px; border: 1px solid var(--black); background: #fff; padding: 7px 10px; border-radius: 0; max-width: 260px; }
.chat-price { font-size: 10px; color: var(--muted); }
.chat-topbar-right { display: flex; align-items: center; gap: 8px; }
.chat-key-chip { font-size: 10px; background: var(--lime); border: 1px solid var(--black); padding: 3px 8px; }
.chat-mini-btn { font-family: var(--mono); font-size: 10px; background: transparent; border: 1px solid var(--black); padding: 4px 9px; cursor: pointer; }
.chat-mini-btn:hover { background: var(--lime); }

.chat-panel { background: var(--band); border: 1px solid var(--black); display: flex; flex-direction: column; padding: 0; }
.chat-log { flex: 1; min-height: 320px; max-height: 55vh; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.chat-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: auto; }
.chat-msg { display: flex; flex-direction: column; max-width: 82%; }
.chat-msg-user { align-self: flex-end; align-items: flex-end; }
.chat-msg-assistant { align-self: flex-start; align-items: flex-start; }
.chat-bubble { padding: 10px 14px; font-size: 14px; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-msg-user .chat-bubble { background: var(--black); color: #fff; }
.chat-msg-assistant .chat-bubble { background: #fff; border: 1px solid var(--black); box-shadow: 3px 3px 0 var(--lime); }
.chat-meta { font-size: 10px; color: var(--muted); margin-top: 5px; }
.chat-bubble code { font-family: var(--mono); font-size: 12px; background: var(--lime-soft); padding: 1px 4px; }
.chat-msg-user .chat-bubble code { background: rgba(255,255,255,0.15); color: var(--lime); }
.chat-code { margin: 10px 0; border: 1px solid var(--black); }
.chat-code-head { display: flex; justify-content: space-between; align-items: center; background: var(--black); color: var(--lime); font-size: 10px; padding: 4px 10px; }
.chat-copy { font-family: var(--mono); font-size: 10px; background: transparent; color: #fff; border: 1px solid #555; padding: 1px 8px; cursor: pointer; }
.chat-copy:hover { background: var(--lime); color: var(--black); border-color: var(--lime); }
.chat-code pre { margin: 0; padding: 10px 12px; overflow-x: auto; font-family: var(--mono); font-size: 12px; line-height: 1.5; background: #fff; }
.chat-typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.chat-typing i { width: 6px; height: 6px; background: var(--black); display: inline-block; animation: chatBlink 1.2s infinite; }
.chat-typing i:nth-child(2) { animation-delay: 0.2s; }
.chat-typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatBlink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-typing i { animation: none; } }

.chat-notice { margin: 0 22px 10px; padding: 10px 14px; font-size: 12px; line-height: 1.5; border: 1px solid var(--black); background: var(--lime-soft); }
.chat-notice-warn { background: #FFF3D6; }

.chat-inputbar { display: flex; align-items: flex-end; gap: 10px; border-top: 1px solid var(--black); padding: 12px 14px; background: #fff; }
.chat-inputbar textarea { flex: 1; border: none; resize: none; font-family: var(--sans); font-size: 14px; line-height: 1.5; padding: 6px 4px; max-height: 140px; background: transparent; }
.chat-inputbar textarea:focus { outline: none; }
.chat-send { width: 36px; height: 36px; flex: 0 0 36px; background: var(--lime); border: 1px solid var(--black); font-size: 13px; cursor: pointer; }
.chat-send:hover { background: var(--lime-mid); }
.chat-send:disabled { opacity: 0.4; cursor: default; }

.key-save-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 12px; cursor: pointer; }
.key-save-row input { accent-color: var(--lime-mid); }
.key-chat-btn { margin-top: 10px; cursor: pointer; }

@media (max-width: 480px) {
  .chat-wrap { padding-left: 12px; padding-right: 12px; }
  .chat-gate { padding: 28px 18px; }
  .chat-gate-title { font-size: 24px; }
  .chat-msg { max-width: 94%; }
  .chat-log { padding: 14px; max-height: 52vh; }
  .chat-notice { margin: 0 14px 8px; }
  .chat-model-select select { max-width: 180px; }
}
.chat-gate[hidden], .chat-ready[hidden], .chat-notice[hidden] { display: none !important; }

/* ============ modal ============ */
.modal-backdrop {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  position: relative;
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--black);
  box-shadow: 6px 6px 0 var(--lime);
  padding: 26px 24px 24px;
}
.modal-close {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px;
  background: transparent; border: 1px solid transparent;
  font-size: 20px; line-height: 1; color: var(--black);
  cursor: pointer;
}
.modal-close:hover { background: var(--lime); border-color: var(--black); }
.modal-title { font-family: var(--serif); font-size: 22px; margin-bottom: 12px; padding-right: 28px; }
.modal .key-issued code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; background: var(--lime-soft); border: 1px solid var(--black); padding: 6px 8px; font-size: 12px; }
.modal .key-sub { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.modal-actions .btn { cursor: pointer; }
body.modal-open { overflow: hidden; }
@media (max-width: 480px) {
  .modal-backdrop { padding: 12px; }
  .modal { padding: 22px 16px 18px; max-height: calc(100vh - 24px); }
}
