/* IMDwindowshopper — dark design system in the shadcn/ui spirit (zinc palette, 1px borders, 8px radii, quiet type) with a
   liquid-glass layer: surfaces are translucent and blur what scrolls behind them. Flat colors only: no gradients
   anywhere (owner's choice, 2026-10-08). Motion is short and respects prefers-reduced-motion. */

:root {
  color-scheme: dark;
  /* surfaces */
  --bg: #09090b;
  --surface: rgba(24, 24, 27, 0.62);
  --surface-solid: #131316;
  --surface-hi: rgba(39, 39, 42, 0.7);
  --muted: #18181b;
  --muted-2: #27272a;
  /* text */
  --ink: #fafafa;
  --ink-2: #d4d4d8;
  --ink-3: #a1a1aa;
  --ink-4: #71717a;
  /* lines */
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --ring: rgba(212, 212, 216, 0.28);
  /* accents (flat) */
  --primary: #fafafa;
  --primary-ink: #09090b;
  --accent: #5b7cff;
  --accent-soft: rgba(91, 124, 255, 0.14);
  --up: #22c55e;
  --up-soft: rgba(34, 197, 94, 0.12);
  --down: #ef4444;
  --down-soft: rgba(239, 68, 68, 0.12);
  --warn: #f59e0b;
  /* shape + type */
  --r-lg: 12px;
  --r-md: 10px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Inter", "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background-color: var(--bg);
  /* fine dot grid (an SVG tile, not a gradient) gives the glass something to blur */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23ffffff' fill-opacity='0.045'/%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--ink);
  font: 14px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(91, 124, 255, 0.35); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }

/* old decorative layers: not used any more */
.ambient, .grain { display: none; }

/* ---------- glass surface ---------- */
.glass {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
}

/* ---------- shell ---------- */
.app { position: relative; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 700px) { .wrap { padding: 0 16px; } }

.navwrap { position: sticky; top: 0; z-index: 50; padding: 10px 16px; background: rgba(9, 9, 11, 0.55); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav { margin: 0 auto; max-width: none; display: flex; align-items: center; gap: 14px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.01em; font-size: 15px; white-space: nowrap; }
.brand .logo { width: 32px; height: 32px; flex: none; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
/* wordmark: IMD in white, windowshopper in muted ink, one word */
.brand .wm { letter-spacing: -0.015em; }
.brand .wm b { font-weight: 500; color: var(--ink-3); }
.login .wm2 { font-weight: 500; color: var(--ink-3); }
.nav .links { display: flex; gap: 2px; margin-left: 10px; }
.nav .links a { padding: 6px 12px; border-radius: var(--r-sm); color: var(--ink-3); font-weight: 500; font-size: 13.5px; transition: background 0.15s, color 0.15s; }
.nav .links a:hover { color: var(--ink); background: var(--muted); }
.nav .links a[aria-current="page"] { color: var(--ink); background: var(--muted-2); }
.nav .spacer { flex: 1; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); position: relative; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--up); animation: ping 2.4s var(--ease) infinite; }
.live-dot.off { background: var(--ink-4); }
.live-dot.off::after { display: none; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.8; } 100% { transform: scale(2); opacity: 0; } }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: transparent; cursor: pointer; color: var(--ink-3); transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--ink); background: var(--muted); border-color: var(--line-2); }
.icon-btn svg { width: 16px; height: 16px; }
.kbd { font: 500 11px var(--mono); color: var(--ink-4); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; line-height: 18px; }
.search-btn { display: flex; align-items: center; gap: 10px; height: 32px; min-width: 220px; padding: 0 6px 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(24, 24, 27, 0.6); color: var(--ink-4); cursor: pointer; transition: border-color 0.15s, color 0.15s; font-size: 13px; }
.search-btn .t { flex: 1; text-align: left; }
.search-btn:hover { border-color: var(--line-2); color: var(--ink-3); }
.search-btn svg { width: 14px; height: 14px; }
@media (max-width: 900px) { .nav .live-pill, .search-btn .kbd, .search-btn .t { display: none; } .search-btn { min-width: 0; width: 32px; padding: 0; justify-content: center; } }
@media (max-width: 700px) { .brand .wm { display: none; } }
@media (max-width: 560px) { .nav .links { margin-left: 4px; } .nav .links a { padding: 6px 9px; } }

main.wrap { padding-block: 32px 96px; }

