:root {
  --bg: #06100a;
  --glass: rgba(10, 24, 15, 0.92);
  --glass-2: #0d1d13;
  --line: rgba(186, 255, 208, 0.08);
  --line-2: rgba(232, 185, 74, 0.22);
  --text: #eefbf1;
  --text-2: #a9c4b1;
  --text-3: #6f8d78;
  --accent: #e8b94a;
  --accent-2: #b88a2a;
  --accent-ice: #ffe08a;
  --accent-soft: rgba(232, 185, 74, 0.14);
  --pcb: #1e8a4a;
  --good: #4ee07a;
  --bad: #ff5a50;
  --sans: 'Space Grotesk', 'Inter Tight', system-ui, -apple-system, sans-serif;
  --pixel: 'Pixelify Sans', 'Space Grotesk', system-ui, sans-serif;
  --tiny: 'Silkscreen', ui-monospace, monospace;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --top: 66px;
  --side: 420px;
  --r: 18px;
  --r2: 12px;
  --drop: 6px 6px 0 #3b2d07;
  --drop-sm: 3px 3px 0 #3b2d07;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .88em; color: var(--text-2); }
[hidden] { display: none !important; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.strong { color: var(--text); font-weight: 600; }
.label { font: 400 10px/1 var(--tiny); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* ---------- the farm (fixed backdrop, right of the panel column) ---------- */
.pit { position: fixed; top: var(--top); left: var(--side); width: calc(100vw - var(--side)); height: calc(100vh - var(--top)); z-index: 1; cursor: pointer; transition: filter .8s var(--ease), opacity .8s var(--ease); }
body.backdrop .pit { filter: blur(4px) brightness(.5); opacity: .6; cursor: default; left: 0; width: 100vw; }
.fig {   /* status strip under the header, over the farm */
  position: fixed; left: calc(var(--side) + 28px); top: calc(var(--top) + 14px); z-index: 2; pointer-events: none;
  display: flex; gap: 12px; align-items: center; white-space: nowrap; margin: 0;
  font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
  padding: 7px 12px; border-radius: 999px; background: rgba(6,16,10,.7); border: 1px solid var(--line);
}
.fig b { color: var(--accent); font-weight: 600; }
.fig i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent-2); }
body.backdrop .fig { opacity: 0; }

/* ---------- top bar ---------- */
.rail {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20;
  display: flex; align-items: center; gap: 18px; padding: 0 22px;
  background: rgba(6,16,10,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 3px solid var(--accent-2);
}
.logo { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--glass-2); box-shadow: inset 0 0 0 2px var(--line-2); transition: transform .3s var(--ease); flex: none; }
.logo img { width: 32px; height: 32px; image-rendering: pixelated; display: block; border-radius: 50%; background: #0a1b10; }
.logo::after { content: 'RAM CENTER'; font: 700 15px var(--pixel); color: var(--text); letter-spacing: .02em; }
.logo:hover { transform: translateY(-1px) rotate(-1deg); }
.rail nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; overflow-x: auto; scrollbar-width: none; }
.rail nav a {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px; color: var(--text-2);
  font-size: 13px; font-weight: 500; white-space: nowrap; transition: color .2s, background .2s;
}
.rail nav a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail nav a span { display: inline; }
.rail nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.rail nav a.on { color: #2a1a06; background: var(--accent); box-shadow: var(--drop-sm); }
.rail nav a.on svg { stroke: #2a1a06; }
.social {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px;
  color: var(--text-2); border: 1px solid var(--line-2); font-size: 13px; transition: color .2s, background .2s;
}
.social svg { width: 15px; height: 15px; fill: currentColor; }
.social span { display: inline; }
.social:hover { color: var(--accent); background: var(--accent-soft); }
.conn { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); flex: none; }
.conn.live { background: var(--good); box-shadow: 0 0 0 4px rgba(78,224,122,.15); }
.conn.down { background: var(--bad); }

.sim-flag {
  position: fixed; top: calc(var(--top) + 14px); right: 24px; z-index: 19; white-space: nowrap;
  font: 500 11px var(--mono); color: var(--accent); padding: 5px 10px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--line-2);
}

/* ---------- stage view: a panel column on the left, the hero and controls over the farm ---------- */
.view { position: relative; z-index: 2; }
.view.stage {
  min-height: 100vh; padding: calc(var(--top) + 18px) 24px 22px 20px;
  display: grid; gap: 14px 22px;
  grid-template-columns: calc(var(--side) - 20px) 1fr 400px;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "net hero hero" "rig hero hero" "rig earn control";
  pointer-events: none;
}
.view.stage > * { pointer-events: auto; }
.hero { grid-area: hero; justify-self: end; align-self: start; max-width: 560px; text-align: right; pointer-events: none !important; padding-top: 44px; }
.hero .chips, .hero .ca { pointer-events: auto; }
.net { grid-area: net; align-self: start; }
.rig { grid-area: rig; align-self: start; }
.earn { grid-area: earn; align-self: end; justify-self: start; width: min(520px, 100%); }
.control { grid-area: control; align-self: end; justify-self: end; width: 100%; position: relative; z-index: 5; }
.hint { position: fixed; left: calc(var(--side) + 28px); top: calc(var(--top) + 52px); pointer-events: none !important; font: 11px var(--mono); color: var(--text-3); opacity: .7; z-index: 2; }
.is-lending .hint { opacity: 0; transition: opacity 1s; }

.eyebrow { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin: 0 0 14px; font: 400 11px var(--tiny); text-transform: uppercase; color: var(--text-3); }
.brandword { display: inline-flex; align-items: center; gap: 7px; color: #2a1a06; background: var(--accent); padding: 4px 8px; border-radius: 6px; font-weight: 600; letter-spacing: .02em; }
.hero h1 { font: 700 clamp(40px, 4.4vw, 66px)/1.02 var(--pixel); letter-spacing: 0; margin: 0 0 16px; text-shadow: 5px 5px 0 rgba(0,0,0,.75); }
.hero h1 em, .sheet h1 em { font-style: normal; color: #2a1a06; background: var(--accent); padding: 0 .18em; border-radius: 8px; box-shadow: 5px 5px 0 #3b2d07; text-shadow: none; }
.hero .lede { color: var(--text-2); margin: 0 0 18px auto; max-width: 440px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0; margin: 0; padding: 0; transition: opacity .5s, transform .5s var(--ease); }
.is-lending .chips { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.chips li { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; background: var(--glass); border: 2px solid var(--line-2); font-size: 13px; color: var(--text-2); backdrop-filter: blur(10px); }
.chips li:first-child { border-radius: 999px 0 0 999px; }
.chips li:last-child { border-radius: 0 999px 999px 0; }
.chips li + li { border-left: 0; }
.chips b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #2a1a06; font: 700 11px var(--mono); }
.ca {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; max-width: 100%;
  padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--glass); border: 2px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.ca.set { border-color: var(--accent); box-shadow: var(--drop-sm); }
.ca-k { font: 700 11px var(--mono); letter-spacing: .14em; color: var(--accent); }
.ca code { font: 500 12.5px var(--mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; user-select: all; }
.ca:not(.set) code { color: var(--text-3); padding: 4px 8px 4px 0; }
.ca-btn {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04);
  font: 500 12px var(--sans); color: var(--text-2); cursor: pointer; transition: color .2s, border-color .2s;
}
.ca-btn:hover { color: var(--accent); border-color: var(--accent); }

.card {
  min-width: 0; position: relative;
  background: var(--glass); border: 3px solid var(--line-2); border-radius: var(--r); padding: 18px 18px 16px;
  box-shadow: var(--drop);
}
.card::before { content: ''; position: absolute; left: 18px; right: 18px; top: -3px; height: 3px; background: var(--accent); border-radius: 0 0 3px 3px; opacity: .8; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head.sub { margin: 18px 0 6px; }
.tag { font: 500 11px var(--mono); color: var(--good); display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(78,224,122,.1); }
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 2s ease-in-out infinite; }

.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 9px 11px; border-radius: var(--r2); background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.stat b { font: 600 26px/1 var(--pixel); color: var(--accent-ice); white-space: nowrap; overflow: hidden; height: 1em; }
.stat em { font: normal 11.5px var(--sans); color: var(--text-3); }
.stat.big b { font-size: 42px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2.tight { margin: 14px 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.grid3 .stat b { font-size: 19px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 22px; }
.grid4 .stat { padding: 16px; border-radius: var(--r); background: var(--glass); border: 2px solid var(--line-2); box-shadow: var(--drop-sm); }
.round { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 10px; }

/* LED strip progress */
.seg { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; }
.seg span { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); transition: background .4s; }
.seg span.on { background: var(--pcb); box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); }
.seg span.at { background: var(--good); animation: blink 1.2s ease-in-out infinite; box-shadow: 0 0 0 3px rgba(78,224,122,.18); }
#thresholdText { margin: 8px 0 0; }

.rig-main { display: flex; flex-direction: column; gap: 10px; }
#spark { width: 100%; height: 44px; display: block; }
.digest { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--r2); background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.digest code { font-size: 11.5px; word-break: break-all; line-height: 1.45; color: var(--text-3); }
.digest code .z { color: var(--accent-ice); text-shadow: 0 0 10px rgba(232,185,74,.7); }
.digest code.flash { animation: flash .9s var(--ease); }
@keyframes flash { from { color: var(--text); } }
.ticker { list-style: none; margin: 12px 0 0; padding: 0; font: 11px/1.7 var(--mono); color: var(--text-3); }
.ticker li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: slidein .4s var(--ease); }
.ticker li:nth-child(2) { opacity: .65; } .ticker li:nth-child(3) { opacity: .35; }
.ticker .good { color: var(--accent); }
.ticker .bad { color: var(--bad); }
@keyframes slidein { from { transform: translateY(6px); opacity: 0; } }

.state { display: inline-flex; align-items: center; gap: 7px; font: 500 12px var(--mono); color: var(--text-2); padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px solid var(--line); }
.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.state.on i, .state.mining i { background: var(--good); box-shadow: 0 0 0 3px rgba(78,224,122,.18); animation: blink 1.2s ease-in-out infinite; }
.state.err i { background: var(--bad); }
@keyframes blink { 50% { opacity: .35; } }

/* engine home: the loop + receipts */
.loop { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.loop li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: baseline; padding: 7px 0 7px 4px; border-left: 2px solid var(--line-2); margin-left: 6px; font-size: 13px; position: relative; }
.loop li b { font: 600 10px var(--tiny); color: #2a1a06; background: var(--accent-2); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; margin-left: -17px; }
.loop li.on b { background: var(--good); }
.loop li.wait b { background: var(--accent); }
.loop li span { color: var(--text-2); }
.loop li span small { display: block; font: 12px var(--mono); color: var(--text-3); margin-top: 2px; }
.loop li em { font: 11px var(--mono); font-style: normal; color: var(--text-3); white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.04); }
.loop li.on em { color: var(--good); }
.loop li.wait em { color: var(--accent); }
.receipts li { grid-template-columns: 62px 1fr auto; }
.receipts li a { color: var(--accent); }
.go.wide { display: grid; place-items: center; flex: 1; text-align: center; }
.home .control { pointer-events: auto; }

.rounds { list-style: none; margin: 0; padding: 0; max-height: 132px; overflow: auto; scrollbar-width: none; }
.rounds li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.rounds li:last-child { border-bottom: 0; }
.rounds li span { font: 12px var(--mono); color: var(--accent-2); }
.rounds li em { font-style: normal; color: var(--text-2); }
.rounds li b { font: 500 12.5px var(--mono); }
.rounds li.empty { display: block; color: var(--text-3); }

/* control bar */
.bar {
  display: flex; gap: 8px; padding: 8px; border-radius: 999px;
  background: var(--glass-2); border: 3px solid var(--line-2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--drop);
}
#wallet {
  flex: 1; min-width: 0; height: 50px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; background: rgba(0,0,0,.3);
  font: 13px var(--mono); color: var(--text); transition: border-color .2s, background .2s;
}
#wallet::placeholder { color: var(--text-3); }
#wallet:focus { outline: none; border-color: var(--accent); }
#wallet.invalid { border-color: var(--bad); animation: shake .3s; }
#wallet:disabled { color: var(--text-2); }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.icon-btn { width: 50px; height: 50px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); cursor: pointer; display: grid; place-items: center; color: var(--text-2); transition: color .2s, border-color .2s, background .2s; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.go {
  height: 50px; padding: 0 28px; flex: none; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 17px var(--pixel); letter-spacing: .01em; color: #2a1a06;
  background: var(--accent); border-bottom: 4px solid #a8700c;
  box-shadow: var(--drop-sm), inset 0 2px 0 rgba(255,255,255,.45);
  transition: transform .1s, filter .2s, box-shadow .2s;
}
.go:hover { filter: brightness(1.08); }
.go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #3b2d07, inset 0 2px 0 rgba(255,255,255,.45); }
.go.stop { background: #163a24; color: var(--text); border-bottom-color: #0b2114; box-shadow: var(--drop-sm), inset 0 0 0 2px var(--line-2); }
.consent { margin: 10px 8px 0; font-size: 12px; color: var(--text-3); text-align: right; }

.settings {
  position: absolute; bottom: calc(100% + 10px); right: 0; width: 340px; padding: 16px; border-radius: var(--r);
  background: var(--glass-2); border: 3px solid var(--line-2);
  box-shadow: var(--drop); animation: pop .3s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ctl { display: grid; grid-template-columns: 104px 1fr 40px; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ctl b { font: 500 12px var(--mono); color: var(--text); text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 18px; background: transparent; width: 100%; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), rgba(255,255,255,.1) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), rgba(255,255,255,.1) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--accent-2); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { width: 36px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.1); position: relative; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-2); transition: transform .3s var(--ease), background .2s; }
