/* Pocket Mainframe - shared styles */
:root {
  --cobalt: #1446ff;
  --cobalt-d: #0c2fc2;
  --cobalt-dd: #0a1f86;
  --cobalt-l: #4a73ff;
  --screen: #060c30;
  --cream: #f6f0e1;
  --cream-2: #ece3cc;
  --paper: #fffaf0;
  --ink: #0d1330;
  --ink-2: #4a5174;
  --line: #d6cba9;
  --c-trade: #ff9f1c;
  --c-lend: #2ee59d;
  --c-bj: #ff5c9a;
  --c-res: #7d92ff;
  --up: #0f9d62;
  --down: #d63a4a;
  --felt: #0f5a4a;
  --pix: 'Press Start 2P', 'Courier New', monospace;
  --mono: 'Space Mono', ui-monospace, 'Courier New', monospace;
  --shadow: 5px 5px 0 var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--mono); font-size: 14px; line-height: 1.55; color: var(--ink);
  background-color: var(--cream);
  background-image: radial-gradient(rgba(13, 19, 48, .09) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--cobalt-d); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
button { font-family: inherit; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- top bar ----- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--cobalt); color: #fff; border-bottom: 3px solid var(--ink); }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 58px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--pix); font-size: 11px; letter-spacing: .5px; }
.logo svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, .18); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-trade); animation: ledblink 1.6s infinite; }
.menu-btn { display: none; margin-left: auto; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; padding: 4px 10px; font-weight: 700; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 0 0 10px; }
  .nav.open { display: flex; }
  .topbar .chip { order: 3; }
}

/* ----- buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; cursor: pointer;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 0 5px 0 var(--ink);
  transition: transform .07s, box-shadow .07s; user-select: none;
}
.btn:hover { background: #fff; }
.btn:active, .btn.pressed { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible, .cell:focus-visible, .key:focus-visible, .menu-btn:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--c-trade); outline-offset: 2px; }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-l); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 9px; box-shadow: 0 3px 0 var(--ink); }
.btn-sm:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ----- layout bits ----- */
section { padding: 56px 0; }
.kicker { font-family: var(--pix); font-size: 10px; color: var(--cobalt-d); letter-spacing: 1px; margin-bottom: 12px; display: block; }
.h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; margin-bottom: 10px; }
.lead { font-size: 16px; max-width: 62ch; color: var(--ink-2); }
.panel { color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; position: relative; }
.panel h3 { font-size: 15px; margin-bottom: 10px; }
.muted { color: var(--ink-2); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; border: 1.5px solid var(--ink); }
.sw.trading { background: var(--c-trade); } .sw.lending { background: var(--c-lend); }
.sw.dice { background: var(--c-bj); } .sw.reserve { background: var(--c-res); }
.up { color: var(--up); } .down { color: var(--down); }
.num { font-variant-numeric: tabular-nums; }

/* ----- hero ----- */
.hero { padding: 40px 0 28px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-family: var(--pix); font-size: 10px; background: var(--ink); color: var(--cream); padding: 7px 10px; border-radius: 6px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 56px); font-weight: 700; letter-spacing: -1.5px; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--cobalt); background: linear-gradient(transparent 62%, rgba(255, 159, 28, .55) 62%); }
.hero p.lead { margin-bottom: 22px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.stat b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: 10px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-2); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .statrow { grid-template-columns: repeat(2, 1fr); } }

/* ----- the machine ----- */
.hero-machine { display: flex; flex-direction: column; align-items: center; }
.fee-pipe { position: relative; width: 74px; height: 64px; margin-bottom: -6px; z-index: 2; }
.fee-pipe .tube { position: absolute; left: 50%; top: 0; width: 26px; height: 100%; transform: translateX(-50%); background: linear-gradient(90deg, #aab7e8, #e9eeff 40%, #8d9ce0); border: 2px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0; }
.fee-pipe .funnel { position: absolute; left: 0; top: -4px; width: 100%; height: 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; }
.fee-pipe .ptag { position: absolute; left: 100%; top: 6px; margin-left: 8px; font-family: var(--pix); font-size: 8px; white-space: nowrap; background: var(--ink); color: var(--cream); padding: 4px 6px; border-radius: 4px; }
.drop { position: absolute; left: 50%; top: 8px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--c-trade); border: 2px solid var(--ink); animation: drip 1s ease-in forwards; z-index: 3; }
.drop.l { background: var(--c-lend); } .drop.b { background: var(--c-bj); } .drop.r { background: var(--c-res); }
@keyframes drip { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(62px) scale(1); opacity: 1; } }