/* ---------- type ---------- */
.eyebrow { font-size: 12px; color: var(--ink-4); font-weight: 500; }
h1.display { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.03em; margin: 6px 0 8px; font-weight: 650; }
h1.display em { font-style: normal; color: var(--ink-3); }
.lede { color: var(--ink-3); font-size: 15px; max-width: 660px; margin: 0; }
h2 { font-size: 16px; letter-spacing: -0.01em; margin: 0; font-weight: 600; }
h3 { font-size: 13px; color: var(--ink); font-weight: 600; margin: 0 0 12px; letter-spacing: -0.005em; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- controls (shadcn: Tabs, Badge, Input, Button) ---------- */
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: var(--r-md); gap: 2px; background: var(--muted); border: 1px solid var(--line); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.seg button {
  position: relative; z-index: 1; border: 0; background: none; padding: 5px 12px; border-radius: 7px; cursor: pointer;
  color: var(--ink-3); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; transition: color 0.15s;
}
.seg button:hover { color: var(--ink-2); }
.seg button[aria-pressed="true"] { color: var(--ink); }
.seg button .count { font-size: 11.5px; color: var(--ink-4); font-weight: 500; font-variant-numeric: tabular-nums; }
.seg .thumb { position: absolute; z-index: 0; top: 0; left: 0; border-radius: 7px; background: var(--muted-2); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 0 0 1px var(--line); transition: transform 0.25s var(--ease), width 0.25s var(--ease); }
.seg.small button { padding: 4px 10px; font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: var(--r-sm); padding: 5px 12px; font-size: 13px; font-weight: 500;
  color: var(--ink-3); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; white-space: nowrap;
}
.chip:hover { color: var(--ink); background: var(--muted); }
.chip[aria-pressed="true"] { color: var(--primary-ink); background: var(--primary); border-color: var(--primary); }
.input {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: var(--r-sm); min-width: 240px;
  border: 1px solid var(--line-2); background: rgba(9, 9, 11, 0.5); transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus-within { border-color: rgba(212, 212, 216, 0.4); box-shadow: 0 0 0 3px var(--ring); }
.input svg { width: 15px; height: 15px; color: var(--ink-4); flex: none; }
.input input { all: unset; flex: 1 1 auto; min-width: 0; width: 100%; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.input input::placeholder { color: var(--ink-4); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-weight: 500; font-size: 13.5px; transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--muted); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: #e4e4e7; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar .grow { flex: 1; }

/* ---------- page heads + stat cards ---------- */
.hero { display: grid; gap: 20px; margin-bottom: 24px; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; max-width: 760px; }
.stat-chip { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-lg); min-width: 0; }
.stat-chip b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; order: 2; }
.stat-chip span { font-size: 12.5px; color: var(--ink-3); font-weight: 500; order: 1; }
.scope-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
@media (max-width: 1180px) { .scope-grid { grid-template-columns: 1fr; } .feed-col { display: none; } }
.list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* token rows (classic list) */
.tcard {
  display: grid; grid-template-columns: auto minmax(0, 1.6fr) repeat(4, minmax(78px, 0.7fr)) auto; align-items: center; gap: 16px;
  padding: 12px 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; overflow: hidden;
}
.tcard:hover { border-color: var(--line-2); background: var(--surface-hi); }
.tcard .who { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tcard .sym { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.tcard .sym b { font-size: 15px; font-weight: 600; white-space: nowrap; }
.tcard .sym span { color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 500; padding: 1px 7px; line-height: 18px; border-radius: 6px; background: var(--muted); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.accent { color: #c7d2fe; background: var(--accent-soft); border-color: rgba(91, 124, 255, 0.3); }
.tag.hot { color: #fcd34d; background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); }
.metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metric span { font-size: 11.5px; color: var(--ink-4); font-weight: 500; }
.metric b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric.big b { font-size: 16px; }
.quick { display: flex; gap: 6px; }
.quick a { width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink-3); transition: background 0.15s, color 0.15s; }
.quick a:hover { color: var(--ink); background: var(--muted); }
.quick svg { width: 14px; height: 14px; }
@media (max-width: 1100px) { .tcard { grid-template-columns: auto minmax(0, 1fr) repeat(2, minmax(80px, auto)) auto; } .tcard .m3, .tcard .m4 { display: none; } }
@media (max-width: 640px) { .tcard { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; } .tcard .m2, .tcard .quick { display: none; } }

/* avatars: image or flat-color initials */
.avatar { position: relative; width: 44px; height: 44px; flex: none; }
.avatar .img { width: 100%; height: 100%; border-radius: var(--r-md); object-fit: cover; display: grid; place-items: center; font-weight: 600; font-size: 15px; color: rgba(255, 255, 255, 0.92); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.avatar .chain { position: absolute; right: -4px; bottom: -4px; font-size: 9px; font-weight: 600; padding: 0 4px; line-height: 15px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink-3); letter-spacing: 0.02em; }
.avatar.lg { width: 64px; height: 64px; }
.avatar.lg .img { border-radius: 14px; font-size: 21px; }

.xchip { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 12px; padding: 1px 7px; border-radius: 6px; background: var(--up-soft); color: var(--up); border: 1px solid rgba(34, 197, 94, 0.3); }
.xchip.big { background: var(--accent-soft); color: #c7d2fe; border-color: rgba(91, 124, 255, 0.35); }
.pct { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- live feed ---------- */
.feed { position: sticky; top: 76px; padding: 16px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
.feed header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.feed .items { overflow: hidden; display: flex; flex-direction: column; gap: 6px; }
.ev { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 8px; border-radius: var(--r-sm); border: 1px solid transparent; font-size: 13px; }
.ev .ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--muted); color: var(--ink-3); }
.ev .ico svg { width: 13px; height: 13px; }
.ev.buy .ico { color: var(--up); background: var(--up-soft); }
.ev.sell .ico { color: var(--down); background: var(--down-soft); }
.ev.job .ico { color: #c7d2fe; background: var(--accent-soft); }
.ev .t { color: var(--ink-4); font-size: 11.5px; white-space: nowrap; }
.ev p { margin: 0; color: var(--ink-3); line-height: 1.35; }
.ev p b { color: var(--ink); font-weight: 600; }
.ev.enter { animation: evIn 0.35s var(--ease); border-color: var(--line-2); }
@keyframes evIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- token page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-weight: 500; font-size: 13px; margin-bottom: 16px; cursor: pointer; transition: color 0.15s; }
.back:hover { color: var(--ink); }
.back svg { width: 15px; height: 15px; }
.thead { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 16px; }
.thead .title { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.thead .title h1 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -0.025em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.thead .title h1 span { font-size: 15px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.thead .price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.thead .price b { display: block; font-size: 26px; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.thead .price span { font-size: 12.5px; color: var(--ink-3); }
.thead .price a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.ca { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 9px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--muted); cursor: pointer; font: 12px var(--mono); color: var(--ink-3); transition: color 0.15s, border-color 0.15s; width: fit-content; max-width: 100%; }
.ca:hover { border-color: var(--line-2); color: var(--ink); }
.ca svg { width: 13px; height: 13px; }
.ca > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tgrid { display: grid; grid-template-columns: 260px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.tgrid > * { min-width: 0; }
@media (max-width: 1280px) { .tgrid { grid-template-columns: 240px minmax(0, 1fr); } .tgrid .right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; } }
.panel { padding: 16px; }
.panel + .panel { margin-top: 16px; }
.linkgroup + .linkgroup { margin-top: 14px; }
.linkgroup h4 { margin: 0 0 6px; font-size: 12px; color: var(--ink-4); font-weight: 500; }
.linkrow { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 13.5px; font-weight: 500; transition: background 0.15s, color 0.15s; }
.linkrow:hover { background: var(--muted-2); color: var(--ink); }
.linkrow .li { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--muted); border: 1px solid var(--line); flex: none; color: var(--ink-3); }
.linkrow .li svg { width: 13px; height: 13px; }
.linkrow .ext { margin-left: auto; width: 13px; height: 13px; opacity: 0.4; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.chartbox { padding: 12px 12px 8px; }
.chartbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 2px 2px 10px; }
.chart { height: 440px; border-radius: var(--r-sm); overflow: hidden; position: relative; }
@media (max-width: 700px) { .chart { height: 320px; } }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--ink-3); font-size: 13.5px; padding: 20px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv .cell { padding: 10px 12px; border-radius: var(--r-md); background: rgba(9, 9, 11, 0.4); border: 1px solid var(--line); min-width: 0; }
.kv .cell > span { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; margin-bottom: 2px; }
.kv .cell b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ratio { height: 4px; border-radius: 2px; background: var(--down); overflow: hidden; margin-top: 8px; opacity: 0.85; }
.ratio i { display: block; height: 100%; background: var(--up); transition: width 0.6s var(--ease); }
.holder { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.holder:first-child { border-top: 0; }
.holder .bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: var(--muted-2); overflow: hidden; }
.holder .bar i { display: block; height: 100%; background: var(--ink-3); border-radius: 2px; }

table.trades { width: 100%; border-collapse: collapse; font-size: 13px; }
table.trades th { text-align: left; font-weight: 500; color: var(--ink-4); font-size: 12px; padding: 0 10px 8px; border-bottom: 1px solid var(--line); }
table.trades td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.trades tr:hover td { background: rgba(255, 255, 255, 0.02); }
table.trades tr.buy td.side { color: var(--up); }
table.trades tr.sell td.side { color: var(--down); }
table.trades tr.flash td { animation: rowflash 1.4s var(--ease); }
@keyframes rowflash { 0% { background: rgba(91, 124, 255, 0.16); } 100% { background: transparent; } }
.tablewrap { overflow-x: auto; }

/* ---------- jobs ---------- */
.jrow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.jrow:hover { border-color: var(--line-2); background: var(--surface-hi); }
.jicon { position: relative; width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--muted); border: 1px solid var(--line); color: var(--ink-2); }
.jicon svg { width: 16px; height: 16px; }
.jicon .runs { position: absolute; right: -7px; bottom: -6px; font-size: 10px; font-weight: 600; padding: 0 4px; line-height: 15px; border-radius: 5px; background: var(--primary); color: var(--primary-ink); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--bg); }
.jrow .ttl { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jrow .sub { font-size: 12.5px; color: var(--ink-4); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 0 8px; line-height: 20px; border-radius: 6px; border: 1px solid var(--line); white-space: nowrap; color: var(--ink-3); background: var(--muted); text-transform: capitalize; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state.executing, .state.working, .state.submitted, .state.dispatched, .state.reviewing { color: #a5b4fc; background: var(--accent-soft); border-color: rgba(91, 124, 255, 0.3); }
.state.executing::before, .state.working::before { animation: breathe 1.6s ease-in-out infinite; }
.state.completed, .state.accepted, .state.live { color: var(--up); background: var(--up-soft); border-color: rgba(34, 197, 94, 0.28); }
.state.blocked, .state.failed, .state.rejected, .state.cancelled { color: #f87171; background: var(--down-soft); border-color: rgba(239, 68, 68, 0.28); }
@keyframes breathe { 50% { opacity: 0.25; } }

.journey { position: relative; display: flex; flex-direction: column; gap: 10px; padding-left: 24px; }
.journey::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 1px; background: var(--line-2); }
.step { position: relative; padding: 12px 14px; border-radius: var(--r-md); box-shadow: none; }
.step::before { content: ""; position: absolute; left: -22px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink-4); }
.step.done::before { border-color: var(--up); background: var(--up); }
.step.active::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: breathe 1.6s ease-in-out infinite; }
.step.bad::before { border-color: var(--down); background: var(--down); }
.step .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step .role { font-weight: 600; text-transform: capitalize; }
.step .meta { margin-top: 6px; font-size: 12.5px; color: var(--ink-4); display: flex; flex-wrap: wrap; gap: 10px; }
.agent-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 3px; line-height: 22px; border-radius: 6px; background: var(--muted); border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.agent-chip:hover { color: var(--ink); border-color: var(--line-2); }
.objective { white-space: pre-wrap; font-size: 13px; color: var(--ink-3); line-height: 1.6; max-height: 260px; overflow: hidden; }
.objective.open { max-height: none; }

.runs-list { display: flex; flex-direction: column; max-height: 380px; overflow-y: auto; margin: 0 -6px; }
.run { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 6px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); border-radius: 6px; }
.run:hover { background: var(--muted); color: var(--ink-2); }
.run .no { font-variant-numeric: tabular-nums; color: var(--ink-4); font-weight: 500; }
.run .ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run.current { background: var(--muted-2); color: var(--ink); }
@media (max-width: 520px) { .run { grid-template-columns: 44px minmax(0, 1fr) auto; } .run > :last-child { display: none; } }

/* ---------- agents ---------- */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 16px; }
.acard { padding: 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.acard:hover { border-color: var(--line-2); background: var(--surface-hi); }
.ring { width: 50px; height: 50px; }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: var(--muted-2); }
.ring .val { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease); }
.ring text { fill: var(--ink); font-size: 13px; font-weight: 600; }
.agent-img { display: inline-block; object-fit: cover; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.agent-img.sm { width: 22px; height: 22px; }
.agent-img.chip { width: 16px; height: 16px; }
.agent-img.lg { width: 60px; height: 60px; border-radius: 14px; }

/* ---------- loading ---------- */
.skel { border-radius: var(--r-lg); height: 84px; background: var(--muted); border: 1px solid var(--line); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); transition: opacity 0.4s var(--ease), visibility 0.4s; }
.boot.done { opacity: 0; visibility: hidden; }
.boot { grid-auto-flow: row; align-content: center; gap: 18px; }
.boot-logo { width: 96px; height: 96px; object-fit: contain; animation: bootPulse 1.6s ease-in-out infinite; }
@keyframes bootPulse { 50% { transform: scale(0.96); opacity: 0.85; } }
.boot .core { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted-2); border-top-color: var(--ink); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.rise { animation: rise 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 20ms); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
.page-enter { animation: pageIn 0.25s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; } }
.new-glow { animation: newGlow 1.8s var(--ease); }
@keyframes newGlow { 0% { border-color: var(--accent); } }
.tick-up { animation: tickUp 1s var(--ease); }
.tick-down { animation: tickDown 1s var(--ease); }
@keyframes tickUp { 0% { color: var(--up); } }
@keyframes tickDown { 0% { color: var(--down); } }

/* toast (shadcn Sonner-like) */
.toasts { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { padding: 10px 14px; font-size: 13px; font-weight: 500; background: var(--surface-solid); animation: toastIn 0.25s var(--ease); }
.toast.out { animation: toastOut 0.25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(4px); } }

/* command palette (shadcn Command) */
.palette-bg { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; justify-items: center; align-items: start; padding-top: 14vh; animation: fadeIn 0.15s var(--ease); }
.palette { width: min(600px, calc(100vw - 32px)); padding: 0; overflow: hidden; background: var(--surface-solid); animation: popIn 0.2s var(--ease); }
.palette .input { min-width: 0; height: 46px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; padding: 0 14px; }
.palette .results { max-height: 50vh; overflow: auto; padding: 6px; }
.palette .res { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 13.5px; }
.palette .res[aria-selected="true"], .palette .res:hover { background: var(--muted-2); }
.palette .res > [data-icon] svg { width: 16px; height: 16px; color: var(--ink-3); }
.palette .avatar { width: 30px; height: 30px; }
.palette .avatar .img { border-radius: 7px; font-size: 11.5px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.98); } }