.switch input:checked + i { background: var(--pcb); }
.switch input:checked + i::after { transform: translateX(16px); background: #fff; }
.switch input:disabled + i { opacity: .4; }

/* ---------- pages ---------- */
.view.page { min-height: 100vh; padding: calc(var(--top) + 44px) 28px 70px; }
.sheet { max-width: 1060px; margin: 0 auto; }
.sheet .eyebrow { justify-content: flex-start; }
.sheet h1 { font: 700 clamp(40px, 4.2vw, 64px)/1.05 var(--pixel); margin: 0 0 14px; text-shadow: 5px 5px 0 rgba(0,0,0,.75); display: inline-block; border-bottom: 4px solid var(--accent-2); padding-bottom: 6px; }
.sheet .lede { color: var(--text-2); font-size: 16px; margin: 0 0 26px; max-width: 760px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 2px solid var(--line-2); backdrop-filter: blur(12px); }
.tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--text-2); font-weight: 500; font-size: 14px; transition: background .2s, color .2s; }
.tabs button.on { background: var(--accent); color: #2a1a06; }
.table-wrap { border-radius: var(--r); border: 2px solid var(--line-2); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); overflow: hidden; margin-bottom: 14px; box-shadow: var(--drop-sm); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 400 10px var(--tiny); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); padding: 14px 16px; border-bottom: 2px solid var(--line-2); background: rgba(0,0,0,.2); }
.table td { padding: 13px 16px; border-bottom: 1px dashed var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tr { animation: slidein .4s var(--ease) both; }
.table tr.me td { background: var(--accent-soft); color: var(--text); }
.table .num { text-align: right; }
.table .share-bar { height: 4px; background: var(--pcb); border-radius: 999px; margin: 6px 0 0 auto; }
.table .empty { color: var(--text-3); padding: 30px 16px; font-family: var(--sans); text-align: center; }
.table a { color: var(--accent); }
.st { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--text-3); }
.st-sent { color: var(--good); background: rgba(78,224,122,.1); }
.st-submitted, .st-queued { color: var(--accent); background: var(--accent-soft); }
.kv { border-radius: var(--r); border: 2px solid var(--line-2); background: var(--glass); padding: 4px 18px; margin-bottom: 20px; backdrop-filter: blur(16px); box-shadow: var(--drop-sm); }
.kv:empty { display: none; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--text-2); }
.kv b { font: 500 12.5px var(--mono); word-break: break-all; text-align: right; }
.kv a { color: var(--accent); }
.flow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.flow > div { position: relative; padding: 20px 20px 20px 72px; border-radius: var(--r); background: var(--glass); border: 2px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: border-color .3s, transform .3s var(--ease); box-shadow: var(--drop-sm); }
.flow > div:hover { border-color: var(--accent); transform: translateY(-3px); }
.flow span { position: absolute; left: 18px; top: 18px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #2a1a06; font: 700 15px var(--pixel); box-shadow: var(--drop-sm); }
.flow b { display: block; font-size: 18px; font-weight: 600; margin: 2px 0 6px; }
.flow p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.flow p b { display: inline; font-size: inherit; margin: 0; color: var(--text); }

/* stats */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.chart-card { margin: 0; padding: 16px 16px 10px; border-radius: var(--r); background: var(--glass); border: 2px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--drop-sm); }
.chart-card figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.chart { position: relative; height: 200px; }
.chart canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.chart-tip {
  position: absolute; pointer-events: none; padding: 7px 10px; border-radius: var(--r2); white-space: nowrap;
  background: rgba(6,16,10,.95); border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 2px; font-size: 11.5px;
}
.chart-tip span { color: var(--text-3); font-family: var(--mono); }
.chart-tip b { color: var(--text); font: 600 14px var(--sans); }
.chart-tip em { font-style: normal; color: var(--text-3); }
.ctl.switch.inline { display: inline-flex; gap: 10px; margin: -8px 0 16px; grid-template-columns: none; }
.table-toggle summary { cursor: pointer; color: var(--text-2); font-size: 13.5px; margin: 6px 0 12px; }
.table-toggle summary:hover { color: var(--accent); }

