:root {
  --bg: #0a0a0b;
  --surface: rgba(18, 18, 20, 0.72);
  --raised: rgba(28, 28, 31, 0.9);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #ededef;
  --muted: #8b8b94;
  --faint: #55555d;
  --gold: #c9a86a;
  --gold-dim: rgba(201, 168, 106, 0.14);
  --long: #3fb68b;
  --long-dim: rgba(63, 182, 139, 0.12);
  --short: #e0626a;
  --short-dim: rgba(224, 98, 106, 0.12);
  --warn: #d6a54a;
  --sans: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 400 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: calc(76px + var(--safe-b));
}
/* eagle backdrop: one fixed layer behind everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 60% at 85% -10%, rgba(201, 168, 106, 0.10), transparent 60%),
    radial-gradient(90% 50% at 50% 120%, rgba(201, 168, 106, 0.05), transparent 70%),
    var(--bg);
}
.eagle-bg {
  position: fixed; z-index: -1; pointer-events: none;
  bottom: 40px; left: -160px; width: 520px; height: 520px;
  background: url("/static/eagle.svg") no-repeat center / contain;
  opacity: 0.05; transform: scaleX(-1);
  animation: eagle-in 1.6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes eagle-in { from { opacity: 0; transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) { .eagle-bg { animation: none; } }
body::after {   /* hairline grid, barely visible */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 60% at 70% 20%, #000, transparent);
  -webkit-mask-image: radial-gradient(80% 60% at 70% 20%, #000, transparent);
}
html, body { background: var(--bg); }
body { background: transparent; isolation: isolate; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: rgba(10, 10, 11, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.24em; }
.mark { width: 24px; height: 24px; fill: rgba(201, 168, 106, 0.08); stroke: var(--gold); stroke-width: 1.15; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 7px rgba(201, 168, 106, 0.22)); }
.live { display: flex; align-items: center; gap: 8px; font: 500 11px var(--mono); color: var(--muted); letter-spacing: 0.04em; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.sound-toggle { border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 10px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.sound-toggle.on { color: var(--gold); border-color: rgba(201, 168, 106, .55); background: var(--gold-dim); }
.live.ok i { background: var(--long); box-shadow: 0 0 0 3px var(--long-dim); }
.live.warn i { background: var(--warn); box-shadow: 0 0 0 3px rgba(214, 165, 74, 0.14); }

main { max-width: 620px; margin: 0 auto; padding: 18px 16px 8px; }

/* typography */
.eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.h-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 10px; }
.h-sec .eyebrow { color: var(--muted); }
.h-sec small { font-size: 11px; color: var(--faint); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.list, .seg, .search { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.card + .card { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > .card { margin: 0; }
.stat .eyebrow { font-size: 10px; }
.stat .v { margin-top: 8px; font: 500 20px var(--mono); letter-spacing: -0.02em; }
.stat .s { margin-top: 2px; font-size: 12px; color: var(--muted); }

/* hero */
.hero { padding: 20px 18px 18px; position: relative; overflow: hidden; }
.hero.eagle {   /* overview hero: the eagle stares out from the right */
  background:
    radial-gradient(60% 80% at 78% 38%, rgba(201, 168, 106, 0.10), transparent 70%),
    linear-gradient(160deg, rgba(22, 20, 16, 0.9), rgba(12, 12, 13, 0.92));
  border-color: rgba(201, 168, 106, 0.2);
  min-height: 260px; display: flex; flex-direction: column; justify-content: space-between;
}
.hero-eagle {
  position: absolute; right: -78px; top: -44px; width: 340px; height: 340px; object-fit: contain;
  opacity: 0.9; pointer-events: none; user-select: none;
  mask-image: linear-gradient(200deg, #000 45%, transparent 85%);
  -webkit-mask-image: linear-gradient(200deg, #000 45%, transparent 85%);
  animation: eagle-in 1.4s cubic-bezier(.2, .8, .2, 1) both;
}
.hero-text { position: relative; z-index: 1; }
.price .unit { font: 500 12px var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-left: 10px; }
/* per-tab eagle placement */
.art-eagle-eye .hero-eagle { width: 300px; height: 190px; right: -40px; top: 10px; opacity: 1; mask-image: linear-gradient(270deg, #000 55%, transparent 100%); -webkit-mask-image: linear-gradient(270deg, #000 55%, transparent 100%); }
.art-eagle-dive .hero-eagle { width: 270px; height: 260px; right: -40px; top: -18px; opacity: 1; }
.art-eagle-flying { min-height: 250px; }
.art-eagle-flying .hero-eagle { width: 420px; height: 224px; right: -90px; top: -14px; mask-image: none; -webkit-mask-image: none; opacity: 0.75; animation: eagle-in 1.4s cubic-bezier(.2, .8, .2, 1) both, glide 7s ease-in-out 1.4s infinite; }
.art-crest { min-height: 350px; justify-content: flex-end; }
.art-crest .hero-eagle {
  width: 300px; height: 300px; right: calc(50% - 150px); top: -14px; opacity: 1;
  mask-image: linear-gradient(180deg, #000 75%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent 100%);
  filter: drop-shadow(0 8px 24px rgba(201, 168, 106, 0.32));
  animation: eagle-in 1.4s cubic-bezier(.2, .8, .2, 1) both, glide 7s ease-in-out 1.4s infinite;
}
.art-crest { background-image: radial-gradient(ellipse at 50% 34%, rgba(201, 168, 106, 0.12), transparent 56%), linear-gradient(160deg, rgba(22, 20, 16, 0.96), rgba(12, 12, 13, 0.98)); }
.art-crest .hero-text:first-of-type { margin-top: 184px; }
.art-eagle-head .hero-eagle { width: 250px; height: 190px; right: -66px; top: 22px; opacity: 1; }
.art-eagle-wing .hero-eagle { width: 260px; height: 230px; right: -36px; top: -10px; }
.art-eagle-flying .hero-text { margin-top: 110px; }
.art-eagle-flying { justify-content: flex-end; }
@keyframes glide { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .hero-eagle { animation: none !important; } }
.close-line { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }
.close-line .num { font-size: 13px; color: var(--gold); }
.hero::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.45;
}
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.price { font: 500 34px/1.1 var(--mono); letter-spacing: -0.03em; margin-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font: 500 10.5px var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.tag.long { color: var(--long); border-color: transparent; background: var(--long-dim); }
.tag.short { color: var(--short); border-color: transparent; background: var(--short-dim); }
.tag.gold { color: var(--gold); border-color: transparent; background: var(--gold-dim); }
.countdown { text-align: right; }
.countdown .v { font: 500 18px var(--mono); margin-top: 6px; }

/* rows / lists */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; padding: 13px 16px; text-align: left; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
button.row:active { background: var(--raised); }
.sym { font-weight: 600; font-size: 14px; letter-spacing: 0.01em; }
.sym small { font-weight: 400; color: var(--faint); margin-left: 2px; }
.sub { margin-top: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right { text-align: right; }
.right .num { font-size: 13.5px; }

.scorebar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 5px; }
.scorebar .track { width: 56px; height: 3px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.scorebar .fill { height: 100%; background: var(--muted); }
.scorebar .fill.hi { background: var(--gold); }
.scorebar span { font: 500 11.5px var(--mono); color: var(--muted); min-width: 28px; text-align: right; }

/* controls */
.seg {
  display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; padding: 7px 12px; border-radius: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.search {
  width: 100%; margin-top: 10px; height: 40px; padding: 0 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font: 14px var(--sans); outline: none;
}
.search:focus { border-color: var(--line-strong); }
.search::placeholder { color: var(--faint); }

/* meters */
.meter { margin-top: 12px; }
.meter:first-of-type { margin-top: 4px; }
.meter-h { display: flex; justify-content: space-between; font-size: 12.5px; }
.meter-h .num { color: var(--text); }
.meter .track { height: 4px; margin-top: 6px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.meter .fill { height: 100%; background: var(--gold); border-radius: 2px; }

/* Compact exchange-flow pulse */
.flow-card { padding: 14px; }
.flow-pulse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flow-pulse-grid > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.flow-value { margin-top: 7px; font: 600 20px var(--mono); font-variant-numeric: tabular-nums; }
.flow-caption { margin-top: 12px; color: var(--faint); font-size: 11px; line-height: 1.45; }
.flow-events { margin-top: 8px; border-top: 1px solid var(--line); }
.flow-event { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.flow-event .sub { grid-column: 2 / -1; margin-top: -6px; }
.flow-event .tag { padding: 4px 7px; font-size: 10px; }
.flow-empty { padding: 18px 8px 6px; }
.flow-leader .right { max-width: 54%; }
.flow-leader .right .sub { white-space: normal; line-height: 1.35; }

.diverge { position: relative; width: 84px; height: 4px; background: var(--line-strong); border-radius: 2px; margin: 6px 0 0 auto; }
.diverge::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--faint); }
.diverge i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }

/* bottom tabs */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;   /* 5 tabs, 6 when Lab is shown */
}
.tabs button[hidden] { display: none; }
/* CJ-4 (premium, calmer): on phones show 4 tabs + More; News/Agents/Ghost/Lab live in the More sheet */
#moreTab { display: none; }
@media (max-width: 640px) {
  .tabs button.more-tab { display: none; }
  #moreTab { display: flex; }
}
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.more-grid button { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: var(--text); font: 600 14px Inter, sans-serif; text-align: left; }
.more-grid button.on { border-color: var(--gold); }
.more-grid svg { width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.more-grid small { display: block; color: var(--faint); font-weight: 400; font-size: 11.5px; margin-top: 2px; }
.tabs {
  padding: 8px 6px calc(8px + var(--safe-b));
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; color: var(--faint); font-size: 10.5px; letter-spacing: 0.02em; }
.tabs svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--text); }
.tabs button.on svg { stroke: var(--gold); }

/* sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.6); opacity: 0; pointer-events: none; transition: opacity .22s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 88vh; overflow-y: auto;
  max-width: 620px; margin: 0 auto;
  background: #111113; border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: 18px 18px 0 0; padding: 10px 18px calc(24px + var(--safe-b));
  transform: translateY(102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet.open { transform: none; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto 14px; }
.kv { display: grid; grid-template-columns: 1fr 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kv > div { padding: 12px; border-left: 1px solid var(--line); }
.kv > div:first-child { border-left: 0; }
.kv .v { font: 500 15px var(--mono); margin-top: 6px; }
.levels { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.levels .lv { display: flex; justify-content: space-between; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.levels .lv:first-child { border-top: 0; }
.note { font-size: 11.5px; color: var(--faint); margin-top: 8px; }
.vote { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.vote:first-child { border-top: 0; }
.vote .ev { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* coin chart */
.chart-wrap { margin-top: 18px; }
.chart-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.chart-tf { display: inline-flex; }
.chart-tf button { flex: 0 0 auto; padding: 5px 12px; font: 500 11px var(--mono); }
.chart-ind { display: flex; gap: 4px; }
.chart-ind button {
  padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--faint);
  font: 500 10.5px var(--sans); letter-spacing: 0.04em;
}
.chart-ind button.on { color: var(--gold); border-color: rgba(201, 168, 106, 0.35); background: var(--gold-dim); }
.chart-main { position: relative; height: 240px; }
.chart-rsi { position: relative; height: 84px; border-top: 1px solid var(--line); }
.chart-legend {
  position: absolute; top: 6px; left: 8px; z-index: 3; display: flex; gap: 10px; pointer-events: none;
  font: 500 10px var(--mono); color: var(--muted);
}
.chart {
  position: relative; min-height: 240px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, rgba(201, 168, 106, 0.035), transparent 60%), rgba(8, 8, 9, 0.6);
}
.chart-msg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--faint); }

/* states */
.boot { padding: 80px 24px; text-align: center; color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }
.empty { padding: 28px 16px; text-align: center; color: var(--faint); font-size: 13px; }
.skel { height: 64px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface), var(--raised), var(--surface)); background-size: 200% 100%; animation: sh 1.4s infinite; }
.skel + .skel { margin-top: 10px; }
@keyframes sh { to { background-position: -200% 0; } }
.err { padding: 14px 16px; border: 1px solid rgba(224, 98, 106, 0.3); border-radius: var(--r); color: var(--short); font-size: 13px; }
.foot { margin: 26px 0 8px; text-align: center; font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }
.pos { color: var(--long); }
.neg { color: var(--short); }
.news-item .sub { white-space: normal; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--faint); }
.dot.HIGH { background: var(--gold); }
.dot.CRITICAL { background: var(--short); }

/* Small-phone layout: preserve readable controls and safe-area spacing. */
@media (max-width: 380px) {
  .top { padding-left: 12px; padding-right: 12px; }
  .brand { gap: 7px; font-size: 10px; letter-spacing: 0.18em; }
  main { padding-left: 12px; padding-right: 12px; }
  .hero { padding-left: 14px; padding-right: 14px; }
  .hero .price { font-size: 30px; }
  .flow-pulse-grid { gap: 6px; }
  .flow-pulse-grid > div { padding: 9px; }
  .flow-value { font-size: 17px; }
  .kv > div { padding: 10px 7px; }
  .chart-ind button { padding-left: 6px; padding-right: 6px; }
  .tabs button { font-size: 9.5px; }
}

/* Agent Hub: the bot's agents and veto process (paper only) */
.ag-live { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--long);
  box-shadow: 0 0 0 0 rgba(63, 182, 139, .6); animation: agPulse 1.8s infinite; vertical-align: 1px; }
