/* Thinkr — dark, aurora-cornered. Built against the impeccable anti-slop rules:
   no gradient text, no per-section uppercase eyebrows, no decorative glow, no
   identical glowing metric cards. One brand accent, weight-driven hierarchy. */
:root {
  --bg:            #0a0b0d;
  --bg-2:          #101114;
  --panel:         #141519;
  --panel-2:       #17181d;
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.17);
  --ink:           #f5f6f7;
  --ink-2:         #c7cbd0;
  --muted:         #888e96;
  --muted-2:       #5f656e;
  --neon:          #cdf03a;
  --neon-hi:       #e2ff6e;
  --neon-soft:     rgba(205,240,58,0.14);
  --blue:          #6b7078;
  --violet:        #6b7078;
  --magenta:       #6b7078;
  --orange:        #6b7078;
  --green:         #cdf03a;
  --red:           #ff5c6c;
  --radius:        14px;
  --radius-sm:     10px;
  --maxw:          1120px;
  font-synthesis: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: linear-gradient(180deg, #0c0d10 0%, #090a0c 55%, #060708 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* subtle neon wash — a single restrained glow, not a rainbow aurora */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(90% 60% at 50% -12%, rgba(205,240,58,0.10) 0%, rgba(205,240,58,0) 58%),
    radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 45%);
}

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* headings & hierarchy */
h2.head { font-size: clamp(24px, 3.4vw, 33px); font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
h2.head + .sub { color: var(--muted); font-size: 16px; margin-top: 6px; max-width: 60ch; }
.head-row { margin-bottom: 24px; }

.pos { color: var(--green); }
.neg { color: var(--red); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(5,6,10,0.82), rgba(5,6,10,0.3));
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand .logo { width: 28px; height: 28px; }
.brand .word { font-family: "Orbitron", -apple-system, sans-serif; font-weight: 700; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--neon); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 8px 13px; border-radius: 9px; transition: color .18s, background .18s; }
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.05); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em;
  padding: 12px 22px; border-radius: 11px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .22s, background .2s, border-color .2s;
}
.btn-primary { color: #0a0b0d; background: var(--neon); box-shadow: 0 6px 24px rgba(205,240,58,0.22); font-weight: 700; }
.btn-primary:hover { transform: translateY(-2px); background: var(--neon-hi); box-shadow: 0 10px 32px rgba(205,240,58,0.34); }
.btn-ghost { color: var(--ink); background: rgba(255,255,255,0.035); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }

/* hero */
.hero { padding: 92px 0 56px; }
.kicker { display:inline-flex; align-items:center; gap:9px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #9fb0d6; font-weight: 600; margin-bottom: 24px; }
.kicker i { width:6px; height:6px; border-radius:50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.hero h1 {
  font-size: clamp(56px, 8.5vw, 94px);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  color: #ffffff; text-wrap: balance;
}
.hero .subtitle { font-size: clamp(19px, 2.6vw, 25px); font-weight: 600; color: var(--ink-2); margin-top: 12px; letter-spacing: -0.015em; }
.hero .support { max-width: 58ch; color: var(--muted); font-size: 17px; margin-top: 20px; text-wrap: pretty; }
.hero .actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

section { padding: 40px 0; }

/* top metrics — a divided readout band, not four glowing cards */
.readout {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0));
  overflow: hidden;
}
.readout .cell { padding: 24px 24px; border-left: 1px solid var(--border); }
.readout .cell:first-child { border-left: none; }
.readout .k { font-size: 13px; color: var(--muted); font-weight: 500; }
.readout .v { font-size: 32px; font-weight: 800; letter-spacing: -0.035em; margin-top: 12px; }
.readout .v small { color: var(--muted-2); font-weight: 600; font-size: 18px; }
.readout .d { font-size: 13px; color: var(--muted); margin-top: 7px; }

/* agent cards — parallel entities, so cards earn it; full borders, no glow blobs */
.agents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.agent-card {
  display: flex; flex-direction: column;
  text-decoration: none; color: var(--ink);
  background: linear-gradient(168deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 22px 20px;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), border-color .2s, box-shadow .25s;
}
.agent-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 16px 44px rgba(0,0,0,.45); }
.agent-head { display: flex; align-items: center; gap: 13px; }
.agent-emblem { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 17px; border: 1px solid var(--border-strong); background: rgba(255,255,255,.03); overflow: hidden; flex: none; }
img.agent-emblem { object-fit: cover; }
.agent-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.agent-tag { font-size: 13.5px; color: var(--muted); margin-top: 1px; }
.rule { height: 2px; width: 34px; border-radius: 2px; margin: 18px 0 16px; }
.agent-card .rule { background: var(--neon); box-shadow: 0 0 12px rgba(205,240,58,0.5); }
.agent-figs { display: flex; gap: 26px; }
.agent-figs .f .lab { font-size: 12px; color: var(--muted-2); }
.agent-figs .f .num { font-size: 19px; font-weight: 700; margin-top: 3px; letter-spacing: -0.02em; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.status-dot.idle i { background: var(--muted-2); box-shadow: none; }
.agent-card .go { margin-top: 18px; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; transition: color .18s, gap .18s; }
.agent-card:hover .go { color: var(--blue); gap: 10px; }

/* growth */
.growth-card { background: linear-gradient(165deg, var(--panel), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.growth-top { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; }
.growth-top .title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.growth-top .sub2 { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.tier-pill { font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(205,240,58,0.3); background: var(--neon-soft); color: var(--neon); }
.bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.05); margin-top: 24px; overflow: hidden; border: 1px solid var(--border); }
.bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9cc42a, var(--neon)); box-shadow: 0 0 14px rgba(205,240,58,0.5); transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.bar-legend { display: flex; justify-content: space-between; margin-top: 11px; font-size: 13.5px; color: var(--muted); }
.bar-legend b { color: var(--ink); font-weight: 700; }

/* activity + how */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.feed { background: linear-gradient(168deg, var(--panel-2), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feed .row { display: flex; align-items: center; gap: 13px; padding: 15px 20px; border-bottom: 1px solid var(--border); }
.feed .row:last-child { border-bottom: none; }
.feed .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.feed .txt { flex: 1; font-size: 14.5px; color: var(--ink-2); }
.feed .txt b { color: var(--ink); font-weight: 700; }
.feed .time { font-size: 12.5px; color: var(--muted-2); white-space: nowrap; }

/* how it works — a genuine 4-step sequence, so numbers are earned here */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { background: linear-gradient(168deg, var(--panel), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; }
.step .num { font-size: 12px; font-weight: 700; color: var(--neon); font-variant-numeric: tabular-nums; }
.step .st { font-size: 16px; font-weight: 700; margin-top: 11px; letter-spacing: -0.02em; }
.step .sd { font-size: 13px; color: var(--muted); margin-top: 7px; text-wrap: pretty; }

/* footer */
.foot { padding: 64px 0 48px; text-align: center; border-top: 1px solid var(--border); margin-top: 30px; }
.foot .tagline { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.foot .disc { margin-top: 15px; font-size: 12.5px; color: #566072; max-width: 62ch; margin-inline: auto; line-height: 1.6; }

/* ================= AGENT PAGE ================= */
.back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; font-size: 14px; margin: 30px 0 10px; }
.back:hover { color: var(--ink); }
.agent-hero { display: flex; align-items: center; gap: 17px; padding: 8px 0 28px; flex-wrap: wrap; }
.agent-hero .big-emblem { width: 58px; height: 58px; border-radius: 15px; display: grid; place-items: center; font-weight: 800; font-size: 25px; border: 1px solid var(--border-strong); overflow: hidden; }
.agent-hero h1 { font-size: clamp(32px, 5vw, 42px); font-weight: 800; letter-spacing: -0.03em; }
.agent-hero .tag { color: var(--muted); font-size: 15.5px; }
.topgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.topgrid .cell { background: linear-gradient(165deg, var(--panel), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.topgrid .k { font-size: 13px; color: var(--muted); }
.topgrid .v { font-size: 27px; font-weight: 800; letter-spacing: -0.03em; margin-top: 10px; }
.topgrid .d { font-size: 12.5px; color: var(--muted-2); margin-top: 6px; }
.chart-card { background: linear-gradient(165deg, var(--panel), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.chart-card h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.chart-meta { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.panel { background: linear-gradient(168deg, var(--panel-2), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); }
.panel h3 { font-size: 15px; font-weight: 700; padding: 18px 20px 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; padding: 10px 20px; border-bottom: 1px solid var(--border); }
td { padding: 13px 20px; border-bottom: 1px solid var(--border); color: var(--ink-2); }
tr:last-child td { border-bottom: none; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.stat-box { background: linear-gradient(165deg, var(--panel), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; }
.stat-box .lab { font-size: 12.5px; color: var(--muted); }
.stat-box .val { font-size: 21px; font-weight: 800; margin-top: 8px; letter-spacing: -0.02em; }

/* motion reveal — enhances an already-visible default (only hides when JS is on) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  body::before { animation: none !important; }
  .btn:hover, .agent-card:hover { transform: none !important; }
}

@media (max-width: 900px) {
  .readout { grid-template-columns: repeat(2, 1fr); }
  .readout .cell:nth-child(3) { border-left: none; }
  .readout .cell:nth-child(n+3) { border-top: 1px solid var(--border); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .agents { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .topgrid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .readout { grid-template-columns: 1fr; }
  .readout .cell { border-left: none; border-top: 1px solid var(--border); }
  .readout .cell:first-child { border-top: none; }
  .steps, .topgrid, .stat-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 44px; }
}

/* ======================================================================
   WEB-APP SHELL (dashboard console)
   ====================================================================== */
.app { display: grid; grid-template-columns: 238px 1fr; min-height: 100vh; position: relative; z-index: 1; }

/* left nav rail */
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 20px 14px 16px; border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0)); }
.rail-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; text-decoration: none; }
.rail-brand .logo { width: 28px; height: 28px; }
.rail-brand .word { font-family: "Orbitron", sans-serif; font-weight: 700; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--neon); }
.rail-group { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; padding: 14px 10px 8px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
.nav-item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; }
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--ink-2); }
.nav-item.active { background: var(--neon-soft); color: var(--neon); }
.nav-item .badge { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--neon); background: var(--neon-soft); padding: 1px 7px; border-radius: 999px; }
.rail-foot { margin-top: auto; padding: 12px 11px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.rail-foot .sync { display: flex; align-items: center; gap: 7px; }

/* live dot */
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 0 0 rgba(205,240,58,0.6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(205,240,58,0.55)} 70%{box-shadow:0 0 0 7px rgba(205,240,58,0)} 100%{box-shadow:0 0 0 0 rgba(205,240,58,0)} }

/* main column */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; height: 62px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10,11,13,0.85), rgba(10,11,13,0.55)); backdrop-filter: blur(14px); }
.topbar .page { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.topbar .page small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 1px; }
.topbar .tools { display: flex; align-items: center; gap: 10px; }
.chip { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,0.02); }
.chip .k { font-size: 11px; color: var(--muted); }
.chip .v { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; }
.pill { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(205,240,58,0.3); background: var(--neon-soft); color: var(--neon); }
.tbtn { font-size: 13.5px; font-weight: 700; color: #0a0b0d; background: var(--neon); padding: 9px 16px; border-radius: 10px; border: none; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.tbtn:hover { background: var(--neon-hi); }

/* mobile nav (hidden on desktop) */
.nav-toggle, .nav-overlay { display: none; }

.content { padding: 22px 26px 64px; display: flex; flex-direction: column; gap: 18px; }

/* KPI tiles */
.feed-empty { color: var(--muted); font-size: 13px; padding: 22px 4px; text-align: center; }

/* three agents — top-of-overview focus */
.focus-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.focus-head h2 { font-family: "Orbitron", sans-serif; font-size: 20px; font-weight: 700; letter-spacing: 0.02em; }
.focus-head .meta { font-size: 13px; color: var(--muted); }
.agent-focus { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.focus-agent { display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: linear-gradient(165deg, var(--panel), var(--bg-2)); transition: transform .18s, border-color .18s, box-shadow .18s; }
.focus-agent:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.fa-head { display: flex; align-items: center; gap: 13px; padding: 17px 17px 0; }
.fa-avatar { position: relative; width: 54px; height: 54px; flex: none; border-radius: 13px;
  overflow: hidden; background: #0a0b0d; border: 1px solid var(--border); }
.fa-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fa-avatar .status-dot { position: absolute; bottom: 2px; right: 2px; padding: 0; width: 11px; height: 11px;
  border-radius: 50%; background: var(--panel); border: 2px solid var(--panel); }
.fa-avatar .status-dot i { margin: 0; }
.fa-body { padding: 13px 17px 17px; display: flex; flex-direction: column; }
.fa-name { font-family: "Orbitron", sans-serif; font-weight: 700; font-size: 19px; letter-spacing: 0.03em; color: var(--neon); }
.fa-tag { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.fa-blurb { font-size: 13.5px; line-height: 1.5; color: rgba(245,246,247,0.82); margin: 0 0 14px; }
.fa-plan { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; margin-bottom: 14px; }
.fa-plan-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 12.5px; }
.fa-plan-row .k { color: var(--muted); }
.fa-plan-row .v { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.fa-plan-row .k { flex: none; }
.fa-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fa-f .lab { font-size: 11px; color: var(--muted); }
.fa-f .num { font-size: 15px; font-weight: 700; margin-top: 3px; }
.fa-go { margin-top: 15px; font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; transition: color .18s, gap .18s; }
.focus-agent:hover .fa-go { color: var(--blue); gap: 10px; }
@media (max-width: 900px) { .agent-focus { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { border: 1px solid var(--border); border-radius: 12px; padding: 15px 16px 16px;
  background: linear-gradient(165deg, var(--panel), var(--bg-2)); }
.kpi .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .v { font-size: 25px; font-weight: 800; letter-spacing: -0.03em; margin-top: 9px; }
.kpi .delta { font-size: 12.5px; margin-top: 5px; font-weight: 600; }

/* asymmetric main grid: chart + feed */
.dash-grid { display: grid; grid-template-columns: 1.62fr 1fr; gap: 18px; align-items: start; }
.card { border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(168deg, var(--panel-2), var(--bg-2)); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.card-head .meta { font-size: 12px; color: var(--muted); }
.card-body { padding: 16px 18px; }

/* segmented timeframe control */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.seg button { background: transparent; border: none; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 6px 11px; cursor: pointer; border-right: 1px solid var(--border); }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--neon-soft); color: var(--neon); }

/* positions / agents table */
.rowline { display: grid; grid-template-columns: 1.6fr 0.9fr 0.7fr 0.9fr 88px 60px; align-items: center; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.rowline:last-child { border-bottom: none; }
.rowline.head { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.agent-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.agent-cell img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: none; }
.agent-cell .nm { font-weight: 700; letter-spacing: -0.01em; }
.agent-cell .tg { font-size: 12px; color: var(--muted); }
.rowline .spark { height: 30px; }
.rowline .open-link { justify-self: end; font-size: 13px; color: var(--muted); text-decoration: none; }
.rowline a.open-link:hover { color: var(--neon); }

/* live feed inside app */
.appfeed { display: flex; flex-direction: column; }
.appfeed .row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.appfeed .row:last-child { border-bottom: none; }
.appfeed .row.flash { animation: flashIn .9s ease; }
@keyframes flashIn { from { background: var(--neon-soft); } to { background: transparent; } }
.appfeed .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.appfeed .txt { flex: 1; font-size: 13.5px; color: var(--ink-2); }
.appfeed .txt b { color: var(--ink); font-weight: 700; }
.appfeed .time { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.appfeed .hash { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted-2); text-decoration: none; white-space: nowrap; }
.appfeed .hash:hover { color: var(--neon); }

/* economics grid: waterfall + buyback */
.econ-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* profit waterfall */
.wf-note { font-size: 12.5px; color: var(--muted); margin-bottom: 15px; }
.wf-bar { display: flex; height: 15px; border-radius: 8px; overflow: hidden; gap: 2px; }
.wf-seg { height: 100%; }
.wf-seg.team { background: var(--muted); }
.wf-seg.treasury { background: rgba(205,240,58,0.42); }
.wf-seg.buyback { background: var(--neon); }
.wf-rows { margin-top: 17px; display: flex; flex-direction: column; gap: 13px; }
.wf-row { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.wf-row .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.wf-row .nm { flex: 1; color: var(--ink-2); }
.wf-row .pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.wf-row .amt { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 74px; text-align: right; }
.wf-sub { margin-top: 4px; margin-left: 21px; padding-left: 15px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 11px; }

/* buyback & burn tracker */
.burn-hero { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 4px; }
.burn-hero .lab { font-size: 12.5px; color: var(--muted); }
.countdown { font-family: "Orbitron", ui-monospace, monospace; font-size: 27px; font-weight: 700; letter-spacing: 0.01em; color: var(--neon); margin-top: 4px; }
.burn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 4px; }
.burn-stats .s .lab { font-size: 12px; color: var(--muted); }
.burn-stats .s .num { font-size: 18px; font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; }

/* docs */
.docs { display: grid; grid-template-columns: 210px 1fr; gap: 34px; align-items: start; }
.docs-toc { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.docs-toc a { font-size: 13.5px; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; border-left: 2px solid transparent; }
.docs-toc a:hover { color: var(--ink-2); background: rgba(255,255,255,0.03); }
.docs-body { max-width: 720px; }
.docs-body section { margin-bottom: 40px; scroll-margin-top: 84px; }
.docs-body h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.docs-body h3 { font-size: 15px; font-weight: 700; margin: 22px 0 8px; }
.docs-body p { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); margin-bottom: 12px; }
.docs-body ul { margin: 0 0 12px 2px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.docs-body li { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); padding-left: 20px; position: relative; }
.docs-body li::before { content: ""; position: absolute; left: 3px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--neon); }
.docs-body b, .docs-body strong { color: var(--ink); font-weight: 700; }
.docs-body .callout { border: 1px solid var(--border); border-left: 3px solid var(--neon); border-radius: 10px; padding: 14px 16px; background: rgba(205,240,58,0.04); font-size: 13.5px; color: var(--ink-2); }
.docs-body code { font-family: ui-monospace, monospace; font-size: 12.5px; background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 5px; color: var(--neon-hi); }

@media (max-width: 1040px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .app { grid-template-columns: minmax(0, 1fr); max-width: 100vw; }
  .main { overflow-x: hidden; min-width: 0; }
  .content { min-width: 0; max-width: 100%; }

  /* rail becomes a slide-in drawer */
  .rail { position: fixed; top: 0; left: 0; z-index: 120; width: 244px; height: 100vh;
    transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.7,.2,1);
    background: #0c0d10; overflow-y: auto; }
  .app.nav-open .rail { transform: translateX(0); box-shadow: 0 0 70px rgba(0,0,0,0.65); }
  .nav-overlay { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,0.5);
    opacity: 0; pointer-events: none; transition: opacity .28s; }
  .app.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }

  /* hamburger in the topbar */
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px;
    background: rgba(255,255,255,0.02); cursor: pointer; flex: none; }
  .nav-toggle span { display: block; height: 2px; background: var(--ink-2); border-radius: 2px; }

  .topbar { padding: 0 14px; gap: 10px; }
  .topbar .page small { display: none; }
  .topbar .tools { gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .topbar .tools::-webkit-scrollbar { display: none; }

  .content { padding: 16px 14px 56px; }
  .dash-grid, .econ-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .docs { grid-template-columns: 1fr; }
  .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; }

  /* agents table: drop sparkline + open-link columns */
  .rowline { grid-template-columns: 1.6fr 0.9fr 0.7fr 1fr; gap: 8px; padding: 12px 14px; }
  .rowline > *:nth-child(5), .rowline > *:nth-child(6) { display: none; }
}

@media (max-width: 600px) {
  .topbar .tools .chip { display: none; }
  .topbar .tools .pill { display: none; }
  .kpis { grid-template-columns: 1fr; }
  .kpi .v { font-size: 22px; }
  .burn-stats { grid-template-columns: 1fr; gap: 10px; }
  .agent-figs { grid-template-columns: repeat(2, 1fr); }
  .agent-hero { flex-wrap: wrap; }
}
