/* Palette taken from the logo: pale mint line art (#b4dccc) on near-black (#040404). */
:root {
  --bg: #040404;
  --panel: #0a0e0c;
  --panel-2: #111814;
  --line: #1f2e28;
  --line-hi: #3b5a4e;
  --text: #e4f2ec;
  --muted: #7f9990;
  --accent: #b4dccc;
  --accent-2: #8fd3b8;
  --accent-deep: #2e4a40;
  --up: #7cf0b0;
  --down: #ff7b7b;
  --warn: #f3c969;
  --radius: 0px;
  --pixel: 'Silkscreen', 'Courier New', monospace;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
}
a { color: inherit; text-decoration: none; }
h1, h2 { margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.1rem; }
code.mono { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--panel-2); padding: .1em .4em; border-radius: 6px; }
.muted { color: var(--muted); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }
.wrap.narrow { max-width: 640px; }

/* topbar */
.topbar { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(11,13,16,.92); backdrop-filter: blur(6px); z-index: 20; }
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 20px; height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; flex-shrink: 0; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: #000; image-rendering: auto; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.nav a.on, .nav a:hover { color: var(--text); background: var(--panel-2); }
.top-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mode-pill.live { color: var(--up); border-color: color-mix(in srgb, var(--up) 40%, transparent); }
.mode-pill.live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--up); margin-right: 6px; vertical-align: 1px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.mode-pill { font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }

.tape { border-bottom: 1px solid var(--line); overflow: hidden; background: var(--panel); }
.tape-track { display: flex; gap: 18px; padding: 7px 0; white-space: nowrap; animation: scroll 40s linear infinite; width: max-content; }
.tape:hover .tape-track { animation-play-state: paused; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tape-item { display: inline-flex; gap: 6px; align-items: baseline; font-size: .82rem; padding: 0 10px; }
.tape-sep { color: var(--line); }
.tape .c.up { color: var(--up); } .tape .c.down { color: var(--down); }

/* buttons + forms */
.btn { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 9px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--line)); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b0d10; border: none; }
.btn-lg { padding: 12px 18px; font-size: 1rem; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-wallet { display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-wallet img { border-radius: 4px; }
.err a { color: inherit; text-decoration: underline; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: .85rem; }
.btn-wallet .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up); margin-right: 6px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.input, .textarea { width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 10px 12px; font: inherit; }
.input:focus, .textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.input-affix { position: relative; }
.input-affix .input { padding-right: 44px; }
.suf-t { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.presets { display: flex; gap: 6px; margin-top: 8px; }
.presets button { flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px; cursor: pointer; font: inherit; }
.presets button:hover, .presets button.on { border-color: var(--accent); }
.hint { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.err { background: color-mix(in srgb, var(--down) 15%, transparent); border: 1px solid color-mix(in srgb, var(--down) 40%, transparent); color: var(--down); padding: 8px 10px; border-radius: 8px; margin-bottom: 10px; font-size: .88rem; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 10px; }
.seg button { flex: 1; background: var(--panel); border: none; color: var(--muted); padding: 8px; cursor: pointer; font: inherit; font-weight: 600; }
.seg button.on { background: var(--panel-2); color: var(--text); }
.note { font-size: .85rem; color: var(--muted); }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card.boot { text-align: center; padding: 60px 20px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat .k { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat .v { font-size: 1.4rem; font-weight: 700; margin-top: 4px; }
.stat .v small { font-size: .7rem; color: var(--muted); font-weight: 600; margin-left: 3px; }
.stat .s { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col > * { min-width: 0; } /* let grid columns shrink; wide tables scroll inside .table-wrap instead */
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
/* Phones: the nav drops to its own row; the CA badge stays up top. */
@media (max-width: 560px) {
  .topbar-in { gap: 6px 10px; height: auto; padding-block: 8px; flex-wrap: wrap; justify-content: space-between; }
  .nav { order: 3; flex-basis: 100%; scrollbar-width: none; }
  .nav a { padding: 6px 10px; }
  .hero h1 { font-size: 1.8rem; }
}

/* hero */
.hero { padding: 28px 4px 8px; }
.hero h1 { font-size: 2.3rem; line-height: 1.1; }
.hero p { color: var(--muted); max-width: 600px; line-height: 1.6; }
.hero-cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* avatars */
.av { display: inline-flex; align-items: center; justify-content: center; width: var(--s, 34px); height: var(--s, 34px); border-radius: 50%; color: #fff; font-weight: 700; font-size: calc(var(--s, 34px) * .38); flex-shrink: 0; }
.av-dot { background: var(--panel-2); }

/* agent cards / grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.agent-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: block; }
.agent-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ac-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ac-head b { display: block; }
.ac-head small { color: var(--muted); font-size: .8rem; }
.ac-head .status { margin-left: auto; }
.ac-stats { display: flex; justify-content: space-between; margin-bottom: 10px; }
.ac-stats > div { display: flex; flex-direction: column; }
.ac-stats .k { font-size: .72rem; color: var(--muted); }
.ac-stats .v { font-weight: 700; }
.ac-foot { display: flex; gap: 6px; }

.status { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; }
.status-active { background: color-mix(in srgb, var(--up) 18%, transparent); color: var(--up); }
.status-paused { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.status-failed { background: color-mix(in srgb, var(--down) 18%, transparent); color: var(--down); }
.tag { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: .74rem; font-weight: 600; color: var(--muted); }
.tag.strat { color: var(--accent-2); }
.tag.agent-coin { margin-left: 6px; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.up { color: var(--up); } .down { color: var(--down); }

/* feed */
.feed { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.feed-row { display: grid; grid-template-columns: 46px 1fr 72px 64px; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: .85rem; }
.feed-row:last-child { border-bottom: none; }
.fr-type { font-size: .68rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; text-align: center; }
.fr-type.buy { background: color-mix(in srgb, var(--up) 20%, transparent); color: var(--up); }
.fr-type.sell { background: color-mix(in srgb, var(--down) 20%, transparent); color: var(--down); }
.fr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-coin { color: var(--muted); }
.fr-pnl { text-align: right; font-weight: 600; }
.fr-ago { color: var(--muted); font-size: .78rem; text-align: right; }
.feed-empty { color: var(--muted); padding: 20px 6px; text-align: center; }

.lead-list { display: flex; flex-direction: column; gap: 2px; }
.lead-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.lead-row:last-child { border-bottom: none; }
.lead-no { color: var(--muted); font-weight: 700; width: 16px; }
.lead-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-pnl { font-weight: 700; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid var(--line); }
.table td small { display: block; color: var(--muted); font-size: .78rem; }
.table tr:last-child td { border-bottom: none; }

/* agent hero */
.agent-hero { display: flex; align-items: center; gap: 14px; }
.ah-info h1 { font-size: 1.4rem; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ah-info p { color: var(--muted); margin: 0; font-size: .9rem; }
.range-bar { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin: -6px 0 16px; }
.range-fill { height: 100%; }
.range-fill.up { background: var(--up); } .range-fill.down { background: var(--down); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.agent-hero { flex-wrap: wrap; }
.agent-hero .actions { margin-left: auto; }

/* strategy pickers */
.strat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.strat-opt, .cust-new { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--text); font: inherit; }
.strat-opt b, .cust-new b { display: block; font-size: .9rem; }
.strat-opt small, .cust-new small { color: var(--muted); font-size: .78rem; }
.strat-opt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.strat-opt em { font-style: normal; font-size: .68rem; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.risk-low, .risk-medium { color: var(--up); background: color-mix(in srgb, var(--up) 16%, transparent); }
.risk-high { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.risk-extreme { color: var(--down); background: color-mix(in srgb, var(--down) 16%, transparent); }
.cust-row { display: flex; gap: 8px; align-items: center; grid-column: 1 / -1; }
.cust-row .strat-opt { flex: 1; }

/* card headers */
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card-head .more { color: var(--accent); font-size: .85rem; font-weight: 600; }
.section-title { margin-top: 28px; }
h3.sub { font-size: .9rem; margin: 14px 0 6px; color: var(--muted); }
.small { font-size: .85rem; }
.click-row { cursor: pointer; }
.click-row:hover td { background: var(--panel-2); }
.table td small.up { color: var(--up); }

/* chips (filters) */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chips button { background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; }
.chips button.on { border-color: var(--accent); color: var(--accent); }

/* radar picks */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 6px; }
.pick-grid .pick { margin-bottom: 0; }
.pick-stack { display: flex; flex-direction: column; gap: 10px; }
.pick-stack .pick { margin-bottom: 0; background: var(--panel-2); }
.pick { padding: 14px; }
.pick-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pick-id { flex: 1; min-width: 0; }
.pick-id b { display: block; }
.pick-id small { color: var(--muted); font-size: .78rem; }
.score-badge { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.score-badge.hot { background: color-mix(in srgb, var(--up) 20%, transparent); color: var(--up); }
.score-badge.warm { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.score-badge.cold { background: var(--panel-2); color: var(--muted); }
.pick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: .82rem; margin-bottom: 8px; }
.pick-stats span { display: flex; flex-direction: column; }
.pick-stats small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 420px) { .pick-stats { grid-template-columns: repeat(2, 1fr); } }
.pros, .cons, .notes { list-style: none; margin: 6px 0; padding: 0; font-size: .84rem; }
.pros li, .cons li, .notes li { padding-left: 18px; position: relative; margin: 3px 0; }
.pros li::before { content: '+'; position: absolute; left: 3px; color: var(--up); font-weight: 800; }
.cons li::before { content: '!'; position: absolute; left: 5px; color: var(--warn); font-weight: 800; }
.notes li::before { content: '›'; position: absolute; left: 4px; color: var(--accent); font-weight: 800; }
.cons li { color: color-mix(in srgb, var(--warn) 75%, var(--text)); }
.research { font-size: .78rem; border-radius: 8px; padding: 6px 9px; margin: 4px 0 6px; border: 1px solid var(--line); color: var(--muted); }
.research b { margin-right: 4px; }
.research.r-pass { border-color: color-mix(in srgb, var(--up) 35%, var(--line)); } .research.r-pass b { color: var(--up); }
.research.r-warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); } .research.r-warn b { color: var(--warn); }
.research.r-rug { border-color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--text); } .research.r-rug b { color: var(--down); }
.log-review .log-kind { background: color-mix(in srgb, var(--accent-2) 18%, transparent); color: var(--accent-2); }
.pick-foot { font-size: .78rem; color: var(--accent-2); margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; }
.pick-foot a { color: var(--accent); font-weight: 600; }
.tag.stage-new { color: var(--warn); } .tag.stage-young { color: var(--accent); } .tag.stage-established { color: var(--up); }
.score-chip { font-size: .72rem; font-weight: 800; color: var(--accent); }

/* narrative heat */
.heat-list { display: flex; flex-direction: column; gap: 8px; }
.heat-row { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; }
.heat-name b { display: block; font-size: .9rem; }
.heat-name small { color: var(--muted); font-size: .74rem; }
.heat-bars { width: 100%; height: 26px; }
.heat-bars .hot { fill: var(--up); } .heat-bars .warm { fill: var(--warn); } .heat-bars .cold { fill: var(--line); }
.heat-score { font-weight: 800; font-size: 1.15rem; text-align: right; line-height: 1.1; }
.heat-score small { display: block; font-size: .72rem; font-weight: 700; }
.heat-score.hot { color: var(--up); } .heat-score.warm { color: var(--warn); } .heat-score.cold { color: var(--muted); }

/* the Worker's log */
.log { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.log-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: start; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: none; }
.log-row p { margin: 0; font-size: .86rem; }
.log-kind { font-size: .64rem; font-weight: 800; letter-spacing: .03em; padding: 3px 0; border-radius: 6px; text-align: center; background: var(--panel-2); color: var(--muted); }
.log-entry .log-kind, .log-kind.good { background: color-mix(in srgb, var(--up) 20%, transparent); color: var(--up); }
.log-exit .log-kind { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.log-lesson .log-kind { background: color-mix(in srgb, var(--accent-2) 22%, transparent); color: var(--accent-2); }
.log-mode .log-kind, .log-kind.bad { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.log-kind.bad { background: color-mix(in srgb, var(--down) 18%, transparent); color: var(--down); }
.fr-name small { color: var(--muted); font-size: .76rem; margin-left: 4px; }

/* charts */
.chart { width: 100%; height: 120px; display: block; }
.chart .line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart.up .line { stroke: var(--up); } .chart.down .line { stroke: var(--down); }
.chart .base { stroke: var(--line); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.chart-empty { color: var(--muted); padding: 30px 0; text-align: center; font-size: .9rem; }
.mode-line { color: var(--muted); font-size: .88rem; margin: 10px 0 0; }
.mode-line b { color: var(--text); }

/* brain level */
.brain { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--panel)), color-mix(in srgb, var(--accent-2) 12%, var(--panel))); }
.brain-lvl { width: 58px; height: 58px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b0d10; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; }
.brain-lvl span { font-size: .62rem; font-weight: 800; letter-spacing: .08em; }
.brain-lvl b { font-size: 1.6rem; }
.brain-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.brain-info small { color: var(--muted); font-size: .8rem; }
.brain-bar { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.brain-bar div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* trust bars */
.trust { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.trust > div { flex: 1; height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; position: relative; }
.trust-fill { height: 100%; }
.trust-fill.up { background: var(--up); } .trust-fill.down { background: var(--down); }
.trust span { font-weight: 700; font-size: .82rem; width: 42px; text-align: right; }

/* goals */
.goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.goal-grid > div { display: flex; flex-direction: column; gap: 3px; }
.goal-grid b { font-size: 1.25rem; }
.goal-grid small { color: var(--muted); font-size: .78rem; }
.log-goal .log-kind { background: color-mix(in srgb, var(--up) 20%, transparent); color: var(--up); }

/* coach */
.coach { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.coach p { color: var(--text); }
.coach-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.coach-head b { display: block; }
.coach-head small { color: var(--muted); font-size: .8rem; }
.grade { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 8px; font-weight: 800; }
.coach-head .grade { min-width: 44px; height: 44px; font-size: 1.2rem; }
.grade-A, .grade-B { background: color-mix(in srgb, var(--up) 22%, transparent); color: var(--up); }
.grade-C { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.grade-D, .grade-F { background: color-mix(in srgb, var(--down) 22%, transparent); color: var(--down); }
.trader-score { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.trader-score .big { font-size: 2.2rem; font-weight: 800; }
.trader-score b { display: block; }
.trader-score small { color: var(--muted); font-size: .8rem; }

/* how page */
.how ul.rules { padding-left: 18px; }
.how ul.rules li { margin-bottom: 8px; }
.how a { color: var(--accent); }

/* how page */
.callout { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--warn); padding: 12px 14px; border-radius: 8px; }
.how-strats { display: flex; flex-direction: column; gap: 10px; }
.how-strat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.how-strat p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; }
.modal-wide { max-width: 620px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-head .x { background: none; border: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal-body { padding: 16px; }
.modal-body p { color: var(--muted); font-size: .9rem; }
.progress { list-style: none; margin: 0 0 10px; padding: 0; }
.progress li { display: flex; gap: 10px; align-items: center; padding: 6px 0; color: var(--muted); }
.progress li .ic { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .7rem; }
.progress li.doing { color: var(--text); }
.progress li.done .ic { background: var(--up); border-color: var(--up); color: #0b0d10; }
.progress li.fail .ic { background: var(--down); border-color: var(--down); color: #0b0d10; }

/* toasts */
.toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: 340px; }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: rise .18s ease-out; }
.toast b { display: block; font-size: .88rem; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.foot { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .8rem; }

.log-smart .log-kind { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }

.rule-changed td { background: color-mix(in srgb, var(--accent-2) 8%, transparent); }
.brain-link { color: var(--accent); font-weight: 600; font-size: .85rem; white-space: nowrap; }

.brain { flex-wrap: wrap; }
.brain-info { min-width: 200px; }
@media (max-width: 560px) { .brain-link { flex-basis: 100%; } }

.btn-wallet .dot.guest { background: var(--muted); }

.wallet-line { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.wallet-line a { color: var(--accent); font-weight: 600; }

/* ═════════════════════ PIXEL WORKER THEME ═════════════════════
   Built around the logo: pixel-art line work in pale mint on black.
   Square corners, 2px "pixel" borders, chunky offset shadows, a pixel
   font for headings and labels, monospace for everything else. */

body {
  font: 14px/1.6 var(--mono);
  background-color: var(--bg);
  /* faint blueprint grid, like graph paper under the line art */
  background-image:
    linear-gradient(rgba(180, 220, 204, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 220, 204, .035) 1px, transparent 1px);
  background-size: 24px 24px;
}
::selection { background: var(--accent); color: #040404; }
h1, h2, h3 { font-family: var(--pixel); font-weight: 400; letter-spacing: .02em; }
h1 { font-size: 1.55rem; line-height: 1.25; }
h2 { font-size: .98rem; color: var(--accent); }
code.mono { border-radius: 0; background: var(--panel-2); border: 1px solid var(--line); font-family: var(--mono); }

/* top bar */
.topbar { background: rgba(4, 4, 4, .92); border-bottom: 2px solid var(--line); }
.brand { gap: 10px; }
.brand-logo { width: 40px; height: 40px; border-radius: 0; border: 2px solid var(--line-hi); background: #040404; }
.brand-name { font-family: var(--pixel); font-size: 1.2rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.nav a { border-radius: 0; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; border: 2px solid transparent; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.on { background: var(--panel-2); color: var(--accent); border-color: var(--line-hi); }
.mode-pill { border-radius: 0; font-family: var(--pixel); font-size: .62rem; letter-spacing: .06em; border-width: 2px; }
.mode-pill.live::before { border-radius: 0; }

/* ticker */
.tape { background: #070a09; border-bottom: 2px solid var(--line); }
.tape-item b { color: var(--accent); font-weight: 600; }
.tape-sep { color: var(--line-hi); }

/* buttons: flat mint blocks with a chunky pixel shadow */
.btn { border-radius: 0; border: 2px solid var(--line-hi); background: var(--panel); font-family: var(--mono); font-weight: 600; transition: transform .06s, box-shadow .06s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent); color: #040404; border: 2px solid var(--accent);
  box-shadow: 4px 4px 0 var(--accent-deep); font-family: var(--pixel); font-weight: 700; letter-spacing: .04em;
}
.btn-primary:hover { color: #040404; background: #c8ecdd; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--accent-deep); }
.btn-primary:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--accent-deep); }
.btn-ghost { background: transparent; }
.btn-wallet { font-size: .8rem; }
.btn-wallet .dot { border-radius: 0; }

/* forms */
.input, .textarea { border-radius: 0; border: 2px solid var(--line); background: #070a09; font-family: var(--mono); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); }
.presets button, .seg, .seg button, .chips button, .cs-bases button { border-radius: 0; }
.presets button { border-width: 2px; font-family: var(--mono); }
.chips button { border-width: 2px; font-family: var(--mono); text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; }
.chips button.on { background: var(--accent); color: #040404; border-color: var(--accent); }
.err { border-radius: 0; border-width: 2px; }
.field label { text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }

/* cards: square, 2px borders, a small mint corner mark like a pixel frame */
.card { border-radius: 0; border: 2px solid var(--line); background: var(--panel); position: relative; }
.card::before, .card::after { content: ''; position: absolute; width: 8px; height: 8px; border-color: var(--line-hi); border-style: solid; pointer-events: none; }
.card::before { top: -2px; left: -2px; border-width: 2px 0 0 2px; }
.card::after { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; }
.stat .k { font-family: var(--pixel); font-size: .62rem; letter-spacing: .08em; color: var(--muted); }
.stat .v { font-family: var(--mono); font-weight: 700; font-size: 1.45rem; color: var(--text); }
.card-head .more { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }

/* hero: text + the big logo */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: center; padding: 28px 0 18px; }
.hero-kicker { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .1em; margin-bottom: 12px; }
.hero h1 { font-size: 2.4rem; line-height: 1.12; color: var(--text); text-shadow: 0 0 22px rgba(180, 220, 204, .18); }
.hero p { font-size: .92rem; max-width: 620px; }
.cursor::after { content: '_'; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: 280px; height: 280px; border: 2px solid var(--line-hi); box-shadow: 8px 8px 0 var(--accent-deep), 0 0 60px rgba(180, 220, 204, .10); image-rendering: auto; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; justify-content: flex-start; }
  .hero-art img { width: 150px; height: 150px; box-shadow: 5px 5px 0 var(--accent-deep); }
  .hero h1 { font-size: 1.7rem; }
}

/* brain level: a pixel badge */
.brain { background: var(--panel); border-color: var(--line-hi); }
.brain-lvl { border-radius: 0; background: var(--accent); box-shadow: 4px 4px 0 var(--accent-deep); }
.brain-lvl span, .brain-lvl b { font-family: var(--pixel); }
.brain-info b { font-family: var(--pixel); font-weight: 400; color: var(--accent); font-size: .9rem; }
.brain-bar { border-radius: 0; height: 8px; background: #070a09; border: 1px solid var(--line); }
.brain-bar div { background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 8px); }

/* small pieces */
.av { border-radius: 0; font-family: var(--pixel); font-weight: 400; box-shadow: 3px 3px 0 rgba(0, 0, 0, .6); }
.tag, .status { border-radius: 0; font-family: var(--mono); }
.status { font-family: var(--pixel); font-size: .6rem; letter-spacing: .06em; }
.score-badge { border-radius: 0; font-family: var(--pixel); border: 2px solid currentColor; }
.grade { border-radius: 0; font-family: var(--pixel); }
.log-kind { border-radius: 0; font-family: var(--pixel); font-size: .56rem; letter-spacing: .04em; }
.fr-type { border-radius: 0; font-family: var(--pixel); font-size: .58rem; }
.research { border-radius: 0; border-width: 2px; }
.coach { border-radius: 0; border-width: 2px; }
.trust > div { border-radius: 0; }
.range-bar, .heat-bars { border-radius: 0; }
.table th { font-family: var(--pixel); font-size: .58rem; letter-spacing: .06em; font-weight: 400; }
.chart .line { stroke-width: 2.5; }
.chart.up .line { stroke: var(--accent); }
.callout { border-radius: 0; border: 2px solid var(--line); border-left: 4px solid var(--accent); }
.how-strat { border-radius: 0; border-width: 2px; }
.how h2 { margin-top: 1.6em; }

/* modals + toasts */
.modal { border-radius: 0; border: 2px solid var(--line-hi); box-shadow: 8px 8px 0 var(--accent-deep); }
.modal-head { border-bottom: 2px solid var(--line); }
.modal-head h3 { font-family: var(--pixel); font-weight: 400; color: var(--accent); }
.toast { border-radius: 0; border: 2px solid var(--line-hi); box-shadow: 5px 5px 0 var(--accent-deep); }
.toast b { color: var(--accent); }

/* footer */
.foot { border-top: 2px solid var(--line); margin-top: 20px; font-size: .74rem; }
.foot b { font-family: var(--pixel); color: var(--accent); font-weight: 400; }

/* narrative heat in the logo's mint shades */
.heat-row { grid-template-columns: 160px 1fr 52px; }
.heat-bars .hot { fill: var(--accent); } .heat-bars .warm { fill: #5e8f7d; } .heat-bars .cold { fill: var(--line); }
.heat-score.hot { color: var(--accent); } .heat-score.warm { color: #9fc4b5; }
@media (max-width: 420px) { .heat-row { grid-template-columns: 120px 1fr 44px; } }
.score-badge.hot { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.score-badge.warm { color: #9fc4b5; background: transparent; }

/* Worker avatars: the logo with the Worker's number */
.av-worker { position: relative; background: #040404 !important; border: 2px solid var(--line-hi); overflow: visible; }
.av-worker img { width: 100%; height: 100%; display: block; }
.av-worker i { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-family: var(--pixel); font-size: calc(var(--s) * .26); min-width: calc(var(--s) * .42); padding: 1px 3px; text-align: center; background: var(--accent); color: #040404; box-shadow: 2px 2px 0 var(--accent-deep); line-height: 1.2; }

.goal-grid small b { font-size: inherit; font-weight: 600; }