@keyframes agPulse { 0% { box-shadow: 0 0 0 0 rgba(63, 182, 139, .55); } 70% { box-shadow: 0 0 0 9px rgba(63, 182, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 182, 139, 0); } }
.ag-funnel .fill { transform-origin: left; animation: agGrow .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0ms); }
@keyframes agGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ag-desk { padding: 0; overflow: hidden; }
.ag-desk + .ag-desk { margin-top: 10px; }
.ag-desk.signal { border-color: rgba(201, 168, 106, .45); box-shadow: 0 0 24px rgba(201, 168, 106, .08); }
.ag-desk > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; }
.ag-desk > summary::-webkit-details-marker { display: none; }
.ag-desk > summary .right { text-align: right; }
.ag-desk[open] > summary { border-bottom: 1px solid var(--line); }
.ag-flow { list-style: none; margin: 0; padding: 12px 16px 4px 34px; position: relative; }
.ag-flow::before { content: ""; position: absolute; left: 20px; top: 18px; bottom: 22px; width: 1px; background: linear-gradient(var(--gold), var(--line)); opacity: .5; }
.ag-flow > li { position: relative; padding: 0 0 14px; animation: agIn .35s ease both; }
.ag-flow > li:nth-child(2) { animation-delay: .06s; } .ag-flow > li:nth-child(3) { animation-delay: .12s; }
.ag-flow > li:nth-child(4) { animation-delay: .18s; } .ag-flow > li:nth-child(5) { animation-delay: .24s; } .ag-flow > li:nth-child(6) { animation-delay: .3s; }
@keyframes agIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ag-flow > li::before { content: ""; position: absolute; left: -18px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg, #0a0a0b); border: 1.5px solid var(--gold); }
.ag-flow > li.ok::before { border-color: var(--long); background: var(--long-dim); }
.ag-flow > li.stop::before { border-color: var(--short); background: var(--short-dim); }
.ag-flow > li.final.ok::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px rgba(201, 168, 106, .6); }
.ag-step { font-size: 13px; color: var(--text); }
.ag-step small { margin-left: 6px; color: var(--faint); font-size: 11.5px; }
.ag-step b.long { color: var(--long); } .ag-step b.short { color: var(--short); } .ag-step b.wait { color: var(--faint); }
.ag-why { white-space: normal; margin-top: 4px; line-height: 1.4; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ag-chip { font-size: 10.5px; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--faint); white-space: nowrap; }
.ag-chip b { font-weight: 600; margin-right: 4px; color: var(--text); }
.ag-chip.long { color: var(--long); background: var(--long-dim); border-color: transparent; }
.ag-chip.short { color: var(--short); background: var(--short-dim); border-color: transparent; }
.ag-open { display: block; width: calc(100% - 32px); margin: 0 16px 14px; padding: 9px; border-radius: 10px; border: 1px solid var(--line);
  color: var(--gold); font-size: 12.5px; background: var(--gold-dim); }