.machine {
  position: relative; width: min(100%, 500px); padding: 16px 18px 22px; border-radius: 30px 30px 22px 22px;
  background: linear-gradient(160deg, var(--cobalt-l) 0%, var(--cobalt) 30%, var(--cobalt-d) 100%);
  border: 3px solid var(--ink);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -8px 0 rgba(0, 0, 0, .22), 8px 10px 0 var(--ink);
}
.m-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: #fff; }
.vent { display: flex; gap: 5px; }
.vent i { width: 5px; height: 20px; border-radius: 3px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 1px 0 rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 255, 255, .25); }
.m-brand { font-family: var(--pix); font-size: 9px; letter-spacing: 1px; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.leds { display: flex; gap: 8px; }
.led { width: 11px; height: 11px; border-radius: 50%; background: #0a1f86; border: 2px solid var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); transition: background .15s, box-shadow .15s; }
.led.on-g { background: var(--c-lend); box-shadow: 0 0 8px var(--c-lend); }
.led.on-a { background: var(--c-trade); box-shadow: 0 0 8px var(--c-trade); }
.led.on-p { background: var(--c-bj); box-shadow: 0 0 8px var(--c-bj); }
.led.blink { animation: ledblink 1.4s infinite; }
@keyframes ledblink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.bezel { background: #0a1038; border: 3px solid var(--ink); border-radius: 16px; padding: 10px; box-shadow: inset 0 4px 10px rgba(0, 0, 0, .7), 0 2px 0 rgba(255, 255, 255, .3); }
.screen { position: relative; background: var(--screen); border-radius: 8px; padding: 8px; overflow: hidden; }
.screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px), radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, .1), transparent 60%); }
.agent-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.cell { aspect-ratio: 1; border: 0; padding: 0; border-radius: 3px; background: #33418f; cursor: pointer; transition: opacity .25s, transform .12s; position: relative; }
.cell:hover { transform: scale(1.3); z-index: 3; box-shadow: 0 0 0 2px #fff; }
.cell[data-st="trading"] { background: var(--c-trade); animation: blink var(--d, 1.4s) var(--o, 0s) infinite steps(2, jump-none); }
.cell[data-st="lending"] { background: var(--c-lend); animation: breathe var(--d, 2s) var(--o, 0s) infinite ease-in-out; }
.cell[data-st="dice"] { background: var(--c-bj); animation: blink var(--d, 1.1s) var(--o, 0s) infinite steps(2, jump-none); }
.cell[data-st="idle"] { background: #4558b8; }
.cell[data-st="resting"] { background: #1a2569; animation: breathe 4s var(--o, 0s) infinite ease-in-out; }
.cell.pulse { animation: pulse .7s ease-out !important; }
.cell.sel { outline: 2px solid #fff; outline-offset: 1px; }
@keyframes blink { 0% { filter: brightness(1.3); } 100% { filter: brightness(.62); } }
@keyframes breathe { 0%, 100% { filter: brightness(.7); } 50% { filter: brightness(1.25); } }
@keyframes pulse { 0% { transform: scale(1.7); background: #fff; box-shadow: 0 0 10px #fff; } 100% { transform: scale(1); } }
.agent-grid[data-focus] .cell { opacity: .2; }
.agent-grid[data-focus="trading"] .cell[data-desk="trading"], .agent-grid[data-focus="lending"] .cell[data-desk="lending"],
.agent-grid[data-focus="dice"] .cell[data-desk="dice"], .agent-grid[data-focus="reserve"] .cell[data-desk="reserve"] { opacity: 1; }
.lcd { margin-top: 12px; background: #b9d9b0; color: #12311c; border: 3px solid var(--ink); border-radius: 8px; padding: 6px 10px; font-family: var(--pix); font-size: 8px; line-height: 1.9; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .3); overflow: hidden; }
.lcd div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-bottom { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.keys { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.key { background: var(--cream); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: 6px 9px 7px; font-family: var(--pix); font-size: 8px; cursor: pointer; box-shadow: 0 4px 0 var(--ink); position: relative; }
.key:active, .key[aria-pressed="true"] { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); background: var(--cream-2); }
.key[aria-pressed="true"]::before { content: ''; position: absolute; top: -9px; left: 50%; margin-left: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--c-lend); box-shadow: 0 0 6px var(--c-lend); border: 1px solid var(--ink); }
.grille { width: 54px; height: 34px; flex: none; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .4) 0 3px, transparent 3px 8px); border-radius: 6px; opacity: .7; }
.feet { display: flex; justify-content: space-between; width: min(86%, 430px); }
.feet i { width: 60px; height: 12px; background: var(--ink); border-radius: 0 0 8px 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 16px; font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--ink); }
.hint { font-size: 12px; color: var(--ink-2); text-align: center; margin-top: 6px; }
@media (max-width: 520px) { .agent-grid { grid-template-columns: repeat(8, 1fr); gap: 4px; } .machine { padding: 12px 12px 18px; } .lcd { font-size: 7px; } }

/* ----- flow / splitter ----- */
.flow-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-top: 26px; }
@media (max-width: 900px) { .flow-grid { grid-template-columns: 1fr; } }
.flow-svg { width: 100%; height: auto; display: block; margin-bottom: 10px; }
.flow-svg text { font-family: var(--mono); font-size: 11px; font-weight: 700; fill: var(--ink); }
.flow-svg .box { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.flow-svg .pipe { fill: none; stroke-width: 7; stroke-linecap: round; opacity: .35; }
.flow-svg .dash { fill: none; stroke-width: 3; stroke-dasharray: 3 9; animation: dash .8s linear infinite; stroke-linecap: round; }
@keyframes dash { to { stroke-dashoffset: -12; } }
.splitrow { display: grid; grid-template-columns: 96px 1fr 44px; gap: 10px; align-items: center; margin: 8px 0; font-weight: 700; font-size: 13px; }
.splitbar { display: flex; height: 18px; border: 2px solid var(--ink); border-radius: 9px; overflow: hidden; margin: 14px 0 6px; }
.splitbar i { display: block; transition: width .25s; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 8px; background: var(--cream-2); border: 2px solid var(--ink); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 6px; background: var(--cobalt); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 6px; background: var(--cobalt); border: 2px solid var(--ink); cursor: grab; }
.presets { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.donut { position: relative; width: 168px; height: 168px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 6; transition: stroke-dasharray .5s, stroke-dashoffset .5s; }
.donut .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-2); text-align: center; }
.donut .mid b { font-size: 14px; color: var(--ink); }
.dlist { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 160px; font-size: 13px; }
.dlist li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.lastfee { margin-top: 14px; font-size: 12px; background: var(--cream); border: 2px dashed var(--ink-2); border-radius: 10px; padding: 8px 10px; }

/* ----- desks ----- */
.desks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 26px; align-items: start; }
@media (max-width: 1100px) { .desks { grid-template-columns: 1fr 1fr; } .desk.trade { grid-column: 1 / -1; } }
@media (max-width: 720px) { .desks { grid-template-columns: 1fr; } }
.desk { padding: 0; overflow: hidden; }
.desk-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 2px solid var(--ink); font-family: var(--pix); font-size: 9px; color: #fff; }
.desk.trade .desk-h { background: #c26a00; } .desk.lend .desk-h { background: #0b8a5a; } .desk.bj .desk-h { background: var(--felt); }
.desk-h .led { background: #fff; }
.desk-b { padding: 14px; }
.desk-sub { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; margin-bottom: 8px; }
.ticks { width: 100%; border-collapse: collapse; font-size: 12px; }
.ticks th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); padding: 0 4px 4px; }
.ticks td { padding: 4px; border-top: 1px dashed var(--line); white-space: nowrap; }
.ticks td:last-child { width: 70px; }
.ticks .sym { font-weight: 700; }
.ticks svg { width: 64px; height: 20px; display: block; }
.poslist { list-style: none; margin: 8px 0 0; padding: 0; max-height: 186px; overflow: auto; font-size: 12px; }
.poslist li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px dashed var(--line); }
.poslist li button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--cobalt-d); cursor: pointer; text-decoration: underline; }
.apy { font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -1px; }
.apy small { font-size: 14px; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.accr { font-family: var(--pix); font-size: 13px; color: #0b8a5a; margin: 6px 0 12px; word-break: break-all; }
.meter { height: 12px; background: var(--cream-2); border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--c-lend); transition: width .6s; }
.pool { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 12px; margin-top: 10px; }
.pool .meter { grid-column: 1 / -1; height: 8px; border-width: 1.5px; }
.felt { background: radial-gradient(ellipse at 50% 30%, #17806a, var(--felt) 70%); border: 2px solid var(--ink); border-radius: 12px; padding: 10px; color: #eafff7; min-height: 262px; position: relative; }
.felt h4 { margin: 0 0 4px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; opacity: .85; display: flex; justify-content: space-between; }
.hand { display: flex; gap: 6px; min-height: 76px; margin-bottom: 8px; flex-wrap: wrap; }
.card { width: 48px; height: 70px; background: #fff; color: #111; border-radius: 6px; border: 1.5px solid #111; position: relative; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); font-weight: 700; animation: deal .3s ease-out; }
.card b { position: absolute; top: 3px; left: 5px; font-size: 14px; line-height: 1; }
.card i { position: absolute; bottom: 4px; right: 5px; font-style: normal; font-size: 22px; line-height: 1; }
.card.red { color: #d3213a; }
.card.back { background: repeating-linear-gradient(45deg, var(--cobalt) 0 5px, var(--cobalt-d) 5px 10px); border-color: #fff; }
@keyframes deal { from { transform: translateY(-14px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.bjinfo { font-size: 11px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.bjwhy { font-size: 12px; min-height: 18px; color: #ffe7a8; }
.banner { position: absolute; right: 10px; top: 10px; font-family: var(--pix); font-size: 9px; padding: 6px 8px; border-radius: 6px; background: var(--ink); color: #fff; border: 2px solid #fff; opacity: 0; transition: opacity .2s; }
.banner.show { opacity: 1; }
.banner.win { background: #0f9d62; } .banner.lose { background: #d63a4a; } .banner.push { background: #6b7bb8; }
.bjstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; text-align: center; font-size: 11px; }
.bjstats b { display: block; font-size: 14px; }

/* ----- chart + feed ----- */
.tl-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 26px; }
@media (max-width: 900px) { .tl-grid { grid-template-columns: 1fr; } }
.chartbox { position: relative; }
#treasuryChart { width: 100%; height: 270px; display: block; cursor: crosshair; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 6px; transform: translate(-50%, -120%); white-space: nowrap; display: none; z-index: 5; }
.chart-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chart-top b { font-size: 22px; }
.feed { list-style: none; margin: 0; padding: 0; max-height: 330px; overflow: hidden; font-size: 12px; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); animation: slidein .35s ease-out; align-items: start; }
.feed li:first-child { border-top: 0; }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; border: 1.5px solid var(--ink); background: var(--cream-2); white-space: nowrap; }
.tag.trade { background: var(--c-trade); } .tag.lending { background: var(--c-lend); } .tag.dice { background: var(--c-bj); }
.tag.reserve { background: var(--c-res); } .tag.fee, .tag.split { background: #ffe37a; } .tag.alloc { background: #d7d7d7; }
.feed .who { font-weight: 700; cursor: pointer; color: var(--cobalt-d); background: none; border: 0; padding: 0; font: inherit; font-weight: 700; text-align: left; }
.feed .t { color: var(--ink-2); font-size: 11px; }

/* ----- how / features / faq ----- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 26px; counter-reset: s; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -14px; left: 14px; font-family: var(--pix); font-size: 11px; background: var(--cobalt); color: #fff; padding: 7px 9px; border: 2px solid var(--ink); border-radius: 8px; }
.step { padding-top: 26px; }
.step p, .feat p { margin: 0; font-size: 13px; color: var(--ink-2); }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 26px; }
@media (max-width: 900px) { .feats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feats { grid-template-columns: 1fr; } }
.feat .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--cobalt); border: 2px solid var(--ink); display: grid; place-items: center; margin-bottom: 10px; box-shadow: 0 3px 0 var(--ink); }
.feat .ico svg { width: 22px; height: 22px; }
details { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; margin-bottom: 12px; box-shadow: 0 4px 0 var(--ink); }
summary { cursor: pointer; padding: 12px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-family: var(--pix); font-size: 12px; }
details[open] summary::after { content: '-'; }
details p { padding: 0 16px 8px; margin: 0 0 8px; color: var(--ink-2); }
.cobalt-band { background: var(--cobalt); color: #fff; border-block: 3px solid var(--ink); }
.cobalt-band .kicker { color: var(--c-trade); } .cobalt-band .lead { color: #dfe6ff; }

/* ----- footer ----- */
.foot { background: var(--ink); color: var(--cream); padding: 30px 0 40px; margin-top: 40px; font-size: 12px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; align-items: center; }
.foot a { color: var(--cream); }
.foot .chip { background: transparent; color: var(--cream); border-color: var(--cream); }

/* ----- profile modal ----- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(6, 12, 48, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.sheet { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 8px 8px 0 var(--ink); width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 18px; position: relative; animation: slidein .25s; }
.sheet .x { position: absolute; right: 12px; top: 12px; }
.ph { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; padding-right: 60px; }
.avatar { width: 64px; height: 64px; flex: none; border: 2px solid var(--ink); border-radius: 12px; background: var(--screen); image-rendering: pixelated; }
.ph h2 { font-size: 20px; }
.ph .sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 12px; }
.quote { background: var(--cream); border-left: 4px solid var(--cobalt); padding: 8px 12px; margin: 10px 0; font-size: 13px; }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.pstats div { border: 2px solid var(--ink); border-radius: 10px; padding: 6px 8px; background: #fff; min-width: 0; }
.pstats span { display: block; font-size: 10px; text-transform: uppercase; color: var(--ink-2); letter-spacing: .6px; }
.pstats b { font-size: 14px; }
.spark { width: 100%; height: 70px; display: block; background: #fff; border: 2px solid var(--ink); border-radius: 10px; }
.pmoves { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; }
.pmoves li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px dashed var(--line); }
.pmoves .t { color: var(--ink-2); margin-right: 6px; }
.dots i { display: inline-block; width: 8px; height: 8px; margin-right: 2px; border-radius: 2px; border: 1.5px solid var(--ink); }
.dots i.on { background: var(--c-trade); }

/* ----- ledger page ----- */
.page-h { padding: 36px 0 12px; }
.page-h h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -1px; margin-bottom: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 12px; }
.fchip { padding: 5px 12px; font-size: 12px; font-weight: 700; background: var(--paper); border: 2px solid var(--ink); border-radius: 99px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.fchip[aria-pressed="true"] { background: var(--cobalt); color: #fff; transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ctrl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.ctrl input[type="search"], .ctrl select { font-family: var(--mono); font-size: 13px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; min-width: 0; }
.ctrl input[type="search"] { flex: 1 1 200px; }
.lsum { font-size: 12px; color: var(--ink-2); margin-bottom: 8px; display: flex; gap: 16px; flex-wrap: wrap; }
.lhead, .lrow { display: grid; grid-template-columns: 74px 150px 86px 1fr 96px 100px; gap: 10px; align-items: center; padding: 7px 12px; }
.lhead { font-size: 10px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-2); font-weight: 700; border-bottom: 2px solid var(--ink); }
.ltable { padding: 0; overflow: hidden; }
.lrow { font-size: 12px; border-bottom: 1px dashed var(--line); }
.lrow.new { animation: flash 1.4s ease-out; }
@keyframes flash { from { background: #fff1b8; } to { background: transparent; } }
.lrow .amt { text-align: right; font-weight: 700; }
.lrow .hash { color: var(--ink-2); font-size: 11px; }
.lrow .who { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--cobalt-d); cursor: pointer; text-align: left; text-decoration: underline; }
.lrow .sys { font-weight: 700; color: var(--ink-2); }
.mt { display: none; }
.empty { padding: 30px; text-align: center; color: var(--ink-2); }
@media (max-width: 860px) {
  .lhead { display: none; }
  .lrow { grid-template-columns: 1fr auto; grid-template-areas: "who amt" "act act" "meta meta"; gap: 4px 10px; padding: 10px 12px; }
  .mt { display: inline; }
  .lrow .c-t { grid-area: meta; } .lrow .c-who { grid-area: who; } .lrow .c-type { display: none; }
  .lrow .c-act { grid-area: act; } .lrow .amt { grid-area: amt; } .lrow .hash { display: none; }
}

/* ----- about page ----- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 26px; margin: 0 0 10px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.warn { border-left: 6px solid var(--down); }
.schema { font-size: 12px; background: var(--ink); color: #dfe6ff; padding: 14px; border-radius: 12px; overflow-x: auto; margin: 10px 0; }
.chart-wrap { overflow-x: auto; }
.bstable { border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.bstable th, .bstable td { border: 1.5px solid var(--ink); padding: 3px 7px; text-align: center; min-width: 30px; }
.bstable th { background: var(--cream-2); }
.bstable .H { background: #ffe9a8; } .bstable .S { background: #bfeedd; } .bstable .D { background: #ffc6dc; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* dice desk */
.dice-row { display: flex; gap: 14px; justify-content: center; align-items: center; min-height: 76px; margin: 6px 0 4px; }
.die { width: 56px; height: 56px; background: #fff; border: 2px solid #111; border-radius: 12px; box-shadow: 0 4px 0 rgba(0, 0, 0, .35); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 7px; gap: 2px; }
.die i { border-radius: 50%; }
.die i.on { background: #111; }
.die[data-n="1"] i.on { background: #d3213a; }
.die.roll { animation: tumble .22s linear infinite; }
.die.land { animation: dland .35s ease-out; }
@keyframes tumble { 0% { transform: rotate(-14deg) translateY(-3px); } 50% { transform: rotate(12deg) translateY(2px); } 100% { transform: rotate(-14deg) translateY(-3px); } }
@keyframes dland { 0% { transform: scale(1.25) rotate(18deg); } 100% { transform: none; } }
.dc-call { text-align: center; font-size: 12px; letter-spacing: 1px; color: #ffe7a8; min-height: 18px; }
.fair { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, .35); font-size: 10.5px; line-height: 1.5; }
.fair code { font-family: var(--mono); background: rgba(0, 0, 0, .3); padding: 0 4px; border-radius: 4px; }
.fair .btn { margin-top: 6px; }
.fair-out { margin-top: 6px; color: #ffe7a8; word-break: break-all; min-height: 14px; }

/* wallet + sponsor */
#wallet-slot { display: inline-flex; align-items: center; }
#wallet-slot .ws-btn { padding: 5px 10px; font-size: 12px; border-width: 2px; border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
#wallet-slot .ws-btn.ws-on { background: var(--paper); color: var(--ink); }
.topbar .wrap #wallet-slot { order: 2; }
.cell.sponsored { box-shadow: inset 0 0 0 2px #fff; }
.cell.sponsored::after { content: ''; position: absolute; right: -2px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink); }
.tag.sponsor { background: #fff; }
@media (max-width: 760px) { .topbar .wrap { gap: 8px; } .topbar .chip { order: 3; } #wallet-slot { order: 2; } }