/* rounds */
.table.clickable tr[data-round] { cursor: pointer; transition: background .15s; }
.table.clickable tr[data-round]:hover td { background: rgba(255,255,255,.03); color: var(--text); }
.ghost { border: 2px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--text); border-radius: 999px; padding: 11px 20px; cursor: pointer; font-weight: 500; transition: border-color .2s, color .2s; }
.ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.ghost:disabled { opacity: .5; cursor: default; }
.round-nav { margin-bottom: 18px; align-items: center; }
.back { color: var(--text-2); font-size: 14px; }
.back:hover, .pill:hover { color: var(--accent); }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); margin-left: 6px; }
h2.section { font: 700 18px var(--pixel); letter-spacing: .01em; margin: 26px 0 12px; color: var(--accent-ice); }

/* benchmark */
.bench { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; align-items: start; }
.bench-run, .bench-result { padding: 20px; border-radius: var(--r); background: var(--glass); border: 2px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--drop-sm); }
.bench-rate { display: flex; align-items: baseline; gap: 10px; }
.bench-rate b { font: 600 56px/1 var(--pixel); color: var(--accent-ice); height: 1em; overflow: hidden; }
.bench-rate em { font: normal 16px var(--mono); color: var(--text-3); }
.bench .go { align-self: start; }
.go:disabled { opacity: .55; cursor: default; filter: none; }
.bench-result { animation: rise .5s var(--ease) both; }
.bench-result .grid3 { margin: 0; }