@media (prefers-reduced-motion: reduce) { .ag-live, .ag-funnel .fill, .ag-flow > li { animation: none; } }

/* Agent Hub: Habbo-style isometric eagle room */
.ag-room { margin-top: 12px; padding: 14px 10px 12px; overflow: hidden; background: var(--surface); }
.ag-topic { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 6px; }
.ag-coin { font-size: 15px; font-weight: 600; } .ag-coin small { color: var(--faint); font-weight: 400; }
.ag-coin .muted { font-size: 11.5px; font-weight: 400; margin-left: 4px; }
.hb-stage { position: relative; margin: 0 -4px; }
.hb-svg { display: block; width: 100%; height: auto; overflow: visible; }
.hb-tile.a { fill: #343b4b; } .hb-tile.b { fill: #2c3240; }
.hb-tile { stroke: #222734; stroke-width: .8; }
.hb-wall.l { fill: #565c73; } .hb-wall.r { fill: #474c60; }
.hb-wall { stroke: #c9a86a; stroke-opacity: .55; stroke-width: .9; stroke-linejoin: round; }
.hb-window { fill: #0f1a2e; stroke: #c9a86a; stroke-width: 1; opacity: .9; }
.hb-sign { font: 700 8px "JetBrains Mono", monospace; fill: #c9a86a; letter-spacing: 1px; }
.hb-screen { fill: #0d1422; stroke: #c9a86a; stroke-width: .8; filter: drop-shadow(0 0 4px rgba(201, 168, 106, .6)); }
.hb-tablecoin { font: 700 5.5px "JetBrains Mono", monospace; fill: #e8c46a; }
.hb-av { transition: transform .38s linear; }
.hb-tag { font: 600 6px Inter, sans-serif; fill: #d9d6cf; paint-order: stroke; stroke: #0a0a0b; stroke-width: 2px; opacity: 0; transition: opacity .2s; }
.hb-av.talk .hb-tag, .hb-room:hover .hb-tag { opacity: 1; }
.hb-sprite { animation: hbIdle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.hb-av:nth-child(2n) .hb-sprite { animation-delay: -.8s; } .hb-av:nth-child(3n) .hb-sprite { animation-delay: -1.5s; }
@keyframes hbIdle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
.hb-av.flip .hb-sprite { transform: scaleX(-1); animation: none; }
.hb-av.walk .hb-sprite { animation: hbStep .38s steps(2) infinite; }
.hb-av.walk.flip .hb-sprite { animation: hbStepFlip .38s steps(2) infinite; }
@keyframes hbStep { 0% { transform: translateY(0); } 50% { transform: translateY(-1.6px); } }
@keyframes hbStepFlip { 0% { transform: scaleX(-1) translateY(0); } 50% { transform: scaleX(-1) translateY(-1.6px); } }
.hb-leg, .hb-arm { transform-box: fill-box; transform-origin: 50% 0; }
.hb-av.walk .hb-leg.l, .hb-av.walk .hb-arm.r { animation: hbSwing .38s ease-in-out infinite alternate; }
.hb-av.walk .hb-leg.r, .hb-av.walk .hb-arm.l { animation: hbSwing .38s ease-in-out infinite alternate-reverse; }
@keyframes hbSwing { from { transform: rotate(18deg); } to { transform: rotate(-18deg); } }
.hb-av.talk .hb-arm.r { animation: hbWave .3s ease-in-out 6 alternate; }
@keyframes hbWave { from { transform: rotate(0); } to { transform: rotate(-120deg); } }
.hb-av.talk .hb-sprite { filter: drop-shadow(0 0 3px var(--c)); }
.hb-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: agBlink 4.2s infinite; }
.hb-av:nth-child(odd) .hb-eyes { animation-delay: -2.1s; }
@keyframes agBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.hb-crown { animation: agShine 2s ease-in-out infinite; } @keyframes agShine { 50% { filter: brightness(1.5); } }
.hb-av.stamp .hb-sprite { animation: hbStamp .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes hbStamp { 40% { transform: scale(1.35) rotate(-8deg); } }
/* Habbo chat: bubbles appear above the speaker and float up as new ones arrive */
.hb-chat { position: absolute; left: 0; right: 0; top: 34%; height: 0; pointer-events: none; z-index: 2; }
.hb-msg { position: absolute; top: 0; transform: translate(-50%, 8px); opacity: 0; white-space: nowrap; max-width: 96%;
  overflow: hidden; text-overflow: ellipsis; padding: 3px 9px 3px 4px; border-radius: 9px; font-size: 10.5px; color: #111;
  background: #fbfaf7; border: 1.5px solid #111; box-shadow: 0 2px 0 rgba(0, 0, 0, .45); display: flex; align-items: center; gap: 5px;
  transition: transform .35s ease, opacity .35s ease; }
.hb-msg.in { opacity: 1; transform: translate(-50%, 0); }
.hb-msg[data-lvl="3"], .hb-msg[data-lvl="4"] { opacity: .45; }
.hb-msg i { width: 12px; height: 12px; border-radius: 3px; flex: none; border: 1px solid #111; }
.hb-msg b { font-weight: 700; }
.hb-msg.long { background: #e9f8f1; } .hb-msg.short { background: #fdeced; }
.ag-verdict { margin: 10px 6px 0; padding: 9px 12px; border-radius: 10px; font-size: 12px; text-align: center; opacity: 0;
  transform: translateY(6px); transition: all .35s ease; border: 1px solid var(--line); min-height: 1em; }
.ag-verdict.show { opacity: 1; transform: none; }
.ag-verdict.go { color: #0a0a0b; background: var(--gold); border-color: var(--gold); font-weight: 600; box-shadow: 0 0 22px rgba(201, 168, 106, .35); }
.ag-verdict.stop { color: var(--short); background: var(--short-dim); border-color: transparent; }
@media (prefers-reduced-motion: reduce) { .hb-av { transition: none; } .hb-sprite, .hb-eyes, .hb-crown, .hb-leg, .hb-arm { animation: none !important; } }
/* Eagle office: desks, plants, bed, South Park faces */
.hb-rug { fill: #4a2f3a; stroke: #c9a86a; stroke-width: .8; stroke-opacity: .5; }
.hb-deskglyph { font: 700 5px "JetBrains Mono", monospace; fill: #1d4d1d; }
.hb-deskglyph.risk { fill: #f2efe8; font-size: 4px; }
.hb-nameplate { font: 700 2.6px Inter, sans-serif; fill: #3a2a12; }
.hb-leaves { animation: hbSway 5s ease-in-out infinite; animation-delay: calc(var(--sway, 0) * -1s); }
@keyframes hbSway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2.5deg); } }
.hb-av.type .hb-arm.l, .hb-av.type .hb-arm.r { animation: hbType .22s ease-in-out infinite alternate; }
.hb-av.type .hb-arm.r { animation-delay: -.11s; }
@keyframes hbType { from { transform: rotate(-35deg); } to { transform: rotate(-55deg); } }
.hb-mouth { transform-box: fill-box; transform-origin: 50% 0; }
.hb-av.talk .hb-mouth { animation: hbMouth .16s ease-in-out 10 alternate; }
@keyframes hbMouth { from { transform: scaleY(1); } to { transform: scaleY(3.2); } }
.hb-zzz { font: 700 6px Inter, sans-serif; fill: #bcd3ff; opacity: 0; }
.hb-av.sleep .hb-zzz { opacity: 1; animation: hbZzz 2.4s ease-in-out infinite; }
@keyframes hbZzz { 0% { transform: translate(0, 0); opacity: .2; } 50% { opacity: 1; } 100% { transform: translate(-4px, -8px); opacity: 0; } }
.hb-av.sleep .hb-sprite { animation: none; transform: rotate(-78deg) translate(4px, 2px); }
.hb-av.sleep .hb-eyes { animation: none; transform: scaleY(.15); }
.hb-av.sleep { transition: none; }
@media (prefers-reduced-motion: reduce) { .hb-leaves, .hb-zzz, .hb-mouth, .hb-av.type .hb-arm.l, .hb-av.type .hb-arm.r { animation: none !important; } }

/* agents sit on their office chair while working */
.hb-av.type .hb-sprite { animation: none; transform: translateY(3px); }
.hb-av.type.flip .hb-sprite { transform: scaleX(-1) translateY(3px); }
.hb-av.type .hb-leg { opacity: 0; }

/* the Chief stands out: bigger, gold ring, name always visible */
.hb-av.boss .hb-tag { opacity: 1; fill: #e8c46a; font-weight: 700; letter-spacing: .5px; }
.hb-bossring { animation: hbRing 2.4s ease-in-out infinite; }
@keyframes hbRing { 50% { stroke-opacity: .35; } }

/* office sound toggle + tappable agents + agent profile sheet */
.hb-sound { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--faint); }
.hb-sound.on { color: var(--gold); border-color: rgba(201, 168, 106, .55); background: var(--gold-dim); }
.hb-av { cursor: pointer; }
.ag-profile { display: flex; gap: 14px; align-items: center; margin: 6px 0 4px; }
.ag-portrait { width: 74px; height: 116px; flex: none; overflow: visible; }
.ag-portrait .hb-tag, .ag-portrait .hb-zzz, .ag-portrait .hb-bossring { display: none; }

/* angry Chief: red face, brows, frown, steam, shaking */
.hb-face { transition: fill .4s; }
.hb-angry { opacity: 0; transition: opacity .2s; }
.hb-av.angry .hb-angry { opacity: 1; }
.hb-av.angry .hb-mouth { opacity: 0; }
.hb-av.angry .hb-face { fill: #e2735f; }
.hb-steam circle { fill: #e9edf3; opacity: .9; }
.hb-av.angry .hb-steam circle { animation: hbSteam 1s ease-out infinite; }
.hb-av.angry .hb-steam circle:nth-child(2) { animation-delay: -.3s; } .hb-av.angry .hb-steam circle:nth-child(3) { animation-delay: -.55s; } .hb-av.angry .hb-steam circle:nth-child(4) { animation-delay: -.8s; }
@keyframes hbSteam { from { transform: translateY(0) scale(.6); opacity: .95; } to { transform: translateY(-9px) scale(1.4); opacity: 0; } }
.hb-av.angry .hb-sprite { animation: hbShake .12s linear infinite; }
.hb-av.angry.flip .hb-sprite { animation: hbShakeFlip .12s linear infinite; }
@keyframes hbShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1px); } 75% { transform: translateX(1px); } }
@keyframes hbShakeFlip { 0%, 100% { transform: scaleX(-1) translateX(0); } 25% { transform: scaleX(-1) translateX(-1px); } 75% { transform: scaleX(-1) translateX(1px); } }
.hb-steam circle { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) { .hb-av.angry .hb-sprite, .hb-av.angry .hb-steam circle { animation: none; } }

/* office v3: eagle mascot, LED ticker, wall clock, market-weather window */
.hb-eagle { transition: transform 1.7s cubic-bezier(.45, .05, .3, 1); pointer-events: none; }
.hb-eagle .eg-dir { transition: transform .2s; }
.hb-eagle.face-r .eg-dir { transform: scaleX(-1); }
.hb-eagle .eg-wing { transform-box: fill-box; transform-origin: 0% 100%; transition: transform .3s; }
.hb-eagle:not(.fly) .eg-wing { transform: scaleY(.45) rotate(12deg); }
.hb-eagle.fly .eg-wing.f { animation: egFlap .28s ease-in-out infinite alternate; }
.hb-eagle.fly .eg-wing.b { animation: egFlap .28s ease-in-out infinite alternate-reverse; }
@keyframes egFlap { from { transform: rotate(-38deg); } to { transform: rotate(26deg); } }
.hb-eagle.fly .eg-bob { animation: egHover 1.2s ease-in-out infinite; }
@keyframes egHover { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
.hb-eagle:not(.fly) .eg-bob { animation: egPerch 3.6s ease-in-out infinite; }
@keyframes egPerch { 0%, 88%, 100% { rotate: 0deg; } 92% { rotate: -8deg; } 96% { rotate: 4deg; } }
.hb-led { fill: #0b0b0d; stroke: #c9a86a; stroke-width: .8; }
.hb-ticker { font: 700 5.6px "JetBrains Mono", monospace; fill: #ffb84a; letter-spacing: .3px; }
.hb-tickmove { animation: hbTick 14s linear infinite; }
@keyframes hbTick { from { transform: translateX(var(--len, 120px)); } to { transform: translateX(calc(-1 * var(--tw, 200px))); } }
.hb-clockpanel { fill: #101216; stroke: #c9a86a; stroke-width: .7; }
.hb-clocklbl { font: 600 2.6px Inter, sans-serif; fill: #9aa3b0; letter-spacing: .3px; }
.hb-clock { font: 700 5px "JetBrains Mono", monospace; fill: #7dffb0; }
.hb-winframe { fill: #0f1a2e; stroke: #c9a86a; stroke-width: 1; }
.hb-weatherlbl { font: 600 3px Inter, sans-serif; fill: #d9d6cf; letter-spacing: .3px; }
.hb-sun { animation: hbSun 4s ease-in-out infinite; } @keyframes hbSun { 50% { opacity: .75; } }
.hb-rain path { animation: hbRain .7s linear infinite; } .hb-rain path:nth-child(2n) { animation-delay: -.35s; }
@keyframes hbRain { from { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(5px); opacity: 0; } }
.hb-fog { animation: hbFog 6s ease-in-out infinite alternate; } @keyframes hbFog { to { transform: translateX(4px); } }
.hb-bolt { animation: hbBolt 2.6s steps(1) infinite; } @keyframes hbBolt { 0%, 70%, 100% { opacity: 0; } 72%, 78% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hb-eagle { transition: none; } .hb-eagle *, .hb-tickmove, .hb-rain path, .hb-fog, .hb-bolt, .hb-sun { animation: none !important; } }

/* sitting at the desk: seen from behind, on the chair, typing on the laptop */
.hb-backhead { display: none; }
.hb-av.type .hb-backhead { display: inline; }
.hb-av.type .hb-eyes, .hb-av.type .hb-mouth, .hb-av.type .hb-angry { display: none; }
.hb-av.type .hb-sprite { animation: none; transform: translateY(5px); }
.hb-av.type.flip .hb-sprite { transform: scaleX(-1) translateY(5px); }
.hb-av.type .hb-tag { opacity: 0; }
.hb-screenglow { animation: hbGlow 2.2s ease-in-out infinite; } @keyframes hbGlow { 50% { opacity: .15; } }

/* typing: small quick taps instead of big swings */
.hb-av.type .hb-arm.l, .hb-av.type .hb-arm.r { animation: hbTap .18s ease-in-out infinite alternate; }
.hb-av.type .hb-arm.r { animation-delay: -.09s; }
@keyframes hbTap { from { transform: rotate(-4deg) translateY(0); } to { transform: rotate(4deg) translateY(-.8px); } }

/* replay slider */
.ag-replay { margin-top: 12px; }
.ag-replay input[type=range] { width: 100%; margin: 12px 0 4px; accent-color: var(--gold); }
.ag-replay-foot { display: flex; justify-content: space-between; align-items: center; color: var(--faint); }
.ag-live-btn { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; color: #0a0a0b; background: var(--gold); }

/* public track record */
.ledger { margin-bottom: 4px; }
.ledger-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; text-align: center; }
.ledger .num.big { font-size: 20px; font-weight: 600; }

/* R27 (owner 19 Oct: clearer buttons) - brighter labels, bigger icons, active tab gold with a soft pill */
.tabs button { color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 6px 0; border-radius: 12px; }
.tabs svg { width: 23px; height: 23px; stroke-width: 1.8; }
.tabs button.on { color: var(--gold); background: var(--gold-dim); }
.seg button { color: #b4b4bc; font-size: 13px; font-weight: 600; }
.seg button.on { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(201, 168, 106, .55); }
.sound-toggle { color: var(--text); font-size: 12px; padding: 8px 12px; }
.more-grid button { padding: 16px; font-size: 15px; }
.more-grid small { color: var(--muted); }
button.card { border: 1px solid rgba(201, 168, 106, .35); }
button.card:active { background: var(--gold-dim); }