.empty { padding: 36px; text-align: center; color: var(--ink-3); }
.loadmore { display: flex; justify-content: center; margin-top: 16px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; align-content: center; padding: 20px; }
.login .card { width: min(380px, 100%); padding: 28px 24px; text-align: left; }
.login .logo { display: block; width: 88px; height: 88px; margin: 0 auto 16px; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6)); }
.login .card h1, .login .card p { text-align: center; }
.login h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.login p { margin: 0 0 20px; color: var(--ink-3); font-size: 13.5px; }
.login .input { min-width: 0; margin-bottom: 12px; }
.login .btn { width: 100%; height: 38px; }
.login .msg { color: #f87171; font-size: 13px; min-height: 18px; margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .tgrid { grid-template-columns: minmax(0, 1fr) !important; }
  .tgrid .center { order: 1; }
  .tgrid .right { order: 2; display: block; }
  .tgrid .left { order: 3; }
  .tgrid .right .panel + .panel, .tgrid .left .panel + .panel { margin-top: 16px; }
}
@media (max-width: 640px) {
  .toolbar .input { min-width: 0; flex: 1 1 100%; }
  .toolbar .grow { display: none; }
  .thead { padding: 16px; gap: 14px; }
  .thead .price { text-align: left; width: 100%; align-items: flex-start; }
  .thead .title h1 { font-size: 21px; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .jrow { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 12px; }
  .jrow > :last-child { display: none; }
  .jrow .ttl { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 480px) {
  .navwrap { padding: 8px 10px; }
  .nav { gap: 8px; }
  .nav .links { gap: 0; }
  .nav .links a { padding: 6px 8px; font-size: 13px; }
  #logoutForm { display: none; }
}
.thead .title h1.jtitle { font-size: 20px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) { .thead .title h1.jtitle { font-size: 17px; } }

/* ================= Pulse: live columns (Axiom-style) ================= */
main.wrap.wide { max-width: none; padding-inline: 16px; padding-block: 16px 16px; }
@media (max-width: 700px) { main.wrap.wide { padding-inline: 8px; padding-block: 10px; } }
.pulse-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.pulse-head h1 { margin: 0; font-size: 20px; letter-spacing: -0.02em; font-weight: 650; display: flex; align-items: baseline; gap: 8px; }
.pulse-head h1 span { font-size: 13px; color: var(--ink-4); font-weight: 500; letter-spacing: 0; }
.pulse-head .grow { flex: 1; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-stat { display: inline-flex; align-items: baseline; gap: 5px; padding: 0 9px; line-height: 26px; border-radius: var(--r-sm); font-size: 12px; color: var(--ink-4); box-shadow: none; }
.mini-stat b { color: var(--ink-2); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pulse-tabs { display: none; margin-bottom: 10px; }
.pulse-tabs .seg { width: 100%; }
.pulse-tabs .seg button { flex: 1; justify-content: center; }

.pulse { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; height: calc(100vh - 122px); min-height: 520px; }
.pcol { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
/* column header: title + sort on one row, search under it (never squeezed) */
.pcol-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title sort" "search search"; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.pcol-head h2 { grid-area: title; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; white-space: nowrap; min-width: 0; overflow: hidden; }
.pcol-head h2 .n { font-size: 11.5px; color: var(--ink-4); font-weight: 500; font-variant-numeric: tabular-nums; padding: 0 6px; line-height: 18px; border-radius: 5px; background: var(--muted-2); }
.pcol-head h2 .n:empty { display: none; }
.pcol-head .grow { display: none; }
.pcol-head .input { grid-area: search; min-width: 0; width: 100%; height: 30px; padding: 0 9px; }
.pcol-head .input input { font-size: 12.5px; }
.pcol-head .input svg { width: 13px; height: 13px; }
.sortbar { grid-area: sort; display: flex; gap: 1px; padding: 2px; border-radius: 7px; background: var(--muted); border: 1px solid var(--line); }
.sortbar button { border: 0; background: none; color: var(--ink-4); font-size: 11.5px; font-weight: 500; padding: 2px 7px; line-height: 18px; border-radius: 5px; cursor: pointer; transition: color 0.15s, background 0.15s; white-space: nowrap; }
.sortbar button:hover { color: var(--ink-2); }
.sortbar button[aria-pressed="true"] { color: var(--ink); background: var(--muted-2); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.pcol-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; container-type: inline-size; }
.pcol-empty { padding: 30px 16px; color: var(--ink-4); text-align: center; font-size: 13px; }
.pcol .sentinel { height: 1px; }
.pcol .skel { height: 92px; margin: 8px; border-radius: var(--r-md); }

/* card: [avatar] [identity + stats + pills] [market], trade buttons below */
.pcard {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "pic body side" "pic buys buys";
  column-gap: 14px; row-gap: 10px; padding: 14px 12px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.12s;
}
.pcard:hover { background: rgba(255, 255, 255, 0.025); }
.pcard:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.pcard .pic { grid-area: pic; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; padding-top: 2px; }
.pcard .avatar { width: 56px; height: 56px; }
.pcard .avatar .img { border-radius: var(--r-md); font-size: 17px; }
.pcard .ca-mini { font: 10px var(--mono); color: var(--ink-4); background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; max-width: 60px; overflow: hidden; text-overflow: ellipsis; }
.pcard .ca-mini:hover { color: var(--ink-2); }
.pcard .body { grid-area: body; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.pcard .l1 { display: flex; align-items: center; gap: 7px; min-width: 0; height: 20px; }
.pcard .l1 b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.pcard .l1 .nm { color: var(--ink-4); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pcard .l1 .cp { flex: none; width: 16px; height: 16px; color: var(--ink-4); cursor: pointer; background: none; border: 0; padding: 0; display: inline-grid; place-items: center; }
.pcard .l1 .cp:hover { color: var(--ink); }
.pcard .l1 .cp svg { width: 12px; height: 12px; }
.pcard .l2 { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); min-width: 0; height: 22px; overflow: hidden; flex-wrap: wrap; }
.pcard .l2 > * { flex: none; }
.pcard .age { font-weight: 600; color: var(--up); font-variant-numeric: tabular-nums; }
.pcard .age.old { color: var(--ink-3); }
.pcard .ic { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-4); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pcard .ic b { color: var(--ink-2); font-weight: 500; }
.pcard .ic svg { width: 12px; height: 12px; }
.pcard a.ic { transition: color 0.15s; }
.pcard a.ic:hover { color: var(--ink); }
/* pills: one row; a pill that does not fit wraps onto a hidden second row instead of being squeezed */
.pcard .l3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; height: 22px; overflow: hidden; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; padding: 0 7px; line-height: 18px; border-radius: 5px; background: var(--muted); border: 1px solid var(--line); color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill svg { width: 10px; height: 10px; flex: none; }
.pill.good { color: var(--up); border-color: rgba(34, 197, 94, 0.25); }
.pill.bad { color: #f87171; border-color: rgba(239, 68, 68, 0.25); }
.pill.x { color: #c7d2fe; background: var(--accent-soft); border-color: rgba(91, 124, 255, 0.3); }
.pcard .side { grid-area: side; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; }
.pcard .vm { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pcard .vm small { font-size: 10.5px; color: var(--ink-4); font-weight: 500; margin-right: 3px; }
.pcard .vm .mc { order: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.pcard .vm .v { order: 2; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.pcard .lt { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-4); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pcard .lt b { color: var(--ink-3); font-weight: 500; }
.bs { width: 36px; height: 3px; border-radius: 2px; background: var(--down); overflow: hidden; display: inline-block; opacity: 0.85; }
.bs i { display: block; height: 100%; background: var(--up); }
.pcard .buys { grid-area: buys; display: flex; justify-content: flex-end; gap: 6px; min-width: 0; }
.tradebtn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 28px; padding: 0 12px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--muted); border: 1px solid var(--line-2); transition: background 0.15s, color 0.15s; white-space: nowrap; }
.tradebtn:hover { background: var(--muted-2); color: var(--ink); }
.tradebtn svg { width: 12px; height: 12px; }
.tradebtn.main { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.tradebtn.main:hover { background: #6d8bff; }
.pcard.hit-buy { animation: hitBuy 1s var(--ease); }
.pcard.hit-sell { animation: hitSell 1s var(--ease); }
@keyframes hitBuy { 0% { background: var(--up-soft); box-shadow: inset 2px 0 0 var(--up); } }
@keyframes hitSell { 0% { background: var(--down-soft); box-shadow: inset 2px 0 0 var(--down); } }
.pcard.fresh { animation: freshIn 0.4s var(--ease), freshGlow 2s var(--ease); }
@keyframes freshIn { from { opacity: 0; transform: translateY(-6px); } }
@keyframes freshGlow { 0% { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); } }

/* narrow columns (container query): smaller avatar, the market block moves under the stats */
@container (max-width: 340px) {
  .pcard { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "pic body" "pic side" "buys buys"; }
  .pcard .avatar { width: 44px; height: 44px; }
  .pcard .avatar .img { font-size: 14px; border-radius: 9px; }
  .pcard .ca-mini { display: none; }
  .pcard .side { flex-direction: row; align-items: center; justify-content: space-between; }
  .pcard .vm { flex-direction: row; align-items: baseline; gap: 10px; }
  .pcard .vm .mc { order: 0; }
  .pcard .buys .tradebtn { flex: 1; }
}

/* one column at a time below 1400 px, chosen with tabs */
@media (max-width: 1400px) {
  .pulse-tabs { display: block; }
  .pulse { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 168px); }
  .pulse .pcol { display: none; }
  .pulse[data-active="jobs"] .pcol[data-col="jobs"], .pulse[data-active="imd"] .pcol[data-col="imd"], .pulse[data-active="pairs"] .pcol[data-col="pairs"], .pulse[data-active="future"] .pcol[data-col="future"] { display: flex; }
  .pcol-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "search sort"; }
  .pcol-head h2 { display: none; }
  .pcol-head .input { height: 32px; }
}
@media (max-width: 560px) {
  .mini-stats { display: none; }
  .pulse-head h1 span { display: none; }
  .pulse { height: calc(100vh - 150px); }
  .pcol-head { grid-template-areas: "search" "sort"; grid-template-columns: minmax(0, 1fr); }
  .sortbar button { flex: 1; }
  .pulse-tabs .seg { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .pulse-tabs .seg button { padding: 6px 8px; font-size: 12.5px; }
}

/* ---------- build complexity ---------- */
.cxbars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 9px; flex: none; }
.cxbars b { width: 2px; border-radius: 1px; background: currentColor; opacity: 0.25; }
.cxbars b:nth-child(1) { height: 3px; } .cxbars b:nth-child(2) { height: 4.5px; } .cxbars b:nth-child(3) { height: 6px; }
.cxbars b:nth-child(4) { height: 7.5px; } .cxbars b:nth-child(5) { height: 9px; }
.cxbars b.on { opacity: 1; }
.pill.cx { gap: 5px; }
.pill.cx.l1 { color: var(--ink-3); }
.pill.cx.l2 { color: #5eead4; border-color: rgba(94, 234, 212, 0.25); }
.pill.cx.l3 { color: #93c5fd; border-color: rgba(147, 197, 253, 0.28); }
.pill.cx.l4 { color: #c4b5fd; border-color: rgba(196, 181, 253, 0.3); }
.pill.cx.l5 { color: #fcd34d; border-color: rgba(252, 211, 77, 0.32); background: rgba(245, 158, 11, 0.08); }
.cxpanel { margin-top: 16px; }
.cxhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cxlevel { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; letter-spacing: -0.02em; }
.cxlevel .cxbars { height: 14px; gap: 2px; }
.cxlevel .cxbars b { width: 3.5px; }
.cxlevel .cxbars b:nth-child(1) { height: 4px; } .cxlevel .cxbars b:nth-child(2) { height: 7px; } .cxlevel .cxbars b:nth-child(3) { height: 9.5px; }
.cxlevel .cxbars b:nth-child(4) { height: 12px; } .cxlevel .cxbars b:nth-child(5) { height: 14px; }
.cxlevel.l1 { color: var(--ink-3); } .cxlevel.l2 { color: #5eead4; } .cxlevel.l3 { color: #93c5fd; } .cxlevel.l4 { color: #c4b5fd; } .cxlevel.l5 { color: #fcd34d; }
.cxlevel b { color: var(--ink); font-weight: 600; }
.cxscore { text-align: right; line-height: 1.1; }
.cxscore b { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cxscore span { display: block; font-size: 11.5px; color: var(--ink-4); }
.cxmeter { height: 4px; border-radius: 2px; background: var(--muted-2); overflow: hidden; margin: 12px 0 10px; }
.cxmeter i { display: block; height: 100%; border-radius: 2px; background: var(--ink-2); transition: width 0.8s var(--ease); }
.cxcalc { width: 100%; border-collapse: collapse; font-size: 13px; }
.cxcalc td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-3); }
.cxcalc td.v { text-align: right; padding: 6px 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cxcalc td.p { text-align: right; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cxcalc tr.tot td { font-weight: 600; color: var(--ink); border-top: 1px solid var(--line-2); }
.cxscale { font-size: 11.5px; margin: 10px 0 0; color: var(--ink-4); }
.cxagents { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.cxagents .faces { display: flex; flex-wrap: wrap; gap: 4px; }
.cxagents .faces .agent-img { width: 24px; height: 24px; transition: transform 0.15s; }
.cxagents .faces a:hover .agent-img { transform: translateY(-1px); }

/* ---------- Future tickers (not trading yet; the card opens the job) ---------- */
.fcard { grid-template-areas: "pic body side" "pic buys buys"; }
.fcard .ttl2 { font-size: 12px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 18px; }
.fcard .l2 .state { font-size: 11px; line-height: 18px; padding: 0 7px; }
.fcard .soon { font-size: 10.5px; font-weight: 500; color: var(--ink-3); padding: 0 6px; line-height: 18px; border-radius: 5px; border: 1px dashed var(--line-2); white-space: nowrap; }
@container (max-width: 340px) {
  .fcard .side { justify-content: flex-start; }
}

/* avatar ring = token type, same colors as the bot's alerts: 🟡 job · 🟣 IMD launch · 🟢 $IMD pair */
.avatar { --kind: transparent; }
.avatar.k-job, .avatar.k-future { --kind: #facc15; }
.avatar.k-launch { --kind: #a855f7; }
.avatar.k-pair { --kind: #22c55e; }
.avatar[class*="k-"] .img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4.5px var(--kind); }
.avatar.k-future .img { box-shadow: 0 0 0 2px var(--bg); outline: 2.5px dashed var(--kind); outline-offset: 2px; }
.avatar.lg[class*="k-"] .img { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 5.5px var(--kind); }
.palette .avatar[class*="k-"] .img { box-shadow: 0 0 0 1.5px var(--bg), 0 0 0 3px var(--kind); }

/* FOMO = highlighted buy option on the token page */
.linkrow.featured { background: var(--accent); color: #fff; font-weight: 600; }
.linkrow.featured:hover { background: #6d8bff; color: #fff; }
.linkrow.featured .li { background: rgba(255, 255, 255, 0.16); border-color: transparent; color: #fff; }
.linkrow.featured .ext { opacity: 0.8; }
.thead .price .buy-cta { margin-top: 10px; height: 34px; padding: 0 16px; font-size: 13px; }
.thead .price .buy-cta svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .thead .price .buy-cta { width: 100%; } }

/* token page: trades pager (15 per page) */
.tpager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12.5px; }
.tpager[hidden] { display: none; }
.tpager b { color: var(--ink); font-weight: 600; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.4; cursor: default; pointer-events: none; }

/* token page: holders rank + pager */
.holder .hrow { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.holder .rank { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; min-width: 30px; }
#hpager .btn.sm { padding: 0 10px; }

/* ---------- footer: one compact row (brand · dev · links) + one legal line ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 16px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--ink-4); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.foot-brand { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.foot-brand img { width: 20px; height: 20px; object-fit: contain; }
.foot-brand b { color: var(--ink-2); font-weight: 600; }
.foot-brand b span { color: var(--ink-3); font-weight: 500; }
.foot-brand .sep { color: var(--ink-4); }
.site-footer a { color: var(--ink-3); transition: color 0.15s; }
.site-footer a:hover { color: var(--ink); }
.foot-links { display: inline-flex; align-items: center; gap: 14px; }
.foot-links a { display: inline-flex; align-items: center; gap: 5px; }
.foot-links svg { width: 11px; height: 11px; }
.foot-legal { margin: 6px auto 0; font-size: 11px; line-height: 1.5; color: var(--ink-4); }
/* Pulse fills the screen; its footer starts right below the columns */
main.wrap.wide + .site-footer { margin-top: 0; }
.login-foot { margin: 18px 0 0; font-size: 12px; color: var(--ink-4); text-align: center; }
.login-foot a { color: var(--ink-3); }
.login-foot a:hover { color: var(--ink); }

/* ---------- token page: rows that line up (chart | market, trades | holders, then three equal info cards) ---------- */
.tp { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "chart market" "trades holders" "info info"; align-items: stretch; }
.tp > *, .tp-info > * { min-width: 0; }
.tp > .panel + .panel, .tp-info > .panel + .panel, .tp-info .cxpanel { margin-top: 0; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; margin-bottom: 12px; }
.tp-head h3 { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.tp-head h3 .muted { font-weight: 500; }
.tp-src { font-size: 12px; }
.tp-chart { grid-area: chart; display: flex; flex-direction: column; padding: 12px 12px 8px; }
.tp-chart .chartbar { margin: 0 0 10px; }
.tp-chart .chart { flex: 1 1 0; height: auto; min-height: 460px; } /* height from the row (or min-height), never from the canvas */
.tp-market { grid-area: market; display: flex; flex-direction: column; }
.tp-market .kv { flex: 1 1 auto; grid-auto-rows: 1fr; } /* cells share the card height evenly */
.tp-market .kv .cell { display: flex; flex-direction: column; justify-content: center; }
.tp-trade { margin-top: auto; padding-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tp-trade .tradebtn { height: 36px; font-size: 13px; padding: 0 8px; }
.tp-trades { grid-area: trades; display: flex; flex-direction: column; }
.tp-holders { grid-area: holders; display: flex; flex-direction: column; }
.tp-holderlist { flex: 1 1 auto; }
.tp-trades .tpager, .tp-holders .tpager { margin-top: auto; padding-top: 14px; }
.tp-info { grid-area: info; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }
#cxbox { display: contents; }
.tp-info .linkrow .lt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-info .linkrow .state { margin-left: auto; font-size: 11px; line-height: 18px; padding: 0 7px; }
.chart-note { position: absolute; top: 10px; left: 12px; z-index: 3; pointer-events: none; font-size: 12px; color: var(--ink-3); background: rgba(9, 9, 11, 0.7); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
@media (max-width: 1180px) {
  .tp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "chart" "market" "trades" "holders" "info"; }
  .tp-chart .chart { min-height: 380px; }
}
@media (max-width: 700px) {
  .tp-chart .chart { min-height: 300px; }
  .tp-trade .tradebtn { height: 34px; }
}

/* ---------- a token that just appeared: glows in its type color for 3 minutes (shadows only, no gradients) ---------- */
.pcard.is-new {
  --glow: #facc15;
  margin: 6px 8px;
  border-radius: 10px;
  border-bottom-color: transparent;
  background: color-mix(in srgb, var(--glow) 7%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 75%, transparent), inset 0 0 22px -6px color-mix(in srgb, var(--glow) 50%, transparent), 0 0 16px -2px color-mix(in srgb, var(--glow) 55%, transparent);
  animation: newGlowPulse 2.4s ease-in-out infinite;
}
.pcard.is-new.glow-launch { --glow: #a855f7; }
.pcard.is-new.glow-pair { --glow: #22c55e; }
.pcard.is-new.glow-job, .pcard.is-new.glow-future { --glow: #facc15; }
.pcard.is-new.fresh { animation: freshIn 0.4s var(--ease), newGlowPulse 2.4s ease-in-out 0.4s infinite; }
.pcard.is-new:hover { background: color-mix(in srgb, var(--glow) 11%, transparent); }
@keyframes newGlowPulse {
  50% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 45%, transparent), inset 0 0 12px -8px color-mix(in srgb, var(--glow) 35%, transparent), 0 0 8px -4px color-mix(in srgb, var(--glow) 35%, transparent); }
}