.calc { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--r2); background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.calc-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.calc-inputs label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-3); }
.calc-inputs input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0,0,0,.3);
  font: 500 14px var(--mono); color: var(--text); -moz-appearance: textfield;
}
.calc-inputs input:focus { outline: none; border-color: var(--accent); }
.calc-inputs em { font-style: normal; font-size: 11px; }
.calc-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.calc-steps b { font: 500 12.5px var(--mono); color: var(--text); margin-left: 4px; }
.calc-steps li:last-child b { color: var(--accent); }
.calc-steps.live b { color: var(--text-2); }
.calc-steps.live li:last-child b { color: var(--accent); animation: blink 1s ease-in-out infinite; }

/* ---------- motion ---------- */
.reel { display: inline-block; height: 1em; line-height: 1; overflow: hidden; vertical-align: top; }
.reel > span { display: flex; flex-direction: column; transition: transform .7s var(--ease); }
.reel i { font-style: normal; height: 1em; line-height: 1; }
.lit { display: inline-block; line-height: 1; vertical-align: top; }

.view.enter > *, .view.enter .sheet article:not([hidden]) > * { animation: rise .7s var(--ease) both; }
.view.enter > .hero { animation-delay: .05s; }
.view.enter > .net { animation-delay: .1s; }
.view.enter > .rig { animation-delay: .18s; }
.view.enter > .earn { animation-delay: .26s; }
.view.enter > .control { animation-delay: .36s; }
.view.enter .sheet article > :nth-child(2) { animation-delay: .05s; }
.view.enter .sheet article > :nth-child(3) { animation-delay: .1s; }
.view.enter .sheet article > :nth-child(4) { animation-delay: .15s; }
.view.enter .sheet article > :nth-child(n+5) { animation-delay: .2s; }
.view.enter .flow > div { animation: rise .6s var(--ease) both; }
.view.enter .flow > div:nth-child(2) { animation-delay: .06s; } .view.enter .flow > div:nth-child(3) { animation-delay: .12s; }
.view.enter .flow > div:nth-child(4) { animation-delay: .18s; } .view.enter .flow > div:nth-child(5) { animation-delay: .24s; }
.view.enter .flow > div:nth-child(6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.rail { animation: rail-in .7s var(--ease) both; }
@keyframes rail-in { from { transform: translateY(-100%); } }

/* round close: a gold flash sweeps across the screen */
.view::after {
  content: ''; position: fixed; inset: var(--top) 0 0 0; pointer-events: none; opacity: 0; z-index: 4;
  background: linear-gradient(90deg, transparent 0, rgba(232,185,74,.10) 45%, rgba(232,185,74,.28) 50%, rgba(232,185,74,.10) 55%, transparent 100%) 0 0 / 40% 100% no-repeat;
}
.view.sweep::after { animation: sweep 1.3s var(--ease); }
@keyframes sweep { 0% { opacity: 1; background-position: -60% 0; } 100% { opacity: 1; background-position: 160% 0; } }

/* while lending: cards get a gold edge, the logo pulses */
.is-lending .rig, .is-lending .bar { border-color: var(--accent); animation: edge 2.6s ease-in-out infinite; }
@keyframes edge { 50% { box-shadow: var(--drop), 0 0 0 2px rgba(232,185,74,.35); } }
.is-lending .logo { animation: logo 1.4s ease-in-out infinite; }
@keyframes logo { 50% { box-shadow: inset 0 0 0 2px var(--accent), 0 0 22px rgba(232,185,74,.35); } }
.state.on b { background: linear-gradient(90deg, var(--text-2) 40%, #fff 50%, var(--text-2) 60%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
#roundLeft.urgent { color: var(--accent); animation: blink .8s ease-in-out infinite; }

.stat { position: relative; }
.floater { position: absolute; left: 12px; top: -6px; font: 600 12px var(--mono); color: var(--accent); pointer-events: none;  animation: float-up 1.4s var(--ease) forwards; }
@keyframes float-up { from { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; } to { opacity: 0; transform: translateY(-28px); } }
.pulse b { animation: stat-pulse .6s var(--ease); }
@keyframes stat-pulse { 30% { color: var(--good);  } }

.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: flex; flex-direction: column; gap: 8px; width: min(320px, calc(100vw - 32px)); }
.toast {
  display: grid; grid-template-columns: 10px 1fr; gap: 12px; align-items: start; padding: 12px 16px;
  background: var(--glass-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 2px solid var(--line-2); border-radius: var(--r); box-shadow: var(--drop-sm);
  animation: toast-in .5s var(--ease) both;
}
.toast.out { animation: toast-out .4s var(--ease) forwards; }
.toast b { font-weight: 600; font-size: 13.5px; display: block; }
.toast p { margin: 2px 0 0; font: 11.5px var(--mono); color: var(--text-2); }
.toast-mark { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--text-3); }
.toast.good .toast-mark { background: var(--good); box-shadow: 0 0 0 3px rgba(78,224,122,.18); }
.toast.bad .toast-mark { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

.go, .icon-btn, .tabs button { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .2; transform: scale(0); pointer-events: none; animation: ripple .6s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.go:not(.stop)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.4) 50%, transparent 65%) -150% 0 / 200% 100% no-repeat;
  animation: gleam 3.6s ease-in-out infinite;
}
@keyframes gleam { 0%, 70% { background-position: -150% 0; } 100% { background-position: 250% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  :root { --side: 0px; }
  .pit { left: 0; width: 100vw; }
  .view.stage { min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "hero hero" "stage stage" "control control" "net net" "rig earn"; }
  .earn { width: 100%; }
  .view.stage::before { content: ''; grid-area: stage; height: 46vh; }
  .hero { justify-self: start; text-align: left; padding-top: 10px; }
  .eyebrow, .chips { justify-content: flex-start; }
  .hero .lede { margin-left: 0; }
  .control { justify-self: stretch; width: 100%; }
  .consent { text-align: center; }
  .hint, .fig { display: none; }
}
@media (max-width: 720px) {
  :root { --top: 58px; }
  .rail { padding: 0 12px; gap: 10px; }
  .logo::after, .social span { display: none; }
  .logo { padding: 0 4px; }
  .rail nav a span { display: none; }
  .rail nav a { padding: 0 9px; }
  .pit { position: absolute; top: 300px; height: 46vh; }
  .view.stage { padding: calc(var(--top) + 16px) 14px 40px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "stage" "control" "net" "rig" "earn"; gap: 14px; }
  .view.stage::before { height: 40vh; }
  .settings { width: 100%; }
  .bar { flex-wrap: wrap; border-radius: var(--r); }
  #wallet { flex-basis: 100%; }
  .go { flex: 1; }
  .view.page { padding: calc(var(--top) + 28px) 16px 60px; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .charts, .bench { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .table td, .table th { padding: 10px 8px; }
  .toasts { bottom: 12px; right: 12px; }
  .sim-flag { right: 12px; font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .view.enter > *, .view.enter .sheet article:not([hidden]) > * { animation: none !important; }
  .fx-scramble { animation: none !important; }
}

/* coming soon gate for the browser pool */
.soon { font: 600 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #2a1a06; background: var(--accent); padding: 2px 6px; border-radius: 999px; }
.rail nav a.on .soon { background: #2a1a06; color: var(--accent); }
.soon-banner { display: flex; gap: 12px; align-items: baseline; margin: 10px 0 14px; padding: 12px 16px; border-radius: var(--r2); background: var(--accent-soft); border: 2px dashed var(--accent); font-size: 13px; line-height: 1.45; color: var(--text); text-align: left; pointer-events: auto; }
.soon-banner b { font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.go:disabled, .go.soon-cta { opacity: .55; cursor: not-allowed; filter: grayscale(.4); }
.go:disabled:active, .go.soon-cta:active { transform: none; }
.stage:not(.home) .bar input:disabled { opacity: .5; cursor: not-allowed; }
